[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Tue Jun 27 18:14:02 PDT 2006
Changes in directory llvm-poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.53 -> 1.54
---
Log message:
see through casts to underlying function pointers
---
Diffs of the changes: (+4 -0)
TransformFunctionBody.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.53 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.54
--- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.53 Mon Jun 19 09:55:28 2006
+++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Jun 27 20:13:50 2006
@@ -456,6 +456,10 @@
Function *CF = CS.getCalledFunction();
Instruction *TheCall = CS.getInstruction();
+ if (ConstantExpr *CE = dyn_cast<ConstantExpr>(CS.getCalledValue()))
+ if (CE->getOpcode() == Instruction::Cast && isa<Function>(CE->getOperand(0)))
+ CF = cast<Function>(CE->getOperand(0));
+
// If this function is one of the memory manipulating functions built into
// libc, emulate it with pool calls as appropriate.
if (CF && CF->isExternal())
More information about the llvm-commits
mailing list