Opened 13 years ago

Last modified 20 months ago

#609 new task (None)

Useful optimisation for set-cost-centre

Reported by: simonpj Owned by: simonmar
Priority: normal Milestone:
Component: Profiling Version: None
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

If you compile, for example, drvrun014 with -prof -auto-all, you'll see stuff like

    (scc "c" (dataToTag#)) y

This generates bad code, because we end up eta-expaning dataToTag, which allocates an extra function closure.

We think that in general

   (scc "c" e) y  = scc "c" (e y)

to within a small constant factor. So maybe the simplifier, or CorePrep, or both, should do this transformation.

Change History (16)

comment:1 Changed 12 years ago by simonmar

Architecture: Unknown
Description: modified (diff)
difficulty: Moderate (1 day)
Operating System: Unknown

comment:2 Changed 11 years ago by igloo

Milestone: 6.6.1

comment:3 Changed 11 years ago by simonmar

Priority: normallow

comment:4 Changed 11 years ago by simonmar

Milestone: 6.6.16.8
Priority: lownormal

comment:5 Changed 10 years ago by simonpj

Description: modified (diff)
Milestone: 6.8 branch_|_

comment:6 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:7 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:8 Changed 8 years ago by simonmar

difficulty: Moderate (1 day)Moderate (less than a day)

comment:9 Changed 6 years ago by simonmar

Component: CompilerProfiling
Milestone: _|_7.4.1
Owner: set to simonmar
Priority: normalhigh
Type of failure: None/Unknown

comment:10 Changed 6 years ago by simonmar

Milestone: 7.4.17.6.1
Priority: highnormal

Going to punt on this for the time being.

comment:11 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:12 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:13 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:14 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:15 Changed 22 months ago by osa1

Is this ticket still valid? I just tried to reproduce this, but I don't think we're generating scc calls anymore. (maybe scc operation is done by the RTS now?)

comment:16 Changed 20 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.