Commit Graph

49357 Commits

Author SHA1 Message Date
Bill Wendling 6d70df0b05 Don't skip over all "terminator" instructions when determining where to put the
callee-saved restore code. It could skip over conditional jumps
accidentally. Instead, just skip the "return" instructions.

llvm-svn: 58489
2008-10-31 04:00:23 +00:00
Daniel Dunbar a290ded36a Formatting tweaks.
- No functionality change.

llvm-svn: 58488
2008-10-31 03:54:29 +00:00
Zhongxing Xu 121a53a176 Fix a comment.
llvm-svn: 58487
2008-10-31 03:01:26 +00:00
Daniel Dunbar a1c4fcfc29 Fix warning.
llvm-svn: 58486
2008-10-31 01:50:01 +00:00
Oscar Fuentes 39304667af CMake: Fix some unwanted commentary line wraps on the last change.
llvm-svn: 58485
2008-10-31 01:37:26 +00:00
Oscar Fuentes c999dfadf1 CMake: Establish dependencies among executables and libraries, using
data manually extracted from llvm-config.

llvm-svn: 58484
2008-10-31 01:24:51 +00:00
Dan Gohman 99cdf8893e Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
vector element 0 for a store, as it's smaller and faster.

llvm-svn: 58483
2008-10-31 00:57:24 +00:00
Ted Kremenek d119c0bd24 Added missing 'expected-warning'
llvm-svn: 58481
2008-10-31 00:20:13 +00:00
Ted Kremenek 20cf431bce Enhance compound literal test case.
llvm-svn: 58480
2008-10-31 00:19:42 +00:00
Ted Kremenek 289c37ad8d Use llvm::raw_string_ostream instead of std::ostringstream.
llvm-svn: 58479
2008-10-31 00:18:30 +00:00
Ted Kremenek 83214f9f9a Enhance path-sensitive return-of-stack-address check to print out the line number of a compound literal (whose address is being returned) instead of printing out the hex representation of the pointer address of the CompoundLiteralExpr.
llvm-svn: 58478
2008-10-31 00:13:20 +00:00
Ted Kremenek 21365a31c2 Add accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.
llvm-svn: 58476
2008-10-31 00:04:54 +00:00
Jim Grosbach 2589604d85 Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
llvm-svn: 58475
2008-10-30 23:44:39 +00:00
Evan Cheng c696ef9b11 I think we got non-machine specific constpool entries covered.
llvm-svn: 58474
2008-10-30 23:43:36 +00:00
Ted Kremenek 883af75f01 Updated checker build.
llvm-svn: 58473
2008-10-30 23:41:37 +00:00
Ted Kremenek 3d71fe1503 Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it).

llvm-svn: 58470
2008-10-30 23:17:05 +00:00
Ted Kremenek 4c276c736c Extend "followsFundamentalRule" to ignore prefix '_' characters.
llvm-svn: 58469
2008-10-30 23:14:58 +00:00
Ted Kremenek 828e6dff9b Handle the case in VisitInitListExprs where there are no initializers in the compound literal.
llvm-svn: 58468
2008-10-30 23:14:36 +00:00
Ted Kremenek ae4d61efb2 Add method that will be invoked using the dot-syntax just to test that the missing -dealloc checker handles it.
llvm-svn: 58467
2008-10-30 23:00:13 +00:00
Ted Kremenek 6955463c24 Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX.
llvm-svn: 58462
2008-10-30 22:28:48 +00:00
Cedric Venet 6c9f3ec66c Change the name of the generated solution file for a CMake build. (from 'project' to 'LLVM').
!!!!!!!!!! Warning !!!!!!!!!!!!!!!
If you already have created a solution with cmake, you will need to manually open to the new one.

llvm-svn: 58461
2008-10-30 21:22:00 +00:00
Duncan Sands aa53c491b2 Testcase for PR2987.
llvm-svn: 58459
2008-10-30 21:13:11 +00:00
Dan Gohman 13cbcf1c18 Canonicalize sext(i1) to i1?-1:0, and update various instcombine
optimizations accordingly.

llvm-svn: 58457
2008-10-30 20:40:10 +00:00
Duncan Sands 8311657b98 Testcase for PR2986.
llvm-svn: 58456
2008-10-30 20:34:30 +00:00
Duncan Sands e18295c258 Fix PR2986: do not use a potentially illegal
type for the shift amount type.  Add a check
that shifts and rotates use the type returned
by getShiftAmountTy for the amount.  This
exposed some problems in CellSPU and PPC,
which have already been fixed.

llvm-svn: 58455
2008-10-30 20:26:50 +00:00
Daniel Dunbar 82d87d6203 Set svn:ignore on cscope.{files,out} in root llvm directory.
llvm-svn: 58453
2008-10-30 19:35:32 +00:00
Daniel Dunbar 5666feb09f Set svn:ignore for some Release-Asserts and Output dirs.
llvm-svn: 58452
2008-10-30 19:31:35 +00:00
Duncan Sands 1310574b0f Shift amounts should have type getShiftAmountTy
(i32 for PPC, not i8).  Correct this, and some
formatting while there.

llvm-svn: 58451
2008-10-30 19:28:32 +00:00
Daniel Dunbar 3933e66a89 Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.

llvm-svn: 58450
2008-10-30 19:26:59 +00:00
Duncan Sands 0852f48d1d Shift amounts should have the type given by
getShiftAmountTy (i32 in the case of CellSPU).

llvm-svn: 58449
2008-10-30 19:24:28 +00:00
Ted Kremenek b7d13803ce Improve compound literal test case.
llvm-svn: 58447
2008-10-30 18:46:50 +00:00
Ted Kremenek 0f0adc97c5 Use the correct predecessor node.
llvm-svn: 58446
2008-10-30 18:37:08 +00:00
Ted Kremenek e40b698953 Pretty-printing for SVals now mainly uses llvm::raw_ostream. We have an adapter for std::ostream, but this will be removed in the future.
llvm-svn: 58445
2008-10-30 18:35:10 +00:00
Ted Kremenek 28f41ba829 Add missing return statement.
llvm-svn: 58444
2008-10-30 18:34:31 +00:00
Mon P Wang 01b8a5a967 Add missing vsetcc expansion for widening
llvm-svn: 58443
2008-10-30 18:21:52 +00:00
Ted Kremenek cbdce2e53a Added iterators to nonloc::CompoundSVal.
Added pretty-printing for nonloc::CompoundSVal.

llvm-svn: 58442
2008-10-30 18:01:28 +00:00
Ted Kremenek 0e19c03382 80 col violation.
llvm-svn: 58441
2008-10-30 17:53:23 +00:00
Ted Kremenek f68bf63611 Use a worklist in GRExprEngine::VisitInitListExpr to process subexpressions.
llvm-svn: 58440
2008-10-30 17:47:32 +00:00
Ted Kremenek a2ace41aa3 Update #includes since SVals.h no longer includes BasicValueFactory.h.
llvm-svn: 58439
2008-10-30 17:46:51 +00:00
Ted Kremenek 1031bf318c Add iterator/reverse_iterator to InitListExpr for iteration over the subexpressions of an initializer list. This is basically the same as child_iterator except reverse iteration is possible (which will be used by GRExprEngine::VisitInitListExpr).
llvm-svn: 58438
2008-10-30 17:45:53 +00:00
Ted Kremenek ec9a252a9b CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time.
llvm-svn: 58437
2008-10-30 17:44:46 +00:00
Ted Kremenek 1e0d95e17e "missing ivar release" is a performance bug.
llvm-svn: 58436
2008-10-30 17:29:54 +00:00
Oscar Fuentes 50af02391b CMake: Reverted some unintentional changes on the previous commit.
llvm-svn: 58435
2008-10-30 17:21:37 +00:00
Oscar Fuentes 876aa17142 CMake: Cygwin pretends to be Unix.
Patch by Jay Foad.

llvm-svn: 58434
2008-10-30 17:15:54 +00:00
Evan Cheng 66cff408ff ARM JIT should observe -relocation-model command line option.
llvm-svn: 58433
2008-10-30 16:10:54 +00:00
Ted Kremenek d26da8cf82 Patch by Nikita Zhuk: test case for fix for false positive reported in PR2978.
llvm-svn: 58432
2008-10-30 15:19:43 +00:00
Ted Kremenek 689ec0eb32 Patch by Nikita Zhuk:
Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property:

  http://llvm.org/bugs/show_bug.cgi?id=2978

llvm-svn: 58431
2008-10-30 15:13:43 +00:00
Steve Naroff 44df6a205b Make sure RewriteObjCMethodDecl() does a block pointer rewrite.
llvm-svn: 58430
2008-10-30 14:45:29 +00:00
Douglas Gregor ffe249f5e5 Fix arithmetic type check
llvm-svn: 58429
2008-10-30 13:47:07 +00:00
Steve Naroff 295570a126 Add a couple fixes for rewriting ivars/methods that use/contain blocks.
Now this:

@interface Test
{
  void (^ivar)(void);
}
- (void)name;
@end

@implementation Test
- (void)name {
  ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0);
  ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar); 
}

llvm-svn: 58428
2008-10-30 12:09:33 +00:00