Skip to content
  1. May 19, 2010
  2. May 15, 2010
  3. May 13, 2010
    • Nick Lewycky's avatar
      Remove heinous tabs. · 2b3cbac0
      Nick Lewycky authored
      llvm-svn: 103700
      2b3cbac0
    • Nick Lewycky's avatar
      Replace the core comparison login in merge functions. We can now merge · d3c6dfe8
      Nick Lewycky authored
      vector<>::push_back() in:
      
        int foo(vector<int> &a, vector<unsigned> &b) {
          a.push_back(10);
          b.push_back(11);
        }
      
      to two calls to the same push_back function, or fold away the two copies of
      push_back() in:
      
        struct T { int; };
        struct S { char; };
        vector<T*> t;
        vector<S*> s;
        void f(T *x) { t.push_back(x); }
        void g(S *x) { s.push_back(x); }
      
      but leave f() and g() separate, since they refer to two different global
      variables.
      
      llvm-svn: 103698
      d3c6dfe8
  4. May 12, 2010
  5. May 11, 2010
  6. May 09, 2010
    • Chris Lattner's avatar
      make simplifycfg insert an llvm.trap before the 'unreachable' it introduces · 84d46186
      Chris Lattner authored
      when it detects undefined behavior.  llvm.trap generally codegens into some
      thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this
      sort of thing is "nontrivial".  For example, we now compile:
      
      void foo() { *(int*)0 = 42; }
      
      into:
      
      _foo:
      	pushl	%ebp
      	movl	%esp, %ebp
      	ud2
      
      Some may even claim that this is a security hole, though that seems dubious
      to me.  This addresses rdar://7958343 - Optimizing away null dereference 
      potentially allows arbitrary code execution
      
      llvm-svn: 103356
      84d46186
  7. May 08, 2010
  8. May 07, 2010
  9. May 05, 2010
  10. May 04, 2010
  11. May 03, 2010
  12. May 01, 2010
    • Chris Lattner's avatar
      revert r102831. We already delete dead readonly calls in · b49a622f
      Chris Lattner authored
      other places, killing a valid transformation is not the right
      answer.
      
      llvm-svn: 102850
      b49a622f
    • Owen Anderson's avatar
      Disable the call-deletion transformation introduced in r86975. Without · 550986ea
      Owen Anderson authored
      halting analysis, it is illegal to delete a call to a read-only function.
      The correct solution is almost certainly to add a "must halt" attribute and
      only allow deletions in its presence.
      
      XFAIL the relevant testcase for now.
      
      llvm-svn: 102831
      550986ea
    • 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
  13. Apr 30, 2010
  14. Apr 28, 2010
  15. Apr 27, 2010
  16. Apr 26, 2010
  17. Apr 25, 2010
  18. Apr 24, 2010
  19. Apr 23, 2010
  20. Apr 22, 2010
    • Chris Lattner's avatar
      when inlining something like this: · 016c00a3
      Chris Lattner authored
      define void @f3(void (i8*)* %__f) ssp {
      entry:
        call void %__f(i8* undef)
        unreachable
      }
      
      define void @f4(i8* %this) ssp align 2 {
      entry:
        call void @f3(void (i8*)* @f2) ssp
        ret void
      }
      
      The inliner is turning the indirect call to %__f into a direct
      call to F2.  Make the call graph more precise when this happens.
      
      The inliner doesn't revisit call sites introduced by inlining,
      so there isn't an easy way to test for this, but a more precise
      callgraph is a good thing.
      
      llvm-svn: 102131
      016c00a3
    • Chris Lattner's avatar
      eliminate dead #include. · 0a3b5b4e
      Chris Lattner authored
      llvm-svn: 102119
      0a3b5b4e
Loading