diff options
author | Chris Lattner <sabre@nondot.org> | 2010-07-29 07:30:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-07-29 07:30:00 +0000 |
commit | c8b7b53a1e7e68a730b04669827ecaf799e103ec (patch) | |
tree | b147d2145dee8294dd34ef84efa564ee8568937d /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | 23f0f4b7aee9d1f305d170370d85f42a8688af18 (diff) | |
download | bcm5719-llvm-c8b7b53a1e7e68a730b04669827ecaf799e103ec.tar.gz bcm5719-llvm-c8b7b53a1e7e68a730b04669827ecaf799e103ec.zip |
implement a todo: pass a eight-byte that consists of a
small integer + padding as that small integer. On code
like:
struct c { double x; int y; };
void bar(struct c C) { }
This means that we compile to:
define void @bar(double %C.coerce0, i32 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=2]
%0 = getelementptr %struct.c* %C, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %0
%1 = getelementptr %struct.c* %C, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %C.coerce1, i32* %1
instead of:
define void @bar(double %C.coerce0, i64 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=3]
%0 = bitcast %struct.c* %C to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %C.coerce1, i64* %2
which gives SRoA heartburn.
This implements rdar://5711709, a nice low number :)
llvm-svn: 109737
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions