[llvm-commits] [llvm] r107972 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Gabor Greif
ggreif at gmail.com
Fri Jul 9 08:01:36 PDT 2010
Author: ggreif
Date: Fri Jul 9 10:01:36 2010
New Revision: 107972
URL: http://llvm.org/viewvc/llvm-project?rev=107972&view=rev
Log:
cache result of operator*
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=107972&r1=107971&r2=107972&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Fri Jul 9 10:01:36 2010
@@ -715,9 +715,10 @@
static bool IsOnlyNullComparedAndFreed(const Value &V) {
for (Value::const_use_iterator UI = V.use_begin(), UE = V.use_end();
UI != UE; ++UI) {
- if (isFreeCall(*UI))
+ const User *U = *UI;
+ if (isFreeCall(U))
continue;
- if (const ICmpInst *ICI = dyn_cast<ICmpInst>(*UI))
+ if (const ICmpInst *ICI = dyn_cast<ICmpInst>(U))
if (ICI->isEquality() && isa<ConstantPointerNull>(ICI->getOperand(1)))
continue;
return false;
More information about the llvm-commits
mailing list