Currently, AArch64InstrInfo::getInstSizeInBytes() uses hard-coded
instruction size for some pseudo-instructions, while this
information should ideally be found in AArch64InstrInfo.td file (which
can be accessed via MCInstrDesc). Hence, the .td file should be updated
and no hard-coded instruction sizes should be used by
getInstSizeInBytes() anymore.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
119 | I am slighly concerned about losing these comments - could you move them to the tablegen too (as the tablegen also doesn't tell us what they're eventually lowered to) |
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
97–100 | Well, this is actually handling cases where the fixed constant size is not specified in .td file. I think the intention was to assume that a pseudo-instruction w/o specified size is always expanded to a 4-byte instruction. Is this correct? |
Move the tablegen querying to the default case to make the code consistent with
ARM version. Update the comment accordingly to clarify the intention of the code
I'm concerned there is no test coverage for:
- SpeculationBarrierISBDSBEndBB and SpeculationBarrierSBEndBB
- StoreSwiftAsyncContext
- JumpTableDest{32,16,8}
This was landed accidentally before it was approved, but given @tyb0807 had made the changes I asked, I have not asked him to revert it. I've given Post-commit approval on the specific commit.
should this case become llvm_unreachable now?