Commit Graph

48018 Commits

Author SHA1 Message Date
Ted Kremenek 36d4cbc382 Added static methods to APSInt: getMinValue and getMaxValue.
llvm-svn: 56355
2008-09-19 18:01:14 +00:00
Ted Kremenek 34bfd8a490 Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.
For checking if a symbol >= value, we need to check if symbol == value || symbol
> value. When checking symbol > value and we know that symbol != value, the path
is infeasible only if value == maximum integer.

For checking if a symbol <= value, we need to check if symbol == value || symbol
< value. When checking symbol < value and we know that symbol != value, the path
is infeasible only if value == minimum integer.

Updated test case exercising this logic: we only prune paths if the values are
unsigned.

llvm-svn: 56354
2008-09-19 18:00:36 +00:00
Chris Lattner a7b034463e Fix rdar://6222856: the receiver of a message expr is an
arbitrary expr, not just a assign expr.  The grammar comment
was right, the code was just wrong.

llvm-svn: 56353
2008-09-19 17:44:00 +00:00
Evan Cheng 4c0197043c Re-materalized definition instructions may be dead. Whack them.
llvm-svn: 56352
2008-09-19 17:38:47 +00:00
Ted Kremenek a5bf9cb4be When we have a binary expression 'int operator symbol', properly rewrite this as
'symbol operator-reverse int'. This patch is a combination of code from
Zhongxing Xu and myself (Zhongxing noticed this bug for the cases of
relational operators).

llvm-svn: 56351
2008-09-19 17:31:13 +00:00
Gabor Greif 715b9d2403 backing out my last commit, it was not intended to go on the trunk
llvm-svn: 56349
2008-09-19 15:13:20 +00:00
Gabor Greif 92f17070e7 first shot at removing Use::Val
untested, Use::swap() is definitely not done yet

llvm-svn: 56348
2008-09-19 15:03:57 +00:00
Duncan Sands 5408dfd3b8 Turn on the AddReadAttrs pass.
llvm-svn: 56345
2008-09-19 14:34:36 +00:00
Duncan Sands 5a896a9858 Add test for improvement of readonly to readnone,
and non-demotion of readnone to readonly.

llvm-svn: 56344
2008-09-19 09:20:05 +00:00
Duncan Sands 310dbffdc0 Turn on these tests!
llvm-svn: 56343
2008-09-19 09:16:32 +00:00
Duncan Sands 310077034a Remove the MarkModRef pass (use AddReadAttrs instead).
Unfortunately this means removing one regression test
of GlobalsModRef because I couldn't work out how to
perform it without MarkModRef.

llvm-svn: 56342
2008-09-19 08:23:44 +00:00
Duncan Sands af25ee7ffc Add a new pass AddReadAttrs which works out which functions
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.

llvm-svn: 56341
2008-09-19 08:17:05 +00:00
Duncan Sands a75815ebb0 Test the callgraph directly for the missing edge.
llvm-svn: 56338
2008-09-19 08:01:57 +00:00
Duncan Sands 938e8f60d6 Teach -callgraph to always print the callgraph (as the
description says it does), not just when -analyze is
used as well.  This means printing to stderr, so adjust
some tests.

llvm-svn: 56337
2008-09-19 07:57:09 +00:00
Zhongxing Xu a8e88ecda6 Add an omitted case for AssumeSymInt.
llvm-svn: 56334
2008-09-19 06:07:59 +00:00
Ted Kremenek 9a7e2efec0 Updated checker build.
llvm-svn: 56333
2008-09-19 05:14:13 +00:00
Ted Kremenek 55bec4d511 Added test case for PR 2600: proper use of NSError**
llvm-svn: 56332
2008-09-19 04:56:32 +00:00
Ted Kremenek a417c0e80a Add panic function "__assert_fail".
llvm-svn: 56327
2008-09-19 02:30:47 +00:00
Dale Johannesen e519bd4183 Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis
and redo as linked list walk.  Logic moved into RA.
Per review feedback.

llvm-svn: 56326
2008-09-19 01:02:35 +00:00
Devang Patel c25be3b2de splitLoop does not handle split condition EQ.
Fixes PR 2805

llvm-svn: 56321
2008-09-18 23:45:14 +00:00
Dan Gohman 6e005fdc8d Address-mode folding for X86FastISel. It's pretty basic, but it
catches a fair number of common cases. Note that this currently
causes Fast-ISel to leave behind lots of dead instructions.
Those will be dealt with in subsequent commits.

llvm-svn: 56320
2008-09-18 23:23:44 +00:00
Ted Kremenek 6a1a334b6c Register the implicit null-dereferenced object as a notable symbol.
llvm-svn: 56319
2008-09-18 23:23:19 +00:00
Ted Kremenek b42f482c91 Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced.
llvm-svn: 56318
2008-09-18 23:09:54 +00:00
Ted Kremenek c38b3fbc4c Update Xcode project.
llvm-svn: 56317
2008-09-18 23:08:24 +00:00
Bill Wendling a00fa322b1 Decrementing the iterator here could be wrong if the worklist is empty after the "erase".
Thanks to Ji Young Park for the patch!

llvm-svn: 56316
2008-09-18 23:04:18 +00:00
Devang Patel 76b22c1420 Try to place hoisted instructions befoe icmp instruction.
llvm-svn: 56315
2008-09-18 22:50:42 +00:00
Evan Cheng 3d9416cf24 Somehow RegAllocLinearScan is keeping two pointers to MachineRegisterInfo.
llvm-svn: 56314
2008-09-18 22:38:47 +00:00
Ted Kremenek 6633871cb3 Analysis option -warn-objc-nserror-methods is no longer available. (check is done automatically with -checker-cfref)
llvm-svn: 56313
2008-09-18 21:25:58 +00:00
Ted Kremenek f0673e4eb6 Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.
llvm-svn: 56312
2008-09-18 21:25:13 +00:00
Dan Gohman e91edeb61c Simplify this code. The FastISel class has its own TD member.
llvm-svn: 56311
2008-09-18 18:26:43 +00:00
Dan Gohman f3d647e00b Don't consider instructions with implicit physical register
defs to be necessarily live.

llvm-svn: 56310
2008-09-18 18:22:32 +00:00
Steve Naroff 3405a73ab8 Finish pushing blocks attribute through the clang attribute machinery.
Also added a couple simple tests from the "gcc.apple" test suite.

llvm-svn: 56309
2008-09-18 16:44:58 +00:00
Tanya Lattner 1fd58f738b Upgrade doxygen.
llvm-svn: 56308
2008-09-18 16:32:28 +00:00
Dan Gohman 95be7d7b85 Add a new "fast" scheduler. This is currently basically just a
copy of the BURRList scheduler, but with several parts ripped
out, such as backtracking, online topological sort maintenance
(needed by backtracking), the priority queue, and Sethi-Ullman
number computation and maintenance (needed by the priority
queue). As a result of all this, it generates somewhat lower
quality code, but that's its tradeoff for running about 30%
faster than list-burr in -fast mode in many cases.

This is somewhat experimental. Moving forward, major pieces of
this can be refactored with pieces in common with
ScheduleDAGRRList.cpp.

llvm-svn: 56307
2008-09-18 16:26:26 +00:00
Steve Naroff 9779e92fa4 Add driver support for invoking block rewriter.
Also tweaked the create function to take an explicit output file.

llvm-svn: 56305
2008-09-18 14:10:13 +00:00
Evan Cheng 5cc53c34c3 Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Evan Cheng 933b392f65 Duh. Default to ARMCC::AL (always).
llvm-svn: 56301
2008-09-18 07:28:19 +00:00
Evan Cheng 5e3ac187d9 Clean up.
llvm-svn: 56300
2008-09-18 07:27:23 +00:00
Evan Cheng bc0d0eccf3 Cosmetic.
llvm-svn: 56299
2008-09-18 07:24:33 +00:00
Ted Kremenek be061e2a19 Enable '-warn-objc-nserror-methods' by default.
llvm-svn: 56298
2008-09-18 06:34:16 +00:00
Ted Kremenek fc3abeb1e5 Implemented one of the checks requested in PR 2600:
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."

Test case written, but the header needs to be delta-debugged reduced.  Will commit shortly.

llvm-svn: 56297
2008-09-18 06:33:41 +00:00
Ted Kremenek 137fc0ea01 Added CFNumberCreate test case to illustrate a 32-bit/64-bit arch issue.
llvm-svn: 56295
2008-09-18 00:28:23 +00:00
Ted Kremenek 24bef31597 Add path-sensitivity test case.
llvm-svn: 56294
2008-09-17 22:24:13 +00:00
Daniel Dunbar 86d97c7985 Improve x86 ABI compatibility.
- Enables use of ABIArgInfo::Expand when needed. This greatly
   improves our x86 ABI compatibility.

 - As the infrastructure for target specific ABI handling isn't built
   yet, this change means ABI compatibility on other platforms is once
   again broken in a different way than before.

 - Upcoming: Figure out how to refactor ABI handling into
   targets. More documentation.

llvm-svn: 56293
2008-09-17 21:22:33 +00:00
Dan Gohman af13bf1ebd FastISel: For calls, prefer using the callee's address as a constant
over having it in a register. And wait until after checking type
legality before requesting that the callee address be placed in a
register. Also, fix support for calls with void return type.

This speeds up fast-isel isel time by about 15% and reduces
instruction counts by about 3% overall on certain testcases. It also
changes many indirect calls to direct calls.

llvm-svn: 56292
2008-09-17 21:18:49 +00:00
Daniel Dunbar d9d1f5f522 Print current function on verification failures.
llvm-svn: 56291
2008-09-17 21:13:22 +00:00
Dale Johannesen f8610ebebc Add a bit to mark operands of asm's that conflict
with an earlyclobber operand elsewhere.  Propagate
this bit and the earlyclobber bit through SDISel.
Change linear-scan RA not to allocate regs in a way 
that conflicts with an earlyclobber.  See also comments.

llvm-svn: 56290
2008-09-17 21:13:11 +00:00
Daniel Dunbar d34d6dc458 Drop CodeGenTypes parameter to classifyArgumentType.
Ensure that ABIArgInfo::Default implementation for aggregrate types
is sensible (StructRet on return and ByVal on arguments).

No functionality change.

llvm-svn: 56289
2008-09-17 20:11:04 +00:00
Steve Naroff 43bafa78b3 Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.

llvm-svn: 56288
2008-09-17 18:37:59 +00:00
Evan Cheng f3fcd7a464 Unallocatable registers do not have live intervals.
llvm-svn: 56287
2008-09-17 18:36:25 +00:00