Skip to content
  1. Dec 06, 2011
  2. Dec 01, 2011
  3. Nov 29, 2011
  4. Nov 13, 2011
  5. Nov 12, 2011
  6. Oct 21, 2011
    • Chandler Carruth's avatar
      Implement a block placement pass based on the branch probability and · 10281425
      Chandler Carruth authored
      block frequency analyses. This differs substantially from the existing
      block-placement pass in LLVM:
      
      1) It operates on the Machine-IR in the CodeGen layer. This exposes much
         more (and more precise) information and opportunities. Also, the
         results are more stable due to fewer transforms ocurring after the
         pass runs.
      2) It uses the generalized probability and frequency analyses. These can
         model static heuristics, code annotation derived heuristics as well
         as eventual profile loading. By basing the optimization on the
         analysis interface it can work from any (or a combination) of these
         inputs.
      3) It uses a more aggressive algorithm, both building chains from tho
         bottom up to maximize benefit, and using an SCC-based walk to layout
         chains of blocks in a profitable ordering without O(N^2) iterations
         which the old pass involves.
      
      The pass is currently gated behind a flag, and not enabled by default
      because it still needs to grow some important features. Most notably, it
      needs to support loop aligning and careful layout of loop structures
      much as done by hand currently in CodePlacementOpt. Once it supports
      these, and has sufficient testing and quality tuning, it should replace
      both of these passes.
      
      Thanks to Nick Lewycky and Richard Smith for help authoring & debugging
      this, and to Jakob, Andy, Eric, Jim, and probably a few others I'm
      forgetting for reviewing and answering all my questions. Writing
      a backend pass is *sooo* much better now than it used to be. =D
      
      llvm-svn: 142641
      10281425
  7. Sep 28, 2011
  8. Sep 25, 2011
    • Jakob Stoklund Olesen's avatar
      Rename LowerSubregs to ExpandPostRAPseudos. · f152df1e
      Jakob Stoklund Olesen authored
      I'll fix the file contents in the next commit.
      
      This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I
      am going to add a hook so targets can expand more pseudo-instructions
      after register allocation.
      
      Many targets have pseudo-instructions that assist the register
      allocator.  They can be expanded after register allocation, before PEI
      and PostRA scheduling.
      
      llvm-svn: 140469
      f152df1e
  9. Sep 13, 2011
  10. Aug 10, 2011
  11. Jul 29, 2011
    • Chandler Carruth's avatar
      Rewrite the CMake build to use explicit dependencies between libraries, · 9d7feab3
      Chandler Carruth authored
      specified in the same file that the library itself is created. This is
      more idiomatic for CMake builds, and also allows us to correctly specify
      dependencies that are missed due to bugs in the GenLibDeps perl script,
      or change from compiler to compiler. On Linux, this returns CMake to
      a place where it can relably rebuild several targets of LLVM.
      
      I have tried not to change the dependencies from the ones in the current
      auto-generated file. The only places I've really diverged are in places
      where I was seeing link failures, and added a dependency. The goal of
      this patch is not to start changing the dependencies, merely to move
      them into the correct location, and an explicit form that we can control
      and change when necessary.
      
      This also removes a serialization point in the build because we don't
      have to scan all the libraries before we begin building various tools.
      We no longer have a step of the build that regenerates a file inside the
      source tree. A few other associated cleanups fall out of this.
      
      This isn't really finished yet though. After talking to dgregor he urged
      switching to a single CMake macro to construct libraries with both
      sources and dependencies in the arguments. Migrating from the two macros
      to that style will be a follow-up patch.
      
      Also, llvm-config is still generated with GenLibDeps.pl, which means it
      still has slightly buggy dependencies. The internal CMake
      'llvm-config-like' macro uses the correct explicitly specified
      dependencies however. A future patch will switch llvm-config generation
      (when using CMake) to be based on these deps as well.
      
      This may well break Windows. I'm getting a machine set up now to dig
      into any failures there. If anyone can chime in with problems they see
      or ideas of how to solve them for Windows, much appreciated.
      
      llvm-svn: 136433
      9d7feab3
  12. Jul 25, 2011
  13. Jul 16, 2011
  14. Jun 28, 2011
  15. Jun 27, 2011
  16. Jun 16, 2011
  17. Jun 02, 2011
    • Jakob Stoklund Olesen's avatar
      Add a RegisterClassInfo class that lazily caches information about · c58894bc
      Jakob Stoklund Olesen authored
      register classes.
      
      It provides information for each register class that cannot be
      determined statically, like:
      
      - The number of allocatable registers in a class after filtering out the
        reserved and invalid registers.
      
      - The preferred allocation order with registers that overlap callee-saved
        registers last.
      
      - The last callee-saved register that overlaps a given physical register.
      
      This information usually doesn't change between functions, so it is
      reused for compiling multiple functions when possible.  The many
      possible combinations of reserved and callee saves registers makes it
      unfeasible to compute this information statically in TableGen.
      
      Use RegisterClassInfo to count available registers in various heuristics
      in SimpleRegisterCoalescing, making the pass run 4% faster.
      
      llvm-svn: 132450
      c58894bc
  18. Apr 02, 2011
  19. Feb 18, 2011
  20. Jan 09, 2011
  21. Jan 06, 2011
    • Jakob Stoklund Olesen's avatar
      Add the SpillPlacement analysis pass. · 8e236eac
      Jakob Stoklund Olesen authored
      This pass precomputes CFG block frequency information that can be used by the
      register allocator to find optimal spill code placement.
      
      Given an interference pattern, placeSpills() will compute which basic blocks
      should have the current variable enter or exit in a register, and which blocks
      prefer the stack.
      
      The algorithm is ready to consume block frequencies from profiling data, but for
      now it gets by with the static estimates used for spill weights.
      
      This is a work in progress and still not hooked up to RegAllocGreedy.
      
      llvm-svn: 122938
      8e236eac
  22. Jan 04, 2011
  23. Dec 16, 2010
    • Jakob Stoklund Olesen's avatar
      Add MachineLoopRanges analysis. · 5e977813
      Jakob Stoklund Olesen authored
      A MachineLoopRange contains the intervals of slot indexes covered by the blocks
      in a loop. This representation of the loop blocks is more efficient to compare
      against interfering registers during register coalescing.
      
      llvm-svn: 121917
      5e977813
  24. Dec 10, 2010
  25. Dec 08, 2010
  26. Dec 05, 2010
  27. Nov 30, 2010
    • Jakob Stoklund Olesen's avatar
      Stub out a new LiveDebugVariables pass. · d4900a64
      Jakob Stoklund Olesen authored
      This analysis is going to run immediately after LiveIntervals. It will stay
      alive during register allocation and keep track of user variables mentioned in
      DBG_VALUE instructions.
      
      When the register allocator is moving values between registers and the stack, it
      is very hard to keep track of DBG_VALUE instructions. We usually get it wrong.
      This analysis maintains a data structure that makes it easy to update DBG_VALUE
      instructions.
      
      llvm-svn: 120385
      d4900a64
  28. Nov 18, 2010
  29. Nov 16, 2010
  30. Oct 23, 2010
    • Andrew Trick's avatar
      This is a prototype of an experimental register allocation · 1c24605a
      Andrew Trick authored
      framework. It's purpose is not to improve register allocation per se,
      but to make it easier to develop powerful live range splitting. I call
      it the basic allocator because it is as simple as a global allocator
      can be but provides the building blocks for sophisticated register
      allocation with live range splitting. 
      
      A minimal implementation is provided that trivially spills whenever it
      runs out of registers. I'm checking in now to get high-level design
      and style feedback. I've only done minimal testing. The next step is
      implementing a "greedy" allocation algorithm that does some register
      reassignment and makes better splitting decisions.
      
      llvm-svn: 117174
      1c24605a
  31. Oct 15, 2010
  32. Oct 07, 2010
  33. Sep 29, 2010
  34. Sep 14, 2010
  35. Sep 10, 2010
  36. Aug 14, 2010
    • Ted Kremenek's avatar
      Update CMake build. · da2eba58
      Ted Kremenek authored
      llvm-svn: 111063
      da2eba58
    • Jim Grosbach's avatar
      Add a local stack object block allocation pass. This is still an · a030fa52
      Jim Grosbach authored
      experimental pass that allocates locals relative to one another before
      register allocation and then assigns them to actual stack slots as a block
      later in PEI. This will eventually allow targets with limited index offset
      range to allocate additional base registers (not just FP and SP) to
      more efficiently reference locals, as well as handle situations where
      locals cannot be referenced via SP or FP at all (dynamic stack realignment
      together with variable sized objects, for example). It's currently
      incomplete and almost certainly buggy. Work in progress.
      
      Disabled by default and gated via the -enable-local-stack-alloc command
      line option.
      
      rdar://8277890
      
      llvm-svn: 111059
      a030fa52
  37. Aug 10, 2010
  38. Aug 06, 2010
Loading