+DumpCode is a hack to embed disassembly in the ELF file. This commit
fixes it to include labels, to make it slightly more useful.
Details
Diff Detail
- Build Status
Buildable 12267 Build 12267: arc lint + arc unit
Event Timeline
I still don't understand why +DumpCode is here or why it's a subtarget feature, and would like to remove it. Why do you need this? Why can't the driver just disassemble the binary itself if it wants to look at the text form
You're right, it's a hack, and I would like to remove it too. But first we need to get the disassembler working. The disassembler is missing some instructions, and it claims it does not support SI or CI.
In the meantime, as a short term fix, I would like to add this to make +DumpCode more useful. That will make it easier to do other work we need to do before we get to fixing the disassembler.
I don't think getting SI/CI to work in the disassembler will be that much work. Which instructions aren't supported? There can't be that many of them.
lib/Target/AMDGPU/AMDGPUAsmPrinter.h | ||
---|---|---|
200 | Using mutable here is questionable |
lib/Target/AMDGPU/AMDGPUAsmPrinter.h | ||
---|---|---|
200 | Yes. The alternative is to do the label in EmitInstruction with a hack to tell when you have changed basic block, possibly including a non-thread-safe static variable. Would you prefer that? In defense of using mutable, I think we all recognize +dumpcode as a hack that needs to be removed. This mutable would go with it. |
Using mutable here is questionable