Skip to content
  1. Aug 04, 2014
  2. Aug 03, 2014
    • Gerolf Hoflehner's avatar
      MachineCombiner Pass for selecting faster instruction · 5e1207e5
      Gerolf Hoflehner authored
       sequence -  target independent framework
      
       When the DAGcombiner selects instruction sequences
       it could increase the critical path or resource len.
      
       For example, on arm64 there are multiply-accumulate instructions (madd,
       msub). If e.g. the equivalent  multiply-add sequence is not on the
       crictial path it makes sense to select it instead of  the combined,
       single accumulate instruction (madd/msub). The reason is that the
       conversion from add+mul to the madd could lengthen the critical path
       by the latency of the multiply.
      
       But the DAGCombiner would always combine and select the madd/msub
       instruction.
      
       This patch uses machine trace metrics to estimate critical path length
       and resource length of an original instruction sequence vs a combined
       instruction sequence and picks the faster code based on its estimates.
      
       This patch only commits the target independent framework that evaluates
       and selects code sequences. The machine instruction combiner is turned
       off for all targets and expected to evolve over time by gradually
       handling DAGCombiner pattern in the target specific code.
      
       This framework lays the groundwork for fixing
       rdar://16319955
      
      llvm-svn: 214666
      5e1207e5
Loading