Beef up CMM tests
AcceptedPublic

Authored by erikd on Mar 18 2017, 9:21 PM.

Details

Summary

For all tests that compile CMM source code, add 3 llvm compile
ways to test the LLVM backend.

Test Plan

Validate on x86 and x86_64

erikd created this revision.Mar 18 2017, 9:21 PM
erikd added a comment.EditedMar 18 2017, 11:21 PM

Its failing to build because llvm-3.9 is not installed.

@bgamari shouldn't these boxes have LLVM?

bgamari edited edge metadata.Mar 29 2017, 4:21 PM
In D3365#96623, @erikd wrote:

Its failing to build because llvm-3.9 is not installed.

@bgamari shouldn't these boxes have LLVM?

Yes, they should. I'm working on it.

erikd updated this revision to Diff 12033.Apr 7 2017, 5:09 AM

Rebase against master.

erikd updated this revision to Diff 12034.Apr 7 2017, 5:10 AM

Fix email address

rwbarton edited edge metadata.Apr 7 2017, 7:37 AM

My understanding is that

mk/test.mk:TEST_HC_OPTS = -dcore-lint -dcmm-lint -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)

should mean that all tests run with -dcmm-lint by default. Does it not work for cmm_src tests?

erikd added a comment.Apr 7 2017, 5:20 PM

This patch is mainly about making sure the CCM tests get run with the LLVM backend. For instance, running make test TEST="T7574" before my patch:

=====> T7574(normal) 1 of 1 [0, 0, 0]
cd "./codeGen/should_compile/T7574.run" &&  "/home/erikd/Git/ghc-upstream/inplace/test   spaces/ghc-stage2" -c T7574.cmm -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output   -no-hs-main 

SUMMARY for test run started at Sat Apr  8 08:13:59 2017 AEST
 0:00:01 spent to go through
       1 total tests, which gave rise to
       4 test cases, of which
       3 were skipped

       0 had missing libraries
       1 expected passes
       0 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       0 unexpected failures
       0 unexpected stat failures

and after:

=====> T7574(normal) 1 of 1 [0, 0, 0]
cd "./codeGen/should_compile/T7574.run" &&  "/home/erikd/Git/ghc-upstream/inplace/test   spaces/ghc-stage2" -c T7574.cmm -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output  -dcmm-lint -no-hs-main 
=====> T7574(optllvm) 1 of 1 [0, 0, 0]
cd "./codeGen/should_compile/T7574.run" &&  "/home/erikd/Git/ghc-upstream/inplace/test   spaces/ghc-stage2" -c T7574.cmm -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output  -O -fllvm -dcmm-lint -no-hs-main 
=====> T7574(llvm) 1 of 1 [0, 0, 0]
cd "./codeGen/should_compile/T7574.run" &&  "/home/erikd/Git/ghc-upstream/inplace/test   spaces/ghc-stage2" -c T7574.cmm -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output  -fllvm -dcmm-lint -no-hs-main 
=====> T7574(debugllvm) 1 of 1 [0, 0, 0]
cd "./codeGen/should_compile/T7574.run" &&  "/home/erikd/Git/ghc-upstream/inplace/test   spaces/ghc-stage2" -c T7574.cmm -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output  -fllvm -keep-llvm-files -dcmm-lint -no-hs-main 

SUMMARY for test run started at Sat Apr  8 08:18:20 2017 AEST
 0:00:01 spent to go through
       1 total tests, which gave rise to
       6 test cases, of which
       2 were skipped

       0 had missing libraries
       4 expected passes
       0 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       0 unexpected failures
       0 unexpected stat failures
erikd updated this revision to Diff 12139.Apr 15 2017, 4:25 PM

Rebase against master.

OK, well, it's still the case that -dcmm-lint is on for all tests by default so there is no need to add it to particular tests.

erikd added a comment.May 1 2017, 3:09 AM

@rwbarton Ack. Will fix!

erikd updated this revision to Diff 12328.May 1 2017, 5:58 AM

Drop redundant -dcmm-lint

erikd planned changes to this revision.May 1 2017, 6:11 AM

Bah, still not right. Probably too tired. Will fix tomorrow.

erikd updated this revision to Diff 12709.May 27 2017, 4:13 AM

Fix it.

erikd edited the summary of this revision. (Show Details)May 27 2017, 4:20 AM
austin resigned from this revision.Nov 6 2017, 3:53 PM
bgamari accepted this revision.Nov 9 2017, 3:47 PM

This has languished for too long. Merging.

This revision is now accepted and ready to land.Nov 9 2017, 3:47 PM