[LLVMdev] Undocumented API changes

Bill Wendling isanbard at gmail.com
Wed Jun 17 13:00:02 PDT 2009

Hi Mark,

> 3.
> 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
>   };
> }
We needed a finer-grained control over what optimizations are run
during the code generation passes. Some optimizations aren't
appropriate for the Default case, but are for the Aggressive case.

I can't comment on the other changes. But in general, the llvm
development trunk is in a state of perpetual flux. It only settles
down around release time. Also, our APIs aren't written in stone,
which is by design. The downside of this is that people who use our
APIs may have to change their code from release to release. And if you
live on the development trunk, it takes a lot of maintenance to keep
up (as you found out). We do try to document, or at least warn, about
every change we make. But that documentation tends to be from release
to release.


More information about the llvm-dev mailing list