Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

GlobalISel: Investigate an efficient way to ensure load/store orderings #37341

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR38368
Status NEW
Importance P enhancement
Reported by Amara Emerson (aemerson@apple.com)
Reported on 2018-07-30 06:37:51 -0700
Last modified on 2018-07-31 07:36:45 -0700
Version trunk
Hardware PC All
CC efriedma@quicinc.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

Load/store ordering needs some thought, as we currently don’t have a way to easily check at the MI level what the ordering requirements are on a set of memory operations. SelectionDAG uses the chains to ensure that they’re scheduled to respect the orderings. How to achieve the same thing remains an open question for GlobalISel.

Quuxplusone commented 6 years ago

GlobalISel should be able to use MachineInstr::mayAlias just like the MI scheduler does, but I guess that isn't really the question?

If you're trying to figure out dependencies, you have essentially same options we have for IR, I think: a uncached backwards scan (like instcombine in certain places), something like MemoryDependenceAnalysis, or something like MemorySSA.

Quuxplusone commented 6 years ago

Yes, I'm interested in a sort of efficient cache (that perhaps we can maintain as an analysis?) throughout the pipeline. I'd like to avoid walking the entire CFG if possible for each query.