Skip to content
  1. Mar 03, 2014
  2. Mar 02, 2014
  3. Mar 01, 2014
  4. Feb 28, 2014
    • Lang Hames's avatar
      Jumped the gun with r202551 and broke some bots that weren't yet C++11ified. · c083578a
      Lang Hames authored
      Reverting until the C++11 switch is complete.
      
      llvm-svn: 202554
      c083578a
    • Lang Hames's avatar
      New PBQP solver, and updates to the PBQP graph. · 525a2123
      Lang Hames authored
      The previous PBQP solver was very robust but consumed a lot of memory,
      performed a lot of redundant computation, and contained some unnecessarily tight
      coupling that prevented experimentation with novel solution techniques. This new
      solver is an attempt to address these shortcomings.
      
      Important/interesting changes:
      
      1) The domain-independent PBQP solver class, HeuristicSolverImpl, is gone.
      It is replaced by a register allocation specific solver, PBQP::RegAlloc::Solver
      (see RegAllocSolver.h).
      
      The optimal reduction rules and the backpropagation algorithm have been extracted
      into stand-alone functions (see ReductionRules.h), which can be used to build
      domain specific PBQP solvers. This provides many more opportunities for
      domain-specific knowledge to inform the PBQP solvers' decisions. In theory this
      should allow us to generate better solutions. In practice, we can at least test
      out ideas now.
      
      As a side benefit, I believe the new solver is more readable than the old one.
      
      2) The solver type is now a template parameter of the PBQP graph.
      
      This allows the graph to notify the solver of any modifications made (e.g. by
      domain independent rules) without the overhead of a virtual call. It also allows
      the solver to supply policy information to the graph (see below).
      
      3) Significantly reduced memory overhead.
      
      Memory management policy is now an explicit property of the PBQP graph (via
      the CostAllocator typedef on the graph's solver template argument). Because PBQP
      graphs for register allocation tend to contain many redundant instances of
      single values (E.g. the value representing an interference constraint between
      GPRs), the new RASolver class uses a uniquing scheme. This massively reduces
      memory consumption for large register allocation problems. For example, looking
      at the largest interference graph in each of the SPEC2006 benchmarks (the
      largest graph will always set the memory consumption high-water mark for PBQP),
      the average memory reduction for the PBQP costs was 400x. That's times, not
      percent. The highest was 1400x. Yikes. So - this is fixed.
      
      "PBQP: No longer feasting upon every last byte of your RAM".
      
      Minor details:
      
      - Fully C++11'd. Never copy-construct another vector/matrix!
      
      - Cute tricks with cost metadata: Metadata that is derived solely from cost
      matrices/vectors is attached directly to the cost instances themselves. That way
      if you unique the costs you never have to recompute the metadata. 400x less
      memory means 400x less cost metadata (re)computation.
      
      Special thanks to Arnaud de Grandmaison, who has been the source of much
      encouragement, and of many very useful test cases.
      
      This new solver forms the basis for future work, of which there's plenty to do.
      I will be adding TODO notes shortly.
      
      - Lang.
      
      llvm-svn: 202551
      525a2123
    • Hal Finkel's avatar
      Fix visitTRUNCATE for legal i1 values · ab51ecd4
      Hal Finkel authored
      This extract-and-trunc vector optimization cannot work for i1 values as
      currently implemented, and so I'm disabling this for now for i1 values. In the
      future, this can be fixed properly.
      
      Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and
      this will be covered by one of the existing regression tests.
      
      llvm-svn: 202449
      ab51ecd4
  5. Feb 27, 2014
  6. Feb 26, 2014
    • Andrew Trick's avatar
      Add a limit to the heuristic that register allocates instructions in local order. · 52a00936
      Andrew Trick authored
      This handles pathological cases in which we see 2x increase in spill
      code for large blocks (~50k instructions). I don't have a unit test
      for this behavior.
      
      Fixes rdar://16072279.
      
      llvm-svn: 202304
      52a00936
    • Hal Finkel's avatar
      Fix the aggressive anti-dep breaker's subregister definition handling · 121caf63
      Hal Finkel authored
      The aggressive anti-dependency breaker scans instructions, bottom-up, within the
      scheduling region in order to find opportunities where register renaming can
      be used to break anti-dependencies.
      
      Unfortunately, the aggressive anti-dep breaker was treating a register definition
      as defining all of that register's aliases (including super registers). This behavior
      is incorrect when the super register is live and there are other definitions of
      subregisters of the super register.
      
      For example, given the following sequence:
      
      %CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
      %CR2GT<def> = IMPLICIT_DEF
      %X4<def> = MFOCRF8 %CR2
      
      the analysis of the first subregister definition would work as expected:
      Anti:   %CR2GT<def> = IMPLICIT_DEF
              Def Groups: CR2GT=g194->g0(via CR2)
              Antidep reg: CR2GT (zero group)
              Use Groups:
      
      but the analysis of the second one would not:
      Anti:   %CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
              Def Groups: CR2EQ=g195
              Antidep reg: CR2EQ
              Rename Candidates for Group g195: ...
      
      because, when processing the %CR2GT<def>, we'd mark all super registers of
      %CR2GT (%CR2 in this case) as defined. As a result, when processing
      %CR2EQ<def>, %CR2 no longer appears to be live, and %CR2EQ<def>'s group is not
      %unioned with the %CR2 group.
      
      I don't have an in-tree test case for this yet (and even if I did, I don't have
      a small one).
      
      llvm-svn: 202294
      121caf63
    • Eric Christopher's avatar
      80-col. · f9761a29
      Eric Christopher authored
      llvm-svn: 202221
      f9761a29
    • Eric Christopher's avatar
      Formatting fixups. · 73ffdb8b
      Eric Christopher authored
      llvm-svn: 202220
      73ffdb8b
  7. Feb 25, 2014
  8. Feb 24, 2014
  9. Feb 23, 2014
  10. Feb 22, 2014
Loading