Skip to content
  1. Nov 10, 2009
  2. Nov 04, 2009
    • Bob Wilson's avatar
      Fix branch folding bug for indirect branches: for a block containing only · 53a31ad3
      Bob Wilson authored
      an unconditional branch (possibly from tail merging), this code is
      trying to redirect all of its predecessors to go directly to the branch
      target, but that isn't feasible for indirect branches.  The other
      predecessors (that don't end with indirect branches) could theoretically
      still be handled, but that is not easily done right now.
      
      The AnalyzeBranch interface doesn't currently let us distinguish jump table
      branches from indirect branches, and this code is currently handling
      jump tables.  To avoid punting on address-taken blocks, we would have to give
      up handling jump tables.  That seems like a bad tradeoff.
      
      llvm-svn: 85975
      53a31ad3
  3. Oct 30, 2009
  4. Oct 29, 2009
  5. Oct 28, 2009
    • Bob Wilson's avatar
      Reimplement BranchFolding change to avoid tail merging for a 1 instruction · 3ab552ec
      Bob Wilson authored
      common tail, except when the OptimizeForSize function attribute is present.
      Radar 7338114.
      
      llvm-svn: 85441
      3ab552ec
    • Bob Wilson's avatar
      Revert r85346 change to control tail merging by CodeGenOpt::Level. · 97b93126
      Bob Wilson authored
      I'm going to redo this using the OptimizeForSize function attribute.
      
      llvm-svn: 85426
      97b93126
    • Bob Wilson's avatar
      Record CodeGen optimization level in the BranchFolding pass so that we can · 9693f9d4
      Bob Wilson authored
      use it to control tail merging when there is a tradeoff between performance
      and code size.  When there is only 1 instruction in the common tail, we have
      been merging.  That can be good for code size but is a definite loss for
      performance.  Now we will avoid tail merging in that case when the
      optimization level is "Aggressive", i.e., "-O3".  Radar 7338114.
      
      Since the IfConversion pass invokes BranchFolding, it too needs to know
      the optimization level.  Note that I removed the RegisterPass instantiation
      for IfConversion because it required a default constructor.  If someone
      wants to keep that for some reason, we can add a default constructor with
      a hard-wired optimization level.
      
      llvm-svn: 85346
      9693f9d4
  6. Oct 22, 2009
    • Dan Gohman's avatar
      Revert the main portion of r31856. It was causing BranchFolding · ff97acd8
      Dan Gohman authored
      to break up CFG diamonds by banishing one of the blocks to the end of
      the function, which is bad for code density and branch size.
      
      This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the
      benchmark cited as the reason for the change, however I've examined
      the code and it looks more like a case of gaming a particular
      branch than of being generally applicable.
      
      llvm-svn: 84803
      ff97acd8
  7. Sep 04, 2009
  8. Aug 22, 2009
  9. Aug 18, 2009
    • Dan Gohman's avatar
      Make tail merging handle blocks with repeated predecessors correctly, and · a41fa359
      Dan Gohman authored
      remove RemoveDuplicateSuccessor, as it is no longer necessary, and because
      it breaks assumptions made in
      MachineBasicBlock::isOnlyReachableByFallthrough.
      
      Convert test/CodeGen/X86/omit-label.ll to FileCheck and add a testcase
      for PR4732.
      
      test/CodeGen/Thumb2/thumb2-ifcvt2.ll sees a diff with this commit due to
      it being bugpoint-reduced to the point where it doesn't matter what the
      condition for the branch is.
      
      Add some more interesting code to
      test/CodeGen/X86/2009-08-06-branchfolder-crash.ll, which is the testcase
      that originally motivated the RemoveDuplicateSuccessor code, to help
      verify that the original problem isn't being re-broken.
      
      llvm-svn: 79338
      a41fa359
  10. Aug 07, 2009
  11. Jul 14, 2009
  12. Jul 11, 2009
    • Torok Edwin's avatar
      assert(0) -> LLVM_UNREACHABLE. · 56d06597
      Torok Edwin authored
      Make llvm_unreachable take an optional string, thus moving the cerr<< out of
      line.
      LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
      NDEBUG builds.
      
      llvm-svn: 75379
      56d06597
  13. May 11, 2009
  14. Feb 09, 2009
  15. Jan 28, 2009
  16. Jan 08, 2009
  17. Dec 11, 2008
  18. Dec 03, 2008
  19. Oct 27, 2008
  20. Oct 03, 2008
  21. Sep 22, 2008
  22. Sep 13, 2008
    • Dan Gohman's avatar
      Remove isImm(), isReg(), and friends, in favor of · 38453eeb
      Dan Gohman authored
      isImmediate(), isRegister(), and friends, to avoid confusion
      about having two different names with the same meaning. I'm
      not attached to the longer names, and would be ok with
      changing to the shorter names if others prefer it.
      
      llvm-svn: 56189
      38453eeb
  23. Sep 04, 2008
  24. Aug 22, 2008
  25. Aug 15, 2008
  26. Jul 29, 2008
  27. Jul 08, 2008
    • Dan Gohman's avatar
      Pool-allocation for MachineInstrs, MachineBasicBlocks, and · 3b460303
      Dan Gohman authored
      MachineMemOperands. The pools are owned by MachineFunctions.
      
      This drastically reduces the number of calls to malloc/free made
      during the "Emit" phase of scheduling, as well as later phases
      in CodeGen. Combined with other changes, this speeds up the
      "instruction selection" phase of CodeGen by 10% in some cases.
      
      llvm-svn: 53212
      3b460303
  28. Jul 01, 2008
    • Dale Johannesen's avatar
      Fix longstanding thinko: don't exclude · ad6b3a6e
      Dale Johannesen authored
      predessors of exit blocks from tail merging
      consideration.
      
      llvm-svn: 52985
      ad6b3a6e
    • Dan Gohman's avatar
      Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating · fb19f940
      Dan Gohman authored
      the need for a flavor operand, and add a new SDNode subclass,
      LabelSDNode, for use with them to eliminate the need for a label id
      operand.
      
      Change instruction selection to let these label nodes through
      unmodified instead of creating copies of them. Teach the MachineInstr
      emitter how to emit a MachineInstr directly from an ISD label node.
      
      This avoids the need for allocating SDNodes for the label id and
      flavor value, as well as SDNodes for each of the post-isel label,
      label id, and label flavor.
      
      llvm-svn: 52943
      fb19f940
  29. Jun 19, 2008
  30. May 23, 2008
  31. May 13, 2008
  32. May 12, 2008
  33. May 10, 2008
Loading