[LLVMbugs] [Bug 11] [llvmg++] Code for executing destructors is not shared
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Thu Nov 27 01:48:30 PST 2003
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=11
sabre at nondot.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From sabre at nondot.org 2003-11-27 03:48 -------
With all three patches applied (over 1180 lines of diff, aggregate), I now get
the function below on the simple testcase, which cannot be improved anymore. It
now contains 11 basic blocks total, compared to the 17 I started out at (and it
should scale linearly now, not N^2). Though it's not a huge win on this
testcase, it is the minimum, and helps more on other, larger, examples.
For example on the large 8361 testcase. The G++ front-end speeds up by 8% and
produces a 10% smaller .s file.
The C front-end cleanup handling code has been much improved, and is now a lot
simpler than it was when I started out on this odyssey.
Simple N^2 example output (contrast with
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=11#c5):
void %_Z4testv() {
entry:
%A = alloca %struct.F ; <%struct.F*> [#uses=2]
%B = alloca %struct.F ; <%struct.F*> [#uses=2]
%C = alloca %struct.F ; <%struct.F*> [#uses=2]
invoke void %_Z10couldThrowv( )
to label %invoke_cont.0 except label %invoke_catch.0
invoke_catch.0: ; preds = %entry, %invoke_catch.1, %invoke_cont.3
invoke void %_ZN1FD1Ev( %struct.F* %A )
to label %rethrow except label %terminate
invoke_cont.0: ; preds = %entry
invoke void %_Z10couldThrowv( )
to label %invoke_cont.1 except label %invoke_catch.1
invoke_catch.1: ; preds = %invoke_cont.0, %invoke_catch.2, %invoke_cont.2
invoke void %_ZN1FD1Ev( %struct.F* %B )
to label %invoke_catch.0 except label %terminate
invoke_cont.1: ; preds = %invoke_cont.0
invoke void %_Z10couldThrowv( )
to label %invoke_cont.2 except label %invoke_catch.2
invoke_catch.2: ; preds = %invoke_cont.1
invoke void %_ZN1FD1Ev( %struct.F* %C )
to label %invoke_catch.1 except label %terminate
invoke_cont.2: ; preds = %invoke_cont.1
invoke void %_ZN1FD1Ev( %struct.F* %C )
to label %invoke_cont.3 except label %invoke_catch.1
invoke_cont.3: ; preds = %invoke_cont.2
invoke void %_ZN1FD1Ev( %struct.F* %B )
to label %invoke_cont.4 except label %invoke_catch.0
invoke_cont.4: ; preds = %invoke_cont.3
call void %_ZN1FD1Ev( %struct.F* %A )
ret void
rethrow: ; preds = %invoke_catch.0
unwind
terminate: ; preds = %invoke_catch.0, %invoke_catch.1, %invoke_catch.2
call void %__llvm_cxxeh_call_terminate( )
ret void
}
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list