Manman Ren [Mon, 18 Mar 2013 21:23:25 +0000 (21:23 +0000)]
Check whether a pointer is non-null (isKnownNonNull) in isKnownNonZero.
This handles the case where we have an inbounds GEP with alloca as the pointer.
This fixes the regression in PR12750 and rdar://
13286434.
Note that we can also fix this by handling some GEP cases in isKnownNonNull.
llvm-svn: 177321
Richard Smith [Mon, 18 Mar 2013 21:12:30 +0000 (21:12 +0000)]
Bring inheriting constructor implementation up-to-date with current defect
reports, and implement implicit definition of inheriting constructors.
Remaining missing features: inheriting constructor templates, implicit
exception specifications for inheriting constructors, inheriting constructors
from dependent bases.
llvm-svn: 177320
Rafael Espindola [Mon, 18 Mar 2013 20:48:54 +0000 (20:48 +0000)]
Centralize the recording of which tools have been constructed.
llvm-svn: 177319
Anna Zaks [Mon, 18 Mar 2013 20:46:56 +0000 (20:46 +0000)]
[analyzer] Warn when a ‘nil’ object is added to NSArray or NSMutableArray.
llvm-svn: 177318
Andrew Trick [Mon, 18 Mar 2013 20:42:25 +0000 (20:42 +0000)]
TableGen fix for the new machine model.
Properly handle cases where a group of instructions have different
SchedRW lists with the same itinerary class.
This was supposed to work, but I left in an early break.
llvm-svn: 177317
David Blaikie [Mon, 18 Mar 2013 20:31:44 +0000 (20:31 +0000)]
Include '.test' suffix in target specific lit configs that need it
Apparently my final cleanup to use a relevant suffix for these tests before
committing r176831 caused them to stop running since lit wasn't configured to
run tests with that suffix in those directories (why don't we just have a
global suffix list?). So, add the suffix to the relevant directories & fix the
test that has bitrotted over the last week due to my debug info schema changes.
llvm-svn: 177315
Eric Christopher [Mon, 18 Mar 2013 20:21:47 +0000 (20:21 +0000)]
Make the fields in the diagram match the descriptive text above them.
llvm-svn: 177314
Sebastian Pop [Mon, 18 Mar 2013 20:21:13 +0000 (20:21 +0000)]
Correct function to decide if a SCEV can be ignored
When doing SCEV based code generation, we ignore instructions calculating values
that are fully defined by a SCEV expression. The values that are calculated by
this instructions are recalculated on demand.
This commit improves the check to verify if certain instructions can be ignored
and recalculated on demand.
llvm-svn: 177313
Dmitry Vyukov [Mon, 18 Mar 2013 19:47:36 +0000 (19:47 +0000)]
tsan: smaller memory block headers (32b->16b)
llvm-svn: 177312
Fariborz Jahanian [Mon, 18 Mar 2013 19:41:18 +0000 (19:41 +0000)]
Objective-C modern translator. Don't put line info
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://
13138170
llvm-svn: 177311
Marshall Clow [Mon, 18 Mar 2013 19:34:07 +0000 (19:34 +0000)]
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
llvm-svn: 177310
Tobias Grosser [Mon, 18 Mar 2013 19:19:57 +0000 (19:19 +0000)]
ScopHelper: clang-format
llvm-svn: 177309
Tobias Grosser [Mon, 18 Mar 2013 19:17:07 +0000 (19:17 +0000)]
ScopHelper: Remove some dead code
llvm-svn: 177307
Sebastian Pop [Mon, 18 Mar 2013 19:09:49 +0000 (19:09 +0000)]
use the canonical IV only when it exists
llvm-svn: 177306
Rafael Espindola [Mon, 18 Mar 2013 18:50:01 +0000 (18:50 +0000)]
Use early returns when checking if we already constructed a tool and when
delegating to Generic_GCC::SelectTool (it already updates the tool map).
llvm-svn: 177305
Marshall Clow [Mon, 18 Mar 2013 18:20:48 +0000 (18:20 +0000)]
Removed raw references to _MSC_VER; now just check to see if it is defined.
llvm-svn: 177304
Rafael Espindola [Mon, 18 Mar 2013 18:19:46 +0000 (18:19 +0000)]
Remove unused argument.
llvm-svn: 177303
Rafael Espindola [Mon, 18 Mar 2013 18:10:27 +0000 (18:10 +0000)]
Pass an ArgList to every toolchain constructor. Remove the useIntegratedAs
argument.
llvm-svn: 177301
Rafael Espindola [Mon, 18 Mar 2013 17:58:22 +0000 (17:58 +0000)]
Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs.
llvm-svn: 177300
Rafael Espindola [Mon, 18 Mar 2013 17:52:57 +0000 (17:52 +0000)]
Refactor a bit of duplicated code to useIntegratedAs.
llvm-svn: 177299
Bill Wendling [Mon, 18 Mar 2013 17:47:33 +0000 (17:47 +0000)]
Update
llvm-svn: 177298
Marshall Clow [Mon, 18 Mar 2013 17:45:34 +0000 (17:45 +0000)]
Removed raw references to __APPLE__; now just check to see if it is defined.
llvm-svn: 177297
Hal Finkel [Mon, 18 Mar 2013 17:40:46 +0000 (17:40 +0000)]
Fix 80-col. violations in PPCCTRLoops
llvm-svn: 177296
Hal Finkel [Mon, 18 Mar 2013 17:40:44 +0000 (17:40 +0000)]
Fix large count and negative constant count handling in PPCCTRLoops
This commit fixes an assert that would occur on loops with large constant counts
(like looping for ((uint32_t) -1) iterations on PPC64). The existing code did
not handle counts that it computed to be negative (asserting instead), but
these can be created with valid inputs.
This bug was discovered by bugpoint while I was attempting to isolate a
completely different problem.
Also, in writing test cases for the negative-count problem, I discovered that
the ori/lsi handling was broken (there was a typo which caused the logic that
was supposed to detect these pairs and extract the iteration count to always
fail). This has now also been corrected (and is covered by one of the new test
cases).
llvm-svn: 177295
Hal Finkel [Mon, 18 Mar 2013 17:40:27 +0000 (17:40 +0000)]
Cleanup initial-value constants in PPCCTRLoops
Because the initial-value constants had not been added to the list
of instructions considered for DCE the resulting code had redundant
constant-materialization instructions.
llvm-svn: 177294
Rafael Espindola [Mon, 18 Mar 2013 17:25:58 +0000 (17:25 +0000)]
Remove unused argument.
llvm-svn: 177293
Dmitry Vyukov [Mon, 18 Mar 2013 17:21:15 +0000 (17:21 +0000)]
tsan: add support for idle threads
llvm-svn: 177292
Marshall Clow [Mon, 18 Mar 2013 17:04:29 +0000 (17:04 +0000)]
Removed raw references to _WIN32; now just check to see if it is defined.
llvm-svn: 177291
Hans Wennborg [Mon, 18 Mar 2013 17:03:05 +0000 (17:03 +0000)]
Fix integer comparison in DIEInteger::BestForm.
The always-true "(int)Int == (signed)Int" comparison was found
while experimenting with a potential new Clang warning.
llvm-svn: 177290
Dmitry Vyukov [Mon, 18 Mar 2013 16:56:48 +0000 (16:56 +0000)]
tsan: touch less shadow memory during operations on big memory ranges
greatly reduces memory consumption
llvm-svn: 177289
Dmitry Vyukov [Mon, 18 Mar 2013 15:49:07 +0000 (15:49 +0000)]
tsan: mark shadow for thread stack as "don't need" when thread exits
llvm-svn: 177288
Rafael Espindola [Mon, 18 Mar 2013 15:33:26 +0000 (15:33 +0000)]
Remove unused argument.
llvm-svn: 177287
Dmitry Vyukov [Mon, 18 Mar 2013 13:55:33 +0000 (13:55 +0000)]
tsan: better memory profiler
llvm-svn: 177286
Matthew Curtis [Mon, 18 Mar 2013 13:08:24 +0000 (13:08 +0000)]
ReleaseNotes: Tweak hexagonv2/hexagonv3 removal note.
llvm-svn: 177284
Daniel Jasper [Mon, 18 Mar 2013 12:50:26 +0000 (12:50 +0000)]
Fix clang-format segfault.
When annotating "lines" starting with ":", clang-format would segfault.
This could actually happen in valid code, e.g.
#define A :
llvm-svn: 177283
Benjamin Kramer [Mon, 18 Mar 2013 12:41:25 +0000 (12:41 +0000)]
ObjCDictionaryElements are pod-like.
llvm-svn: 177282
Benjamin Kramer [Mon, 18 Mar 2013 12:14:30 +0000 (12:14 +0000)]
Remove default copy ctor/assignment, makes AttributeSet trivially copyable.
And enables SmallVector's pod optimizations.
llvm-svn: 177281
David Tweed [Mon, 18 Mar 2013 12:07:24 +0000 (12:07 +0000)]
Initially forgotten-to-svn-add test case for r177279.
llvm-svn: 177280
David Tweed [Mon, 18 Mar 2013 11:54:44 +0000 (11:54 +0000)]
The optimization a + (-0.0f) -> a was being misapplied to a + (+0.0f) in the vector case (because
we weren't differntiating floating-point zeroinitializers from other zero-initializers)
which was causing problems for code relying upon a + (+0.0f) to, eg, flush denormals to
0. Make the scalar and vector cases have the same behaviour.
llvm-svn: 177279
Dmitry Vyukov [Mon, 18 Mar 2013 11:51:51 +0000 (11:51 +0000)]
tsan: madvise(DONTNEED) shadow memory on munmap()
llvm-svn: 177278
Christian Konig [Mon, 18 Mar 2013 11:34:16 +0000 (11:34 +0000)]
R600/SI: implement indirect adressing for SI
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177277
Christian Konig [Mon, 18 Mar 2013 11:34:10 +0000 (11:34 +0000)]
R600/SI: add float vector types
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177276
Christian Konig [Mon, 18 Mar 2013 11:34:05 +0000 (11:34 +0000)]
R600/SI: add shl pattern
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177275
Christian Konig [Mon, 18 Mar 2013 11:34:00 +0000 (11:34 +0000)]
R600/SI: add BUFFER_LOAD_DWORD pattern
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177274
Christian Konig [Mon, 18 Mar 2013 11:33:55 +0000 (11:33 +0000)]
R600/SI: implement SI.load.const intrinsic
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177273
Christian Konig [Mon, 18 Mar 2013 11:33:50 +0000 (11:33 +0000)]
R600/SI: enable all S_LOAD and S_BUFFER_LOAD opcodes
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177272
Christian Konig [Mon, 18 Mar 2013 11:33:45 +0000 (11:33 +0000)]
R600/SI: fix inserting waits for all defines
Unfortunately the previous fix for inserting waits for unordered
defines wasn't sufficient, cause it's possible that even ordered
defines are only partially used (or not used at all).
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 177271
Kostya Serebryany [Mon, 18 Mar 2013 10:52:25 +0000 (10:52 +0000)]
[asan] make the __asan_get_heap_size more robust
llvm-svn: 177270
Dmitry Vyukov [Mon, 18 Mar 2013 10:32:21 +0000 (10:32 +0000)]
tsan: move implementation out of h file
llvm-svn: 177269
Dmitry Vyukov [Mon, 18 Mar 2013 10:10:15 +0000 (10:10 +0000)]
tsan: fix clang -Wall build
Clang does not like classes with virtual functions but w/o virtual dtor.
Go does not like libstdc++ (operator delete).
llvm-svn: 177267
Alexey Samsonov [Mon, 18 Mar 2013 09:45:22 +0000 (09:45 +0000)]
[TSan] re-apply r177249 lost in edits
llvm-svn: 177265
Kostya Serebryany [Mon, 18 Mar 2013 09:38:39 +0000 (09:38 +0000)]
[asan] when creating string constants, set unnamed_attr and align 1 so that equal strings are merged by the linker. Observed up to 1% binary size reduction. Thanks to Anton Korobeynikov for the suggestion
llvm-svn: 177264
Evgeniy Stepanov [Mon, 18 Mar 2013 09:22:58 +0000 (09:22 +0000)]
[asan] Switch to allocator2 on Android.
llvm-svn: 177263
Dmitry Vyukov [Mon, 18 Mar 2013 09:09:41 +0000 (09:09 +0000)]
tsan: fix memory leak
llvm-svn: 177262
Dmitry Vyukov [Mon, 18 Mar 2013 09:02:27 +0000 (09:02 +0000)]
tsan: use StackDepot for thread creation stacks
llvm-svn: 177261
Dmitry Vyukov [Mon, 18 Mar 2013 08:52:46 +0000 (08:52 +0000)]
tsan: fix Go build
llvm-svn: 177260
Chandler Carruth [Mon, 18 Mar 2013 08:36:46 +0000 (08:36 +0000)]
Mark internal classes as POD-like to get better behavior out of
SmallVector and DenseMap.
This speeds up SROA by 25% on PR15412.
llvm-svn: 177259
Dmitry Vyukov [Mon, 18 Mar 2013 08:27:47 +0000 (08:27 +0000)]
tsan: use StackDepot in sync object to store creation stacks
llvm-svn: 177258
Anton Korobeynikov [Mon, 18 Mar 2013 08:12:28 +0000 (08:12 +0000)]
TLS support for MinGW targets.
MinGW is almost completely compatible to MSVC, with the exception of the _tls_array global not being available.
Patch by David Nadlinger!
llvm-svn: 177257
Anton Korobeynikov [Mon, 18 Mar 2013 08:10:10 +0000 (08:10 +0000)]
Windows TLS: Section name prefix to ensure correct order
The linker sorts the .tls$<xyz> sections by name, and we need
to make sure any extra sections we produce (e.g. for weak globals)
always end up between .tls$AAA and .tls$ZZZ, even if the name
starts with e.g. an underscore.
Patch by David Nadlinger!
llvm-svn: 177256
Dmitry Vyukov [Mon, 18 Mar 2013 08:09:42 +0000 (08:09 +0000)]
tsan: fix huge stack frames
llvm-svn: 177255
Kostya Serebryany [Mon, 18 Mar 2013 08:05:29 +0000 (08:05 +0000)]
[asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. llvm-part
llvm-svn: 177254
Kostya Serebryany [Mon, 18 Mar 2013 08:04:55 +0000 (08:04 +0000)]
[asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. compiler-rt part, llvm-part will follow
llvm-svn: 177253
Anton Korobeynikov [Mon, 18 Mar 2013 07:59:20 +0000 (07:59 +0000)]
Make sure to use same EABI version for external assembler as for integrated as.
Patch by Andrew Turner!
llvm-svn: 177252
Dmitry Vyukov [Mon, 18 Mar 2013 07:58:20 +0000 (07:58 +0000)]
tsan: fix lint warnings
llvm-svn: 177251
Kostya Serebryany [Mon, 18 Mar 2013 07:33:49 +0000 (07:33 +0000)]
[asan] don't instrument functions with available_externally linkage. This saves a bit of compile time and reduces the number of redundant global strings generated by asan (https://code.google.com/p/address-sanitizer/issues/detail?id=167)
llvm-svn: 177250
Alexey Samsonov [Mon, 18 Mar 2013 07:33:00 +0000 (07:33 +0000)]
[TSan] fix undefined variable in debug TSan build
llvm-svn: 177249
Alexey Samsonov [Mon, 18 Mar 2013 07:02:08 +0000 (07:02 +0000)]
[TSan] Use ThreadRegistry::FindThreadContextLocked() to find thread by its stack/tls address.
llvm-svn: 177248
Alexey Samsonov [Mon, 18 Mar 2013 07:00:36 +0000 (07:00 +0000)]
[TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti flag.
llvm-svn: 177247
Alexey Samsonov [Mon, 18 Mar 2013 06:27:13 +0000 (06:27 +0000)]
[Sanitizer] Get rid of global mutexes in StopTheWorld implementation
llvm-svn: 177246
Alexey Samsonov [Mon, 18 Mar 2013 06:07:44 +0000 (06:07 +0000)]
[Sanitizer] Rely on template argument deduction in sanitizer_allocator_test
llvm-svn: 177245
Jakob Stoklund Olesen [Mon, 18 Mar 2013 04:08:07 +0000 (04:08 +0000)]
Extract a method.
This computes the type of an instruction operand or result based on the
records in the instruction's ins and outs lists.
llvm-svn: 177244
Craig Topper [Mon, 18 Mar 2013 03:34:55 +0000 (03:34 +0000)]
Post process ADC/SBB and use a shorter encoding if they use a sign extended immediate.
llvm-svn: 177243
Craig Topper [Mon, 18 Mar 2013 02:53:34 +0000 (02:53 +0000)]
Refactor some duplicated code into helper functions.
llvm-svn: 177242
David Blaikie [Sun, 17 Mar 2013 21:32:54 +0000 (21:32 +0000)]
Fix the build broken in r177239
Seems some accidental C++11 crept in there. Reported by the C++98 buildbots.
llvm-svn: 177241
Michael Gottesman [Sun, 17 Mar 2013 21:31:12 +0000 (21:31 +0000)]
Reduced dont-infinite-loop-during-block-escape-analysis.ll with bugpoint and moved it to retain-block-escape-analysis.ll.
*NOTE* I verified that the original bug behind
dont-infinite-loop-during-block-escape-analysis.ll occurs when using opt on
retain-block-escape-analysis.ll.
llvm-svn: 177240
David Blaikie [Sun, 17 Mar 2013 21:13:55 +0000 (21:13 +0000)]
Split out filename & directory from DIFile to start generalizing over DIScopes
This is the first step to making all DIScopes have a common metadata prefix (so
that things (using directives, for example) that can appear in any scope can be
added to that common prefix). DIFile is itself a DIScope so the common prefix
of all DIScopes cannot be a DIFile - instead it's the raw filename/directory
name pair.
llvm-svn: 177239
David Blaikie [Sun, 17 Mar 2013 21:08:22 +0000 (21:08 +0000)]
Generalize debug info test to be resilient to changes in metadata node numbering
llvm-svn: 177238
David Blaikie [Sun, 17 Mar 2013 20:29:22 +0000 (20:29 +0000)]
Generalize a few debug info test cases
Checking for the annotation comment rather than the metadata values makes these
tests resilient to a coming refactor that will pull these fields out into a
separate metadata node.
llvm-svn: 177237
David Blaikie [Sun, 17 Mar 2013 20:28:12 +0000 (20:28 +0000)]
Improve DIFile debug info annotation by letting it fallback to DIScope
llvm-svn: 177236
Jakob Stoklund Olesen [Sun, 17 Mar 2013 17:26:09 +0000 (17:26 +0000)]
Use ArrayRef<MVT::SimpleValueType> when possible.
Not passing vector references around makes it possible to use
SmallVector in most places.
llvm-svn: 177235
Sylvestre Ledru [Sun, 17 Mar 2013 12:40:42 +0000 (12:40 +0000)]
To avoid symbol clash, undefine PPC here. PPC may be predefined on some hosts.
llvm-svn: 177234
Rafael Espindola [Sun, 17 Mar 2013 12:01:05 +0000 (12:01 +0000)]
Build LLVMgold.so on FreeBSD using cmake.
Patch by Stephen Checkoway.
llvm-svn: 177233
Michael Gottesman [Sun, 17 Mar 2013 08:42:58 +0000 (08:42 +0000)]
The promised test case for r175939.
This test makes sure that the ObjCARC escape analysis looks at the uses of
instructions which copy the block pointer value by checking all four cases where
that can occur.
llvm-svn: 177232
Hal Finkel [Sun, 17 Mar 2013 04:43:44 +0000 (04:43 +0000)]
Improve PPC VR (Altivec) register spilling
This change cleans up two issues with Altivec register spilling:
1. The spilling code was inefficient (using two instructions, and add and a
load, when just one would do)
2. The code assumed that r0 would always be available (true for now, but this
will change)
The new code handles VR spilling just like GPR spills but forced into r+r mode.
As a result, when any VR spills are present, we must now always allocate the
register-scavenger spill slot.
llvm-svn: 177231
Hal Finkel [Sat, 16 Mar 2013 23:02:31 +0000 (23:02 +0000)]
Remove FIXMEs in PPC test cases related to unaligned loads/stores
As pointed out by Bill in response to r177160, these two FIXMEs
can also be removed.
llvm-svn: 177229
Hal Finkel [Sat, 16 Mar 2013 22:50:51 +0000 (22:50 +0000)]
Remove PPC avoidWriteAfterWrite callback
As a follow-up to r158719, remove PPCRegisterInfo::avoidWriteAfterWrite.
Jakob pointed out in response to r158719 that this callback is currently unused
and so this has no effect (and the speedups that I thought that I had observed
as a result of implementing this function must have been noise).
llvm-svn: 177228
Andrew Trick [Sat, 16 Mar 2013 18:58:57 +0000 (18:58 +0000)]
Change the default latency for implicit defs.
Implicit defs are not currently positional and not modeled by the
per-operand machine model. Unfortunately, we treat defs that are part
of the architectural instruction description, like flags, the same as
other implicit defs. Really, they should have a fixed MachineInstr
layout and probably shouldn't be "implicit" at all.
For now, we'll change the default latency to be the max operand
latency. That will give flag setting operands full latency for x86
folded loads. Other kinds of "fake" implicit defs don't occur prior to
regalloc anyway, and we would like them to go away postRegAlloc as
well.
llvm-svn: 177227
Andrew Trick [Sat, 16 Mar 2013 18:58:55 +0000 (18:58 +0000)]
Machine model. Allow mixed itinerary classes and SchedRW lists.
We always supported a mixture of the old itinerary model and new
per-operand model, but it required a level of indirection to map
itinerary classes to SchedRW lists. This was done for ARM A9.
Now we want to define x86 SchedRW lists, with the goal of removing its
itinerary classes, but still support the itineraries in the mean
time. When I original developed the model, Atom did not have
itineraries, so there was no reason to expect this requirement.
llvm-svn: 177226
Sylvestre Ledru [Sat, 16 Mar 2013 17:01:13 +0000 (17:01 +0000)]
When built with cmake, only call the string functions when the previous commands (utils/GetSourceVersion & utils/GetRepositoryPath successed). Otherwise, they fail when not launched from a repository
llvm-svn: 177225
Sean Silva [Sat, 16 Mar 2013 16:58:20 +0000 (16:58 +0000)]
[docs] Discuss a potential bug to be aware of.
llvm-svn: 177224
Aaron Ballman [Sat, 16 Mar 2013 15:00:51 +0000 (15:00 +0000)]
Test case for graceful handling of long file names on Windows. Patch thanks to Paul Robinson!
llvm-svn: 177223
Manman Ren [Sat, 16 Mar 2013 04:47:38 +0000 (04:47 +0000)]
revert r177211 due to its potential issues
llvm-svn: 177222
Craig Topper [Sat, 16 Mar 2013 03:44:31 +0000 (03:44 +0000)]
Add X86 code emitter support AVX encoded MRMDestReg instructions.
Previously we weren't skipping the VVVV encoded register. Based on patch by Michael Liao.
llvm-svn: 177221
Jordan Rose [Sat, 16 Mar 2013 02:14:06 +0000 (02:14 +0000)]
[analyzer] Model trivial copy/move assignment operators with a bind as well.
r175234 allowed the analyzer to model trivial copy/move constructors as
an aggregate bind. This commit extends that to trivial assignment
operators as well. Like the last commit, one of the motivating factors here
is not warning when the right-hand object is partially-initialized, which
can have legitimate uses.
<rdar://problem/
13405162>
llvm-svn: 177220
Enrico Granata [Sat, 16 Mar 2013 01:50:07 +0000 (01:50 +0000)]
C++ formatters for NSTimeZone and for CFBitVector
llvm-svn: 177219
Argyrios Kyrtzidis [Sat, 16 Mar 2013 01:40:35 +0000 (01:40 +0000)]
Remove -Wspellcheck and replace it with a diagnostic option.
Thanks to Richard S. for pointing out that the warning would show up
with -Weverything.
llvm-svn: 177218
Enrico Granata [Sat, 16 Mar 2013 01:18:00 +0000 (01:18 +0000)]
NS(Mutable)IndexSet formatter moves from Python to C++
llvm-svn: 177217
Jordan Rose [Sat, 16 Mar 2013 01:07:58 +0000 (01:07 +0000)]
[analyzer] Separate graph trimming from creating the single-path graph.
When we generate a path diagnostic for a bug report, we have to take the
full ExplodedGraph and limit it down to a single path. We do this in two
steps: "trimming", which limits the graph to all the paths that lead to
this particular bug, and "creating the report graph", which finds the
shortest path in the trimmed path to any error node.
With BugReporterVisitor false positive suppression, this becomes more
expensive: it's possible for some paths through the trimmed graph to be
invalid (i.e. likely false positives) but others to be valid. Therefore
we have to run the visitors over each path in the graph until we find one
that is valid, or until we've ruled them all out. This can become quite
expensive.
This commit separates out graph trimming from creating the report graph,
performing the first only once per bug equivalence class and the second
once per bug report. It also cleans up that portion of the code by
introducing some wrapper classes.
This seems to recover most of the performance regression described in my
last commit.
<rdar://problem/
13433687>
llvm-svn: 177216
Jordan Rose [Sat, 16 Mar 2013 01:07:53 +0000 (01:07 +0000)]
[analyzer] Eliminate InterExplodedGraphMap class and NodeBackMap typedef.
...in favor of this typedef:
typedef llvm::DenseMap<const ExplodedNode *, const ExplodedNode *>
InterExplodedGraphMap;
Use this everywhere the previous class and typedef were used.
Took the opportunity to ArrayRef-ize ExplodedGraph::trim while I'm at it.
No functionality change.
llvm-svn: 177215