[LLVMdev] flag_unit_at_a_time and pass scheduling in llvm-gcc

Duncan Sands baldrick at free.fr
Tue Apr 15 23:49:22 PDT 2008

In llvm-backend.cpp I see:

    if (optimize > 1) {
      if (flag_inline_trees > 1)                // respect -fno-inline-functions
        PM->add(createFunctionInliningPass());  // Inline small functions
      if (flag_unit_at_a_time && !lang_hooks.flag_no_builtin())
        PM->add(createSimplifyLibCallsPass());  // Library Call Optimizations

      if (optimize > 2)
        PM->add(createArgumentPromotionPass()); // Scalarize uninlined fn args

Shouldn't createFunctionInliningPass and createArgumentPromotionPass only be
called if flag_unit_at_a_time is true?  As far as I can see flag_unit_at_a_time
is used to control whether inter-procedural/whole-module passes are scheduled.



More information about the llvm-dev mailing list