platform/upstream/llvm.git
11 years ago[analyzer] Warn when a ‘nil’ object is added to NSArray or NSMutableArray.
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

11 years agoTableGen fix for the new machine model.
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

11 years agoInclude '.test' suffix in target specific lit configs that need it
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

11 years agoMake the fields in the diagram match the descriptive text above them.
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

11 years agoCorrect function to decide if a SCEV can be ignored
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

11 years agotsan: smaller memory block headers (32b->16b)
Dmitry Vyukov [Mon, 18 Mar 2013 19:47:36 +0000 (19:47 +0000)]
tsan: smaller memory block headers (32b->16b)

llvm-svn: 177312

11 years agoObjective-C modern translator. Don't put line info
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

11 years agoRemoved raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just...
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

11 years agoScopHelper: clang-format
Tobias Grosser [Mon, 18 Mar 2013 19:19:57 +0000 (19:19 +0000)]
ScopHelper: clang-format

llvm-svn: 177309

11 years agoScopHelper: Remove some dead code
Tobias Grosser [Mon, 18 Mar 2013 19:17:07 +0000 (19:17 +0000)]
ScopHelper: Remove some dead code

llvm-svn: 177307

11 years agouse the canonical IV only when it exists
Sebastian Pop [Mon, 18 Mar 2013 19:09:49 +0000 (19:09 +0000)]
use the canonical IV only when it exists

llvm-svn: 177306

11 years agoUse early returns when checking if we already constructed a tool and when
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

11 years agoRemoved raw references to _MSC_VER; now just check to see if it is defined.
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

11 years agoRemove unused argument.
Rafael Espindola [Mon, 18 Mar 2013 18:19:46 +0000 (18:19 +0000)]
Remove unused argument.

llvm-svn: 177303

11 years agoPass an ArgList to every toolchain constructor. Remove the useIntegratedAs
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

11 years agoInline ShouldUseIntegratedAssembler and move the documentation to
Rafael Espindola [Mon, 18 Mar 2013 17:58:22 +0000 (17:58 +0000)]
Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs.

llvm-svn: 177300

11 years agoRefactor a bit of duplicated code to useIntegratedAs.
Rafael Espindola [Mon, 18 Mar 2013 17:52:57 +0000 (17:52 +0000)]
Refactor a bit of duplicated code to useIntegratedAs.

llvm-svn: 177299

11 years agoUpdate
Bill Wendling [Mon, 18 Mar 2013 17:47:33 +0000 (17:47 +0000)]
Update

llvm-svn: 177298

11 years agoRemoved raw references to __APPLE__; now just check to see if it is defined.
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

11 years agoFix 80-col. violations in PPCCTRLoops
Hal Finkel [Mon, 18 Mar 2013 17:40:46 +0000 (17:40 +0000)]
Fix 80-col. violations in PPCCTRLoops

llvm-svn: 177296

11 years agoFix large count and negative constant count handling in PPCCTRLoops
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

11 years agoCleanup initial-value constants in PPCCTRLoops
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

11 years agoRemove unused argument.
Rafael Espindola [Mon, 18 Mar 2013 17:25:58 +0000 (17:25 +0000)]
Remove unused argument.

llvm-svn: 177293

11 years agotsan: add support for idle threads
Dmitry Vyukov [Mon, 18 Mar 2013 17:21:15 +0000 (17:21 +0000)]
tsan: add support for idle threads

llvm-svn: 177292

11 years agoRemoved raw references to _WIN32; now just check to see if it is defined.
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

11 years agoFix integer comparison in DIEInteger::BestForm.
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

11 years agotsan: touch less shadow memory during operations on big memory ranges
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

11 years agotsan: mark shadow for thread stack as "don't need" when thread exits
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

11 years agoRemove unused argument.
Rafael Espindola [Mon, 18 Mar 2013 15:33:26 +0000 (15:33 +0000)]
Remove unused argument.

llvm-svn: 177287

11 years agotsan: better memory profiler
Dmitry Vyukov [Mon, 18 Mar 2013 13:55:33 +0000 (13:55 +0000)]
tsan: better memory profiler

llvm-svn: 177286

11 years agoReleaseNotes: Tweak hexagonv2/hexagonv3 removal note.
Matthew Curtis [Mon, 18 Mar 2013 13:08:24 +0000 (13:08 +0000)]
ReleaseNotes: Tweak hexagonv2/hexagonv3 removal note.

llvm-svn: 177284

11 years agoFix clang-format segfault.
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

11 years agoObjCDictionaryElements are pod-like.
Benjamin Kramer [Mon, 18 Mar 2013 12:41:25 +0000 (12:41 +0000)]
ObjCDictionaryElements are pod-like.

llvm-svn: 177282

11 years agoRemove default copy ctor/assignment, makes AttributeSet trivially copyable.
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

11 years agoInitially forgotten-to-svn-add test case for r177279.
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

11 years ago The optimization a + (-0.0f) -> a was being misapplied to a + (+0.0f) in the vector...
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

11 years agotsan: madvise(DONTNEED) shadow memory on munmap()
Dmitry Vyukov [Mon, 18 Mar 2013 11:51:51 +0000 (11:51 +0000)]
tsan: madvise(DONTNEED) shadow memory on munmap()

llvm-svn: 177278

11 years agoR600/SI: implement indirect adressing for SI
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

11 years agoR600/SI: add float vector types
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

11 years agoR600/SI: add shl pattern
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

11 years agoR600/SI: add BUFFER_LOAD_DWORD pattern
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

11 years agoR600/SI: implement SI.load.const intrinsic
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

11 years agoR600/SI: enable all S_LOAD and S_BUFFER_LOAD opcodes
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

11 years agoR600/SI: fix inserting waits for all defines
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

11 years ago[asan] make the __asan_get_heap_size more robust
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

11 years agotsan: move implementation out of h file
Dmitry Vyukov [Mon, 18 Mar 2013 10:32:21 +0000 (10:32 +0000)]
tsan: move implementation out of h file

llvm-svn: 177269

11 years agotsan: fix clang -Wall build
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

11 years ago[TSan] re-apply r177249 lost in edits
Alexey Samsonov [Mon, 18 Mar 2013 09:45:22 +0000 (09:45 +0000)]
[TSan] re-apply r177249 lost in edits

llvm-svn: 177265

11 years ago[asan] when creating string constants, set unnamed_attr and align 1 so that equal...
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

11 years ago[asan] Switch to allocator2 on Android.
Evgeniy Stepanov [Mon, 18 Mar 2013 09:22:58 +0000 (09:22 +0000)]
[asan] Switch to allocator2 on Android.

llvm-svn: 177263

11 years agotsan: fix memory leak
Dmitry Vyukov [Mon, 18 Mar 2013 09:09:41 +0000 (09:09 +0000)]
tsan: fix memory leak

llvm-svn: 177262

11 years agotsan: use StackDepot for thread creation stacks
Dmitry Vyukov [Mon, 18 Mar 2013 09:02:27 +0000 (09:02 +0000)]
tsan: use StackDepot for thread creation stacks

llvm-svn: 177261

11 years agotsan: fix Go build
Dmitry Vyukov [Mon, 18 Mar 2013 08:52:46 +0000 (08:52 +0000)]
tsan: fix Go build

llvm-svn: 177260

11 years agoMark internal classes as POD-like to get better behavior out of
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

11 years agotsan: use StackDepot in sync object to store creation stacks
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

11 years agoTLS support for MinGW targets.
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

11 years agoWindows TLS: Section name prefix to ensure correct order
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

11 years agotsan: fix huge stack frames
Dmitry Vyukov [Mon, 18 Mar 2013 08:09:42 +0000 (08:09 +0000)]
tsan: fix huge stack frames

llvm-svn: 177255

11 years ago[asan] while generating the description of a global variable, emit the module name...
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

11 years ago[asan] while generating the description of a global variable, emit the module name...
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

11 years agoMake sure to use same EABI version for external assembler as for integrated as.
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

11 years agotsan: fix lint warnings
Dmitry Vyukov [Mon, 18 Mar 2013 07:58:20 +0000 (07:58 +0000)]
tsan: fix lint warnings

llvm-svn: 177251

11 years ago[asan] don't instrument functions with available_externally linkage. This saves a...
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

11 years ago[TSan] fix undefined variable in debug TSan build
Alexey Samsonov [Mon, 18 Mar 2013 07:33:00 +0000 (07:33 +0000)]
[TSan] fix undefined variable in debug TSan build

llvm-svn: 177249

11 years ago[TSan] Use ThreadRegistry::FindThreadContextLocked() to find thread by its stack...
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

11 years ago[TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti...
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

11 years ago[Sanitizer] Get rid of global mutexes in StopTheWorld implementation
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

11 years ago[Sanitizer] Rely on template argument deduction in sanitizer_allocator_test
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

11 years agoExtract a method.
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

11 years agoPost process ADC/SBB and use a shorter encoding if they use a sign extended immediate.
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

11 years agoRefactor some duplicated code into helper functions.
Craig Topper [Mon, 18 Mar 2013 02:53:34 +0000 (02:53 +0000)]
Refactor some duplicated code into helper functions.

llvm-svn: 177242

11 years agoFix the build broken in r177239
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

11 years agoReduced dont-infinite-loop-during-block-escape-analysis.ll with bugpoint and moved...
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

11 years agoSplit out filename & directory from DIFile to start generalizing over DIScopes
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

11 years agoGeneralize debug info test to be resilient to changes in metadata node numbering
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

11 years agoGeneralize a few debug info test cases
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

11 years agoImprove DIFile debug info annotation by letting it fallback to DIScope
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

11 years agoUse ArrayRef<MVT::SimpleValueType> when possible.
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

11 years agoTo avoid symbol clash, undefine PPC here. PPC may be predefined on some hosts.
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

11 years agoBuild LLVMgold.so on FreeBSD using cmake.
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

11 years agoThe promised test case for r175939.
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

11 years agoImprove PPC VR (Altivec) register spilling
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

11 years agoRemove FIXMEs in PPC test cases related to unaligned loads/stores
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

11 years agoRemove PPC avoidWriteAfterWrite callback
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

11 years agoChange the default latency for implicit defs.
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

11 years agoMachine model. Allow mixed itinerary classes and SchedRW lists.
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

11 years agoWhen built with cmake, only call the string functions when the previous commands...
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

11 years ago[docs] Discuss a potential bug to be aware of.
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

11 years agoTest case for graceful handling of long file names on Windows. Patch thanks to Paul...
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

11 years agorevert r177211 due to its potential issues
Manman Ren [Sat, 16 Mar 2013 04:47:38 +0000 (04:47 +0000)]
revert r177211 due to its potential issues

llvm-svn: 177222

11 years agoAdd X86 code emitter support AVX encoded MRMDestReg instructions.
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

11 years ago[analyzer] Model trivial copy/move assignment operators with a bind as well.
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

11 years agoC++ formatters for NSTimeZone and for CFBitVector
Enrico Granata [Sat, 16 Mar 2013 01:50:07 +0000 (01:50 +0000)]
C++ formatters for NSTimeZone and for CFBitVector

llvm-svn: 177219

11 years agoRemove -Wspellcheck and replace it with a diagnostic option.
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

11 years agoNS(Mutable)IndexSet formatter moves from Python to C++
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

11 years ago[analyzer] Separate graph trimming from creating the single-path graph.
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

11 years ago[analyzer] Eliminate InterExplodedGraphMap class and NodeBackMap typedef.
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

11 years ago[analyzer] Don't repeat a bug equivalence class if every report is invalid.
Jordan Rose [Sat, 16 Mar 2013 01:07:47 +0000 (01:07 +0000)]
[analyzer] Don't repeat a bug equivalence class if every report is invalid.

I removed this check in the recursion->iteration commit, but forgot that
generatePathDiagnostic may be called multiple times if there are multiple
PathDiagnosticConsumers.

llvm-svn: 177214

11 years agoConverting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort and NSNot...
Enrico Granata [Sat, 16 Mar 2013 00:50:25 +0000 (00:50 +0000)]
Converting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort and NSNotification

llvm-svn: 177213

11 years agoThis should be nothing but a load-time optimization. I'm trying to reduce load time...
Howard Hinnant [Sat, 16 Mar 2013 00:17:53 +0000 (00:17 +0000)]
This should be nothing but a load-time optimization.  I'm trying to reduce load time initializers and this is a big one.  No visible functionality change intended.

llvm-svn: 177212