[LLVMdev] warning from -instcombine

Evan Cheng evan.cheng at apple.com
Fri Feb 27 10:37:31 PST 2009


On Feb 27, 2009, at 1:47 AM, Jay Foad wrote:

> Hi,
>
> I noticed this code in lib/Transforms/Scalar/InstructionCombining.cpp:
>
>      cerr << "WARNING: While resolving call to function '"
>           << Callee->getName() << "' arguments were dropped!\n";
>
> If you're using LLVM as a static compiler, this warning is a bit
> incongruous, because it's not formatted in the same way as warnings
> from the front end, and it isn't suppressed by -w.
>
> If you're using LLVM as a JIT, it seems completely wrong for any
> optimisation pass to use cerr like this.
>
> So should it be removed, or downgraded to DOUT, or something?

We should not remove them. These indicate a bug in the source,  
frontend, or earlier optimization passes. It's pretty useful. It would  
be nice to have a backend diagnosis facility then we can control them.  
Patches welcome.

Evan

>
>
> There are a few other instances of cerr << "WARNING: ..." in other  
> LLVM passes.
>
> Thanks,
> Jay.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list