[llvm-dev] IR Pass Ordering Sensitivity

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 15 14:12:59 PDT 2017


Hi Kavon,

JFYI, while in general any sequence of optimization passes should compose to
produce a valid optimization pipeline, there are some tradeoffs LLVM makes in
practice for backend passes.  I think the current structure is more on the lines
of:

 - Passes that are part of "opt -O(3|2|1|0)" should compose in any order to form
   a correct compilation pipeline that can handle any IR.

 - IR passes that are only run by backends:
    * Should never silently miscompile IR
    * May fail asserts on IR they can't handle

I'd suggest restricting your autotuner on passes that are part of "opt
-O(3|2|1|0)" as a starting point.

-- Sanjoy


More information about the llvm-dev mailing list