This shrinks MCInstrDesc (and hence the whole TargetInsts table) because
we can store a 16-bit offset value to access the operands info, instead
of a pointer. This also reduces the number of relocs that need to be
applied when LLVM is compiled as position-independent code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/MC/MCInstrDesc.h | ||
---|---|---|
580–581 | ImplicitOps -> OpInfo (this is where it points now) |
llvm/include/llvm/MC/MCInstrDesc.h | ||
---|---|---|
580–581 | You're right that it points to the start of the OpInfo, but I'm not sure that's important. It's also the "origin" from which implicit op list offsets are measured. So maybe ImplicitOpOrigin? |
llvm/include/llvm/MC/MCInstrDesc.h | ||
---|---|---|
580–581 | I mean that it now points to explicit ops. Implicit ops follow explicit ops (offseted by ImplicitOffset). |
llvm/include/llvm/MC/MCInstrDesc.h | ||
---|---|---|
580–581 | Yes, you are correct, it points to explicit ops. I just meant that that does not necessarily mean the variable has to be called "OpInfo". |
llvm/include/llvm/MC/MCInstrDesc.h | ||
---|---|---|
580–581 | Rather than change the name, I tweaked the expression so that ImplicitOps now points to the first list of implicit ops for this instruction. |
ImplicitOps -> OpInfo (this is where it points now)