Commit Graph

124430 Commits

Author SHA1 Message Date
Nico Weber 8935578528 Fix a regression where ':' in CPLUS_INCLUDE_PATH and friends would no longer separate paths.
This regressed in r152583. Also add a test to make sure it doesn't regress again.

llvm-svn: 153034
2012-03-19 15:00:03 +00:00
Preston Gurd 48ccc4df0b This patch adds X86 instruction itineraries for non-pseudo opcodes in
X86InstrCompiler.td.
 
It also adds –mcpu-generic to the legalize-shift-64.ll test so the test
will pass if run on an Intel Atom CPU, which would otherwise
produce an instruction schedule which differs from that which the test expects.

llvm-svn: 153033
2012-03-19 14:10:12 +00:00
Benjamin Kramer 57003a6768 Add a note for -ffast-math optimization of vector norm.
llvm-svn: 153031
2012-03-19 00:43:34 +00:00
Chandler Carruth 93f2c7b584 Make the formatting of this file more consistent, and fix the 80-columns
violations I introduced. Also sort some of the instructions to get
a more consistent ordering.

Suggestions on still better / more consistent formatting would be
welcome. I'm actually tempted to use a macro to define all of the
delegate methods...

llvm-svn: 153030
2012-03-18 23:45:14 +00:00
Chandler Carruth 609522e2cc Teach InstVisitor about the UnaryInstruction layer in the instruction
type hierarchy. I wanted to use this for the inline cost rewrite, and
found it was missing.

llvm-svn: 153029
2012-03-18 23:31:28 +00:00
Nick Lewycky fa30607eca Factor out the multiply analysis code in ComputeMaskedBits and apply it to the
overflow checking multiply intrinsic as well.

Add a test for this, updating the test from grep to FileCheck.

llvm-svn: 153028
2012-03-18 23:28:48 +00:00
Craig Topper 129f9ef669 isCommutedMOVLMask should only look at 128-bit vectors to match isMOVLMask.
llvm-svn: 153027
2012-03-18 22:50:10 +00:00
Sebastian Redl 1678d5f7b2 Add the missing compatibility warning for braced initializers as default arguments.
llvm-svn: 153026
2012-03-18 22:25:45 +00:00
Benjamin Kramer 44057c3d01 Include limits.h for PATH_MAX.
llvm-svn: 153013
2012-03-18 13:06:54 +00:00
Benjamin Kramer 7377e31d21 An error can't be in a warning group.
llvm-svn: 153012
2012-03-18 13:01:31 +00:00
Nick Lewycky f70a2bde45 This clause (although matching parts of the implementation) can't be correct.
Thanks to Eli for noticing the discrepancy.

llvm-svn: 153011
2012-03-18 09:35:50 +00:00
Jordy Rose bf38f20e79 [analyzer] Mark a failed-realloc's result as an interesting symbol between the realloc call and the null check, so we get nicer path notes. Fixes a regression introduced by the diagnostic pruning added in r152361.
This is accomplished by calling markInteresting /during/ path diagnostic generation, and as such relies on deterministic ordering of BugReporterVisitors -- namely, that BugReporterVisitors are run in /reverse/ order from how they are added. (Right now that's a consequence of storing visitors in an ImmutableList, where new items are added to the front.) It's a little hacky, but it works for now.

I think this is the best we can do without storing the relation between the old and new symbols, and that would be a hit whether or not there ends up being an error.

llvm-svn: 153010
2012-03-18 07:43:35 +00:00
Aaron Ballman 0467f55d62 Turns #import in MS Mode into an error.
llvm-svn: 153009
2012-03-18 03:10:37 +00:00
David Blaikie a90e86aa36 Use character literals for vexing initialization fixit hints.
Instead of suggesting " = 0" for "char c();", suggest " = '\0'", and similarly
for other char types (wide, 16, and 32). Add tests for all these, and since
this means testing such hints under C++0x, add tests for some untested C++0x
hint cases in the existing code, including suggesting nullptr for pointer
initialization.

This sets up the initialization helper to provide better type fidelity that
will be especially helpful for non-assignment cases (such as fixit-correcting
NULL usage in function calls (eg: foo(char) + foo(NULL) => foo('\0') instead
of the less informative foo(0)))

llvm-svn: 153008
2012-03-18 02:56:47 +00:00
Jordy Rose 61c974b492 [analyzer] Use a FoldingSet to cache simple RetainSummary instances, rather than explicitly keeping DoNothing and StopTracking summaries and nothing else.
I tried to test the effects of this change on memory usage and run time, but what I saw on retain-release.m was indistinguishable from noise (debug and release builds). Even so, some caveman profiling showed 101 cache hits that we would have generated new summaries for before (i.e. not default or stop summaries), and the more code we analyze, the more memory we should save.

Maybe we should have a standard project for benchmarking the retain count checker's memory and time?

llvm-svn: 153007
2012-03-18 01:26:10 +00:00
Douglas Gregor d17dfe1638 Replace a FIXME with a diagnostic when we can't resolve the
nested-name-specifier for a class template declaration. Fixes PR12291.

llvm-svn: 153006
2012-03-18 00:15:42 +00:00
Douglas Gregor 31feb337a6 Diagnose tag and class template declarations with qualified
declarator-ids that occur at class scope. Fixes PR8019.

llvm-svn: 153002
2012-03-17 23:06:31 +00:00
Jordy Rose 35e71c771d [analyzer] Unify retain-count summary generation for class and instance methods. No functionality change.
llvm-svn: 153001
2012-03-17 21:13:07 +00:00
Jordy Rose 9046bcd03b Kill cocoa::deriveNamingConvention and cocoa::followsFundamentalRule. They are now just simple wrappers around method families, and method decls can cache method family lookups. Also, no one is using them right now.
The one difference between ObjCMethodDecl::getMethodFamily and Selector::getMethodFamily is that the former will do some additional sanity checking, and since CoreFoundation types don't look like Objective-C objects, an otherwise interesting method will get a method family of OMF_None. Future clients that use method families should consider how they want to handle CF types.

llvm-svn: 153000
2012-03-17 20:51:32 +00:00
Benjamin Kramer 5d1bca8016 CriticalAntiDepBreaker: Replace a SmallSet of regs with a much denser BitVector.
llvm-svn: 152999
2012-03-17 20:22:57 +00:00
Jordy Rose 7063883e8c [analyzer] Remove duplicate work on deriving method behavior. No functionality change.
The cocoa::deriveNamingConventions helper is just using method families anyway now, and the way RetainSummaryTemplate works means we're allocating an extra summary for every method with a relevant family.

Also, fix RetainSummaryTemplate to do the right thing w/r/t annotating an /existing/ summary. This was probably the real cause of <rdar://problem/10824732> and the fix in r152448.

llvm-svn: 152998
2012-03-17 19:53:04 +00:00
Craig Topper b25fda95f6 Reorder includes in Target backends to following coding standards. Remove some superfluous forward declarations.
llvm-svn: 152997
2012-03-17 18:46:09 +00:00
Fariborz Jahanian e8810768a9 modern objective-c rewriter: further improvement in
writing @synchronized statement; do not call locking
expression more than once and support early exits in
@synchronized's statement block (such as return).

llvm-svn: 152993
2012-03-17 17:46:02 +00:00
Benjamin Kramer 97f889f43b MachineInstr: Inline the fast path (non-bundle instruction) of hasProperty.
This is particularly helpful as both arguments tend to be constants.

llvm-svn: 152991
2012-03-17 17:03:45 +00:00
NAKAMURA Takumi 3ec7c4574f StaticAnalyzer: Fix abuse of StringRef in r152962.
llvm-svn: 152982
2012-03-17 13:06:05 +00:00
Craig Topper f3f6650f8f Fix some copy and paste remnants of Cell and SPU in Hexagon files.
llvm-svn: 152981
2012-03-17 09:39:20 +00:00
Craig Topper bc3168b128 Fix typo in file header.
llvm-svn: 152980
2012-03-17 09:28:37 +00:00
Craig Topper b545408116 Pass TargetOptions to HexagonTargetMachine constructor by reference to match other targets and the base class.
llvm-svn: 152979
2012-03-17 09:24:09 +00:00
Craig Topper 188ed9d56e Reorder includes to match coding standards. Fix an issue or two exposed by that.
llvm-svn: 152978
2012-03-17 07:33:42 +00:00
Douglas Gregor 7b316825d4 When determining the availability of an enum constant, also consider
the availability of the enumeration type itself. Fixes
<rdar://problem/10996386>.

llvm-svn: 152977
2012-03-17 06:39:06 +00:00
Jordy Rose 78373e505d [analyzer] Don't claim an object was returned with +1 retain count before counting autoreleases. Fixes PR10376.
(Also, 80-column violations.)

llvm-svn: 152976
2012-03-17 05:49:15 +00:00
Jordy Rose 914e81ad94 [analyzer] Add test case from PR10794 for using 'new' with Obj-C objects.
llvm-svn: 152975
2012-03-17 03:53:59 +00:00
Jason Molenda be55f383f0 Bump to lldb-133.
Remove unused entitlements plist from debugserver.

llvm-svn: 152973
2012-03-17 03:27:04 +00:00
Enrico Granata 3713cadd09 Changed the URL to the CFString summary provider; slightly reworded the relevant piece of content
llvm-svn: 152972
2012-03-17 02:14:46 +00:00
Enrico Granata 0fddd5631d Pointing users to a new example of synthetic children provider en lieu of the old StdVector example which was removed earlier today
llvm-svn: 152971
2012-03-17 02:04:20 +00:00
Enrico Granata ab8674f99f Adding a new example of synthetic children provider
llvm-svn: 152970
2012-03-17 02:02:03 +00:00
Anna Zaks ce690f4b24 [analyzer] This test is breaking windows bots, make it darwin-specific.
(The plist output does not match the one we expect, specifically we do
not detect that the interesting symbol is returned by a call.)

llvm-svn: 152969
2012-03-17 01:53:32 +00:00
Ted Kremenek 679b478616 Fix crash on invalid code. I've tried to produce a reduced test case, but when I do the specific crash is hidden. Fixes <rdar://problem/11063594>.
llvm-svn: 152968
2012-03-17 00:53:39 +00:00
Jim Grosbach 2c8e0ac85c MC asm parser macro argument count was wrong when empty.
evaluated to '1' when the argument list was empty (should be '0').

rdar://11057257

llvm-svn: 152967
2012-03-17 00:11:42 +00:00
Howard Hinnant 0f73197364 Arm fixes in cxa_personality.cpp and a little refactoring.
llvm-svn: 152966
2012-03-17 00:10:52 +00:00
Sean Callanan 7de79f3297 Updated LLVM/Clang to take a patch that fixes some
ARM assembly syntax in LLVM.  This allows LLDB to
build with the latest Clang.

llvm-svn: 152965
2012-03-17 00:02:03 +00:00
Anna Zaks a7f457a5ea [analyzer] Shorten the stack hint diagnostic.
Do not display the standard "Returning from 'foo'", when a stack hint is
available.

llvm-svn: 152964
2012-03-16 23:44:28 +00:00
Bill Wendling 44ab2103e2 Make the storing variable's name generic.
llvm-svn: 152963
2012-03-16 23:37:23 +00:00
Anna Zaks cba4f298c6 [analyzer] Create symbol-aware stack hints (building upon r152837).
The symbol-aware stack hint combines the checker-provided message
with the information about how the symbol was passed to the callee: as
a parameter or a return value.

For malloc, the generated messages look like this :
"Returning from 'foo'; released memory via 1st parameter"
"Returning from 'foo'; allocated memory via 1st parameter"
"Returning from 'foo'; allocated memory returned"
"Returning from 'foo'; reallocation of 1st parameter failed"


(We are yet to handle cases when the symbol is a field in a struct or
an array element.)

llvm-svn: 152962
2012-03-16 23:24:20 +00:00
Anna Zaks 180e4aa246 [analyzer] +Comments
llvm-svn: 152961
2012-03-16 23:24:16 +00:00
Anna Zaks bbea3e7780 [analyzer] Add a statistic for the number of times we reach the max
number of steps in the work list.

llvm-svn: 152960
2012-03-16 23:24:13 +00:00
Bill Wendling 23f8c4a50c Check if we can handle the arguments of a call (and therefore the call) in
fast-isel before emitting code. If the program bails after code was emitted,
then it could lead to the stack being adjusted more than once (two
CALLSEQ_BEGINs emitted) but being adjuste back only once after the call. This
leads to general badness and gnashing of teeth.
<rdar://problem/11050630>

llvm-svn: 152959
2012-03-16 23:11:07 +00:00
Francois Pichet b7ae23fb66 Revert r152915. Chapuni's WinWaitReleased refactoring: It doesn't work for me
llvm-svn: 152958
2012-03-16 22:50:01 +00:00
Chris Lattner c9de7e5281 clarify the coding standards a bit.
llvm-svn: 152957
2012-03-16 22:34:37 +00:00
Benjamin Kramer 778b8b84b8 Escape % in diagnostic message when compiling LLVM IR.
% is a common character in IR so we'd crash on almost any malformed IR. The
diagnostic formatter expects a formatting directive when it sees an unescaped %.

llvm-svn: 152956
2012-03-16 22:31:42 +00:00