[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Thu Feb 23 19:22:19 PST 2006
Changes in directory llvm-poolalloc/lib/PoolAllocate:
PointerCompress.cpp updated: 1.66 -> 1.67
---
Log message:
fix llvm-poolalloc/Regressions/2006-02-23.memcpy.ll
---
Diffs of the changes: (+23 -0)
PointerCompress.cpp | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+)
Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.66 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.67
--- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.66 Mon Feb 20 16:03:14 2006
+++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Thu Feb 23 21:22:07 2006
@@ -944,6 +944,29 @@
CI.setOperand(1, SrcPtr);
return;
}
+ } else if (Callee->getName() == "llvm.memcpy") {
+ bool doret = false;
+ if (const CompressedPoolInfo *DestPI = getPoolInfo(CI.getOperand(1))) {
+ std::vector<Value*> Ops;
+ Ops.push_back(getTransformedValue(CI.getOperand(1)));
+ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI);
+ Value *SrcPtr = new GetElementPtrInst(BasePtr, Ops,
+ CI.getOperand(1)->getName()+".pp", &CI);
+ SrcPtr = new CastInst(SrcPtr, CI.getOperand(1)->getType(), "", &CI);
+ CI.setOperand(1, SrcPtr);
+ doret = true;
+ }
+ if (const CompressedPoolInfo *DestPI = getPoolInfo(CI.getOperand(2))) {
+ std::vector<Value*> Ops;
+ Ops.push_back(getTransformedValue(CI.getOperand(2)));
+ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI);
+ Value *SrcPtr = new GetElementPtrInst(BasePtr, Ops,
+ CI.getOperand(2)->getName()+".pp", &CI);
+ SrcPtr = new CastInst(SrcPtr, CI.getOperand(2)->getType(), "", &CI);
+ CI.setOperand(2, SrcPtr);
+ doret = true;
+ }
+ if (doret) return;
}
More information about the llvm-commits
mailing list