llvm.org GIT mirror llvm / e39c450
[Docs] [llvm-mca] Point out a caveat for using llvm-mca markers in source code. Summary: See: https://bugs.llvm.org/show_bug.cgi?id=42173 Reviewers: andreadb, mattd, RKSimon, spatel Reviewed By: andreadb Subscribers: tschuett, gbedwell, llvm-commits, andreadb Tags: #llvm Patch by Max Marrone (maxpm)! Thanks! Differential Revision: https://reviews.llvm.org/D63040 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362979 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Davis a month ago
1 changed file(s) with 11 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
240240 Note that multiple anonymous regions cannot overlap. Also, overlapping regions
241241 cannot have the same name.
243 Inline assembly directives may be used from source code to annotate the
244 assembly text:
243 There is no support for marking regions from high-level source code, like C or
244 C++. As a workaround, inline assembly directives may be used:
246246 .. code-block:: c++
252252 a *= b;
253253 return a;
254254 }
256 However, this interferes with optimizations like loop vectorization and may have
257 an impact on the code generated. This is because the ``__asm`` statements are
258 seen as real code having important side effects, which limits how the code
259 around them can be transformed. If users want to make use of inline assembly
260 to emit markers, then the recommendation is to always verify that the output
261 assembly is equivalent to the assembly generated in the absence of markers.
262 The `Clang options to emit optimization reports `_
263 can also help in detecting missed optimizations.
257266 ------------------