15#ifndef LLVM_TRANSFORMS_SCALAR_GVNVALUETABLE_H
16#define LLVM_TRANSFORMS_SCALAR_GVNVALUETABLE_H
54 std::vector<Expression> Expressions;
55 std::vector<uint32_t> ExprIdx;
65 using PhiTranslateMap =
67 PhiTranslateMap PhiTranslateTable;
71 bool IsMDEnabled =
false;
73 bool IsMSSAEnabled =
false;
89 std::pair<uint32_t, bool> assignExpNewValueNum(
Expression &Exp);
120 IsMDEnabled = MDEnabled;
124 IsMSSAEnabled = MSSAEnabled;
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
This file defines the DenseMap class.
ppc ctr loops PowerPC CTR Loops Verify
LLVM Basic Block Representation.
This class represents a function call, abstracting a target machine's calling convention.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
A mapping from value numbers to lists of Value*'s that have that value number.
LLVM_ABI uint32_t lookupOrAddCmp(unsigned Opcode, CmpInst::Predicate Pred, Value *LHS, Value *RHS)
Returns the value number of the given comparison, assigning it a new number if it did not have one be...
LLVM_ABI void erase(Value *V)
Remove a value from the value numbering.
LLVM_ABI uint32_t lookup(Value *V, bool Verify=true) const
Returns the value number of the specified value.
LLVM_ABI void add(Value *V, uint32_t Num)
add - Insert a value into the table with a specified value number.
LLVM_ABI void eraseTranslateCacheEntry(uint32_t Num, const BasicBlock &CurrBlock)
Erase stale entry from phiTranslate cache so phiTranslate can be computed again.
LLVM_ABI void verifyRemoved(const Value *) const
verifyRemoved - Verify that the value is removed from all internal data structures.
void setAliasAnalysis(AAResults *A)
LLVM_ABI uint32_t phiTranslate(const BasicBlock *BB, const BasicBlock *PhiBlock, uint32_t Num, GVNLeaderMap &LeaderTable)
Wrap phiTranslateImpl to provide caching functionality.
LLVM_ABI GVNValueTable(const GVNValueTable &Arg)
AAResults * getAliasAnalysis() const
LLVM_ABI uint32_t lookupOrAdd(MemoryAccess *MA)
void setMemDep(MemoryDependenceResults *M, bool MDEnabled=true)
LLVM_ABI void clear()
Remove all entries from the ValueTable.
LLVM_ABI bool exists(Value *V) const
Returns true if a value number exists for the specified value.
LLVM_ABI GVNValueTable(GVNValueTable &&Arg)
uint32_t getNextUnusedValueNumber()
LLVM_ABI GVNValueTable & operator=(const GVNValueTable &Arg)
LLVM_ABI uint32_t lookupPtrToInt(Value *Ptr, Type *Ty)
Returns the value number of ptrtoint Ptr to \Ty.
void setDomTree(DominatorTree *D)
LLVM_ABI ~GVNValueTable()
void setMemorySSA(MemorySSA *M, bool MSSAEnabled=false)
an instruction for type-safe pointer arithmetic to access elements of arrays and structs
Provides a lazy, caching interface for making common memory aliasing information queries,...
Encapsulates MemorySSA, including all data associated with memory accesses.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.