[PATCH] D46182: [RISCV] Set isReMaterializable on ADDI and LUI instructions
    Mandeep Singh Grang via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Apr 27 12:23:53 PDT 2018
    
    
  
mgrang added a comment.
@asb Thanks for the patch. I tested this on our internal workload and it gave us ~44 bytes savings. However, instead if we mark all ALU insts as isReMaterializable then we get ~226 bytes savings:
  let hasSideEffects = 0, isReMaterializable = 1, mayLoad = 0, mayStore = 0 in
  class ALU_ri<bits<3> funct3, string opcodestr>
      : RVInstI<funct3, OPC_OP_IMM, (outs GPR:$rd), (ins GPR:$rs1, simm12:$imm12),
                opcodestr, "$rd, $rs1, $imm12">;
Note: Marking ALU insts in addition to ADDI and LUI as isReMaterializable still gave us only ~44 bytes savings.
Repository:
  rL LLVM
https://reviews.llvm.org/D46182
    
    
More information about the llvm-commits
mailing list