Commit Graph

145452 Commits

Author SHA1 Message Date
Jordan Rose a45fc81180 [analyzer] Collect stats on the max # of bug reports in an equivalence class.
We discovered that sqlite3.c currently has 2600 reports in a single
equivalence class; it would be good to know if this is a recent
development or what.

(For the curious, the different reports in an equivalence class represent
the same bug found along different paths. When we're suppressing false
positives, we need to go through /every/ path to make sure there isn't a
valid path to a bug. This is a flaw in our after-the-fact suppression,
made worse by the fact that that function isn't particularly optimized.)

llvm-svn: 177188
2013-03-15 21:41:53 +00:00
Jordan Rose 06f68eda4d [analyzer] Include opcode in dumping a SymSymExpr.
For debugging use only; no functionality change.

llvm-svn: 177187
2013-03-15 21:41:50 +00:00
Jordan Rose ecaa7d2c3d [analyzer] Look through ExprWhenCleanups when trying to track a NULL.
Silences a few false positives in LLVM.

llvm-svn: 177186
2013-03-15 21:41:46 +00:00
Jordan Rose 755a2ffd79 Add some assertions to appease the static analyzer.
No functionality change.

llvm-svn: 177185
2013-03-15 21:41:35 +00:00
David Blaikie c28422445a Remove unnecessary default in covered switch over enum
This cleans up the Clang -Werror build that was broken by r177180.

llvm-svn: 177184
2013-03-15 21:12:54 +00:00
Daniel Dunbar 99514845df [AST] Add a fast path to ConstantArrayType::getNumAddressingBits().
- This fast path is almost 100% effective on real code, and lets us avoid
   multiple allocations of 128-bit APSInt objects in the common case.

 - As with any overflow-check-skipping-code, I'd appreciate someone double
   checking my logic.

llvm-svn: 177183
2013-03-15 20:55:27 +00:00
David Blaikie 7e138ff572 Remove IR scenario tests.
These are a burden to maintain & use hand crafted IR to test particular DWARF
generation cases in LLVM. If someone thinks there's high value coverage here
they can rephrase these as IR+dwarfdump tests in the LLVM regression suite so
they'll be portable/easily executed by all developers.

llvm-svn: 177182
2013-03-15 20:52:10 +00:00
Fariborz Jahanian 28c781f039 c: perform integer overflow check on all binary
operations. // rdar://13423975

llvm-svn: 177181
2013-03-15 20:47:07 +00:00
Richard Trieu b4cff1184a Refactor template diffing to store an enum that records which type of
difference is stored inside a DiffNode.  This should not change any
diagnostic messages.

llvm-svn: 177180
2013-03-15 20:35:18 +00:00
Edwin Vane 2032fb973b Don't include outer-most explicit cast in nullptr replacement
The outer-most explicit cast is now left alone by the Use-Nullptr transform to
maintain the type of the expression and avoid introducing ambiguities.

Fixes PR15395.

Author: Ariel J Bernal <ariel.j.bernal@intel.com>
llvm-svn: 177179
2013-03-15 20:18:08 +00:00
Daniel Dunbar 3145eb8e54 [ADT] Fix StringSet::insert() to not allocate on every lookup.
- The previous implementation always constructed the StringMap entry, even if
   the key was present in the set.

llvm-svn: 177178
2013-03-15 20:16:59 +00:00
Edwin Vane 34794c5b3d ClangTool output cleanup
Information messages sent to stdout by ClangTool now only happen when the
-debug flag is set.

Error messages that used to go to stdout now go to stderr.

Author: Ariel J Bernal <ariel.j.bernal@intel.com>
llvm-svn: 177177
2013-03-15 20:14:01 +00:00
Matt Kopec c6672c8783 Rollback r177173. Some OSs may not have ptrace extensions which lldb expects when building. This needs to be accounted for.
llvm-svn: 177176
2013-03-15 20:00:39 +00:00
Michael J. Spencer d932d41190 [Support][Path][Windows] Fix dangling else. Don't call CloseHandle when CloseFD is false.
llvm-svn: 177175
2013-03-15 19:25:47 +00:00
Matt Kopec 0de53f062f Add icc support to the test suite
-adds icc to the lit of compilers to run the tests
-adds icc test decorators
-skip TestAnonymous.py for icc

Patch by Ashok Thirumurthi.

llvm-svn: 177174
2013-03-15 19:10:12 +00:00
Matt Kopec 6773276351 Add ptrace extensions to query a register set.
Patch by Ashok Thirumurthi.

llvm-svn: 177173
2013-03-15 19:06:45 +00:00
Enrico Granata 559008649b Porting the Objective-C Class data type’s summary from Python to C++
llvm-svn: 177172
2013-03-15 18:55:30 +00:00
Enrico Granata f68f732746 Moving CFBag and NSBundle summaries from Python to C++
Temporarily disabled non-code-running summaries for CF*Dictionary and NSCountedSet

llvm-svn: 177171
2013-03-15 18:44:08 +00:00
Arnold Schwaighofer 9d7a3827e4 ARM cost model: Fix costs for some vector selects
I was too pessimistic in r177105. Vector selects that fit into a legal register
type lower just fine. I was mislead by the code fragment that I was using. The
stores/loads that I saw in those cases came from lowering the conditional off
an address.

Changing the code fragment to:

%T0_3 = type <8 x i18>
%T1_3 = type <8 x i1>

define void @func_blend3(%T0_3* %loadaddr, %T0_3* %loadaddr2,
                         %T1_3* %blend, %T0_3* %storeaddr) {
  %v0 = load %T0_3* %loadaddr
  %v1 = load %T0_3* %loadaddr2
==> FROM:
  ;%c = load %T1_3* %blend
==> TO:
  %c = icmp slt %T0_3 %v0, %v1
==> USE:
  %r = select %T1_3 %c, %T0_3 %v0, %T0_3 %v1

  store %T0_3 %r, %T0_3* %storeaddr
  ret void
}

revealed this mistake.

radar://13403975

llvm-svn: 177170
2013-03-15 18:31:01 +00:00
Silviu Baranga 82dd6ac3bc Adding an A15 specific optimization pass for interactions between S/D/Q registers. The pass handles all the required transformations pre-regalloc.
llvm-svn: 177169
2013-03-15 18:28:25 +00:00
Edwin Vane 52c326ec78 Prevent nullptr_t-typed exprs from being replaced
The Use-Nullptr transform was replacing nullptr_t-typed expressions because in
the AST such expressions have an implicit NullToPointer cast around them. Now
the transform ignores these expressions.

Fixes PR15414.

llvm-svn: 177168
2013-03-15 18:10:07 +00:00
Benjamin Kramer 2f5457141a ARM: Fix an old refacto.
Fixes PR15520.

llvm-svn: 177167
2013-03-15 17:27:39 +00:00
Enrico Granata ebafd2f187 <rdar://problem/13194155>
Fixing an issue where threads and frames could get out of sync and cause ValueObjects to fail to retrieve their values correctly

llvm-svn: 177166
2013-03-15 17:25:04 +00:00
Bob Wilson c8541f2bf2 Revert "Remove a pointless assertion."
This reverts commit r177158.

I'm blindly reverting this because it appears to be breaking numerous
buildbots.  I'll reapply if it doesn't turn out to be the culprit.

llvm-svn: 177165
2013-03-15 17:12:43 +00:00
Adrian Prantl 5acf8a3ac5 Force column info only for direct inlined functions. This should strike
the balance between expected behavior and compatibility with the gdb
testsuite.
(GDB gets confused if we break an expression into multiple debug
stmts so we enable this behavior only for inlined functions. For the
full experience people can still use -gcolumn-info.)

llvm-svn: 177164
2013-03-15 17:09:05 +00:00
Fariborz Jahanian 1c150a0d0d c: Also chek for integer overflow for '%' operator.
llvm-svn: 177163
2013-03-15 17:03:56 +00:00
Fariborz Jahanian 352eeafa0a c: add the missing binary operatory when checking
for integer overflow. // rdar://13423975

llvm-svn: 177162
2013-03-15 16:36:04 +00:00
Sylvestre Ledru e0bf581a81 Take in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for the port of Debian on this arch. More information on: http://wiki.debian.org/PowerPCSPEPort Patch by Roland Stigge
llvm-svn: 177161
2013-03-15 16:22:43 +00:00
Hal Finkel 8d7fbc9dad Enable unaligned memory access on PPC for scalar types
Unaligned access is supported on PPC for non-vector types, and is generally
more efficient than manually expanding the loads and stores.

A few of the existing test cases were using expanded unaligned loads and stores
to test other features (like load/store with update), and for these test cases,
unaligned access remains disabled.

llvm-svn: 177160
2013-03-15 15:27:13 +00:00
Arnold Schwaighofer f5284ff61f ARM cost model: Fix cost of fptrunc and fpext instructions
A vector fptrunc and fpext simply gets split into scalar instructions.

radar://13192358

llvm-svn: 177159
2013-03-15 15:10:47 +00:00
Nico Weber 966b331251 Remove a pointless assertion.
FindNodeOrInsertPos() is called 10 lines earlier already, and the function
early-returns there if the result is != 0. InsertPos isn't recomputed after
that check, so this assert is always trivially true. (And it has nothing to
do with if T is canonical or not.)

llvm-svn: 177158
2013-03-15 15:02:37 +00:00
Daniel Jasper 9b33424d6f Improve formatting of chained calls.
clang-format already prevented sequences like:
  ...
  SomeParameter).someFunction(
  ...

as those are quite confusing. This failed on:
  ...
  SomeParameter).someFunction(otherFunction(
  ...

Fixed in this patch.

llvm-svn: 177157
2013-03-15 14:57:30 +00:00
Alexander Potapenko 845b575370 [libsanitizer] StopTheWorld in sanitizer_common
StopTheWorld puts the process in a suspended state before running the
user-supplied callback. To be used in TSan and in leak checking code.

Linux implementation provided.

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 177156
2013-03-15 14:37:21 +00:00
Alexey Samsonov 3a6b6b9d55 [Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to asan_intercepted_functions.h
llvm-svn: 177155
2013-03-15 14:02:21 +00:00
Alexey Samsonov 9aecdfe34d [TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_common
llvm-svn: 177154
2013-03-15 13:48:44 +00:00
Alexander Kornienko 79d6c72e0e Indent all lines in a multi-line comment by the same amount.
Summary:
Do this to avoid spoling nicely formatted multi-line comments (e.g.
with code examples or similar stuff).

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D544

llvm-svn: 177153
2013-03-15 13:42:02 +00:00
Hal Finkel b0fac42987 Protect PPC Altivec patterns with a predicate
In preparation for the addition of other SIMD ISA extensions (such as QPX) we
need to make sure that all Altivec patterns are properly predicated on having
Altivec support.

No functionality change intended (one test case needed to be updated b/c it
assumed that Altivec intrinsics would be supported without enabling Altivec
support).

llvm-svn: 177152
2013-03-15 13:21:21 +00:00
Alexey Samsonov e4385c4b98 [Sanitizer] Don't link tests with -lpthread on Android.
llvm-svn: 177151
2013-03-15 12:54:01 +00:00
Kostya Serebryany 96a7620f3a [sanitizer] fix gcc build warnings
llvm-svn: 177149
2013-03-15 12:27:52 +00:00
Kostya Serebryany b941a2fca4 [asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey Matveev
llvm-svn: 177147
2013-03-15 11:39:41 +00:00
Alexey Samsonov cdd46d9ccc [Sanitizer] Generalize compile/link flags for sanitizer_common tests on Android and on other platforms.
llvm-svn: 177146
2013-03-15 10:39:26 +00:00
Alexey Samsonov efb4168330 Fixup for r176934. More careful setup of path to llvm-symbolizer
llvm-svn: 177145
2013-03-15 07:29:58 +00:00
Alexey Samsonov cd27b98d38 Fixup for r176933: more careful setup of path to llvm-symbolizer
llvm-svn: 177144
2013-03-15 07:27:49 +00:00
Alexey Samsonov 337b0fcf9c [Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class members below methods.
llvm-svn: 177143
2013-03-15 07:08:52 +00:00
Craig Topper f6f549ce02 Use NumBaseBits in a few more places in SmallBitVector instead of recalculating it. No functional change.
llvm-svn: 177142
2013-03-15 06:01:42 +00:00
Rafael Espindola ef9d3494b2 Fix the FDE encoding to be relative on ELF.
This is a very late complement to r130637 which fixed this on x86_64. Fixes
pr15448.

Since it looks like that every elf architecture uses this encoding when using
cfi, make it the default for elf. Just exclude mips64el. It has a lovely
.ll -> .o test (ef_frame.ll) that tests that nothing changes in the binary
content of the .eh_frame produced by llc. Oblige it.

llvm-svn: 177141
2013-03-15 05:51:57 +00:00
Hal Finkel bb420f10e9 Allocate the RS spill slot for any PPC function with spills and a large stack frame
For spills into a large stack frame, the FI-elimination code uses the register
scavenger to obtain a free GPR for use with an r+r-addressed load or store.
When there are no available GPRs, the scavenger gets one by using its spill
slot. Previously, we were not always allocating that spill slot and the RS
would assert when the spill slot was needed.

I don't currently have a small test that triggered the assert, but I've
created a small regression test that verifies that the spill slot is now
added when the stack frame is sufficiently large.

llvm-svn: 177140
2013-03-15 05:06:04 +00:00
Sean Callanan cb7733c33c Rolled back r176719 because settings with file
names were broken.

<rdar://problem/13422580>

llvm-svn: 177139
2013-03-15 01:39:44 +00:00
Anna Zaks e9c43ffb2a [analyzer] Refactor checks in IDC visitor for consistency and speed
llvm-svn: 177138
2013-03-15 01:15:14 +00:00
Anna Zaks 913b0d0078 [analyzer] Teach trackNullOrUndef to look through ternary operators
Allows the suppression visitors trigger more often.

llvm-svn: 177137
2013-03-15 01:15:12 +00:00