[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
Reid Spencer
reid at x10sys.com
Fri Apr 29 23:45:58 PDT 2005
Changes in directory llvm/lib/Transforms/IPO:
SimplifyLibCalls.cpp updated: 1.24 -> 1.25
---
Log message:
Fix a comment that stated the wrong thing.
---
Diffs of the changes: (+2 -5)
SimplifyLibCalls.cpp | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.24 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.25
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.24 Fri Apr 29 22:17:54 2005
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Sat Apr 30 01:45:47 2005
@@ -511,11 +511,8 @@
virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC)
{
// First, check to see if src and destination are the same. If they are,
- // then the optimization is to replace the CallInst with the destination
- // because the call is a no-op. Note that this corresponds to the
- // degenerate strcpy(X,X) case which should have "undefined" results
- // according to the C specification. However, it occurs sometimes and
- // we optimize it as a no-op.
+ // then the optimization is to replace the CallInst with a constant 0
+ // because the call is a no-op.
Value* s1 = ci->getOperand(1);
Value* s2 = ci->getOperand(2);
if (s1 == s2)
More information about the llvm-commits
mailing list