[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 10 12:09:05 PST 2005
Changes in directory llvm-poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.37 -> 1.38
---
Log message:
This code is not safe, remove it.
---
Diffs of the changes: (+0 -14)
TransformFunctionBody.cpp | 14 --------------
1 files changed, 14 deletions(-)
Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.37 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.38
--- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.37 Sun Feb 27 16:32:04 2005
+++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Thu Mar 10 14:08:49 2005
@@ -381,20 +381,6 @@
Function *CF = CS.getCalledFunction();
Instruction *TheCall = CS.getInstruction();
- // optimization for function pointers that are basically gotten from a cast
- // with only one use and constant expressions with casts in them
- if (!CF) {
- Value *CV = CS.getCalledValue();
- if (CastInst* CastI = dyn_cast<CastInst>(CV)) {
- if (isa<Function>(CastI->getOperand(0)) &&
- CastI->getOperand(0)->getType() == CastI->getType())
- CF = dyn_cast<Function>(CastI->getOperand(0));
- } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
- if (CE->getOpcode() == Instruction::Cast)
- CF = dyn_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