This is an archive of the discontinued LLVM Phabricator instance.

[2/3] TLS loads optimization (hoist)
ClosedPublic

Authored by xiangzhangllvm on Apr 1 2022, 3:19 AM.

Details

Summary

Refine tls-load-hoist llvm option from string value to bool

Diff Detail

Event Timeline

xiangzhangllvm created this revision.Apr 1 2022, 3:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2022, 3:19 AM
xiangzhangllvm requested review of this revision.Apr 1 2022, 3:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2022, 3:19 AM

This can be [2/3] ?

xiangzhangllvm retitled this revision from Refine tls-load-hoista llvm option to [2/3] TLS loads optimization (hoist).Apr 1 2022, 3:26 AM
xiangzhangllvm edited the summary of this revision. (Show Details)

This can be [2/3] ?

done

LuoYuanke accepted this revision.Apr 1 2022, 3:44 AM

LGTM.

This revision is now accepted and ready to land.Apr 1 2022, 3:44 AM

I'm not really sure that attribute should be there, especially after the optimization is enabled by default and cl::opt is inverted.

I'm not really sure that attribute should be there, especially after the optimization is enabled by default and cl::opt is inverted.

I think we can leave end user a chance to enable it or not. Maybe for debug purpose.

I'm not really sure that attribute should be there, especially after the optimization is enabled by default and cl::opt is inverted.

I think we can leave end user a chance to enable it or not. Maybe for debug purpose.

I don't believe that is consistent with the current situation, i.e. is there any prior art for this, an attribute that specifically tells to perform some optimization?
How should it play with inliner, should it stop the inlining if they mismatch on the caller-callee, or should it be propagated to callee? Etc.

I'm not really sure that attribute should be there, especially after the optimization is enabled by default and cl::opt is inverted.

Yes, In fact I saw it before, due to, D122866, I prefer keep it here.
And if customer strongly require the option, I may need to re-active the D122558

This revision was landed with ongoing or failed builds.Apr 1 2022, 4:04 AM
This revision was automatically updated to reflect the committed changes.

I'm not really sure that attribute should be there, especially after the optimization is enabled by default and cl::opt is inverted.

I think we can leave end user a chance to enable it or not. Maybe for debug purpose.

I don't believe that is consistent with the current situation, i.e. is there any prior art for this, an attribute that specifically tells to perform some optimization?
How should it play with inliner, should it stop the inlining if they mismatch on the caller-callee, or should it be propagated to callee? Etc.

I think this pass runs after inlining.