Skip to content
  1. Jun 20, 2012
    • Chandler Carruth's avatar
      Fix two rather subtle internal vs. external linker issues. · c60fbe6b
      Chandler Carruth authored
      I'll admit I'm not entirely satisfied with this change, but it seemed
      the cleanest option. Other suggestions quite welcome
      
      The issue is that the traits specializations have static methods which
      return the typedef'ed PHI_iterator type. In both the IR and MI layers
      this is typedef'ed to a custom iterator class defined in an anonymous
      namespace giving the types and the functions returning them internal
      linkage. However, because the traits specialization is defined in the
      'llvm' namespace (where it has to be, specialized template lives there),
      and is in turn used in the templated implementation of the SSAUpdater.
      This led to the linkage conflict that Clang now warns about.
      
      The simplest solution to me was just to define the PHI_iterator as
      a nested class inside the trait specialization. That way it still
      doesn't get scoped widely, it can't be accidentally reused somewhere,
      etc. This is a little gross just because nested class definitions are
      a little gross, but the alternatives seem more ad-hoc.
      
      llvm-svn: 158799
      c60fbe6b
    • Andrew Trick's avatar
      A new algorithm for computing LoopInfo. Temporarily disabled. · ff2ed7b6
      Andrew Trick authored
      -stable-loops enables a new algorithm for generating the Loop
      forest. It differs from the original algorithm in a few respects:
      
      - Not determined by use-list order.
      - Initially guarantees RPO order of block and subloops.
      - Linear in the number of CFG edges.
      - Nonrecursive.
      
      I didn't want to change the LoopInfo API yet, so the block lists are
      still inclusive. This seems strange to me, and it means that building
      LoopInfo is not strictly linear, but it may not be a problem in
      practice. At least the block lists start out in RPO order now. In the
      future we may add an attribute or wrapper analysis that allows other
      passes to assume RPO order.
      
      The primary motivation of this work was not to optimize LoopInfo, but
      to allow reproducing performance issues by decomposing the compilation
      stages. I'm often unable to do this with the current LoopInfo, because
      the loop tree order determines Loop pass order. Serializing the IR
      tends to invert the order, which reverses the optimization order. This
      makes it nearly impossible to debug interdependent loop optimizations
      such as LSR.
      
      I also believe this will provide more stable performance results across time.
      
      llvm-svn: 158790
      ff2ed7b6
    • Andrew Trick's avatar
      Move the implementation of LoopInfo into LoopInfoImpl.h. · cda51d43
      Andrew Trick authored
      The implementation only needs inclusion from LoopInfo.cpp and
      MachineLoopInfo.cpp. Clients of the interface should only include the
      interface. This makes the interface readable and speeds up rebuilds
      after modifying the implementation.
      
      llvm-svn: 158787
      cda51d43
    • Jakob Stoklund Olesen's avatar
      Add regunit liveness support to LiveIntervals::handleMove(). · 3802bbf3
      Jakob Stoklund Olesen authored
      When LiveIntervals is tracking fixed interference in regunits, make sure
      to update those intervals as well. Currently guarded by -live-regunits.
      
      llvm-svn: 158766
      3802bbf3
    • Chad Rosier's avatar
      Tidy up. · 651f9a48
      Chad Rosier authored
      llvm-svn: 158762
      651f9a48
    • Chad Rosier's avatar
      Add an ensureMaxAlignment() function to MachineFrameInfo (analogous to · 73696927
      Chad Rosier authored
      ensureAlignment() in MachineFunction).  Also, drop setMaxAlignment() in
      favor of this new function.  This creates a main entry point to setting
      MaxAlignment, which will be helpful for future work.  No functionality
      change intended.
      
      llvm-svn: 158758
      73696927
    • Lang Hames's avatar
      Add DAG-combines for aggressive FMA formation. · 39fb1d08
      Lang Hames authored
      This patch adds DAG combines to form FMAs from pairs of FADD + FMUL or
      FSUB + FMUL. The combines are performed when:
      (a) Either
            AllowExcessFPPrecision option (-enable-excess-fp-precision for llc)
              OR
            UnsafeFPMath option (-enable-unsafe-fp-math)
          are set, and
      (b) TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) is true for the type of
          the FADD/FSUB, and
      (c) The FMUL only has one user (the FADD/FSUB).
      
      If your target has fast FMA instructions you can make use of these combines by
      overriding TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) to return true for
      types supported by your FMA instruction, and adding patterns to match ISD::FMA
      to your FMA instructions.
      
      llvm-svn: 158757
      39fb1d08
    • Jakob Stoklund Olesen's avatar
      80 col. · 2db1125b
      Jakob Stoklund Olesen authored
      llvm-svn: 158755
      2db1125b
  2. Jun 19, 2012
  3. Jun 18, 2012
  4. Jun 16, 2012
  5. Jun 15, 2012
  6. Jun 14, 2012
  7. Jun 13, 2012
  8. Jun 12, 2012
  9. Jun 09, 2012
    • Benjamin Kramer's avatar
    • Andrew Trick's avatar
      Register pressure: added getPressureAfterInstr. · fc8ce08b
      Andrew Trick authored
      llvm-svn: 158256
      fc8ce08b
    • Jakob Stoklund Olesen's avatar
      Sketch a LiveRegMatrix analysis pass. · c26fbbfb
      Jakob Stoklund Olesen authored
      The LiveRegMatrix represents the live range of assigned virtual
      registers in a Live interval union per register unit. This is not
      fundamentally different from the interference tracking in RegAllocBase
      that both RABasic and RAGreedy use.
      
      The important differences are:
      
      - LiveRegMatrix tracks interference per register unit instead of per
        physical register. This makes interference checks cheaper and
        assignments slightly more expensive. For example, the ARM D7 reigster
        has 24 aliases, so we would check 24 physregs before assigning to one.
        With unit-based interference, we check 2 units before assigning to 2
        units.
      
      - LiveRegMatrix caches regmask interference checks. That is currently
        duplicated functionality in RABasic and RAGreedy.
      
      - LiveRegMatrix is a pass which makes it possible to insert
        target-dependent passes between register allocation and rewriting.
        Such passes could tweak the register assignments with interference
        checking support from LiveRegMatrix.
      
      Eventually, RABasic and RAGreedy will be switched to LiveRegMatrix.
      
      llvm-svn: 158255
      c26fbbfb
    • Jakob Stoklund Olesen's avatar
      Also compute MBB live-in lists in the new rewriter pass. · be336295
      Jakob Stoklund Olesen authored
      This deduplicates some code from the optimizing register allocators, and
      it means that it is now possible to change the register allocators'
      solutions simply by editing the VirtRegMap between the register
      allocator pass and the rewriter.
      
      llvm-svn: 158249
      be336295
    • Jakob Stoklund Olesen's avatar
      Reintroduce VirtRegRewriter. · 1224312f
      Jakob Stoklund Olesen authored
      OK, not really. We don't want to reintroduce the old rewriter hacks.
      
      This patch extracts virtual register rewriting as a separate pass that
      runs after the register allocator. This is possible now that
      CodeGen/Passes.cpp can configure the full optimizing register allocator
      pipeline.
      
      The rewriter pass uses register assignments in VirtRegMap to rewrite
      virtual registers to physical registers, and it inserts kill flags based
      on live intervals.
      
      These finalization steps are the same for the optimizing register
      allocators: RABasic, RAGreedy, and PBQP.
      
      llvm-svn: 158244
      1224312f
  10. Jun 08, 2012
  11. Jun 07, 2012
  12. Jun 06, 2012
Loading