[cfe-dev] Change in JIT

Bill Wendling isanbard at gmail.com
Wed Apr 29 18:20:21 PDT 2009


Hi all,

There was a recent change to how the JIT works. Before, you would pass
a flag into the code generator to indicate whether you wanted "fast"
code generation or normal code generation. Now, we have a
finer-grained control over this. An enum value is passed instead of a
boolean flag.

The change you should make: every call to addPassesToEmitFile,
addPassesToEmitFileFinish, addPassesToEmitMachineCode, or
addCommonCodeGenPasses should pass an optimization level enum rather
than true / false for "Fast". The enum is in
llvm/Target/TargetMachine.h:

namespace CodeGenOpt {
  enum Level {
    Default,
    None,
    Aggressive
  };
}

The "Default" enum is the old, non-fast version. "None" is now the
"fast" version. "Aggressive" is currently identical to Default, but
will change in the future to apply more passes to the code.

-bw



More information about the cfe-dev mailing list