[LLVMdev] Odd problem with command line options

Bill Wendling isanbard at gmail.com
Sun Jul 6 22:43:00 PDT 2008


On Jul 6, 2008, at 4:30 AM, Richard Pennington wrote:

> OK, I finally found my problem. (Which means I took the time to  
> track it
> down.) At first glance I thought the above patch would work. It  
> didn't.
>
> What it turned out to be is:
>
> ./lib/CodeGen/LLVMTargetMachine.cpp:41
> EnableLICM("machine-licm",
>            cl::init(false), cl::Hidden,
>            cl::desc("Perform loop-invariant code motion on machine  
> code"));
>
> and
> ./lib/CodeGen/MachineLICM.cpp:156:
> static RegisterPass<MachineLICM>
> X("machine-licm", "Machine Loop Invariant Code Motion");
>
> Both are defining a command line option with the same name. I'm I the
> only person who links both at the same time? :-(
>
> My suggestion: change the name of one or the other. I changed the  
> first
> one to "enable-machine-licm" since it was hidden.
>
> Does this sound OK?
>
I just fixed this. Try it now.

-bw




More information about the llvm-dev mailing list