Currently, the targets of auipc+jalr calls are not printed because
MCInstrAnalysis fails to analyze them. This patch implements this as follows:
- Add a new MCInstrAnalysis::evaluateBranch overload that takes two consecutive instructions as arguments. This allows the RISC-V backend to detect auipc+jalr sequences.
- While disassembling in llvm-objdump, keep track of the previous instruction and call the new evaluateBranch overload.
Note that the new evaluateBranch overload could have been avoided by making
PrevInst an argument of the existing version and giving it a default value.
However, this would have made it necessary to update nearly all targets so I
will keep this refactoring to a future patch.
How about passing the optional PrevInst to to the existing evaluateBranch() instead? Having to choose which overload to implement is bit awkward and means two calls per instruction instead of just one.