[llvm-commits] CVS: llvm/lib/CodeGen/PreOpts/PreSelection.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jun 3 20:25:01 PDT 2003
Changes in directory llvm/lib/CodeGen/PreOpts:
PreSelection.cpp updated: 1.11 -> 1.12
---
Log message:
Avoid generating a getelementptr instruction of a function
---
Diffs of the changes:
Index: llvm/lib/CodeGen/PreOpts/PreSelection.cpp
diff -u llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.11 llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.12
--- llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.11 Sat May 31 02:34:57 2003
+++ llvm/lib/CodeGen/PreOpts/PreSelection.cpp Tue Jun 3 20:24:40 2003
@@ -177,7 +177,7 @@
if (isa<ConstantPointerRef>(ptr))
ptr = cast<ConstantPointerRef>(ptr)->getValue();
- return (isa<GlobalValue>(ptr))
+ return (isa<GlobalVariable>(ptr))
? new GetElementPtrInst(ptr,
std::vector<Value*>(1, ConstantSInt::get(Type::LongTy, 0U)),
"addrOfGlobal", &insertBefore)
More information about the llvm-commits
mailing list