[PATCH] D63040: [Docs] [llvm-mca] Point out a caveat for using llvm-mca markers in source code.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 8 13:29:34 PDT 2019


andreadb added reviewers: mattd, RKSimon, spatel.
andreadb added a comment.

I understand your point.

The reality is that source level markers have never been a real feature in llvm-mca. What is described in that section as "source level marker" is simply just a "hack" to workaround the lack of a real feature. While I agree that it has mostly worked quite well in practice (at least so far), it is known to interfere with the optimizers.

So here is the idea: what if we change the paragraph that introduces source level markers by clarifying those points?

Something along the line of:

  There is no support for source level markers in llvm-mca.
  However, as a workaround, users can insert inline assembly as follows [example here]. [...] this may interfere with the optimizers [... your paragraph goes here ...]. If users want to make use of inline assembly to emit markers in the generated assembly, then the recommendation is to always verify that the output assembly is equivalent to the assembly generated in the absence of markers.

Essentially, we clarify that the feature is missing. We also don't set too high the expectation on the asm workaround. In that context, I think it is fine to suggest using -Rpass as one possible way to check missed optimization opportunities caused by the presence of inline assembly.

What do you think?

-Andrea


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63040/new/

https://reviews.llvm.org/D63040





More information about the llvm-commits mailing list