Skip to content
  1. May 01, 2010
    • Chris Lattner's avatar
      rename InlineInfo.DevirtualizedCalls -> InlinedCalls to · c2432b9d
      Chris Lattner authored
      reflect that it includes all inlined calls now, not just
      devirtualized ones.
      
      llvm-svn: 102824
      c2432b9d
    • Chris Lattner's avatar
      Implement rdar://6295824 and PR6724 with two tiny changes · fc8d9ee6
      Chris Lattner authored
      that can have a big effect :).  The first is to enable the
      iterative SCC passmanager juice that kicks in when the
      scc passmgr detects that a function pass has devirtualized
      a call.  In this case, it will rerun all the passes it 
      manages on the SCC, up to the iteration count limit (4). This
      is useful because a function pass may devirualize a call, and
      we want the inliner to inline it, or pruneeh to infer stuff
      about it, etc.
      
      The second patch is to add *all* call sites to the 
      DevirtualizedCalls list the inliner uses.  This list is
      about to get renamed, but the jist of this is that the 
      inliner now reconsiders *all* inlined call sites as candidates
      for further inlining.  The intuition is this that in cases 
      like this:
      
      f() { g(1); }     g(int x) { h(x); }
      
      We analyze this bottom up, and may decide that it isn't 
      profitable to inline H into G.  Next step, we decide that it is
      profitable to inline G into F, and do so, which means that F 
      now calls H.  Even though the call from G -> H may not have been
      profitable to inline, the call from F -> H may be (in this case
      because a constant allows folding etc).
      
      In my spot checks, this doesn't have a big impact on code.  For
      example, the LLC output for 252.eon grew from 0.02% (from
      317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612
      to 1520964 bytes).  252.eon never iterated in the SCC Passmgr,
      176.gcc iterated at most 1 time.
      
      llvm-svn: 102823
      fc8d9ee6
    • Chris Lattner's avatar
      The inliner has traditionally not considered call sites · e8262675
      Chris Lattner authored
      that appear due to inlining a callee as candidates for
      futher inlining, but a recent patch made it do this if
      those call sites were indirect and became direct.
      
      Unfortunately, in bizarre cases (see testcase) doing this
      can cause us to infinitely inline mutually recursive
      functions into callers not in the cycle.  Fix this by
      keeping track of the inline history from which callsite
      inline candidates got inlined from.
      
      This shouldn't affect any "real world" code, but is required
      for a follow on patch that is coming up next.
      
      llvm-svn: 102822
      e8262675
    • Dan Gohman's avatar
      Re-enable kill flags from SelectionDAGISel, with a fix: don't · 77ef6f6a
      Dan Gohman authored
      try to put a kill flag on a DBG_INFO instruction.
      
      llvm-svn: 102820
      77ef6f6a
    • Dale Johannesen's avatar
      Fix a bug where debug info affected stack slot coloring. · 3dca8f3d
      Dale Johannesen authored
      Seen in SingleSrc/Benchmarks/Misc/flops with TEST=optllcdbg.
      7929951.
      
      llvm-svn: 102819
      3dca8f3d
    • John McCall's avatar
      It turns out that basically every caller to RequireCompleteDeclContext · 0b66eb38
      John McCall authored
      already knows what context it's looking in.  Just pass that context in
      instead of (questionably) recalculating it.
      
      llvm-svn: 102818
      0b66eb38
    • Dan Gohman's avatar
      Fix whitespace. · 096619eb
      Dan Gohman authored
      llvm-svn: 102817
      096619eb
    • Dan Gohman's avatar
      Don't pass SDValues by non-const reference unless they may be · 63f31115
      Dan Gohman authored
      modified.
      
      llvm-svn: 102816
      63f31115
    • Evan Cheng's avatar
      Add a pseudo instruction REG_SEQUENCE that takes a list of registers and · 66561537
      Evan Cheng authored
      sub-register indices and outputs a single super register which is formed from
      a consecutive sequence of registers.
      
      This is used as register allocation / coalescing aid and it is useful to
      represent instructions that output register pairs / quads. For example,
      v1024, v1025 = vload <address>
      where v1024 and v1025 forms a register pair.
      
      This really should be modelled as
      v1024<3>, v1025<4> = vload <address>
      but it would violate SSA property before register allocation is done.
      
      Currently we use insert_subreg to form the super register:
      v1026 = implicit_def
      v1027 - insert_subreg v1026, v1024, 3
      v1028 = insert_subreg v1027, v1025, 4
      ...
            = use v1024
            = use v1028
      
      But this adds pseudo live interval overlap between v1024 and v1025.
      
      We can now modeled it as
      v1024, v1025 = vload <address>
      v1026 = REG_SEQUENCE v1024, 3, v1025, 4
      ...
            = use v1024
            = use v1026
      
      After coalescing, it will be
      v1026<3>, v1025<4> = vload <address>
      ...
            = use v1026<3>
            = use v1026
      
      llvm-svn: 102815
      66561537
    • Dan Gohman's avatar
      Reorgnaize more switch code lowering to clean up some tricky · 5d059718
      Dan Gohman authored
      code, and to eliminate the need for the SelectionDAGBuilder
      state to be live during CodeGenAndEmitDAG calls.
      
      Call SDB->clear() before CodeGenAndEmitDAG calls instead of
      before it, and move the CurDAG->clear() out of SelectionDAGBuilder,
      which doesn't own the DAG, and into CodeGenAndEmitDAG.
      
      llvm-svn: 102814
      5d059718
    • Bill Wendling's avatar
      Test failing too much on too many platforms. · 02bc6787
      Bill Wendling authored
      llvm-svn: 102812
      02bc6787
    • Daniel Dunbar's avatar
      Fix NON_ANSI_COMPILE_FLAGS setting, for MSVC. · 832fc4a0
      Daniel Dunbar authored
      llvm-svn: 102811
      832fc4a0
    • Dan Gohman's avatar
      Delete the EdgeMapping variable itself. · f0514717
      Dan Gohman authored
      llvm-svn: 102810
      f0514717
    • Dan Gohman's avatar
      Get rid of the EdgeMapping map. Instead, just check for BasicBlock · 25c16537
      Dan Gohman authored
      changes before doing phi lowering for switches.
      
      llvm-svn: 102809
      25c16537
    • Daniel Dunbar's avatar
      Update for CIndex rename. · 66ba55a9
      Daniel Dunbar authored
      llvm-svn: 102803
      66ba55a9
    • Bill Wendling's avatar
      Maybe it needs sse2? · 06cacb12
      Bill Wendling authored
      llvm-svn: 102802
      06cacb12
    • Bill Wendling's avatar
      Force 64-bit. · 613fb7da
      Bill Wendling authored
      llvm-svn: 102800
      613fb7da
    • Dan Gohman's avatar
      Fix a typo. · 0cb06d64
      Dan Gohman authored
      llvm-svn: 102799
      0cb06d64
    • Chris Lattner's avatar
      Dan recently disabled recursive inlining within a function, but we · a9bac86d
      Chris Lattner authored
      were still inlining self-recursive functions into other functions.
      
      Inlining a recursive function into itself has the potential to
      reduce recursion depth by a factor of 2, inlining a recursive
      function into something else reduces recursion depth by exactly 
      1.  Since inlining a recursive function into something else is a
      weird form of loop peeling, turn this off.
      
      The deleted testcase was added by Dale in r62107, since then
      we're leaning towards not inlining recursive stuff ever.  In any
      case, if we like inlining recursive stuff, it should be done 
      within the recursive function itself to get the algorithm 
      recursion depth win.
      
      llvm-svn: 102798
      a9bac86d
    • Ted Kremenek's avatar
      Add null check in CFGBuilder::VisitStmt() to make CFG construction · bc1416dc
      Ted Kremenek authored
      more resilient to bad code.
      
      llvm-svn: 102793
      bc1416dc
    • Bill Wendling's avatar
      EXTRACT_VECTOR_ELT of an INSERT_VECTOR_ELT may have the same index, but the · de4b2250
      Bill Wendling authored
      indexes could be of a different value type. Or not even using the same SDNode
      for the constant (weird, I know). Compare the actual values instead of the
      pointers.
      
      llvm-svn: 102791
      de4b2250
    • Daniel Dunbar's avatar
      Don't use 'else ifdef', I guess this is a 3.81 feature? · 11328b7f
      Daniel Dunbar authored
      llvm-svn: 102781
      11328b7f
  2. Apr 30, 2010
Loading