Details
Diff Detail
Event Timeline
lib/Target/Nios2/Nios2ISelLowering.cpp | ||
---|---|---|
201 | Merge init with the declaration on the previous line. | |
207 | llvm_unreachable takes a string describing the problem. | |
lib/Target/Nios2/Nios2InstrInfo.cpp | ||
53 | Is this function being called without a valid destination or source register? | |
lib/Target/Nios2/Nios2InstrInfo.td | ||
88 | 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 | 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 | 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 | You can now drop the MachineInstrBuilder MIB = part too. |
Merge init with the declaration on the previous line.