summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2021-05-17 11:25:53 -0700
committernineonine <mail4chemik@gmail.com>2021-11-23 22:32:51 -0800
commit1669037430f968dd25a6339edfc95d6091974b61 (patch)
tree80984faf0fc3c1322d12b016fdaea385a1ab5e8d /testsuite/tests/codeGen
parent9dcb2ad15df54e209cfae3dd1f51cf8e8d6c69d5 (diff)
downloadhaskell-1669037430f968dd25a6339edfc95d6091974b61.tar.gz
Combine STG free variable traversals (#17978)
Previously we would traverse the STG AST twice looking for free variables. * Once in `annTopBindingsDeps` which considers top level and imported ids free. Its output is used to put bindings in dependency order. The pass happens in STG pipeline. * Once in `annTopBindingsFreeVars` which only considers non-top level ids free. Its output is used by the code generator to compute offsets into closures. This happens in Cmm (CodeGen) pipeline. Now these two traversal operations are merged into one - `FVs.depSortWithAnnotStgPgm`. The pass happens right at the end of STG pipeline. Some type signatures had to be updated due to slight shifts of StgPass boundaries (for example, top-level CodeGen handler now directly works with CodeGen flavoured Stg AST instead of Vanilla). Due to changed order of bindings, a few debugger type reconstruction bugs have resurfaced again (see tests break018, break021) - work item #18004 tracks this investigation. authors: simonpj, nineonine
Diffstat (limited to 'testsuite/tests/codeGen')
-rw-r--r--testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-3224
-rw-r--r--testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-6424
2 files changed, 24 insertions, 24 deletions
diff --git a/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-32 b/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-32
index 884e8abcca..2ff5530f61 100644
--- a/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-32
+++ b/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-32
@@ -1,19 +1,19 @@
+[T14373d.lateDefault_entry() { //
+ switch [0 .. 15]
+ case 15 : goto
+ default: {goto
+ R1 = XYZ_closure+2;
[T14373d.earlyDefault_entry() { //
switch [1 .. 3]
- case 2 : goto
- default: {goto
+ case 2 : goto
+ default: {goto
R1 = XYZ_closure+2;
[T14373d.mixedDefault_entry() { //
switch [1 .. 3]
- case 2 : goto
- case 3 : goto
- default: {goto
+ case 2 : goto
+ case 3 : goto
+ default: {goto
switch [2 .. 15]
- case 15 : goto
- default: {goto
- R1 = XYZ_closure+2;
-[T14373d.lateDefault_entry() { //
- switch [0 .. 15]
- case 15 : goto
- default: {goto
+ case 15 : goto
+ default: {goto
R1 = XYZ_closure+2;
diff --git a/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-64 b/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-64
index 6258d38e4a..0850a479cc 100644
--- a/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-64
+++ b/testsuite/tests/codeGen/should_compile/T14373d.stderr-ws-64
@@ -1,19 +1,19 @@
+[T14373d.lateDefault_entry() { //
+ switch [0 .. 15]
+ case 15 : goto
+ default: {goto
+ R1 = XYZ_closure+2;
[T14373d.earlyDefault_entry() { //
switch [1 .. 7]
- case 2 : goto
- default: {goto
+ case 2 : goto
+ default: {goto
R1 = XYZ_closure+2;
[T14373d.mixedDefault_entry() { //
switch [1 .. 7]
- case 2 : goto
- case 7 : goto
- default: {goto
+ case 2 : goto
+ case 7 : goto
+ default: {goto
switch [6 .. 15]
- case 15 : goto
- default: {goto
- R1 = XYZ_closure+2;
-[T14373d.lateDefault_entry() { //
- switch [0 .. 15]
- case 15 : goto
- default: {goto
+ case 15 : goto
+ default: {goto
R1 = XYZ_closure+2;