[llvm-commits] [llvm] r50382 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/DeadLoopElimination.cpp

Owen Anderson resistor at mac.com
Tue Apr 29 14:47:54 PDT 2008


On Apr 29, 2008, at 4:41 PM, Chris Lattner wrote:

>
> On Apr 29, 2008, at 1:09 PM, Owen Anderson wrote:
>>
>>
>> Unfortunately, no.  isLoopInvariant never considers an instruction
>> defined within the loop to be invariant.  I tried using it
>> initially, and found that i eliminated very few loops.  The code I'm
>> using here is the same logic that LICM uses as well.
>
> Maybe there should be a new predicate on Loop?
>

I think it's just a difference in assumed meaning.  isLoopInvariant()  
makes the fewest assumptions about the client, whereas  
IsLoopInvariantInst() assumes that the client is willing and/or able  
to handle hoisting loop-invariant instructions for themselves.

--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080429/b1582a3c/attachment.bin>


More information about the llvm-commits mailing list