- Use the new interface TargetInstrInfo::isRegisterOperandPCRel to tell MachineVerifier whether a specific register operand is legal to have OPERAND_PCREL. Since some of the pc-relative addressing modes in M68K involve (non-pc) registers.
- Make MachineBasicBlock::findDebugLoc to work on reverse_iterator.
Details
Diff Detail
Event Timeline
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
1687–1688 | I wonder whether this should be a TII (or similar) hook/field instead; weakening assertions for targets where the assertion is valid is a bit sad. |
Add a new interface in TargetInstrInfo: isRegisterOperandPCRel to tell MachineVerifier whether specific register operand is legal to be pc-relative
llvm/lib/CodeGen/MachineBasicBlock.cpp | ||
---|---|---|
1387 | Is it possible MBBI is already at instr_rend() so that std::prev isn't valid? |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
956 | Shouldn't you also have added the derived implementations for each target? |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
956 | I'm not sure, is there a policy to enforce this? Because there is a default implementation here (i.e. return false) so functionally it works. Also some of the functions, the isCopyInstrImpl below for example, don't have implementations in every derived targets either |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
956 | There is no policy regarding this. Just now reading the MachineVerrifier again, it seems as this does not change the implementation for any other target that doesn't implement. No worries. |
- Rebase to latest changes
- Addressed feedbacks
llvm/lib/CodeGen/MachineBasicBlock.cpp | ||
---|---|---|
1387 | sorry I missed this comment. I've just fixed it. |
Needs a blank line