[llvm-commits] [llvm] r86840 - in /llvm/trunk: include/llvm/IntrinsicInst.h lib/Transforms/Utils/Local.cpp test/Transforms/InstCombine/invariant.ll
Chris Lattner
clattner at apple.com
Wed Dec 2 09:44:18 PST 2009
On Dec 2, 2009, at 5:42 AM, Duncan Sands wrote:
> 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.
I think marking it as potentially writing is the right way to go.
There are few places that should care (memdep and the code that infers
readonly/readnone) right?
-Chris
More information about the llvm-commits
mailing list