[llvm-commits] [llvm] r161256 - /llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
Matt Beaumont-Gay
matthewbg at google.com
Fri Aug 3 14:15:03 PDT 2012
On Fri, Aug 3, 2012 at 2:11 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Fri, Aug 3, 2012 at 1:54 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
>> --- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Fri Aug 3 15:54:11 2012
>> @@ -672,6 +672,7 @@
>> LiveInterval &SrcInterval = LI->getInterval(SrcReg);
>> SlotIndex PredIndex = LI->getMBBEndIdx(PredBB);
>> VNInfo *SrcVNI = SrcInterval.getVNInfoBefore(PredIndex);
>> + (void)SrcVNI;
>> assert(SrcVNI);
>
> Looks like this could/should just be rolled into the assert so we
> don't even call the function if it's a release build:
>
> assert(SrcInterval.getVNInfoBefore(PredIndex));
That would also make SrcInterval unused in -Asserts, and I was too
lazy to look up or experiment to find out if either variable's
initializer has side effects.
>
> (& to whoever actually wrote this originally - could use some text to
> go with it)
+1
-Matt
More information about the llvm-commits
mailing list