Commit Graph

132552 Commits

Author SHA1 Message Date
Anna Zaks 6c67d98374 [analyzer] More fixups/rewording based on Jordan's feedback.
llvm-svn: 162597
2012-08-24 21:07:45 +00:00
Jakob Stoklund Olesen e6afde59db Fix call instruction operands in ARMFastISel.
The ARM BL and BLX instructions don't have predicate operands, but the
thumb variants tBL and tBLX do.

The argument registers should be added as implicit uses.

llvm-svn: 162593
2012-08-24 20:52:46 +00:00
Jakob Stoklund Olesen b50cf8b30f Mark X86::RET and RETI instructions as variadic.
There is special magic happening when returning floating point values on
the x87 stack. The RET instructions get extra f80 operands.

llvm-svn: 162592
2012-08-24 20:52:44 +00:00
Jakob Stoklund Olesen 10cdd09318 Avoid including explicit uses when counting SDNode imp-uses.
It is legal to have a register node as an explicit operand, it shouldn't
be counted as an implicit use.

llvm-svn: 162591
2012-08-24 20:52:42 +00:00
Benjamin Kramer c5d00f61b6 Remove unnecessary calls to c_str.
llvm-svn: 162590
2012-08-24 20:43:21 +00:00
Akira Hatanaka 4a08a4a8b6 Disable Mips' delay slot filler when optimization level is O0.
llvm-svn: 162589
2012-08-24 20:40:15 +00:00
Ted Kremenek 722398f1d4 Fix analyzer tests.
llvm-svn: 162588
2012-08-24 20:39:55 +00:00
Ted Kremenek 7c2137a328 Revert "Go ahead and show experimental checkers in the scan-build "-h" output."
llvm-svn: 162587
2012-08-24 20:39:38 +00:00
John McCall 7d8b041999 Instantiate class template specializations during ADL.
llvm-svn: 162586
2012-08-24 20:38:34 +00:00
Howard Hinnant 49a37bbb9f Fix basic_filebuf's internal buffer is shrinking when using with some codecvt. http://llvm.org/bugs/show_bug.cgi?id=13602
llvm-svn: 162585
2012-08-24 20:37:00 +00:00
Akira Hatanaka e8e4ef102d In MipsDAGToDAGISel::SelectAddr, fold add node into address operand, if its
second operand is MipsISD::GPRel.

llvm-svn: 162584
2012-08-24 20:21:49 +00:00
Fariborz Jahanian fd5cf6cf26 objective-C: When checking for valid overriden property
in class extension, assume default is rewdwrite and don't
issue any diagnostics, privided other ownership models
are ok.

llvm-svn: 162583
2012-08-24 20:10:53 +00:00
Ted Kremenek 7c65b8f22a Rename the "experimental" checker package to "alpha". We will then refine
this group into "alpha" and "beta" to distinguish between checkers in
different levels of premature state.

llvm-svn: 162582
2012-08-24 19:46:03 +00:00
Ted Kremenek 5bc38bad73 Rework how PathDiagnosticConsumers pass knowledge of what files they
generated for a given diagnostic to another.  Because PathDiagnostics
are specific to a give PathDiagnosticConsumer, store in
a FoldingSet a unique hash for a PathDiagnostic (that will be the same
for the same bug for different PathDiagnosticConsumers) that
stores a list of files generated.  This can then be read by the
other PathDiagnosticConsumers.

This fixes breakage in the PLIST-HTML output.

llvm-svn: 162580
2012-08-24 19:35:19 +00:00
Anna Zaks f0aa7d1bc2 [analyzer] Address Jordan's review comments.
llvm-svn: 162579
2012-08-24 18:43:09 +00:00
Manman Ren 637d03b977 Forgot to check in ProfileDataTypes.h in r162576
llvm-svn: 162578
2012-08-24 18:40:00 +00:00
Manman Ren 32a71b9659 Profile: move a single enum out of ProfileInfoTypes.h into a new
ProfileDataTypes.h header.

With this patch the old and new profiling code can exist side-by-side. The new
profiling code will be submitted soon and it only supports insert-edge-profiling
for now and will not depend on ProfileInfo.

Patch by Alastair Murray.

llvm-svn: 162576
2012-08-24 18:31:44 +00:00
Chad Rosier 0f8487c632 Fix 80-column violation.
llvm-svn: 162575
2012-08-24 18:31:16 +00:00
Sean Callanan 6efc2ba7f8 Changed register ValueObjects to report their
expression path in a way that can actually be
resolved by "expr".

llvm-svn: 162574
2012-08-24 18:21:05 +00:00
Johnny Chen 6d675243b4 rdar://problem/11811338
Add 'attach <pid>|<process-name>' command to lldb, as well as 'detach' which is an alias of 'process detach'.
Add two completion test cases for "attach" and "detach".

llvm-svn: 162573
2012-08-24 18:15:45 +00:00
Manman Ren cf10446ffa BranchProb: modify the definition of an edge in BranchProbabilityInfo to handle
the case of multiple edges from one block to another.

A simple example is a switch statement with multiple values to the same
destination. The definition of an edge is modified from a pair of blocks to
a pair of PredBlock and an index into the successors.

Also set the weight correctly when building SelectionDAG from LLVM IR,
especially when converting a Switch.
IntegersSubsetMapping is updated to calculate the weight for each cluster.

llvm-svn: 162572
2012-08-24 18:14:27 +00:00
Howard Hinnant 45c03a8f8d Fixed order of calling use_facet vs setbuf in basic_filebuf default constructor.
llvm-svn: 162571
2012-08-24 18:06:47 +00:00
Dmitri Gribenko 219bd1554f Comment diagnostics: for unresolved parameters, do not suggest parameter fixit
with parameter that is documented.

Fixes PR13670, <rdar://problem/12155840>.

llvm-svn: 162570
2012-08-24 17:45:39 +00:00
Jakob Stoklund Olesen 8a276c26bd Verify explicit instruction properties when they can be inferred.
It is now allowed to explicitly set hasSideEffects, mayStore, and
mayLoad on instructions with patterns.

Verify that the patterns are consistent with the explicit flags.

llvm-svn: 162569
2012-08-24 17:08:41 +00:00
Chad Rosier 14836bab36 [ms-inline asm] Refactor code. No functional change intended.
llvm-svn: 162568
2012-08-24 17:05:45 +00:00
Howard Hinnant cc27317a62 basic_filebuf needs to delay obtaining a codecvt facet from the global locale to give the client a chance to imbue the proper locale. Fixes http://llvm.org/bugs/show_bug.cgi?id=13663.
llvm-svn: 162567
2012-08-24 16:52:47 +00:00
Kostya Serebryany 4cc511daf0 [asan/tsan] rename FunctionBlackList* to BlackList* as this class is not limited to functions any more
llvm-svn: 162566
2012-08-24 16:44:47 +00:00
Kostya Serebryany 36dfc5ceab [asan/tsan] extend the functionality of FunctionBlackList to globals and modules. Patch by Reid Watson.
llvm-svn: 162565
2012-08-24 16:40:11 +00:00
Chad Rosier 1e17cf9c22 [ms-inline asm] Generate the Input/Output expressions using
Sema::ActOnIdExpression().

llvm-svn: 162564
2012-08-24 16:38:58 +00:00
Jordan Rose 51c27163c0 [analyzer] If we dereference a NULL that came from a function, show the return.
More generally, any time we try to track where a null value came from, we
should show if it came from a function. This usually isn't necessary if
the value is symbolic, but if the value is just a constant we previously
just ignored its origin entirely. Now, we'll step into the function and
recursively add a visitor to the returned expression.

<rdar://problem/12114609>

llvm-svn: 162563
2012-08-24 16:34:31 +00:00
Roman Divacky ace4707ea6 Lower constant pools and jump tables via TOC on PPC64/SVR4.
In collaboration with Adhemerval Zanella.

llvm-svn: 162562
2012-08-24 16:26:02 +00:00
Dmitry Vyukov 7d3d94454c tsan: improve memory allocator a bit
llvm-svn: 162561
2012-08-24 15:53:14 +00:00
Chad Rosier ab24b6e24e Fix 80-column violation.
llvm-svn: 162560
2012-08-24 15:51:10 +00:00
Benjamin Kramer dd62d6b6c8 GVN: Fix quadratic runtime on the number of switch cases.
No intended behavior change.  This was introduced in r162023.  With the fixed
algorithm a Release build of ARMInstPrinter.cpp goes from 16s to 10s on a
2011 MBP.

llvm-svn: 162559
2012-08-24 15:06:28 +00:00
Jakob Stoklund Olesen 3ac45d9a1f Fix load/store SDNode flags.
llvm-svn: 162558
2012-08-24 14:43:30 +00:00
Jakob Stoklund Olesen a954e92053 Add missing SDNPSideEffect flags.
llvm-svn: 162557
2012-08-24 14:43:27 +00:00
Jakob Stoklund Olesen 8ff666fcb6 Remove more mayLoad workarounds.
llvm-svn: 162556
2012-08-24 14:43:22 +00:00
Tobias Grosser 6f9465591e PoCC: Simplify condition
llvm-svn: 162555
2012-08-24 13:56:56 +00:00
Tobias Grosser 4a67e01216 Sort includes
llvm-svn: 162554
2012-08-24 13:54:40 +00:00
Tobias Grosser c8fc2d7045 PoCC: Adapt to earlier vectorizer changes
llvm-svn: 162553
2012-08-24 13:54:36 +00:00
Benjamin Kramer c215e76f78 Push ArrayRef through the Expr hierarchy.
No functionality change.

llvm-svn: 162552
2012-08-24 11:54:20 +00:00
NAKAMURA Takumi d574ac2f4d Fix the definition of JSONAnchorSource. MSVC mangles variable symbols, and "volatile" affects.
llvm-svn: 162550
2012-08-24 10:39:28 +00:00
Chandler Carruth 387ffe7d4b Try to appease MSVC even more elaborately in the alignment hacking space.
MSVC doesn't support passing by-value parameters with alignment of
16-bytes or higher apparantly. What is deeply confusing is that it seems
to *sometimes* (but not always) apply this to any type whose alignment
is set using __declspec(align(...)). This caused lots of errors when we switch
SmallVector over to use the automatically aligned character array
utilities as they used __declspec(align(...)) heavily.

As a pretty horrible but effective work-around, we instead cherry pick
the smallest alignment sizes with specific types that happen to have the
correct alignment, and then fall back to the attribute solution past
them. This should resolve the MSVC build errors folks have been hitting.
Sorry for that. In good news, it will do this without introducing other
UB I hope. =]

Thanks to Timur Iskhodzhanov for helping me test this!

llvm-svn: 162549
2012-08-24 09:53:43 +00:00
Alexander Potapenko 00492cab3e Revert the erroneous changes made to Makefile.old in r162547
Remove a spare newline from asan_rtl.cc

llvm-svn: 162548
2012-08-24 09:31:53 +00:00
Alexander Potapenko fefc1e989c If the program is linked to a dynamic ASan runtime which is not present in DYLD_INSERT_LIBRARIES
(which, in turn, is required for our interceptors to take effect), re-exec the program with
DYLD_INSERT_LIBRARIES set.

llvm-svn: 162547
2012-08-24 09:22:05 +00:00
Alexander Potapenko d79d80b4a0 Add add_clang_runtime_shared_library() CMake function and use it to put the shared ASan runtime in the appropriate place.
llvm-svn: 162546
2012-08-24 07:49:22 +00:00
Ted Kremenek 64fea5fc8f Teach CFG that 'if (x & 0)' and 'if (x * 0)' is an unfeasible branch.
Fixes <rdar://problem/11005770>.

llvm-svn: 162545
2012-08-24 07:42:09 +00:00
James Dennett 75c100b8e5 Allow RecursiveASTVisitor to visit CXXCtorInitializer objects for which
isWritten() returns false, if shouldVisitImplicitCode() returns true.
Previously those CXXCtorInitializers were always skipped.

In order to make this change easier to test, this patch also extends the
test class template ExpectedLocationVisitor to support arbitrary numbers
of expected matches and disallowed matches.

llvm-svn: 162544
2012-08-24 06:59:51 +00:00
Ted Kremenek b5e409fd20 Go ahead and show experimental checkers in the scan-build "-h" output.
They are labeled as not being enabled-by-default, and how else
are users going to test them.

Fixes <rdar://problem/11654923>

llvm-svn: 162543
2012-08-24 06:49:34 +00:00
Greg Clayton bc38679b07 Remove printf that go left in the code.
llvm-svn: 162542
2012-08-24 06:43:15 +00:00