Go to the documentation of this file.
13 #ifndef LLVM_TRANSFORMS_UTILS_SSAUPDATER_H
14 #define LLVM_TRANSFORMS_UTILS_SSAUPDATER_H
26 template <
typename T>
class SmallVectorImpl;
27 template <
typename T>
class SSAUpdaterTraits;
47 Type *ProtoType =
nullptr;
50 std::string ProtoName;
180 #endif // LLVM_TRANSFORMS_UTILS_SSAUPDATER_H
void Initialize(Type *Ty, StringRef Name)
Reset this object to get ready for a new set of SSA updates with type 'Ty'.
This is an optimization pass for GlobalISel generic memory operations.
SSAUpdater(SmallVectorImpl< PHINode * > *InsertedPHIs=nullptr)
If InsertedPHIs is specified, it will be filled in with all PHI Nodes created by rewriting.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Basic Block Representation.
void RewriteUseAfterInsertions(Use &U)
Rewrite a use like RewriteUse but handling in-block definitions.
Value * GetValueInMiddleOfBlock(BasicBlock *BB)
Construct SSA form, materializing a value that is live in the middle of the specified block.
@ BasicBlock
Various leaf nodes.
SSAUpdater & operator=(const SSAUpdater &)=delete
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
Value * GetValueAtEndOfBlock(BasicBlock *BB)
Construct SSA form, materializing a value that is live at the end of the specified block.
Value * FindValueForBlock(BasicBlock *BB) const
Return the value for the specified block if the SSAUpdater has one, otherwise return nullptr.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
An instruction for reading from memory.
bool HasValueForBlock(BasicBlock *BB) const
Return true if the SSAUpdater already has a value for the specified block.
void RewriteUse(Use &U)
Rewrite a use of the symbolic value.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
void AddAvailableValue(BasicBlock *BB, Value *V)
Indicate that a rewritten value is available in the specified block with the specified value.
Helper class for SSA formation on a set of values defined in multiple blocks.
LLVM Value Representation.
A Use represents the edge between a Value definition and its users.