[LLVMdev] some superoptimizer results (original) (raw)

John Regehr regehr at cs.utah.edu
Thu Jul 23 07:55:46 PDT 2015


One last cost function idea: the cost is the number of inputs. So here the LHS has cost 1 and the RHS has cost 0:

%0:i32 = var %1:i32 = shlnsw %0, 1:i32 %2:i32 = or 1:i32, %1 %3:i1 = slt %1, %2 infer %3 result 1:i1

The rationale, of course, is that these are likely to enable subsequent optimizations. There aren't that many of these so perhaps a separate run would be reasonable?

John



More information about the llvm-dev mailing list