[LLVMdev] RFC: llvm-convert.cpp Patch

Chris Lattner clattner at apple.com
Wed Nov 7 10:47:20 PST 2007

On Nov 7, 2007, at 10:23 AM, Duncan Sands wrote:

>> How about this patch then?
> How about this one :)  It passes alignment and volatility around
> with DestLoc.  It's not finished because I noticed some bugs in
> how CopyAggregate and ZeroAggregate handle alignment (problem points
> marked with "QQ").  Also, I noticed potential problems with how we
> handle call arguments and return results (what if they are strangely
> aligned/volatile?), marked with FIXME.
> While there, I fixed the following:
> - Taught EmitAggregateZero not to do element by element zeroing
> if the LLVM type doesn't cover the gcc type.  Also, not to do
> it if there are too many aggregate elements.
> - Added a bunch of missing alignment/volatile stuff on various
> loads and stores.
> - Fixed up a lot of bogus handling of volatility in the complex
> number stuff.

Whoa, this is awesome Duncan.

One minor nit-pick is that you can use BitCastToType instead of  
"CastToType(Instruction::BitCast", which is a minor simplification.

Other than that, if it tests out fine, please commit it!


More information about the llvm-dev mailing list