This is an archive of the discontinued LLVM Phabricator instance.

[AAPointerInfo] Distinguish initial from unknown OffsetInfo
ClosedPublic

Authored by sameerds on Sep 26 2022, 11:34 PM.

Diff Detail

Event Timeline

sameerds created this revision.Sep 26 2022, 11:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 11:34 PM
sameerds requested review of this revision.Sep 26 2022, 11:34 PM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
jdoerfert accepted this revision.Sep 27 2022, 6:33 AM

Some minor nits inlined. Also, (1) can we have a pure Attributor test for this? And, (2) can you describe the issue in the commit message a bit.

I'm not 100% sure about the impact on other Unkown uses but it's probably fine. We can also port some to Unassigned later.

LG, see above.

llvm/include/llvm/Transforms/IPO/Attributor.h
5071

Nit: Update the comment too.

llvm/lib/Transforms/IPO/AttributorAttributes.cpp
1246

Please add messages to all assertions, also below.

1322

Isn't this just UsrOI.Offset != Unknown?

This revision is now accepted and ready to land.Sep 27 2022, 6:33 AM

Some minor nits inlined. Also, (1) can we have a pure Attributor test for this?

I'll take care of the rest, but some advise on a pure Attributor test would be useful. I did take a look at tests that were affected by previous changes to the handling of PHI nodes. But couldn't really follow how to eventually surface the effect of PointerInfo in terms of function attributes or load/store optimizations in a lit test.

Some minor nits inlined. Also, (1) can we have a pure Attributor test for this?

I'll take care of the rest, but some advise on a pure Attributor test would be useful. I did take a look at tests that were affected by previous changes to the handling of PHI nodes. But couldn't really follow how to eventually surface the effect of PointerInfo in terms of function attributes or load/store optimizations in a lit test.

How did we miscompile the AMDGPU test? I assume we thought something holds about the %.in load, right? I would assume we can make that property we assumed wrongly cause us to misoptimize, no?

sameerds updated this revision to Diff 463509.Sep 28 2022, 5:25 AM

Addressed review comments

How did we miscompile the AMDGPU test? I assume we thought something holds about the %.in load, right? I would assume we can make that property we assumed wrongly cause us to misoptimize, no?

Got it. Thanks!