[PATCH] D117788: [llvm-mca] Improve barriers for strict region marking (PR52198)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 07:36:02 PST 2022


RKSimon created this revision.
RKSimon added reviewers: andreadb, lebedev.ri.
Herald added a subscriber: gbedwell.
RKSimon requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117788

Files:
  llvm/docs/CommandGuide/llvm-mca.rst


Index: llvm/docs/CommandGuide/llvm-mca.rst
===================================================================
--- llvm/docs/CommandGuide/llvm-mca.rst
+++ llvm/docs/CommandGuide/llvm-mca.rst
@@ -299,9 +299,9 @@
 .. 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;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117788.401639.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/2af07c0b/attachment.bin>


More information about the llvm-commits mailing list