summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-09 07:08:01 +0000
committerChris Lattner <sabre@nondot.org>2009-12-09 07:08:01 +0000
commite18b97121c286eeff5efe89150b093bf1b7b7bfc (patch)
tree2618633963fd3849ec0924a34244dcbdaca0a89e /lib/Transforms/Scalar/GVN.cpp
parent6194569d22003fddaf1a33acdbb84d5efe76e7d7 (diff)
downloadllvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.gz
llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.bz2
llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.xz
change NonLocalDepEntry from being a typedef for an std::pair to be its
own small class. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 51eedbc24c..00dbe2df0a 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -491,21 +491,21 @@ uint32_t ValueTable::lookup_or_add_call(CallInst* C) {
// Check to see if we have a single dominating call instruction that is
// identical to C.
for (unsigned i = 0, e = deps.size(); i != e; ++i) {
- const MemoryDependenceAnalysis::NonLocalDepEntry *I = &deps[i];
+ const NonLocalDepEntry *I = &deps[i];
// Ignore non-local dependencies.
- if (I->second.isNonLocal())
+ if (I->getResult().isNonLocal())
continue;
// We don't handle non-depedencies. If we already have a call, reject
// instruction dependencies.
- if (I->second.isClobber() || cdep != 0) {
+ if (I->getResult().isClobber() || cdep != 0) {
cdep = 0;
break;
}
- CallInst *NonLocalDepCall = dyn_cast<CallInst>(I->second.getInst());
+ CallInst *NonLocalDepCall = dyn_cast<CallInst>(I->getResult().getInst());
// FIXME: All duplicated with non-local case.
- if (NonLocalDepCall && DT->properlyDominates(I->first, C->getParent())){
+ if (NonLocalDepCall && DT->properlyDominates(I->getBB(), C->getParent())){
cdep = NonLocalDepCall;
continue;
}
@@ -1344,7 +1344,7 @@ static bool isLifetimeStart(Instruction *Inst) {
bool GVN::processNonLocalLoad(LoadInst *LI,
SmallVectorImpl<Instruction*> &toErase) {
// Find the non-local dependencies of the load.
- SmallVector<MemoryDependenceAnalysis::NonLocalDepEntry, 64> Deps;
+ SmallVector<NonLocalDepEntry, 64> Deps;
MD->getNonLocalPointerDependency(LI->getOperand(0), true, LI->getParent(),
Deps);
//DEBUG(errs() << "INVESTIGATING NONLOCAL LOAD: "
@@ -1358,11 +1358,11 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
// If we had a phi translation failure, we'll have a single entry which is a
// clobber in the current block. Reject this early.
- if (Deps.size() == 1 && Deps[0].second.isClobber()) {
+ if (Deps.size() == 1 && Deps[0].getResult().isClobber()) {
DEBUG(
errs() << "GVN: non-local load ";
WriteAsOperand(errs(), LI);
- errs() << " is clobbered by " << *Deps[0].second.getInst() << '\n';
+ errs() << " is clobbered by " << *Deps[0].getResult().getInst() << '\n';
);
return false;
}
@@ -1377,8 +1377,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
const TargetData *TD = 0;
for (unsigned i = 0, e = Deps.size(); i != e; ++i) {
- BasicBlock *DepBB = Deps[i].first;
- MemDepResult DepInfo = Deps[i].second;
+ BasicBlock *DepBB = Deps[i].getBB();
+ MemDepResult DepInfo = Deps[i].getResult();
if (DepInfo.isClobber()) {
// If the dependence is to a store that writes to a superset of the bits