summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-31 20:28:14 +0000
committerOwen Anderson <resistor@mac.com>2009-07-31 20:28:14 +0000
commit5a1acd99126d8b867aef4a785aae635fb98b6c08 (patch)
tree4a7049e4b83ac61c1b374bbb168e359ff4d5268a /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
parentef3ef7f645cd4f070e426ed781f0104bcffb45d7 (diff)
downloadbcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.tar.gz
bcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.zip
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 4e8bc4b3bbb..cae70cdd461 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -560,8 +560,6 @@ static bool IsNonLocalValue(Value *V, BasicBlock *BB) {
bool CodeGenPrepare::OptimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
const Type *AccessTy,
DenseMap<Value*,Value*> &SunkAddrs) {
- LLVMContext &Context = MemoryInst->getContext();
-
// Figure out what addressing mode will be built up for this operation.
SmallVector<Instruction*, 16> AddrModeInsts;
ExtAddrMode AddrMode = AddressingModeMatcher::Match(Addr, AccessTy,MemoryInst,
@@ -658,7 +656,7 @@ bool CodeGenPrepare::OptimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
}
if (Result == 0)
- SunkAddr = Context.getNullValue(Addr->getType());
+ SunkAddr = Constant::getNullValue(Addr->getType());
else
SunkAddr = new IntToPtrInst(Result, Addr->getType(), "sunkaddr",InsertPt);
}
OpenPOWER on IntegriCloud