diff options
Diffstat (limited to 'include/llvm/Transforms/Scalar/ConstantHoisting.h')
-rw-r--r-- | include/llvm/Transforms/Scalar/ConstantHoisting.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Transforms/Scalar/ConstantHoisting.h b/include/llvm/Transforms/Scalar/ConstantHoisting.h index 6b0fc9c1dd07..39039b093241 100644 --- a/include/llvm/Transforms/Scalar/ConstantHoisting.h +++ b/include/llvm/Transforms/Scalar/ConstantHoisting.h @@ -37,7 +37,9 @@ #define LLVM_TRANSFORMS_SCALAR_CONSTANTHOISTING_H #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/MapVector.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/IR/PassManager.h" @@ -154,21 +156,21 @@ private: /// Keeps track of constant candidates found in the function. using ConstCandVecType = std::vector<consthoist::ConstantCandidate>; - using GVCandVecMapType = DenseMap<GlobalVariable *, ConstCandVecType>; + using GVCandVecMapType = MapVector<GlobalVariable *, ConstCandVecType>; ConstCandVecType ConstIntCandVec; GVCandVecMapType ConstGEPCandMap; /// These are the final constants we decided to hoist. using ConstInfoVecType = SmallVector<consthoist::ConstantInfo, 8>; - using GVInfoVecMapType = DenseMap<GlobalVariable *, ConstInfoVecType>; + using GVInfoVecMapType = MapVector<GlobalVariable *, ConstInfoVecType>; ConstInfoVecType ConstIntInfoVec; GVInfoVecMapType ConstGEPInfoMap; /// Keep track of cast instructions we already cloned. - SmallDenseMap<Instruction *, Instruction *> ClonedCastMap; + MapVector<Instruction *, Instruction *> ClonedCastMap; Instruction *findMatInsertPt(Instruction *Inst, unsigned Idx = ~0U) const; - SmallPtrSet<Instruction *, 8> + SetVector<Instruction *> findConstantInsertionPoint(const consthoist::ConstantInfo &ConstInfo) const; void collectConstantCandidates(ConstCandMapType &ConstCandMap, Instruction *Inst, unsigned Idx, |