Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-mca] Teach the tool how to identify memory fence instructions. #36015

Open
adibiagio opened this issue Mar 9, 2018 · 0 comments
Open
Labels
bugzilla Issues migrated from bugzilla tools:llvm-mca

Comments

@adibiagio
Copy link
Collaborator

Bugzilla Link 36667
Version trunk
OS All
CC @legrosbuffle,@RKSimon,@rotateright

Extended Description

This could be fixed by using an extra flag in MCInstrDesc.

Currently, the LSUnit in llvm-mca (LSUnit.h) doesn't know about memory-barriers. It conservatively assumes that an instruction with both 'mayLoad' and 'unmodeledSideEffects' behaves like a "soft" load barrier. Similarly, an instruction with flag 'mayStore' and 'unmodeledSideEffects' is treated like a "soft" store barrier. That means, memory operations are serialized without forcing a flush (of the load/store queue).
This is inaccurate, and currently it leads to potentially incorrect analysis.

If we teach llvm-mca how to correctly identify fence instructions, then the analysis becomes more accurate (and we don't need to guess anymore).

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla tools:llvm-mca
Projects
None yet
Development

No branches or pull requests

1 participant