LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::ClonedCodeInfo Struct Reference

This struct can be used to capture information about code being cloned, while it is being cloned. More...

#include "llvm/Transforms/Utils/Cloning.h"

Collaboration diagram for llvm::ClonedCodeInfo:
Collaboration graph
[legend]

Public Member Functions

 ClonedCodeInfo ()=default
 
bool isSimplified (const Value *From, const Value *To) const
 

Public Attributes

bool ContainsCalls = false
 This is set to true if the cloned code contains a normal call instruction. More...
 
bool ContainsDynamicAllocas = false
 This is set to true if the cloned code contains a 'dynamic' alloca. More...
 
std::vector< WeakTrackingVHOperandBundleCallSites
 All cloned call sites that have operand bundles attached are appended to this vector. More...
 
DenseMap< const Value *, const Value * > OrigVMap
 Like VMap, but maps only unsimplified instructions. More...
 

Detailed Description

This struct can be used to capture information about code being cloned, while it is being cloned.

Definition at line 64 of file Cloning.h.

Constructor & Destructor Documentation

◆ ClonedCodeInfo()

llvm::ClonedCodeInfo::ClonedCodeInfo ( )
default

Member Function Documentation

◆ isSimplified()

bool llvm::ClonedCodeInfo::isSimplified ( const Value From,
const Value To 
) const
inline

Definition at line 85 of file Cloning.h.

References From, and OrigVMap.

Referenced by AddAliasScopeMetadata().

Member Data Documentation

◆ ContainsCalls

bool llvm::ClonedCodeInfo::ContainsCalls = false

This is set to true if the cloned code contains a normal call instruction.

Definition at line 66 of file Cloning.h.

Referenced by llvm::CloneBasicBlock(), HandleInlinedEHPad(), HandleInlinedLandingPad(), and llvm::InlineFunction().

◆ ContainsDynamicAllocas

bool llvm::ClonedCodeInfo::ContainsDynamicAllocas = false

This is set to true if the cloned code contains a 'dynamic' alloca.

Dynamic allocas are allocas that are either not in the entry block or they are in the entry block but are not a constant size.

Definition at line 71 of file Cloning.h.

Referenced by llvm::CloneBasicBlock(), and llvm::InlineFunction().

◆ OperandBundleCallSites

std::vector<WeakTrackingVH> llvm::ClonedCodeInfo::OperandBundleCallSites

All cloned call sites that have operand bundles attached are appended to this vector.

This vector may contain nulls or undefs if some of the originally inserted callsites were DCE'ed after they were cloned.

Definition at line 76 of file Cloning.h.

Referenced by llvm::InlineFunction().

◆ OrigVMap

DenseMap<const Value *, const Value *> llvm::ClonedCodeInfo::OrigVMap

Like VMap, but maps only unsimplified instructions.

Values in the map may be dangling, it is only intended to be used via isSimplified(), to check whether the main VMap mapping involves simplification or not.

Definition at line 81 of file Cloning.h.

Referenced by isSimplified().


The documentation for this struct was generated from the following file: