diff options
Diffstat (limited to 'include/llvm/Transforms/Scalar/GVN.h')
-rw-r--r-- | include/llvm/Transforms/Scalar/GVN.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Scalar/GVN.h b/include/llvm/Transforms/Scalar/GVN.h index 9fe00a9e7f2d..8a64768af6b5 100644 --- a/include/llvm/Transforms/Scalar/GVN.h +++ b/include/llvm/Transforms/Scalar/GVN.h @@ -120,6 +120,8 @@ public: uint32_t lookupOrAddCall(CallInst *C); uint32_t phiTranslateImpl(const BasicBlock *BB, const BasicBlock *PhiBlock, uint32_t Num, GVN &Gvn); + bool areCallValsEqual(uint32_t Num, uint32_t NewNum, const BasicBlock *Pred, + const BasicBlock *PhiBlock, GVN &Gvn); std::pair<uint32_t, bool> assignExpNewValueNum(Expression &exp); bool areAllValsInBB(uint32_t num, const BasicBlock *BB, GVN &Gvn); @@ -159,6 +161,7 @@ private: SetVector<BasicBlock *> DeadBlocks; OptimizationRemarkEmitter *ORE; ImplicitControlFlowTracking *ICF; + LoopInfo *LI; ValueTable VN; @@ -175,7 +178,7 @@ private: // Block-local map of equivalent values to their leader, does not // propagate to any successors. Entries added mid-block are applied // to the remaining instructions in the block. - SmallMapVector<Value *, Constant *, 4> ReplaceWithConstMap; + SmallMapVector<Value *, Value *, 4> ReplaceOperandsWithMap; SmallVector<Instruction *, 8> InstrsToErase; // Map the block to reversed postorder traversal number. It is used to @@ -280,7 +283,7 @@ private: void verifyRemoved(const Instruction *I) const; bool splitCriticalEdges(); BasicBlock *splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ); - bool replaceOperandsWithConsts(Instruction *I) const; + bool replaceOperandsForInBlockEquality(Instruction *I) const; bool propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root, bool DominatesByEdge); bool processFoldableCondBr(BranchInst *BI); |