[PATCH] D106503: MCSubtargetInfo: Add debugging 'features' that dump current CPU bit state

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 11:08:13 PDT 2021


george.burgess.iv added a comment.

> Why not add a separate flag instead of polluting the feature string?

I'm amenable to this if you'd prefer it. A flag would make:

  "target-features" = "+foo,+dump-enabled,-bar,+dump-enabled"

require multiple `llc` invocations. It'd also mean we dump all of the `MCSubtargetInfo`s that we construct in a compilation, rather than a particular one of interest in a Module. I don't think either of these are huge problems, given that this feature is purely for people debugging LLVM itself. If you'd still prefer the flag approach, please let me know and I'll do that.



================
Comment at: llvm/lib/MC/MCSubtargetInfo.cpp:213
       Help(ProcDesc, ProcFeatures);
     else if (Feature == "+cpuhelp")
       cpuHelp(ProcDesc);
----------------
arsenm wrote:
> I didn’t realize we had these 
Yeah, I kind of stumbled upon them while trying to figure this all out :P 


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

https://reviews.llvm.org/D106503



More information about the llvm-commits mailing list