projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update SetVector to rely on the underlying set's insert to return a pair<iterator...
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
ConstantHoisting.cpp
diff --git
a/lib/Transforms/Scalar/ConstantHoisting.cpp
b/lib/Transforms/Scalar/ConstantHoisting.cpp
index af0450729a724314f59462cd2ed77659f2d589f3..27c177a542e31597f62fce8bd9b6ee6c29039f8b 100644
(file)
--- 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 "llvm/IR/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
+#include <tuple>
using namespace llvm;
using namespace llvm;
@@
-90,7
+91,7
@@
struct RebasedConstantInfo {
Constant *Offset;
RebasedConstantInfo(ConstantUseListType &&Uses, Constant *Offset)
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.
};
/// \brief A base constant and all its rebased constants.
@@
-118,7
+119,8
@@
class ConstantHoisting : public FunctionPass {
SmallVector<ConstantInfo, 8> ConstantVec;
public:
static char ID; // Pass identification, replacement for typeid
SmallVector<ConstantInfo, 8> 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());
}
initializeConstantHoistingPass(*PassRegistry::getPassRegistry());
}
@@
-393,7
+395,7
@@
void ConstantHoisting::findAndMakeBaseConstant(ConstCandVecType::iterator S,
ConstInfo.RebasedConstants.push_back(
RebasedConstantInfo(std::move(ConstCand->Uses), Offset));
}
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
}
/// \brief Finds and combines constant candidates that can be easily