[PATCH] D159114: [llvm-objdump][RISCV] Print target of auipc+jalr calls

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 01:40:20 PDT 2023


jobnoorman updated this revision to Diff 554628.
jobnoorman edited the summary of this revision.
jobnoorman added a comment.

Update the `evaluateBranch` overload to take `PrevInst` as a `std::optional`.
The default implementation falls back to the existing `evaluateBranch`. This
simplifies its use in llvm-objdump as now only a single `evaluateBranch` call is
needed.

Thanks for the suggestion @arichardson! Not that I didn't add the `std::optional`
argument to the existing `evaluateBranch` but created a new overload instead.
This is to avoid having to update nearly all targets in this patch. I will
propose a refactoring once this gets accepted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159114

Files:
  llvm/include/llvm/MC/MCInstrAnalysis.h
  llvm/lib/MC/MCInstrAnalysis.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
  llvm/test/tools/llvm-objdump/ELF/RISCV/branches.s
  llvm/tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159114.554628.patch
Type: text/x-patch
Size: 4580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/6ba89de1/attachment.bin>


More information about the llvm-commits mailing list