Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: tests_lit/llvm2ice_tests/reorder-functions.ll

Issue 1206723003: Function Layout, Global Variable Layout and Pooled Constants Layout Reordering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | tests_lit/llvm2ice_tests/reorder-global-variables.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/reorder-functions.ll
diff --git a/tests_lit/llvm2ice_tests/reorder-functions.ll b/tests_lit/llvm2ice_tests/reorder-functions.ll
new file mode 100644
index 0000000000000000000000000000000000000000..02af79a6d79da4a26751fe745107f793ea04cff0
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/reorder-functions.ll
@@ -0,0 +1,90 @@
+; This is a smoke test of function reordering.
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE
+
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -reorder-functions-window-size=1 \
+; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -reorder-functions-window-size=1 \
+; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1
+
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -threads=0 \
+; RUN: | FileCheck %s --check-prefix=SEQUENTIAL
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -threads=0 \
+; RUN: | FileCheck %s --check-prefix=SEQUENTIAL
+
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -reorder-functions-window-size=0xffffffff \
+; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
+; RUN: -sz-seed=1 -reorder-functions \
+; RUN: -reorder-functions-window-size=0xffffffff \
+; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX
+
+define void @func1() {
+ ret void
+}
+
+define void @func2() {
+ ret void
+}
+
+define void @func3() {
+ ret void
+}
+
+define void @func4() {
+ ret void
+}
+
+define void @func5() {
+ ret void
+}
+
+define void @func6() {
+ ret void
+}
+
+; DEFAULTWINDOWSIZE-LABEL: func4
+; DEFAULTWINDOWSIZE-LABEL: func1
+; DEFAULTWINDOWSIZE-LABEL: func3
+; DEFAULTWINDOWSIZE-LABEL: func6
+; DEFAULTWINDOWSIZE-LABEL: func5
+; DEFAULTWINDOWSIZE-LABEL: func2
+
+; WINDOWSIZE1-LABEL: func1
+; WINDOWSIZE1-LABEL: func2
+; WINDOWSIZE1-LABEL: func3
+; WINDOWSIZE1-LABEL: func4
+; WINDOWSIZE1-LABEL: func5
+; WINDOWSIZE1-LABEL: func6
+
+; SEQUENTIAL-LABEL: func1
+; SEQUENTIAL-LABEL: func2
+; SEQUENTIAL-LABEL: func3
+; SEQUENTIAL-LABEL: func4
+; SEQUENTIAL-LABEL: func5
+; SEQUENTIAL-LABEL: func6
+
+; WINDOWSIZEMAX-LABEL: func4
+; WINDOWSIZEMAX-LABEL: func1
+; WINDOWSIZEMAX-LABEL: func3
+; WINDOWSIZEMAX-LABEL: func6
+; WINDOWSIZEMAX-LABEL: func5
+; WINDOWSIZEMAX-LABEL: func2
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | tests_lit/llvm2ice_tests/reorder-global-variables.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698