[LLVMdev] 64 bit MRV problem; Missed optimizations.

Duncan Sands baldrick at free.fr
Mon Mar 7 23:37:12 PST 2011


Hi Arushi,

> I was tracking the issue discussed earlier, and I was wondering if a bug for the
> missed optimizations, was ever filed, and if it has been fixed since? If so in
> which llvm version, and more specifically which optimization pass.
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-January/028877.html

this doesn't really sound like an LLVM optimizer issue, it looks more like an
issue with the llvm-g++ front-end to LLVM.  In order to conform to the platform
ABI (x86-64 in this case), the front-end has to carefully arrange how parameters
are passed to functions and return values handled.  This can result in nasty
code that picks parameters apart and puts one bit in a float, another in an
int etc.  It's often hard for the optimizers to do much about this - so the
front-end needs to carefully do things in such a way as to help the optimizers
as much as possible while maintaining ABI conformance.  I don't think this will
ever be improved in llvm-g++ (which is now deprecated).  Hopefully clang does a
better job.  I plan to rewrite the ABI stuff completely in dragonegg, so it may
end up being fixed there one day.

Ciao, Duncan.



More information about the llvm-dev mailing list