Skip to content
  1. Jun 26, 2012
    • Jakob Stoklund Olesen's avatar
      Allow targets to inject passes before the virtual register rewriter. · 59a0d324
      Jakob Stoklund Olesen authored
      Such passes can be used to tweak the register assignments in a
      target-dependent way, for example to avoid write-after-write
      dependencies.
      
      llvm-svn: 159209
      59a0d324
    • Chandler Carruth's avatar
      Update a bunch of stale comments that dated from when this folled the · 9139f44d
      Chandler Carruth authored
      very first (and worst) placement algorithm. These should now more
      accurately reflect the reality of the pass.
      
      llvm-svn: 159185
      9139f44d
    • Andrew Trick's avatar
      Enable the new LoopInfo algorithm by default. · fb2ba3e1
      Andrew Trick authored
      The primary advantage is that loop optimizations will be applied in a
      stable order. This helps debugging and unit test creation. It is also
      a better overall implementation without pathologically bad performance
      on deep functions.
      
      On large functions (llvm-stress --size=200000 | opt -loops)
      Before: 0.1263s
      After:  0.0225s
      
      On deep functions (after tweaking llvm-stress, thanks Nadav):
      Before: 0.2281s
      After:  0.0227s
      
      See r158790 for more comments.
      
      The loop tree is now consistently generated in forward order, but loop
      passes are applied in reverse order over the program. If we have a
      loop optimization that prefers forward order, that can easily be
      achieved by adding a different type of LoopPassManager.
      
      llvm-svn: 159183
      fb2ba3e1
    • Evan Cheng's avatar
      Make sure type is not extended or untyped before create a constant of the... · 4c6f917d
      Evan Cheng authored
      Make sure type is not extended or untyped before create a constant of the type. No test case. Found by inspection.
      
      llvm-svn: 159179
      4c6f917d
  2. Jun 25, 2012
    • Jakob Stoklund Olesen's avatar
      Enforce stricter liveness rules for PHIs. · a57fc12e
      Jakob Stoklund Olesen authored
      Verify that all paths from the entry block to a virtual register read
      pass through a def. Enable this check even when MRI->isSSA() is false.
      
      Verify that the live range of a virtual register is live out of all
      predecessor blocks, even for PHI-values.
      
      This requires that PHIElimination sometimes inserts IMPLICIT_DEF
      instruction in predecessor blocks.
      
      llvm-svn: 159150
      a57fc12e
    • Jakob Stoklund Olesen's avatar
      Run ProcessImplicitDefs on SSA form where it can be much simpler. · eb495664
      Jakob Stoklund Olesen authored
      Implicitly defined virtual registers can simply have the <undef> bit set
      on all uses, and copies can be turned into implicit defs recursively.
      
      Physical registers are a bit trickier. We handle the common case where a
      physreg def is used by a nearby instruction in the same basic block. For
      more complicated cases, just leave the IMPLICIT_DEF instruction in.
      
      llvm-svn: 159149
      eb495664
    • Jakob Stoklund Olesen's avatar
      Teach PHIElimination to handle <undef> operands. · 70ed924e
      Jakob Stoklund Olesen authored
      When a PHI use is <undef>, don't emit a copy in the predecessor block,
      but insert an IMPLICIT_DEF instruction instead. This ensures that
      virtual register uses are always jointly dominated by defs, even if some
      of them are IMPLICIT_DEF.
      
      llvm-svn: 159121
      70ed924e
    • Jakob Stoklund Olesen's avatar
      Handle <undef> operands in TwoAddressInstructionPass. · 6b556f82
      Jakob Stoklund Olesen authored
      When the source register to a 2-addr instruction is undefined, there is
      no need to attempt any transformations - simply replace the source
      register with the destination register.
      
      This also comes up when lowering IMPLICIT_DEF instructions - make sure
      the <undef> flag is moved to the new partial register def operand:
      
        %vreg8<def> = INSERT_SUBREG %vreg9<undef>, %vreg0<kill>, sub_16bit
      rewrite undef:
        %vreg8<def> = INSERT_SUBREG %vreg8<undef>, %vreg0<kill>, sub_16bit
      convert to:
        %vreg8:sub_16bit<def,read-undef> = COPY %vreg0<kill>
      
      llvm-svn: 159120
      6b556f82
  3. Jun 24, 2012
  4. Jun 23, 2012
  5. Jun 22, 2012
  6. Jun 21, 2012
    • Jack Carter's avatar
      The inline asm operand modifier 'n' is suppose · c457f620
      Jack Carter authored
      to be generic across architectures. It has the
      following description in the gnu sources:
      
          Negate the immediate constant
      
      Several Architectures such as x86 have local implementations
      of operand modifier 'n' which go beyond the above description
      slightly. This won't affect them.
      
      Affected files:
      
          lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
              Added 'n' to the switch cases.
      
          test/CodeGen/Generic/asm-large-immediate.ll
              Generic compiled test (x86 for me)
      
          test/CodeGen/Mips/asm-large-immediate.ll
              Mips compiled version of the generic one
      
      Contributer: Jack Carter
      llvm-svn: 158939
      c457f620
    • Pete Cooper's avatar
      Fix potential crash if DAGCombine on stores sees a half type · 5b61422d
      Pete Cooper authored
      llvm-svn: 158927
      5b61422d
    • Jack Carter's avatar
      The inline asm operand modifier 'c' is suppose · b2fd5f66
      Jack Carter authored
      to be generic across architectures. It has the
      following description in the gnu sources:
      
          Substitute immediate value without immediate syntax
      
      Several Architectures such as x86 have local implementations
      of operand modifier 'c' which go beyond the above description
      slightly. To make use of the generic modifiers without overriding
      local implementation one can make a call to the base class method
      for AsmPrinter::PrintAsmOperand() in the locally derived method's 
      "default" case in the switch statement. That way if it is already
      defined locally the generic version will never get called.
      
      This change is needed when test/CodeGen/generic/asm-large-immediate.ll
      failed on a native Mips board. The test was assuming a generic
      implementation was in place.
      
      Affected files:
      
          lib/Target/Mips/MipsAsmPrinter.cpp:
              Changed the default case to call the base method.
          lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
              Added 'c' to the switch cases.
          test/CodeGen/Mips/asm-large-immediate.ll
              Mips compiled version of the generic one
      
      Contributer: Jack Carter
      llvm-svn: 158925
      b2fd5f66
    • Evan Cheng's avatar
      Emit a single _udivmodsi4 libcall instead of two separate _udivsi3 and · 8c2ad812
      Evan Cheng authored
      _umodsi3 libcalls if they have the same arguments. This optimization
      was apparently broken if one of the node was replaced in place.
      rdar://11714607
      
      llvm-svn: 158900
      8c2ad812
    • Jakob Stoklund Olesen's avatar
      Update regunits in RegisterCoalescer::reMaterializeTrivialDef. · 58713de5
      Jakob Stoklund Olesen authored
      Old code would only update physreg live intervals.
      
      llvm-svn: 158881
      58713de5
    • Jakob Stoklund Olesen's avatar
      Remove spurious typedefs. · 37a1338a
      Jakob Stoklund Olesen authored
      llvm-svn: 158878
      37a1338a
    • Jakob Stoklund Olesen's avatar
      Remove the RenderMachineFunction HTML output pass. · 1911a020
      Jakob Stoklund Olesen authored
      I don't think anyone has been using this functionality for a while, and
      it is getting in the way of refactoring now.
      
      llvm-svn: 158876
      1911a020
    • Jakob Stoklund Olesen's avatar
      Remove the -live-regunits command line option. · 51c63e64
      Jakob Stoklund Olesen authored
      Register allocators depend on it being permanently enabled now.
      
      llvm-svn: 158873
      51c63e64
    • Jakob Stoklund Olesen's avatar
      Fix some more LiveInterval enumerations. · 781e0b9f
      Jakob Stoklund Olesen authored
      Deterministically enumerate the virtual registers instead.
      
      llvm-svn: 158872
      781e0b9f
    • Jakob Stoklund Olesen's avatar
      Remove LiveIntervalUnions from RegAllocBase. · 2d2dec96
      Jakob Stoklund Olesen authored
      They are living in LiveRegMatrix now.
      
      llvm-svn: 158868
      2d2dec96
    • Jakob Stoklund Olesen's avatar
      Convert RAGreedy to LiveRegMatrix interference checking. · 96eebf0b
      Jakob Stoklund Olesen authored
      Stop depending on the LiveIntervalUnions in RegAllocBase, they are about
      to be removed.
      
      The changes are mostly replacing register alias iterators with regunit
      iterators, and querying LiveRegMatrix instrad of RegAllocBase.
      
      InterferenceCache is converted to work with per-regunit
      LiveIntervalUnions, and it checks fixed regunit interference separately,
      using the fixed live intervals provided by LiveIntervalAnalysis.
      
      The local splitting helper calcGapWeights() is also considering fixed
      regunit interference which is kept on the side now.
      
      llvm-svn: 158867
      96eebf0b
    • Jakob Stoklund Olesen's avatar
      Convert RABasic to using LiveRegMatrix interference checking. · 03b87d5a
      Jakob Stoklund Olesen authored
      Stop using the LiveIntervalUnions provided by RegAllocBase, they will be
      removed soon.
      
      llvm-svn: 158866
      03b87d5a
Loading