DescriptionThis is a clean-up of Sean McQuillan's patch at http://codereview.appspot.com/74058.
Performance:
$ tests/perf.py -r --args "-j always -O2" -b ai,django,slowspitfire,slowpickle,slowunpickle control/python trunk3/python
ai (n_queens only):
Min: 0.441 -> 0.432: 2.07% faster
Avg: 0.443 -> 0.435: 2.04% faster
Significant (t=28.349679, a=0.95)
django:
Min: 1.053 -> 1.064: 0.99% slower
Avg: 1.056 -> 1.068: 1.13% slower
Significant (t=-33.003287, a=0.95)
slowpickle:
Min: 0.640 -> 0.646: 1.03% slower
Avg: 0.641 -> 0.648: 1.13% slower
Significant (t=-28.428479, a=0.95)
slowspitfire:
Min: 0.672 -> 0.672: 0.04% slower
Avg: 0.673 -> 0.674: 0.12% slower
Significant (t=-3.018280, a=0.95)
slowunpickle:
Min: 0.292 -> 0.284: 2.87% faster
Avg: 0.292 -> 0.284: 2.81% faster
Significant (t=60.641397, a=0.95)
LLVM IR code change for "def foo(): return 7"
## AFTER ##
line_start: ; preds = %continue_entry
%50 = load i32* getelementptr (%struct._object* inttoptr (i64 145752472 to %struct._object*), i32 0, i32 0), align 8 ; <i32> [#uses=1]
%51 = add i32 %50, 1 ; <i32> [#uses=1]
store i32 %51, i32* inttoptr (i32 145752472 to i32*), align 8
store %struct._object* inttoptr (i64 145752472 to %struct._object*), %struct._object** %stack_bottom
%f_iblock = getelementptr %struct._frame* %frame, i32 0, i32 19 ; <i8*> [#uses=1]
br label %unwind_loop_header
## BEFORE ##
line_start: ; preds = %continue_entry
%53 = getelementptr %struct._object* %3, i32 2 ; <%struct._object*> [#uses=1]
%54 = bitcast %struct._object* %53 to %struct._object** ; <%struct._object**> [#uses=1]
%55 = load %struct._object** %54 ; <%struct._object*> [#uses=9]
%56 = getelementptr %struct._object* %55, i32 0, i32 0 ; <i32*> [#uses=4]
%57 = load i32* %56 ; <i32> [#uses=1]
%58 = add i32 %57, 1 ; <i32> [#uses=1]
store i32 %58, i32* %56
store %struct._object* %55, %struct._object** %stack_bottom
%f_iblock = getelementptr %struct._frame* %frame, i32 0, i32 19 ; <i8*> [#uses=1]
br label %unwind_loop_header
Patch Set 1 #Patch Set 2 : Cleanup #
MessagesTotal messages: 1
|
||||||||||||||||||||||||||||