Anton Korobeynikov
3edd854d64
Perform mul combine when multiplying wiht negative constants.
...
Patch by Weiming Zhao!
This fixes PR12212
llvm-svn: 153049
2012-03-19 19:19:50 +00:00
Benjamin Kramer
26dbe37993
LanguageExtensions: Manually word wrap a line to reduce horizontal scrolling.
...
llvm-svn: 153048
2012-03-19 19:12:30 +00:00
Matt Beaumont-Gay
ee570a2510
line endings
...
llvm-svn: 153046
2012-03-19 18:47:12 +00:00
Lang Hames
dd98c497b9
Add an option to the MI scheduler to cut off scheduling after a fixed number of
...
instructions have been scheduled. Handy for tracking down scheduler bugs, or
bugs exposed by scheduling.
llvm-svn: 153045
2012-03-19 18:38:38 +00:00
Matt Beaumont-Gay
7fd63a29f7
Use a simpler pluralization construct
...
llvm-svn: 153044
2012-03-19 18:36:28 +00:00
Fariborz Jahanian
3466059001
modern objective-c translator: fix type of objc_exception_throw
...
declaration and its siblings.
llvm-svn: 153043
2012-03-19 18:11:32 +00:00
Howard Hinnant
e59dbd7b82
I would really like to write the handlers in terms of C++11 atomics. This would give us the best performance, portablity, and safety tradeoff. Unfortunately I can not yet do that. So I've put the desired code in comments, and reverted the handler getters to the slower but safer legacy atomic intrinsics.
...
llvm-svn: 153041
2012-03-19 16:56:51 +00:00
Kostya Serebryany
c58dc9fcd2
[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are currently used only for experiments
...
llvm-svn: 153040
2012-03-19 16:40:35 +00:00
Howard Hinnant
4ac72dd982
I've moved __cxa_terminate_handler, __cxa_unexpected_handler and __cxa_new_handler from the public header cxxabi.h into the private header cxa_handlers.hpp. During this move I've also moved them from namespace __cxxabiapple into the global namespace. They are, and have always been extern C and so the namespace (or lack of it) does not affect their ABI. In general external clients should not reference these symbols. They are atomic variables and will be changing into C++11 atomic variables in the future. However for those few clients who really need access to them, their name, mangling, size, alignment and layout will remain stable. You just may need your own declaration of them. Include guards have been added to the private header cxa_exception.hpp. The private header cxa_default_handlers.hpp has been removed and the default handlers are now file-static. Include guards have been added to the private header cxa_handlers.hpp.
...
llvm-svn: 153039
2012-03-19 16:20:34 +00:00
NAKAMURA Takumi
bed1cb1e13
llvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.
...
llvm-svn: 153038
2012-03-19 16:16:03 +00:00
NAKAMURA Takumi
7fc219f713
test/Driver/cpath.c: Mark this as XFAIL:mingw32,win32 for now.
...
On Win32 hosts, ';' is used for path separator.
llvm-svn: 153037
2012-03-19 16:07:58 +00:00
Howard Hinnant
b2f52bb982
Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
...
llvm-svn: 153036
2012-03-19 15:40:23 +00:00
Duncan Sands
3fb2fc6edb
Fix DAG combine which creates illegal vector shuffles. Patch by Heikki Kultala.
...
llvm-svn: 153035
2012-03-19 15:35:44 +00:00
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