Opened 12 months ago

Last modified 7 months ago

#12765 new task

Don't optimize coercions with -O0

Reported by: bgamari Owned by:
Priority: normal Milestone: 8.4.1
Component: Compiler Version: 8.0.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


During the call today Simon and I discussed the possibility of omitting coercion optimization from the desugarer's simple optimization (simpleOptPgm) when compiling with -O0. The justification here was to perhaps speed-up unoptimized compilation times for programs like that of #12506, which has very large coercions (presumably due to #8095).

The rationale was that while this first pass of coercion simplification during desugaring may reduce the size of some of these coercions, we only walk over them once more during code generation, so there's little benefit given the cost.

Change History (2)

comment:1 Changed 12 months ago by bgamari

I'm dropping a ticket here since I'm no longer convinced that this is worthwhile. Unfortunately this would require a significant amount of plumbing of the optimization level through a bunch of pure simplification functions to make this happen. Moreover, even if we forego the coercion simplification pass in simpleOptPgm, we still do run the simplifier even with -O0.

comment:2 Changed 7 months ago by bgamari


Given that 8.2.1-rc1 is imminent, I'm bumping these off to the 8.4

Note: See TracTickets for help on using tickets.