This is an archive of the discontinued LLVM Phabricator instance.

[Attributor][NFCI] Make abstract attributes stateless
ClosedPublic

Authored by jdoerfert on Aug 3 2019, 9:42 PM.

Details

Summary

To remove boilerplate, mostly passing through values to the
AbstractAttriubute base class, we extract the state into an IRPosition
helper. There is no function change intended.

Event Timeline

jdoerfert created this revision.Aug 3 2019, 9:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2019, 9:42 PM

I really like both this and D65712. This makes things much cleaner imo. One more question, since D65712 also simplifies some things from this patch, wouldn't it be easier to just make it in one review?

llvm/lib/Transforms/IPO/Attributor.cpp
407

Can these getState() overrides be also put in the above macro? As far as I can see they are also always same.
This would also apply to D65712, for IRAttribute.

sstefan1 accepted this revision.Aug 4 2019, 5:04 PM

Comment discussed on irc and agreed to be done in another patch.

LGTM.

This revision is now accepted and ready to land.Aug 4 2019, 5:04 PM
This revision was automatically updated to reflect the committed changes.