Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Nios2/Nios2ISelLowering.cpp | ||
---|---|---|
202 ↗ | (On Diff #127101) | Merge init with the declaration on the previous line. |
208 ↗ | (On Diff #127101) | llvm_unreachable takes a string describing the problem. |
lib/Target/Nios2/Nios2InstrInfo.cpp | ||
53 ↗ | (On Diff #127101) | Is this function being called without a valid destination or source register? |
lib/Target/Nios2/Nios2InstrInfo.td | ||
88 ↗ | (On Diff #127101) | Would you really want to rematerialize division on this architecture? Only declare these as rematerializable if they're cheaper than a spill/restore. |
Thanks for the review Hal. When I was addressing the things that you pointed out I found that entire analyzeReturn method is already implemented in LLVM, which allowed me to remove some code.
test/CodeGen/Nios2/add-sub.ll | ||
---|---|---|
7 ↗ | (On Diff #127502) | Aren't all of the registers here fixed by the ABI? If so, check for them explicitly instead of matching any register. |
Are you planning to soon introduce an asm parser and disassembler so that you can test the encodings? I recommend doing this early do that you can test those along the way.
lib/Target/Nios2/Nios2InstrInfo.cpp | ||
---|---|---|
53 ↗ | (On Diff #128626) | We generally write this as: BuildMI(MBB, I, DL, get(opc), DestReg) .addReg(Nios2::ZERO); .addReg(SrcReg, getKillRegState(KillSrc)); |
Are you planning to soon introduce an asm parser and disassembler so that you can test the encodings? I recommend doing this early do that you can test those along the way.
Yes, we plan to support asm parser in disassembler, but I would not say these were nearby plans. Currently we can just generate assembler and then use GCC as with Nios2 support to generate object-files. But I'm OK with your recommendation, I think we can focus on that before continue committing new instructions.
LGTM
lib/Target/Nios2/Nios2InstrInfo.cpp | ||
---|---|---|
50 ↗ | (On Diff #128897) | You can now drop the MachineInstrBuilder MIB = part too. |