This reduces the isel table size by about 3000 bytes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I understand it is not a win to apply a similar scheme to the base RISCVInstrInfo.td and perhaps F's and D's because we do have an offset available there. Is my understanding correct?
For instance now we have in the base .td:
multiclass LdPat<PatFrag LoadOp, RVInst Inst> { def : Pat<(LoadOp GPR:$rs1), (Inst GPR:$rs1, 0)>; def : Pat<(LoadOp AddrFI:$rs1), (Inst AddrFI:$rs1, 0)>; def : Pat<(LoadOp (add GPR:$rs1, simm12:$imm12)), (Inst GPR:$rs1, simm12:$imm12)>; def : Pat<(LoadOp (add AddrFI:$rs1, simm12:$imm12)), (Inst AddrFI:$rs1, simm12:$imm12)>; def : Pat<(LoadOp (IsOrAdd AddrFI:$rs1, simm12:$imm12)), (Inst AddrFI:$rs1, simm12:$imm12)>; }
Comment Actions
I didn't realize how many times that is instantiated. We can probably at lest merge patterns 1 and 2 together, and 3 and 4 together. I ideally we could merge all of them with a ComplexPattern that emitted 2 results, but I think that requires changing the "ins" operands for the instructions and some assembly parser changes.
Comment Actions
LGTM other than that stylistic change.
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
859 | I think the clang-tidy suggestion here is "correct" LLVM style: auto * |
I think the clang-tidy suggestion here is "correct" LLVM style: auto *