[LLVMdev] Manipulate order of optimizations in llvm-ld
Reid Spencer
rspencer at reidspencer.com
Mon Sep 18 12:34:43 PDT 2006
Hi Bram,
On Mon, 2006-09-18 at 17:27 +0200, Bram Adams wrote:
> Hi,
>
> I've written a couple of passes, and I intend to use them using llvm-ld
> (loading works fine).
That's good to hear :)
> However, I can't seem to figure out how to put
> them first, i.e. before all other optimizations (inlining,
> internalizing, ... should only kick in after my passes).
I don't think you can. llvm-ld's always going to give you at least a
verifier and TargetData pass. See tools/llvm-ld/Optimize.cpp for the
details. If you pass --disable-opt it will put yours first, but then
you're responsible for doing the things that llvm-ld normally does.
>
> Omitting AnalysisUsage::setPreservesAll() doesn't help and there is no
> AnalysisUsage::invalidateAll(). Does anybody know a workaround?
--disable-opt or change Optimize.cpp :)
Reid.
More information about the llvm-dev
mailing list