[llvm-commits] [llvm] r86840 - in /llvm/trunk: include/llvm/IntrinsicInst.h lib/Transforms/Utils/Local.cpp test/Transforms/InstCombine/invariant.ll

Duncan Sands baldrick at free.fr
Wed Dec 2 05:42:20 PST 2009


Hi Chris,

>> +++ llvm/trunk/lib/Transforms/Utils/Local.cpp Wed Nov 11 09:34:13 2009
>> @@ -252,6 +252,9 @@
>>   // We don't want debug info removed by anything this general.
>>   if (isa<DbgInfoIntrinsic>(I)) return false;
>>
>> +  // Likewise for memory use markers.
>> +  if (isa<MemoryUseIntrinsic>(I)) return false;
> 
> Is this still needed?  I thought that it turns out that these intrinsics need to be marked as having side effects after all?

this is only needed for llvm.invariant.start, which is readonly.  That makes
some sense because if it wasn't readonly then passes that are not llvm.invariant
aware might think it stomps on the values being declared invariant.  Another
possibility is to have it be marked as writing memory like the others, and teach
every possible place that it doesn't do anything bad.

Ciao,

Duncan.



More information about the llvm-commits mailing list