Commit Graph

43310 Commits

Author SHA1 Message Date
Ted Kremenek 234dc7ac39 Initialize a local variable.
llvm-svn: 50527
2008-05-01 17:08:00 +00:00
Ted Kremenek ed36e4b9a4 Added ziperr as a panic function. Eventually inter-procedural analysis
should catch this one easily.

llvm-svn: 50526
2008-05-01 15:55:59 +00:00
Ted Kremenek aec2b6e360 Added comments to ObjCMessageExpr.
llvm-svn: 50525
2008-05-01 15:55:24 +00:00
Chris Lattner d4b2a67cf3 don't randomly miscompile seto/setuo just because we are in
ffastmath mode.  This fixes rdar://5902801, a miscompilation
of gcc.dg/builtins-8.c.

Bill, please pull this into Tak.

llvm-svn: 50523
2008-05-01 07:26:11 +00:00
Chris Lattner bb41aab426 1) add '-debug' output
2) Return NULL instead of false in several places for tidiness.
3) fix a bug optimizing  sprintf(p, "%c", x)

llvm-svn: 50521
2008-05-01 06:39:12 +00:00
Chris Lattner b9b5d6ddaa Delete the IPO simplify-libcalls and completely reimplement it as
a FunctionPass.  This makes it simpler, fixes dozens of bugs, adds
a couple of minor features, and shrinks is considerably: from
2214 to 1437 lines.

llvm-svn: 50520
2008-05-01 06:25:24 +00:00
Chris Lattner 0ceb8807e2 fix typo
llvm-svn: 50519
2008-05-01 06:16:48 +00:00
Chris Lattner 9ad872201b instcombine does memset optzns.
llvm-svn: 50518
2008-05-01 06:16:38 +00:00
Chris Lattner 4add60753b simplifylibcalls doesn't optimize llvm.memmove, instcombine does.
llvm-svn: 50517
2008-05-01 06:14:24 +00:00
Chris Lattner adf28cb71c move some tests from libcall optimizer suite.
llvm-svn: 50516
2008-05-01 06:13:48 +00:00
Chris Lattner dbe188720b Add CreateCall3/CreateCall4 at Eric's request.
llvm-svn: 50515
2008-05-01 05:23:45 +00:00
Chris Lattner 472f3bce74 Add a spiffy little "CreateCall2" method, which can be used to make
a function call that takes two Value*'s as arguments.

llvm-svn: 50514
2008-05-01 05:11:00 +00:00
Ted Kremenek 9f696852c4 When processing "release", "retain", and "autorelease" messages return the
lval passed as an argument.

Fix: Inverted diagnostic messages.
llvm-svn: 50513
2008-05-01 04:02:04 +00:00
Ted Kremenek 4828aa3152 Added support for "autorelease" message in CF ref. count checker.
llvm-svn: 50512
2008-05-01 02:18:37 +00:00
Steve Naroff 20348b5653 Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing).
llvm-svn: 50511
2008-05-01 02:04:18 +00:00
Fariborz Jahanian 7cf18862c2 More ObjC2 property semantics work. Work in progress.
llvm-svn: 50508
2008-05-01 00:03:38 +00:00
Ted Kremenek b0f87c48cb added preliminary diagnostics in scan-build results to denote whether
a CF memory leak occurred with GC enabled, etc.

llvm-svn: 50507
2008-04-30 23:47:44 +00:00
Ted Kremenek 0ae9ed7fab scan-build: Disable distributed builds for xcodebuild
llvm-svn: 50506
2008-04-30 23:47:12 +00:00
Ted Kremenek f20e2285c9 More cleanups with ObjCQualifiedIdType in the static analyzer.
llvm-svn: 50503
2008-04-30 22:48:21 +00:00
Ted Kremenek a16dacb6aa Add placeholder code in the static analyzer for MemberExprs involving struct temporaries.
llvm-svn: 50502
2008-04-30 22:17:15 +00:00
Ted Kremenek ca67cab1e8 Add workaround for __builtin_offsetof in the static analyzer.
llvm-svn: 50500
2008-04-30 21:45:55 +00:00
Ted Kremenek 99057462aa Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the sizeof of a ObjCInterfaceType.
llvm-svn: 50499
2008-04-30 21:31:12 +00:00
Ted Kremenek e0e8b535cf Support implicit casts from pointers to references.
llvm-svn: 50498
2008-04-30 21:10:19 +00:00
Ted Kremenek 84dea154fc When creating LVals for array entries, canonicalize entries with a 0 index.
llvm-svn: 50497
2008-04-30 21:05:35 +00:00
Ted Kremenek 20d8006e93 Teach more of the static analyzer about ObjCQualifiedIdType.
llvm-svn: 50494
2008-04-30 20:17:27 +00:00
Ted Kremenek 0940b99e3b Teach the static analysis engine about ObjCQualifiedIdType.
llvm-svn: 50493
2008-04-30 20:01:29 +00:00
Ted Kremenek 5ce35cc514 Add conjured symbols for decl initializations.
Add db_error as panic function.

llvm-svn: 50489
2008-04-30 17:54:04 +00:00
Ted Kremenek 39a736f723 Handle lval::ArrayOffset and lval::FieldOffset in EvalNE and EvalEQ.
llvm-svn: 50486
2008-04-30 16:07:22 +00:00
Chris Lattner dd477ce32b Verify the whole module after codegen to catch silly IR bugs.
llvm-svn: 50485
2008-04-30 16:05:42 +00:00
Chris Lattner e16406d2b1 fix 'var unused' warning.
llvm-svn: 50484
2008-04-30 16:04:01 +00:00
Chris Lattner 78769f0223 fix a bug in my previous patch, a classic =/== bug.
llvm-svn: 50483
2008-04-30 15:27:09 +00:00
Arnold Schwaighofer 68988d13f6 Really commit the test checking the argument lowering behaviour on x86-64 :).
llvm-svn: 50478
2008-04-30 09:19:47 +00:00
Arnold Schwaighofer be0de34ede Tail call optimization improvements:
Move platform independent code (lowering of possibly overwritten
arguments, check for tail call optimization eligibility) from
target X86ISelectionLowering.cpp to TargetLowering.h and
SelectionDAGISel.cpp.

Initial PowerPC tail call implementation:

Support ppc32 implemented and tested (passes my tests and
test-suite llvm-test).  
Support ppc64 implemented and half tested (passes my tests).
On ppc tail call optimization is performed if 
  caller and callee are fastcc
  call is a tail call (in tail call position, call followed by ret)
  no variable argument lists or byval arguments
  option -tailcallopt is enabled
Supported:
 * non pic tail calls on linux/darwin
 * module-local tail calls on linux(PIC/GOT)/darwin(PIC)
 * inter-module tail calls on darwin(PIC)
If constraints are not met a normal call will be emitted.

A test checking the argument lowering behaviour on x86-64 was added.

llvm-svn: 50477
2008-04-30 09:16:33 +00:00
Gabor Greif be5c91d3b3 set ignore property
llvm-svn: 50476
2008-04-30 08:59:22 +00:00
Gabor Greif 659e5c4bc9 fcntl.h is pretty standard on unix (without the sys/)
llvm-svn: 50475
2008-04-30 08:53:22 +00:00
Owen Anderson 0255998dcf Move this test to LoopDeletion, where it now passes.
llvm-svn: 50474
2008-04-30 07:17:22 +00:00
Owen Anderson 0ced13ccd9 This condition got inverted accidentally.
llvm-svn: 50473
2008-04-30 07:16:33 +00:00
Chris Lattner 2dc4426675 move lowering of llvm.memset -> store from simplify libcalls
to instcombine.

llvm-svn: 50472
2008-04-30 06:39:11 +00:00
Chris Lattner f5f944aeaa no reason for simplifylibcalls to simplify intrinsics, instcombine does
a fine job.

llvm-svn: 50470
2008-04-30 06:12:15 +00:00
Chris Lattner 4b20032b08 remove redundant check.
llvm-svn: 50469
2008-04-30 06:06:37 +00:00
Chris Lattner 9caa8c0d77 add missing #include
llvm-svn: 50468
2008-04-30 04:56:14 +00:00
Ted Kremenek 772d9f0aae Added test case for the static analyzer.
llvm-svn: 50467
2008-04-30 04:40:48 +00:00
Ted Kremenek 5cc9e60a5f Invalidate old subexpression bindings when binding UnknownVal.
llvm-svn: 50466
2008-04-30 04:23:07 +00:00
Chris Lattner a1d850ee1c add a method for comparing to see if a value has a specified name.
llvm-svn: 50465
2008-04-30 03:55:40 +00:00
Chris Lattner 438e35c4d1 use string length computation to generalize several xforms.
llvm-svn: 50464
2008-04-30 03:07:53 +00:00
Dale Johannesen c110c4a526 Add comments for previous patch as requested.
llvm-svn: 50463
2008-04-30 00:43:29 +00:00
Scott Michel c3a1910a07 Bug fixes and updates for CellSPU, syncing up with trunk. Most notable
fixes are target-specific lowering of frame indices, fix constants generated
for the FSMBI instruction, and fixing SPUTargetLowering::computeMaskedBitsFor-
TargetNode().

llvm-svn: 50462
2008-04-30 00:30:08 +00:00
Scott Michel be940424b3 Fix custom target lowering for zero/any/sign_extend: make sure that
DAG.UpdateNodeOperands() is called before (not after) the call to
TLI.LowerOperation().

llvm-svn: 50461
2008-04-30 00:26:38 +00:00
Ted Kremenek 9700bd42f0 Simplify RemoveDeadBindings.
llvm-svn: 50458
2008-04-29 23:58:03 +00:00
Ted Kremenek 10bad41159 Added test case to test null dereference checking with lval::ArrayOffset.
llvm-svn: 50454
2008-04-29 23:25:09 +00:00