Skip to content
  1. Dec 15, 2008
    • Chris Lattner's avatar
      Add a testcase for GCC PR 23455, which lpre handles now. Add some · 81ee7318
      Chris Lattner authored
      comments about why we're not getting other cases.
      
      llvm-svn: 61032
      81ee7318
    • Nick Lewycky's avatar
      Update generated files after nocapture syntax change. · bc07dbd1
      Nick Lewycky authored
      llvm-svn: 61031
      bc07dbd1
    • Nick Lewycky's avatar
      It turns out that "align 1" and unaligned are different. Add a bias to the · 8d2ea183
      Nick Lewycky authored
      alignment attribute such that 0 means unaligned.
      
      This will probably require a rebuild of llvm-gcc because of the change to
      Attributes.h. If you see many test failures on "make check", please rebuild
      your llvm-gcc.
      
      llvm-svn: 61030
      8d2ea183
    • Mon P Wang's avatar
      Added support to LegalizeType for expanding the operands of scalar to vector · ac4e1209
      Mon P Wang authored
      and insert vector element.  Modified extract vector element to extend the
      result to match the expected promoted type.
      
      llvm-svn: 61029
      ac4e1209
    • Chris Lattner's avatar
      gvn now hoists this load out of the hot non-call path. · 3c2c36b5
      Chris Lattner authored
      llvm-svn: 61028
      3c2c36b5
    • Chris Lattner's avatar
      Enable Load PRE. This teaches GVN to push partially redundant loads up the · 0c68ae06
      Chris Lattner authored
      CFG when there is exactly one predecessor where the load is not available.
      This is designed to not increase code size but still eliminate partially
      redundant loads.  This fires 1765 times on 403.gcc even though it doesn't
      do critical edge splitting yet (the most common reason for it to fail).
      
      llvm-svn: 61027
      0c68ae06
    • Chris Lattner's avatar
      if we have a phi translation failure of the start block, · 7ed5ccc5
      Chris Lattner authored
      return *just* a clobber of the start block, not other 
      random stuff as well.
      
      llvm-svn: 61026
      7ed5ccc5
    • Chris Lattner's avatar
      Adjust testcase to make it more stable across visitation order changes, · b2429e2d
      Chris Lattner authored
      unbreaking it after r61024.
      
      llvm-svn: 61025
      b2429e2d
    • Owen Anderson's avatar
      Ifdef out some code that I didn't mean to enable by default yet. · 03aacbae
      Owen Anderson authored
      llvm-svn: 61024
      03aacbae
    • Chris Lattner's avatar
      make GVN try to rename inputs to the resultant replaced values, which · 69131fd8
      Chris Lattner authored
      cleans up the generated code a bit.  This should have the added benefit of
      not randomly renaming functions/globals like my previous patch did. :)
      
      llvm-svn: 61023
      69131fd8
    • Chris Lattner's avatar
      Implement initial support for PHI translation in memdep. This means that · ff9f3dba
      Chris Lattner authored
      memdep keeps track of how PHIs affect the pointer in dep queries, which 
      allows it to eliminate the load in cases like rle-phi-translate.ll, which
      basically end up being:
      
      BB1:
         X = load P
         br BB3
      BB2:
         Y = load Q
         br BB3
      BB3:
         R = phi [P] [Q]
         load R
      
      turning "load R" into a phi of X/Y.  In addition to additional exposed
      opportunities, this makes memdep safe in many cases that it wasn't before
      (which is required for load PRE) and also makes it substantially more 
      efficient.  For example, consider:
      
      
      bb1:  // has many predecessors.
         P = some_operator()
         load P
      
      In this example, previously memdep would scan all the predecessors of BB1
      to see if they had something that would mustalias P.  In some cases (e.g.
      test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end
      up eliminating something.  In many other cases though, it would scan and not
      find anything useful.  MemDep now stops at a block if the pointer is defined
      in that block and cannot be phi translated to predecessors.  This causes it
      to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not
      scanning tons of stuff that is unlikely to be useful.  For example, this
      speeds up GVN as a whole from 3.928s to 2.448s (60%)!.  IMO, scalar GVN 
      should be enhanced to simplify the rle-must-alias pointer base anyway, which
      would allow the loads to be eliminated.
      
      In the future, this should be enhanced to phi translate through geps and 
      bitcasts as well (as indicated by FIXMEs) making memdep even more powerful.
      
      llvm-svn: 61022
      ff9f3dba
    • Owen Anderson's avatar
      Add support for slow-path GVN with full phi construction for scalars. This is... · bfe133e4
      Owen Anderson authored
      Add support for slow-path GVN with full phi construction for scalars.  This is disabled for now, as it actually pessimizes code in the abscence
      of phi translation for load elimination.  This slow down GVN a bit, by about 2% on 403.gcc.
      
      llvm-svn: 61021
      bfe133e4
    • Nick Lewycky's avatar
      Fix whitespace in comment. · e88d388f
      Nick Lewycky authored
      Remove TODO; icmp isn't a binary operator, so this function will never deal
      with them.
      
      llvm-svn: 61020
      e88d388f
    • Nick Lewycky's avatar
      Introducing nocapture, a parameter attribute for pointers to indicate that the · ddffe620
      Nick Lewycky authored
      callee will not introduce any new aliases of that pointer.
      
      The attributes had all bits allocated already, so I decided to collapse
      alignment. Alignment was previously stored as a 16-bit integer from bits 16 to
      32 of the attribute, but it was required to be a power of 2. Now it's stored in
      log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of
      space.
      
      You may have already noticed that you only need four bits to encode a 16-bit
      power of two, so why five bits? Because the AsmParser accepted 32-bit
      alignments, even though we couldn't store them (they were silently discarded).
      Now we can store them in memory, but not in the bitcode.
      
      The bitcode format was already storing these as 64-bit VBR integers. So, the
      bitcode format stays the same, keeping the alignment values stored as 16 bit
      raw values. There's some hideous code in the reader and writer that deals with
      this, waiting to be ripped out the moment we run out of bits again and have to
      replace the parameter attributes table encoding.
      
      llvm-svn: 61019
      ddffe620
  2. Dec 14, 2008
  3. Dec 13, 2008
    • Anders Carlsson's avatar
      Store the size of the EH stack inside each BreakContinue struct so we know... · 6b958f96
      Anders Carlsson authored
      Store the size of the EH stack inside each BreakContinue struct so we know when a break/continue won't cross a try block.
      
      llvm-svn: 60998
      6b958f96
    • Duncan Sands's avatar
      LegalizeDAG is not supposed to introduce illegal · 24092271
      Duncan Sands authored
      types into the DAG if they were not already there.
      Check this with an assertion.
      
      llvm-svn: 60997
      24092271
    • Fariborz Jahanian's avatar
      Patch for ObjCIvarRefExpr containing the field · b1378f9b
      Fariborz Jahanian authored
      matching the storage layout for this ivar
      
      llvm-svn: 60996
      b1378f9b
    • Ted Kremenek's avatar
      MemRegion: · b5670fd5
      Ted Kremenek authored
      - Overhauled the notion of "types" for TypedRegions.  We now distinguish between the "lvalue" of a region (via getLValueRegion()) and the "rvalue" of a region (va getRValueRegion()).  Since a region represents a chunk of memory it has both, but we were conflating these concepts in some cases, leading to some insidious bugs.
      - Removed AnonPointeeType, partially because it is unused and because it doesn't have a clear notion of lvalue vs rvalue type.  We can add it back once there is a need for it and we can resolve its role with these concepts.
      
      StoreManager:
      - Overhauled StoreManager::CastRegion.  It expects an *lvalue* type for a region.  This is actually what motivated the overhaul to the MemRegion type mechanism.  It also no longer returns an SVal; we can just return a MemRegion*.
      - BasicStoreManager::CastRegion now overlays an "AnonTypedRegion" for pointer-pointer casts.  This matches with the MemRegion changes.
      - Similar changes to RegionStore, except I've added a bunch of FIXMEs where it wasn't 100% clear where we should use TypedRegion::getRValueRegion() or TypedRegion::getLValueRegion().
      
      AuditCFNumberCreate check:
      - Now blasts through AnonTypedRegions that may layer the original memory region, thus checking if the actually memory block is of the appropriate type.  This change was needed to work with the changes to StoreManager::CastRegion.
      
      GRExprEngine::VisitCast:
      - Conform to the new interface of StoreManager::CastRegion.
      
      Tests:
      - None of the analysis tests fail now for using the "basic store".
      - Disabled the tests 'array-struct.c' and 'rdar-6442306-1.m' pending further testing and bug fixing.
      
      llvm-svn: 60995
      b5670fd5
    • Chris Lattner's avatar
      RLE isn't smart enough to eliminate this safely yet. · 9b9a1456
      Chris Lattner authored
      llvm-svn: 60994
      9b9a1456
    • Fariborz Jahanian's avatar
      Add storage layout to ObjC classes. · 0222553d
      Fariborz Jahanian authored
      llvm-svn: 60993
      0222553d
    • Chris Lattner's avatar
      eliminate the isCXXNamedOperator function and some string compares and · 77c76ae3
      Chris Lattner authored
      use identifierinfo instead.  Patch by Chris Goller!
      
      llvm-svn: 60992
      77c76ae3
    • Ted Kremenek's avatar
      Temporarily XFAIL these tests. · 1c89be02
      Ted Kremenek authored
      llvm-svn: 60991
      1c89be02
    • Ted Kremenek's avatar
      A series of cleanups/fixes motivated by <rdar://problem/6442306>: · f065b15f
      Ted Kremenek authored
      GRExprEngine (VisitCast):
      - When using StoreManager::CastRegion, always use the state and value it returns to generate the next node.  Failure to do so means that region values returned that don't require the state to be modified will get ignored.
      
      MemRegion:
      - Tighten the interface for ElementRegion.  Now ElementRegion can only be created with a super region that is a 'TypedRegion' instead of any MemRegion.  Code in BasicStoreManager/RegionStoreManager already assumed this, but it would result in a dynamic assertion check (and crash) rather than just having the compiler forbid the construction of such regions.
      - Added ElementRegion::getArrayRegion() to return the 'typed version' of an ElementRegion's super region.
      - Removed bogus assertion in ElementRegion::getType() that assumed that the super region was an AnonTypedRegion.  All that matters is that it is a TypedRegion, which is now true all the time by design.
      
      BasicStore:
      - Modified getLValueElement() to check if the 'array' region is a TypedRegion before creating an ElementRegion.  This conforms to the updated interface for ElementRegion.
      
      RegionStore:
      - In ArrayToPointer() gracefully handle things we don't reason about, and only create an ElementRegion if the array region is indeed a TypedRegion.
      
      llvm-svn: 60990
      f065b15f
    • Chris Lattner's avatar
      disable Anders' recent VLA patch, this fixes PR3209. · e69336c2
      Chris Lattner authored
      llvm-svn: 60989
      e69336c2
    • Chris Lattner's avatar
      rename some tests to be more uniform in naming convention. · d923519c
      Chris Lattner authored
      llvm-svn: 60988
      d923519c
Loading