X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTransforms%2FScalar%2FConstantHoisting.cpp;h=27c177a542e31597f62fce8bd9b6ee6c29039f8b;hb=5401ba7099b9f3cd32b3399276b549bea15e5d1e;hp=af0450729a724314f59462cd2ed77659f2d589f3;hpb=b95412cc24e99a72ee3efc05a14995bb508f3a23;p=oota-llvm.git diff --git a/lib/Transforms/Scalar/ConstantHoisting.cpp b/lib/Transforms/Scalar/ConstantHoisting.cpp index af0450729a7..27c177a542e 100644 --- a/lib/Transforms/Scalar/ConstantHoisting.cpp +++ b/lib/Transforms/Scalar/ConstantHoisting.cpp @@ -43,6 +43,7 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/Pass.h" #include "llvm/Support/Debug.h" +#include using namespace llvm; @@ -90,7 +91,7 @@ struct RebasedConstantInfo { Constant *Offset; RebasedConstantInfo(ConstantUseListType &&Uses, Constant *Offset) - : Uses(Uses), Offset(Offset) { } + : Uses(std::move(Uses)), Offset(Offset) { } }; /// \brief A base constant and all its rebased constants. @@ -118,7 +119,8 @@ class ConstantHoisting : public FunctionPass { SmallVector ConstantVec; public: static char ID; // Pass identification, replacement for typeid - ConstantHoisting() : FunctionPass(ID), TTI(0), DT(0), Entry(0) { + ConstantHoisting() : FunctionPass(ID), TTI(nullptr), DT(nullptr), + Entry(nullptr) { initializeConstantHoistingPass(*PassRegistry::getPassRegistry()); } @@ -393,7 +395,7 @@ void ConstantHoisting::findAndMakeBaseConstant(ConstCandVecType::iterator S, ConstInfo.RebasedConstants.push_back( RebasedConstantInfo(std::move(ConstCand->Uses), Offset)); } - ConstantVec.push_back(ConstInfo); + ConstantVec.push_back(std::move(ConstInfo)); } /// \brief Finds and combines constant candidates that can be easily