WIP: Limit scExpr nesting depth
Needs ReviewPublic

Authored by tdammers on Oct 28 2018, 5:15 PM.

Details

Reviewers
bgamari
Trac Issues
#13253
Summary

Based on Trac:13253, this patch naively tries to limit recursion depth in
scExpr. Even more naively, I first tried to just return (nullEnv, e) from
scExpr (skipping scExpr' entirely), but that fails epically. This patch is
an attempt at a slightly more surgical limit, however it still produces test
failures, and doesn't have the desired effect of keeping Core size during
specialization at bay.

Test Plan

Compile LessBad.hs from Trac:13253 with -O2

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
wip/T13253
Lint
Lint WarningsExcuse: consistent with existing context
SeverityLocationCodeMessage
Warningcompiler/main/DynFlags.hs:888TXT3Line Too Long
Warningcompiler/main/DynFlags.hs:889TXT3Line Too Long
Warningcompiler/specialise/SpecConstr.hs:1308TXT3Line Too Long
Unit
No Unit Test Coverage
Build Status
Buildable 25007
Build 62194: [GHC] Linux/amd64: Continuous Integration
Build 62193: [GHC] OSX/amd64: Continuous Integration
Build 62192: [GHC] Windows/amd64: Continuous Integration
Build 62191: arc lint + arc unit