LLVM-MCA spews "unknown sub-directive" errors with GCC versions > 9.2
See original GitHub issuehttps://godbolt.org/z/svnn4xEsG
This is how the MCA output looks like with GCC versions after 9.2:
<source>:12:14: error: unknown sub-directive in '.loc' directive
.loc 1 4 86 view -0
^
<source>:14:13: error: unknown sub-directive in '.loc' directive
.loc 1 5 5 view .LVU1
^
<source>:15:13: error: unknown sub-directive in '.loc' directive
.loc 1 6 5 view .LVU2
^
<source>:16:13: error: unknown sub-directive in '.loc' directive
.loc 1 7 5 view .LVU3
...
Looks like a probable bug in MCA to me, but could be CE specific.
Edit: GCC 11.2 and current trunk appear to work at first glance, but if you scroll down to the end of the MCA output, the errors are still there: https://godbolt.org/z/4hhW64753
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
llvm-mca - LLVM Machine Code Analyzer
The main goal of this tool is not just to predict the performance of the code when run on the target, but also...
Read more >gcc versions - ms.fr.edu.vn Search
This is how the MCA output looks like with GCC versions after 9.2: <source>:12:14: error: unknown sub-directive in '.loc' directive .loc ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Apologies for the very late reply.
I found the following options from https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
Strictly speaking, I don’t think this is an llvm-mca issue. It is more like llvm libraries don’t know how to parse these new “view assignment and reset assertion checking in .loc directives”.
As a workaround, you can pass -gno-as-locview-support to the command line for the gcc build (in your godbolt link). That should generate .loc directives that are compatible with what the llvm asm parser expects to see.
I hope it helps.
Again, apologies for the very late reply.
-Andrea
Scratch that, the errors still appear with the latest GCC versions, but for whatever reason they are displayed after the MCA output