Skip to content
Commit b5bd924e authored by Chris Lattner's avatar Chris Lattner
Browse files

Teach argpromote to ruthlessly hack small byval structs when it can

get away with it, which exposes opportunities to eliminate the memory
objects entirely.  For example, we now compile byval.ll to:

define internal void @f1(i32 %b.0, i64 %b.1) {
entry:
	%tmp2 = add i32 %b.0, 1		; <i32> [#uses=0]
	ret void
}

define i32 @main() nounwind  {
entry:
	call void @f1( i32 1, i64 2 )
	ret i32 0
}

This seems like it would trigger a lot for code that passes around small
structs (e.g. SDOperand's or _Complex)...

llvm-svn: 45886
parent 0ebaf91f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment