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
Ted Kremenek
10246e8bfa
Add lval::ArrayOffset, which represent the locations of entries in an array.
...
llvm-svn: 50453
2008-04-29 23:24:44 +00:00
Fariborz Jahanian
2dfcec129f
Default visbility for instance variables is protected.
...
Patch by Emerson Murhpy-Hill.
llvm-svn: 50452
2008-04-29 23:03:51 +00:00
Dale Johannesen
fc3e3ad74d
Make eh_frame objects by 8-byte aligned on 64-bit
...
targets.
llvm-svn: 50451
2008-04-29 22:58:20 +00:00
Ted Kremenek
0d2ccffa83
Added lval::FieldOffset, which represents symbolic lvalues for field offsets from other Lvalues.
...
This removes the failure in null-deref-ps.c (test suite).
llvm-svn: 50449
2008-04-29 22:17:41 +00:00
John Criswell
663f5fccd4
Minor spelling and typo fixes.
...
llvm-svn: 50448
2008-04-29 22:12:40 +00:00
Owen Anderson
ad5367f8ed
Revert r50441. The original code was correct. Add some more comments so that I don't make the same mistake in the future.
...
llvm-svn: 50446
2008-04-29 21:51:00 +00:00
Owen Anderson
ff7d7b18e5
Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied because
...
we were checking for it in the wrong order. This caused a miscompilation because the
return slot optimization assumes that the call it is dealing with is NOT a memcpy.
llvm-svn: 50444
2008-04-29 21:26:06 +00:00
Ted Kremenek
fa5a3d0fe7
Major rewrite/refactoring of static analysis engine. We now use
...
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.
This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.
llvm-svn: 50443
2008-04-29 21:04:26 +00:00