[llvm] 0ca426d - [llvm-mca] Improve barriers for strict region marking (PR52198)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 21 03:25:14 PST 2022
Author: Simon Pilgrim
Date: 2022-01-21T11:25:05Z
New Revision: 0ca426d6ac65b84c70ac7fd9511628ce5115423e
URL: https://github.com/llvm/llvm-project/commit/0ca426d6ac65b84c70ac7fd9511628ce5115423e
DIFF: https://github.com/llvm/llvm-project/commit/0ca426d6ac65b84c70ac7fd9511628ce5115423e.diff
LOG: [llvm-mca] Improve barriers for strict region marking (PR52198)
As suggested on the bug, to help (but not completely....) stop folded instructions crossing the inline asm barriers used for llvm-mca analysis, we should recommend tagging with memory captures/attributes.
Differential Revision: https://reviews.llvm.org/D117788
Added:
Modified:
llvm/docs/CommandGuide/llvm-mca.rst
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-mca.rst b/llvm/docs/CommandGuide/llvm-mca.rst
index b08f088762799..fdb45783ea663 100644
--- a/llvm/docs/CommandGuide/llvm-mca.rst
+++ b/llvm/docs/CommandGuide/llvm-mca.rst
@@ -299,9 +299,9 @@ C++. As a workaround, inline assembly directives may be used:
.. code-block:: c++
int foo(int a, int b) {
- __asm volatile("# LLVM-MCA-BEGIN foo");
+ __asm volatile("# LLVM-MCA-BEGIN foo":::"memory");
a += 42;
- __asm volatile("# LLVM-MCA-END");
+ __asm volatile("# LLVM-MCA-END":::"memory");
a *= b;
return a;
}
More information about the llvm-commits
mailing list