diff options
author | nineonine <mail4chemik@gmail.com> | 2019-07-13 00:11:46 -0700 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-26 00:57:39 -0400 |
commit | aae0457f412aa40dd192ca2cbea565ea60b182ec (patch) | |
tree | fd58e2a399fd70e0aeaa9e6c9eb7415877776ba3 /testsuite/tests/cmm | |
parent | 30b6f391801d58e364f79df5da2cf9f02be2ba5f (diff) | |
download | haskell-aae0457f412aa40dd192ca2cbea565ea60b182ec.tar.gz |
Change behaviour of -ddump-cmm-verbose to dump each Cmm pass output to a separate file and add -ddump-cmm-verbose-by-proc to keep old behaviour (#16930)
Diffstat (limited to 'testsuite/tests/cmm')
-rw-r--r-- | testsuite/tests/cmm/should_compile/Makefile | 12 | ||||
-rw-r--r-- | testsuite/tests/cmm/should_compile/T16930.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/cmm/should_compile/T16930.stdout | 9 | ||||
-rw-r--r-- | testsuite/tests/cmm/should_compile/all.T | 1 |
4 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/tests/cmm/should_compile/Makefile b/testsuite/tests/cmm/should_compile/Makefile index 9101fbd40a..ac96d11fac 100644 --- a/testsuite/tests/cmm/should_compile/Makefile +++ b/testsuite/tests/cmm/should_compile/Makefile @@ -1,3 +1,15 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk + +## check if -ddump-cmm-verbose -ddump-to-file generates files +# for all cmm stages and dumps correspond to correct procs +T16930: + echo "testing -ddump-cmm-verbose for T16930 ..." + '$(TEST_HC)' $(TEST_HC_OPTS) T16930.hs -fforce-recomp -ddump-cmm-verbose -ddump-to-file + grep -rl "CAFEnv" . --include=\T16930.* + grep -rl "Post control-flow optimisations" . --include=\T16930.* + grep -rl "Post CPS Cmm" . --include=\T16930.* + grep -rl "after setInfoTableStackMap" . --include=\T16930.* + grep -rl "Layout Stack" . --include=\T16930.* + grep -rl "Post switch plan" . --include=\T16930.* diff --git a/testsuite/tests/cmm/should_compile/T16930.hs b/testsuite/tests/cmm/should_compile/T16930.hs new file mode 100644 index 0000000000..74aaf0c59f --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T16930.hs @@ -0,0 +1,10 @@ +module Main where + +a :: Int +a = 1 + +b :: Int +b = a + 7 + +main :: IO () +main = return () diff --git a/testsuite/tests/cmm/should_compile/T16930.stdout b/testsuite/tests/cmm/should_compile/T16930.stdout new file mode 100644 index 0000000000..bbad2da83f --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T16930.stdout @@ -0,0 +1,9 @@ +testing -ddump-cmm-verbose for T16930 ... +[1 of 1] Compiling Main ( T16930.hs, T16930.o ) +Linking T16930 ... +./T16930.dump-cmm-caf +./T16930.dump-cmm-cfg +./T16930.dump-cmm-cps +./T16930.dump-cmm-info +./T16930.dump-cmm-sp +./T16930.dump-cmm-switch diff --git a/testsuite/tests/cmm/should_compile/all.T b/testsuite/tests/cmm/should_compile/all.T index 4bfa949a80..46dc86930a 100644 --- a/testsuite/tests/cmm/should_compile/all.T +++ b/testsuite/tests/cmm/should_compile/all.T @@ -1,2 +1,3 @@ # test('selfloop', [cmm_src], compile, ['']) +test('T16930', normal, makefile_test, ['T16930']) |