From: Rafael Espindola Date: Tue, 25 Feb 2014 14:24:11 +0000 (+0000) Subject: Make a few more DataLayout variables const. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=37ecf69cbf5da240079a6b55967231bf2fc6e6c0 Make a few more DataLayout variables const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202155 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index d518cc3de23..65a821b2a9a 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -606,7 +606,7 @@ private: FnSetType FnSet; /// DataLayout for more accurate GEP comparisons. May be NULL. - DataLayout *DL; + const DataLayout *DL; /// Whether or not the target supports global aliases. bool HasGlobalAliases; diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index 8e3ec815e82..68d64e71ecd 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -344,7 +344,7 @@ public: typedef SmallPtrSet ValueSet; typedef SmallVector StoreList; - BoUpSLP(Function *Func, ScalarEvolution *Se, DataLayout *Dl, + BoUpSLP(Function *Func, ScalarEvolution *Se, const DataLayout *Dl, TargetTransformInfo *Tti, AliasAnalysis *Aa, LoopInfo *Li, DominatorTree *Dt) : F(Func), SE(Se), DL(Dl), TTI(Tti), AA(Aa), LI(Li), DT(Dt), @@ -533,7 +533,7 @@ private: // Analysis and block reference. Function *F; ScalarEvolution *SE; - DataLayout *DL; + const DataLayout *DL; TargetTransformInfo *TTI; AliasAnalysis *AA; LoopInfo *LI; @@ -1784,7 +1784,7 @@ struct SLPVectorizer : public FunctionPass { } ScalarEvolution *SE; - DataLayout *DL; + const DataLayout *DL; TargetTransformInfo *TTI; AliasAnalysis *AA; LoopInfo *LI; @@ -2234,7 +2234,7 @@ public: /// \brief Try to find a reduction tree. bool matchAssociativeReduction(PHINode *Phi, BinaryOperator *B, - DataLayout *DL) { + const DataLayout *DL) { assert((!Phi || std::find(Phi->op_begin(), Phi->op_end(), B) != Phi->op_end()) && "Thi phi needs to use the binary operator");