summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-29 07:43:55 +0000
committerChris Lattner <sabre@nondot.org>2010-07-29 07:43:55 +0000
commit98076a25ced0c70ef088b6577276409519170f74 (patch)
treec2860fdfdba060adadc62c86ca5d87a21fe2723c /clang/lib/CodeGen/MicrosoftCXXABI.cpp
parentc8b7b53a1e7e68a730b04669827ecaf799e103ec (diff)
downloadbcm5719-llvm-98076a25ced0c70ef088b6577276409519170f74.tar.gz
bcm5719-llvm-98076a25ced0c70ef088b6577276409519170f74.zip
This is a little bit far, but optimize cases like:
struct a { struct c { double x; int y; } x[1]; }; void foo(struct a A) { } into: define void @foo(double %A.coerce0, i32 %A.coerce1) nounwind { entry: %A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1] %0 = bitcast %struct.a* %A to %struct.c* ; <%struct.c*> [#uses=2] %1 = getelementptr %struct.c* %0, i32 0, i32 0 ; <double*> [#uses=1] store double %A.coerce0, double* %1 %2 = getelementptr %struct.c* %0, i32 0, i32 1 ; <i32*> [#uses=1] store i32 %A.coerce1, i32* %2 instead of: define void @foo(double %A.coerce0, i64 %A.coerce1) nounwind { entry: %A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1] %0 = bitcast %struct.a* %A to %0* ; <%0*> [#uses=2] %1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1] store double %A.coerce0, double* %1 %2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1] store i64 %A.coerce1, i64* %2 I only do this now because I never want to look at this code again :) llvm-svn: 109738
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud