Skip to content
  1. Jan 09, 2009
  2. Jan 08, 2009
    • Dale Johannesen's avatar
      Do not inline functions with (dynamic) alloca into · b48fc71f
      Dale Johannesen authored
      functions that don't already have a (dynamic) alloca.
      Dynamic allocas cause inefficient codegen and we shouldn't
      propagate this (behavior follows gcc).  Two existing tests
      assumed such inlining would be done; they are hacked by
      adding an alloca in the caller, preserving the point of
      the tests.
      
      llvm-svn: 61946
      b48fc71f
    • Chris Lattner's avatar
      This implements the second half of the fix for PR3290, handling · c518dfd1
      Chris Lattner authored
      loads from allocas that cover the entire aggregate.  This handles
      some memcpy/byval cases that are produced by llvm-gcc.  This triggers
      a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator
      <kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon).
      
      llvm-svn: 61915
      c518dfd1
  3. Jan 07, 2009
  4. Jan 06, 2009
  5. Jan 05, 2009
  6. Jan 04, 2009
  7. Jan 03, 2009
  8. Jan 02, 2009
    • Duncan Sands's avatar
      Load tracking means that the value analyzed may · c7affb0a
      Duncan Sands authored
      not have pointer type.  In particular, it may
      be the condition argument for a select or a GEP
      index.  While I was unable to construct a testcase
      for which some bits of the original pointer are
      captured due to one of these, it's very very close
      to being possible - so play safe and exclude these
      possibilities.
      
      llvm-svn: 61580
      c7affb0a
    • Duncan Sands's avatar
      When calculating 'nocapture' argument attributes, allow · b193a37c
      Duncan Sands authored
      the argument to be stored to an alloca by tracking uses
      of the alloca.  This occurs 4 times (out of 7121, 0.05%)
      in MultiSource/Applications, so may not be worth it.  On
      the other hand, it is easy to do and fairly cheap.  The
      functions it helps are: W_addcom and W_addlit in spiff;
      process_args (argv) in d (make_dparser); ercPixConcealIMB
      in JM/ldecod.
      
      llvm-svn: 61570
      b193a37c
    • Duncan Sands's avatar
      Improve comments and reorganize a bit - no functionality · cefc8604
      Duncan Sands authored
      change.
      
      llvm-svn: 61569
      cefc8604
    • Nick Lewycky's avatar
      Make adding nocapture a bit stronger. FreeInst is nocapture. Also, · 7e82055e
      Nick Lewycky authored
      functions that don't write can't leak a pointer except through 
      the return value, so a void readonly function is implicitly nocapture.
      
      Test these, and add a test that verifies that f1 calling f2 with an 
      otherwise dead pointer gets both of them marked nocapture.
      
      llvm-svn: 61552
      7e82055e
  9. Jan 01, 2009
  10. Dec 31, 2008
  11. Dec 29, 2008
    • Duncan Sands's avatar
      Experiments show that looking through phi nodes · f6069577
      Duncan Sands authored
      and select instructions doesn't buy anything here
      except extra complexity: the only difference in
      the entire testsuite was that a readonly function
      became readnone in MiBench/consumer-typeset.  Add
      a comment about this.
      
      llvm-svn: 61478
      f6069577
    • Duncan Sands's avatar
      Allow readnone functions to read (and write!) global · c125d6a3
      Duncan Sands authored
      constants, since doing so is irrelevant for aliasing
      purposes.  While this doesn't increase the total number
      of functions marked readonly or readnone in MultiSource/
      Applications (3089), it does result in 12 functions being
      marked readnone rather than readonly.
      Before:
        readnone: 820
        readonly: 2269
      After:
        readnone: 832
        readonly: 2257
      
      llvm-svn: 61469
      c125d6a3
  12. Dec 24, 2008
  13. Dec 23, 2008
    • Dale Johannesen's avatar
      Fix the time regression I introduced in 464.h264ref with · 93b9aa87
      Dale Johannesen authored
      my last patch to this file.
      
      The issue there was that all uses of an IV inside a loop
      are actually references to Base[IV*2], and there was one
      use outside that was the same but LSR didn't see the base
      or the scaling because it didn't recurse into uses outside
      the loop; thus, it used base+IV*scale mode inside the loop
      instead of pulling base out of the loop.  This was extra bad
      because register pressure later forced both base and IV into
      memory.  Doing that recursion, at least enough
      to figure out addressing modes, is a good idea in general;
      the change in AddUsersIfInteresting does this.  However,
      there were side effects....
      
      It is also possible for recursing outside the loop to
      introduce another IV where there was only 1 before (if
      the refs inside are not scaled and the ref outside is).
      I don't think this is a common case, but it's in the testsuite.
      It is right to be very aggressive about getting rid of
      such introduced IVs (CheckForIVReuse and the handling of
      nonzero RewriteFactor in StrengthReduceStridedIVUsers).
      In the testcase in question the new IV produced this way
      has both a nonconstant stride and a nonzero base, neither
      of which was handled before.  And when inserting 
      new code that feeds into a PHI, it's right to put such 
      code at the original location rather than in the PHI's 
      immediate predecessor(s) when the original location is outside 
      the loop (a case that couldn't happen before)
      (RewriteInstructionToUseNewBase); better to avoid making
      multiple copies of it in this case.
      
      Also, the mechanism for keeping SCEV's corresponding to GEP's
      no longer works, as the GEP might change after its SCEV
      is remembered, invalidating the SCEV, and we might get a bad
      SCEV value when looking up the GEP again for a later loop.  
      This also couldn't happen before, as we weren't recursing
      into GEP's outside the loop.
      
      I owe some testcases for this, want to get it in for nightly runs.
      
      llvm-svn: 61362
      93b9aa87
Loading