[LLVMdev] Let's get rid of neverHasSideEffects

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Aug 24 16:33:40 PDT 2012


On Aug 22, 2012, at 9:40 AM, Evandro Menezes <emenezes at codeaurora.org> wrote:

> On 08/21/12 16:49, Jim Grosbach wrote:
>> 
>> I like that. Possibly with the addition that we can filter by a specific property. -Winfer=neverHasSideEffects, e.g., would only show when that specific property is inferred.
>> 
>> Beyond that, I don't see an alternative to an audit of the instructions that get flagged by such a warning. :(
> 
> This proposal would certainly make my life easier by having an easier to maintain insn table.
> 
> For instance, we had to create two store insn classes: one which defined mayStore and one that didn't.  The former was to be used when an insn had no pattern and the latter, when mayStore was implied in the pattern.
> 
> If only TableGen wouldn't warn about non-conflicting attributes at least…

That warning has been removed now, and you should be able to clean up your classes.

I also filed PR13693 for you. It's a bug to lower atomic_load to an instruction without mayStore - atomic loads can't be reordered.

/jakob





More information about the llvm-dev mailing list