[PATCH] D101145: [MC][AMDGPU][llvm-objdump] Synthesized local labels in disassembly

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 01:05:18 PDT 2021


tpr created this revision.
Herald added subscribers: kerbowa, rupprecht, mgrang, hiraditya, t-tye, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
tpr requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

1. Add an accessor function to MCSymbolizer to retrieve addresses referenced by a symbolizable operand, but not resolved to a symbol. That way, the caller can synthesize labels at those addresses and then retry disassembling the section.

2. Implement that in AMDGPU -- a failed symbol lookup results in the address being added to a vector returned by the new function.

3. Use that in llvm-objdump when using MCSymbolizer (which only happens on AMDGPU).

Change-Id: I19087c3bbfece64bad5a56ee88bcc9110d83989e


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101145

Files:
  llvm/include/llvm/MC/MCDisassembler/MCSymbolizer.h
  llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
  llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
  llvm/test/tools/llvm-objdump/AMDGPU/elf-disassemble-symbolize-operands.yaml
  llvm/tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101145.339923.patch
Type: text/x-patch
Size: 8832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/c8ea2607/attachment.bin>


More information about the llvm-commits mailing list