[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Thu Feb 23 19:34:41 PST 2006
Changes in directory llvm-poolalloc/lib/PoolAllocate:
PointerCompress.cpp updated: 1.67 -> 1.68
---
Log message:
read can't handle compressed pointers either. ah the joys of making spec work
---
Diffs of the changes: (+11 -0)
PointerCompress.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.67 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.68
--- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.67 Thu Feb 23 21:22:07 2006
+++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Thu Feb 23 21:34:29 2006
@@ -933,6 +933,17 @@
getPoolInfo(CI.getOperand(i)))
CI.setOperand(i, getTransformedValue(CI.getOperand(i)));
return;
+ } else if (Callee->getName() == "read") {
+ 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);
+ return;
+ }
} else if (Callee->getName() == "llvm.memset") {
if (const CompressedPoolInfo *DestPI = getPoolInfo(CI.getOperand(1))) {
std::vector<Value*> Ops;
More information about the llvm-commits
mailing list