Skip to content
  1. Mar 27, 2012
  2. Mar 07, 2012
  3. Mar 05, 2012
  4. Mar 04, 2012
  5. Feb 22, 2012
  6. Feb 16, 2012
  7. Feb 08, 2012
  8. Jan 20, 2012
  9. Jan 12, 2012
  10. Jan 07, 2012
    • Evan Cheng's avatar
      Revert part of r147716. Looks like x87 instructions kill markers are all messed · 6cc8d498
      Evan Cheng authored
      up so branch folding pass can't use the scavenger. :-(  This doesn't breaks
      anything currently. It just means targets which do not carefully update kill
      markers cannot run post-ra scheduler (not new, it has always been the case).
      
      We should fix this at some point since it's really hacky.
      
      llvm-svn: 147719
      6cc8d498
    • Evan Cheng's avatar
      Added a late machine instruction copy propagation pass. This catches · 00b1a3cd
      Evan Cheng authored
      opportunities that only present themselves after late optimizations
      such as tail duplication .e.g.
      ## BB#1:
              movl    %eax, %ecx
              movl    %ecx, %eax
              ret
      
      The register allocator also leaves some of them around (due to false
      dep between copies from phi-elimination, etc.)
      
      This required some changes in codegen passes. Post-ra scheduler and the
      pseudo-instruction expansion passes have been moved after branch folding
      and tail merging. They were before branch folding before because it did
      not always update block livein's. That's fixed now. The pass change makes
      independently since we want to properly schedule instructions after
      branch folding / tail duplication.
      
      rdar://10428165
      rdar://10640363
      
      llvm-svn: 147716
      00b1a3cd
  11. Dec 14, 2011
    • Evan Cheng's avatar
      - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function · 7fae11b2
      Evan Cheng authored
        to finalize MI bundles (i.e. add BUNDLE instruction and computing register def
        and use lists of the BUNDLE instruction) and a pass to unpack bundles.
      - Teach more of MachineBasic and MachineInstr methods to be bundle aware.
      - Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to
        prevent IT blocks from being broken apart.
      
      llvm-svn: 146542
      7fae11b2
  12. Dec 07, 2011
    • Evan Cheng's avatar
      Add bundle aware API for querying instruction properties and switch the code · 7f8e563a
      Evan Cheng authored
      generator to it. For non-bundle instructions, these behave exactly the same
      as the MC layer API.
      
      For properties like mayLoad / mayStore, look into the bundle and if any of the
      bundled instructions has the property it would return true.
      For properties like isPredicable, only return true if *all* of the bundled
      instructions have the property.
      For properties like canFoldAsLoad, isCompare, conservatively return false for
      bundles.
      
      llvm-svn: 146026
      7f8e563a
  13. Oct 26, 2011
    • Bill Wendling's avatar
      Reapply r142920 with fix: · 9b993222
      Bill Wendling authored
      An MBB which branches to an EH landing pad shouldn't be considered for tail merging.
      
      In SjLj EH, the jump to the landing pad is not done explicitly through a branch
      statement. The EH landing pad is added as a successor to the throwing
      BB. Because of that however, the branch folding pass could mistakenly think that
      it could merge the throwing BB with another BB. This isn't safe to do.
      <rdar://problem/10334833>
      
      llvm-svn: 143001
      9b993222
  14. Oct 25, 2011
  15. Aug 05, 2011
    • Jakob Stoklund Olesen's avatar
      Fix liveness computations in BranchFolding. · d633abeb
      Jakob Stoklund Olesen authored
      The old code would look at kills and defs in one pass over the
      instruction operands, causing problems with this code:
      
        %R0<def>, %CPSR<def,dead> = tLSLri %R5<kill>, 2, pred:14, pred:%noreg
        %R0<def>, %CPSR<def,dead> = tADDrr %R4<kill>, %R0<kill>, pred:14, %pred:%noreg
      
      The last instruction kills and redefines %R0, so it is still live after
      the instruction.
      
      This caused a register scavenger crash when compiling 483.xalancbmk for
      armv6. I am not including a test case because it requires too much bad
      luck to expose this old bug.
      
      First you need to convince the register allocator to use %R0 twice on
      the tADDrr instruction, then you have to convince BranchFolding to do
      something that causes it to run the register scavenger on he bad block.
      
      <rdar://problem/9898200>
      
      llvm-svn: 136973
      d633abeb
  16. Jul 07, 2011
    • Eli Friedman's avatar
      When tail-merging multiple blocks, make sure to correctly update the live-in... · bf007364
      Eli Friedman authored
      When tail-merging multiple blocks, make sure to correctly update the live-in list on the merged block to correctly account for the live-outs of all the predecessors.  They might not be the same in all cases (the testcase I have involves a PHI node where one of the operands is an IMPLICIT_DEF).
      
      Unfortunately, the testcase I have is large and confidential, so I don't have a test to commit at the moment; I'll see if I can come up with something smaller where this issue reproduces.
      
      <rdar://problem/9716278>
      
      llvm-svn: 134565
      bf007364
  17. Jun 28, 2011
  18. Jun 14, 2011
  19. May 26, 2011
  20. May 13, 2011
  21. May 12, 2011
  22. May 11, 2011
  23. Apr 22, 2011
    • Bill Wendling's avatar
      Branch folding is folding a landing pad into a regular BB. · c14d7322
      Bill Wendling authored
      An exception is thrown via a call to _cxa_throw, which we don't expect to
      return. Therefore, the "true" part of the invoke goes to a BB that has
      'unreachable' as its only instruction. This is lowered into an empty MachineBB.
      The landing pad for this invoke, however, is directly after the "true" MBB.
      When the empty MBB is removed, the landing pad is directly below the BB with the
      invoke call. The unconditional branch is removed and then the two blocks are
      merged together.
      
      The testcase is too big for a regression test.
      <rdar://problem/9305728>
      
      llvm-svn: 129965
      c14d7322
  24. Feb 22, 2011
  25. Aug 06, 2010
  26. Jun 22, 2010
  27. Jun 19, 2010
    • Evan Cheng's avatar
      Allow ARM if-converter to be run after post allocation scheduling. · 2d51c7c5
      Evan Cheng authored
      - This fixed a number of bugs in if-converter, tail merging, and post-allocation
        scheduler. If-converter now runs branch folding / tail merging first to
        maximize if-conversion opportunities.
      - Also changed the t2IT instruction slightly. It now defines the ITSTATE
        register which is read by instructions in the IT block.
      - Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
        change the instruction ordering in the IT block (since IT mask has been
        finalized). It also ensures no other instructions can be scheduled between
        instructions in the IT block.
      
      This is not yet enabled.
      
      llvm-svn: 106344
      2d51c7c5
  28. Jun 18, 2010
    • Stuart Hastings's avatar
      Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). This · 0125b641
      Stuart Hastings authored
      addresses a longstanding deficiency noted in many FIXMEs scattered
      across all the targets.
      
      This effectively moves the problem up one level, replacing eleven
      FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path
      through FastISel where we actually supply a DebugLoc, fixing Radar
      7421831.
      
      llvm-svn: 106243
      0125b641
  29. May 03, 2010
    • Dan Gohman's avatar
      Fix a bug which prevented tail merging of return instructions in · 2ad68de4
      Dan Gohman authored
      beneficial cases. See the changes in test/CodeGen/X86/tail-opts.ll and
      test/CodeGen/ARM/ifcvt2.ll for details.
      
      The fix is to change HashEndOfMBB to hash at most one instruction,
      instead of trying to apply heuristics about when it will be profitable to
      consider more than one instruction. The regular tail-merging heuristics
      are already prepared to handle the same cases, and they're more precise.
      
      Also, make test/CodeGen/ARM/ifcvt5.ll and
      test/CodeGen/Thumb2/thumb2-branch.ll slightly more complex so that they
      continue to test what they're intended to test.
      
      And, this eliminates the problem in
      test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll, the testcase from
      PR5204. Update it accordingly.
      
      llvm-svn: 102907
      2ad68de4
Loading