Opened 3 years ago

Last modified 9 months ago

#12765 new task

Don't optimize coercions with -O0

Reported by: bgamari Owned by:
Priority: normal Milestone: 8.10.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 (5)

comment:1 Changed 3 years 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 2 years ago by bgamari


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

comment:3 Changed 20 months ago by bgamari


This ticket won't be resolved in 8.4; remilestoning for 8.6. Do holler if you are affected by this or would otherwise like to work on it.

comment:4 Changed 15 months ago by bgamari


These won't be fixed for 8.6, bumping to 8.8.

comment:5 Changed 9 months ago by osa1


Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.