[LLVMdev] Let's get rid of neverHasSideEffects

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Aug 21 16:03:14 PDT 2012


On Aug 21, 2012, at 2:10 PM, Chandler Carruth <chandlerc at google.com> wrote:

> I just wanted to comment on the migration bit:
>  
> I can't just kill off the neverHasSideEffects flag, that could cause miscompilations by clearing the UnmodeledSideEffects bit on instructions that should have it.
> 
> Why not mass-update all the td files in the tree to explicitly set the flag exactly as it is being inferred today, then kill the inference. The behavior is the same, but now explicit, and we can go through and remove all the places that make no sense.

This would work for the mayLoad / mayStore flags. You'll get a bunch of warnings on your loads and stores.

For hasSideEffects, I will be changing what happens when you do nothing (i.e., set neither neverHasSideEffects nor hasSideEffects). We need a tool that can point out those instructions so they can be audited, as Jim suggested.

I think we should make sure that such a tool is available at least in the the next release.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120821/9a0fcfb2/attachment.html>


More information about the llvm-dev mailing list