Skip to content
  1. Oct 15, 2009
    • Bob Wilson's avatar
      Fix another problem with ARM constant pools. Radar 7303551. · b4f2a85f
      Bob Wilson authored
      When ARMConstantIslandPass cannot find any good locations (i.e., "water") to
      place constants, it falls back to inserting unconditional branches to make a
      place to put them.  My recent change exposed a problem in this area.  We may
      sometimes append to the same block more than one unconditional branch.  The
      symptoms of this are that the generated assembly has a branch to an undefined
      label and running llc with -debug will cause a seg fault.
      
      This happens more easily since my change to prevent CPEs from moving from
      lower to higher addresses as the algorithm iterates, but it could have
      happened before.  The end of the block may be in range for various constant
      pool references, but the insertion point for new CPEs is not right at the end
      of the block -- it is at the end of the CPEs that have already been placed
      at the end of the block.  The insertion point could be out of range.  When
      that happens, the fallback code will always append another unconditional
      branch if the end of the block is in range.
      
      The fix is to only append an unconditional branch if the block does not
      already end with one.  I also removed a check to see if the constant pool load
      instruction is at the end of the block, since that is redundant with
      checking if the end of the block is in-range.
      
      There is more to be done here, but I think this fixes the immediate problem.
      
      llvm-svn: 84172
      b4f2a85f
    • Chris Lattner's avatar
      only try to fold constantexpr operands when the worklist is first populated, · c855b45b
      Chris Lattner authored
      don't bother every time going around the main worklist.  This speeds up a 
      release-asserts opt -std-compile-opts on 403.gcc by about 4% (1.5s).  It
      seems to speed up the most expensive instances of instcombine by ~10%.
      
      llvm-svn: 84171
      c855b45b
    • Chris Lattner's avatar
      don't bother calling ConstantFoldInstruction unless there is a use of the · dd1f68a1
      Chris Lattner authored
      instruction (which disqualifies stores, unreachable, etc) and at least the
      first operand is a constant.  This filters out a lot of obvious cases that
      can't be folded.  Also, switch the IRBuilder to a TargetFolder, which tries
      harder.
      
      llvm-svn: 84170
      dd1f68a1
    • John McCall's avatar
      Complete some unfinished comments. · 9f49103e
      John McCall authored
      llvm-svn: 84169
      9f49103e
    • John McCall's avatar
      Better living through metaprogramming. Create a base class which abstracts · 33815690
      John McCall authored
      most of the unsafe boilerplate out of TypeLoc.  Create a QualifiedLoc class
      to represent the idea that we *might* start representing source locations
      of qualifiers.  Dealing with qualifiers explicitly like this also lets us
      efficiently ignore them in all the concrete cases.
      
      This should make it obvious and easy to add new TypeLoc subclasses.
      
      llvm-svn: 84168
      33815690
    • Mike Stump's avatar
      Make this at least compile. · bf186694
      Mike Stump authored
      llvm-svn: 84167
      bf186694
    • Mike Stump's avatar
      Track the offset to the current virtual base in CurrentVBaseOffset. · 37dbe96a
      Mike Stump authored
      Track path information completely to ensure we get all the overrides.  WIP.
      
      llvm-svn: 84166
      37dbe96a
    • Ted Kremenek's avatar
      Per an astute observation from Zhongxing Xu, remove a "special case" logic in · 3abc41f4
      Ted Kremenek authored
      RegionStoreManager::Retrieve() that was intended to handle conflated uses of pointers as integers.
      It turns out this isn't needed, and resulted in inconsistent behavior when creating symbolic values on the following test case in 'tests/Analysis/misc-ps.m':
      
        typedef struct _BStruct { void *grue; } BStruct;
        void testB_aux(void *ptr);
        void testB(BStruct *b) {
          {
            int *__gruep__ = ((int *)&((b)->grue));
            int __gruev__ = *__gruep__;
            testB_aux(__gruep__);
          }
          {
            int *__gruep__ = ((int *)&((b)->grue));
            int __gruev__ = *__gruep__;
            if (~0 != __gruev__) {}
          }
        }
      
      When the code was analyzed with '-arch x86_64', the value assigned to '__gruev__' be would be a
      symbolic integer, but for '-arch i386' the value assigned to '__gruev__' would be a symbolic region
      (a blob of memory). With this change the value created is always a symbolic integer.
      
      Since the code being removed was added to support analysis of code calling
      OSAtomicCompareAndSwapXXX(), I also modified 'test/Analysis/NSString.m' to analyze the code in both
      '-arch i386' and '-arch x86_64', and also added some complementary test cases to test the presence
      of leaks when using OSAtomicCompareAndSwap32Barrier()/OSAtomicCompareAndSwap64Barrier() instead of
      just their absence. This code change reveals that previously both RegionStore and BasicStore were
      handling these cases wrong, and would never cause the analyzer to emit a leak in these cases (false
      negatives). Now RegionStore gets it right, but BasicStore still gets it wrong (and hence it has been
      disabled temporarily for this test case).
      
      llvm-svn: 84163
      3abc41f4
    • Anders Carlsson's avatar
      Handle · 66413c29
      Anders Carlsson authored
      struct A { };
      struct B : A { };
      
      void f() {
        const A& a = B();
      }
      
      correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope).
      
      llvm-svn: 84162
      66413c29
    • Anders Carlsson's avatar
      Check the return type when calling pointer to member functions. · 63dce025
      Anders Carlsson authored
      llvm-svn: 84161
      63dce025
    • John Thompson's avatar
      Removed math.h include, as Windows math.h has a compile error. · 3254182b
      John Thompson authored
      llvm-svn: 84160
      3254182b
    • Nick Lewycky's avatar
      Take advantage of TargetData when available; we know that the atomic intrinsics · fcb27ad5
      Nick Lewycky authored
      only dereference the element they point to directly with no pointer arithmetic.
      
      llvm-svn: 84159
      fcb27ad5
    • Dan Gohman's avatar
      Make CodePlacementOpt align loops, rather than loop headers. The · c9af381d
      Dan Gohman authored
      header is just the entry block to the loop, and it needn't be at
      the top of the loop in the code layout.
      
      Remove the code that suppressed loop alignment for outer loops,
      so that outer loops are aligned.
      
      llvm-svn: 84158
      c9af381d
    • Ted Kremenek's avatar
      Remove stale comment. · 8070b82d
      Ted Kremenek authored
      llvm-svn: 84157
      8070b82d
    • Douglas Gregor's avatar
      CheckTemplateSpecializationScope isn't going to be used for explicit · ba8e1ac3
      Douglas Gregor authored
      instantiations, since the requirements are too different from those
      for template specializations. Simplify it slightly.
      
      llvm-svn: 84156
      ba8e1ac3
    • Douglas Gregor's avatar
      Additional semantic checking for explicit template instantiations, · e47f5a76
      Douglas Gregor authored
      focusing on the scope- and qualifier-related semantic requirements in
      C++ [temp.explicit]p2.
      
      llvm-svn: 84154
      e47f5a76
    • Evan Cheng's avatar
      When LiveVariables is adding implicit-def to model "partial dead", add the... · 2f61e094
      Evan Cheng authored
      When LiveVariables is adding implicit-def to model "partial dead", add the earlyclobber marker if the superreg def has it.
      
      llvm-svn: 84153
      2f61e094
    • Evan Cheng's avatar
      Print earlyclobber for implicit-defs as well. · 70b1fa5a
      Evan Cheng authored
      llvm-svn: 84152
      70b1fa5a
    • Eric Christopher's avatar
      One more iteration here and a yet better way to solve it. · ef40bd15
      Eric Christopher authored
      llvm-svn: 84150
      ef40bd15
  2. Oct 14, 2009
Loading