Changes between Initial Version and Version 1 of Ticket #5171


Ignore:
Timestamp:
Jul 15, 2011 10:28:45 PM (3 years ago)
Author:
igloo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5171 – Description

    initial v1  
    33 
    44Let's say we have (Op1 arg1 arg2) and we want to transform it to (Op2 arg1 (Op3 arg2 arg1)). Doing this would mean that arg1 would be computed more than once. Instead, the following should be possible: 
    5  
     5{{{ 
    66arg1_reg <- arg1 
    77(Op2 arg1_reg (Op3 arg2 arg1_reg)) 
    8  
     8}}} 
    99The lack of this feature already stops one of optimisations from happening in most cases. See: 
    10  
     10{{{ 
    1111       CmmReg _ <- x -> -- We duplicate x below, hence require 
    1212        -- it is a reg.  FIXME: remove this restriction. 
    13  
     13}}} 
    1414in CmmOpt.hs. 
    1515