[PATCH] D15668: [attrs] Split off the forced attributes utility into its own pass that can be potentially run much earlier than FuncitonAttrs proper.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 02:16:44 PST 2015

jmolloy accepted this revision.
jmolloy added a comment.
This revision is now accepted and ready to land.

Generally LGTM, but I *really* would like to see this in the default pipeline. Its primary purpose is to allow users to fiddle around with the heuristics a bit (alwaysinline/noinline are probably the most useful attributes we have), and given how negligible the performance impact of this is I'm very much for it being enabled by default so users didn't have to recompile their compiler to do some heuristic exploration.


> I'd suggest something on llvm-dev and CC-ing the author.

As the author, I can reply here :) I'm not particularly invested either in this parse function and didn't want to do it this way. What there ideally should be is some method on Attribute to parse the textual form of an enum attribute. That's not currently possible - you get a String attribute without an associated enum number.

The attribute parsing logic lives in the AsmParser, so extracting it out of there into Attribute would seem to me the right thing to do longer term. For this patch, it was simply for debugging / testing / exploration and the duplicated code was limited, so it didn't seem worth the refactoring investment.

I can however reconsider this if people think it's worth it :)


More information about the llvm-commits mailing list