Skip to content
  1. Jun 21, 2011
  2. Jun 20, 2011
    • Jay Foad's avatar
      Change how PHINodes store their operands. · e03c05c3
      Jay Foad authored
      Change PHINodes to store simple pointers to their incoming basic blocks,
      instead of full-blown Uses.
      
      Note that this loses an optimization in SplitCriticalEdge(), because we
      can no longer walk the use list of a BasicBlock to find phi nodes. See
      the comment I removed starting "However, the foreach loop is slow for
      blocks with lots of predecessors".
      
      Extend replaceAllUsesWith() on a BasicBlock to also update any phi
      nodes in the block's successors. This mimics what would have happened
      when PHINodes were proper Users of their incoming blocks. (Note that
      this only works if OldBB->replaceAllUsesWith(NewBB) is called when
      OldBB still has a terminator instruction, so it still has some
      successors.)
      
      llvm-svn: 133435
      e03c05c3
  3. Jun 18, 2011
    • Hans Wennborg's avatar
      Fix PR10103: Less code for enum type translation. · 4ab4a8e6
      Hans Wennborg authored
      In cases such as the attached test, where the case value for a switch
      destination is used in a phi node that follows the destination, it
      might be better to replace that value with the condition value of the
      switch, so that more blocks can be folded away with
      TryToSimplifyUncondBranchFromEmptyBlock because there are less
      conflicts in the phi node.
      
      llvm-svn: 133344
      4ab4a8e6
  4. Jun 17, 2011
  5. Jun 15, 2011
  6. Jun 14, 2011
  7. Jun 13, 2011
  8. Jun 09, 2011
    • John McCall's avatar
      SplitCriticalEdge can sometimes split the edge from an invoke to a landing · fc1ca368
      John McCall authored
      pad, separating the exception and selector calls from the new lpad.  Teaching
      it not to do that, or to properly adjust the CFG afterwards, is out of
      scope because it would require the other edges to the landing pad to be split
      as well (effectively).  Instead, just recover from the most likely cases
      during inlining.  The best long-term solution is to change the exception
      representation and commit to either requiring or not requiring the more
      complex edge-splitting logic;  this is just a shorter-term hack.
      
      llvm-svn: 132799
      fc1ca368
    • John McCall's avatar
      Teach the CallGraph to ignore calls to intrinsics. · 729c35b6
      John McCall authored
      llvm-svn: 132797
      729c35b6
  9. Jun 04, 2011
    • Bill Wendling's avatar
      If the block that we're threading through is jumped to by an indirect branch, · 4f163dfe
      Bill Wendling authored
      then we don't want to set the destination in the indirect branch to the
      destination. This is because the indirect branch needs its destinations to have
      had their block addresses taken. This isn't so of the new critical edge that's
      split during this process. If it turns out that the destination block has only
      one predecessor, and that being a BB with an indirect branch, then it won't be
      marked as 'used' and may be removed.
      PR10072
      
      llvm-svn: 132638
      4f163dfe
  10. Jun 01, 2011
  11. May 29, 2011
  12. May 28, 2011
    • John McCall's avatar
      Implement and document the llvm.eh.resume intrinsic, which is · 046c47e9
      John McCall authored
      transformed by the inliner into a branch to the enclosing landing pad
      (when inlined through an invoke).  If not so optimized, it is lowered
      DWARF EH preparation into a call to _Unwind_Resume (or _Unwind_SjLj_Resume
      as appropriate).  Its chief advantage is that it takes both the
      exception value and the selector value as arguments, meaning that there
      is zero effort in recovering these;  however, the frontend is required
      to pass these down, which is not actually particularly difficult.
      
      Also document the behavior of landing pads a bit better, and make it
      clearer that it's okay that personality functions don't always land at
      landing pads.  This is just a fact of life.  Don't write optimizations that
      rely on pushing things over an unwind edge.
      
      llvm-svn: 132253
      046c47e9
  13. May 27, 2011
    • John McCall's avatar
      Fix the inliner to maintain the current de facto invoke semantics: · bd04b74b
      John McCall authored
        - the selector for the landing pad must provide all available information
          about the handlers, filters, and cleanups within that landing pad
        - calls to _Unwind_Resume must be converted to branches to the enclosing
          lpad so as to avoid re-entering the unwinder when the lpad claimed it
          was going to handle the exception in some way
      This is quite specific to libUnwind-based unwinding.  In an effort to not
      interfere too badly with other unwinders, and with existing hacks in frontends,
      this only triggers on _Unwind_Resume (not _Unwind_Resume_or_Rethrow) and does
      nothing with selectors if it cannot find a selector call for either lpad.
      
      llvm-svn: 132200
      bd04b74b
    • Eli Friedman's avatar
      One more debug line number miss in instcombine (although the code in question... · e217f894
      Eli Friedman authored
      One more debug line number miss in instcombine (although the code in question isn't actually in instcombine).
      
      llvm-svn: 132170
      e217f894
  14. May 24, 2011
  15. May 22, 2011
    • Frits van Bommel's avatar
      Add a parameter to ConstantFoldTerminator() that callers can use to ask it to... · ad964559
      Frits van Bommel authored
      Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior.
      
      I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this.
      
      llvm-svn: 131855
      ad964559
    • Nick Lewycky's avatar
      Teach the inliner to emit llvm.lifetime.start/end, to scope the local variables · a68ec83b
      Nick Lewycky authored
      of the inlinee to the code representing the original function.
      
      llvm-svn: 131838
      a68ec83b
  16. May 19, 2011
  17. May 18, 2011
Loading