platform/upstream/llvm.git
10 years agoclang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32...
NAKAMURA Takumi [Wed, 12 Feb 2014 11:42:12 +0000 (11:42 +0000)]
clang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32 with %/t (instead of %t).

xargs didn't handle dosish paths, while find foo\bar\ emits dosish paths.

llvm-svn: 201228

10 years agoclang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish...
NAKAMURA Takumi [Wed, 12 Feb 2014 11:42:02 +0000 (11:42 +0000)]
clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish pathsep.

FIXME: It could be more simple...
llvm-svn: 201227

10 years ago[sanitizer] added class BVGraph, to be used in a deadlock detector; added more method...
Kostya Serebryany [Wed, 12 Feb 2014 11:28:09 +0000 (11:28 +0000)]
[sanitizer] added class BVGraph, to be used in a deadlock detector; added more methods to the bit vectors

llvm-svn: 201226

10 years ago'svn add' files I forgot for r201224 (Add an option to allow Clang verify
Dmitri Gribenko [Wed, 12 Feb 2014 10:40:07 +0000 (10:40 +0000)]
'svn add' files I forgot for r201224 (Add an option to allow Clang verify
source files for a module only once during)

llvm-svn: 201225

10 years agoAdd an option to allow Clang verify source files for a module only once during
Dmitri Gribenko [Wed, 12 Feb 2014 10:33:14 +0000 (10:33 +0000)]
Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from.  If any file was changed, the module is rebuilt.  There are two
problems with this:
1. correctness: we don't verify system files (there are too many of them, and
   stat'ing all of them would take a lot of time);
2. performance: the same module file is verified again and again during a
   single build.

This change allows the build system to optimize source file verification.  The
idea is based on the fact that while the project is being built, the source
files don't change.  This allows us to verify the module only once during a
single build session.  The build system passes a flag,
-fbuild-session-timestamp=, to inform Clang of the time when the build started.
The build system also requests to enable this feature by passing
-fmodules-validate-once-per-build-session.  If these flags are not passed, the
behavior is not changed.  When Clang verifies the module the first time, it
writes out a timestamp file.  Then, when Clang loads the module the second
time, it finds a timestamp file, so it can compare the verification timestamp
of the module with the time when the build started.  If the verification
timestamp is too old, the module is verified again, and the timestamp file is
updated.

llvm-svn: 201224

10 years ago[ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex...
Amara Emerson [Wed, 12 Feb 2014 10:22:35 +0000 (10:22 +0000)]
[ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.

This was caused by r200708 which enabled the crypto feature for these cores.

llvm-svn: 201223

10 years agoR600: Always implement both versions of isTruncateFree and add a sanity check.
Benjamin Kramer [Wed, 12 Feb 2014 10:17:54 +0000 (10:17 +0000)]
R600: Always implement both versions of isTruncateFree and add a sanity check.

llvm-svn: 201222

10 years agoConsume checker names from clang static analyzer.
Alexander Kornienko [Wed, 12 Feb 2014 09:52:07 +0000 (09:52 +0000)]
Consume checker names from clang static analyzer.

Summary: This patch depends on patches D2556 and D2557.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, jordan_rose, krememek
Differential Revision: http://llvm-reviews.chandlerc.com/D2620

llvm-svn: 201221

10 years agoFix memory leak introduced by r201010.
Daniel Jasper [Wed, 12 Feb 2014 08:45:05 +0000 (08:45 +0000)]
Fix memory leak introduced by r201010.

llvm-svn: 201220

10 years ago[TSan] Kill tsan_symbolize_addr2line_linux.cc
Alexey Samsonov [Wed, 12 Feb 2014 08:37:09 +0000 (08:37 +0000)]
[TSan] Kill tsan_symbolize_addr2line_linux.cc

llvm-svn: 201219

10 years ago[Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is...
Alexey Samsonov [Wed, 12 Feb 2014 08:29:42 +0000 (08:29 +0000)]
[Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.

llvm-svn: 201218

10 years ago[UBSan] Parse common runtime flags before using a symbolizer
Alexey Samsonov [Wed, 12 Feb 2014 08:21:44 +0000 (08:21 +0000)]
[UBSan] Parse common runtime flags before using a symbolizer

llvm-svn: 201217

10 years agoRemove special case filtering for instructions with lock prefix as they are all marke...
Craig Topper [Wed, 12 Feb 2014 08:09:20 +0000 (08:09 +0000)]
Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.

llvm-svn: 201216

10 years agoMark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from...
Craig Topper [Wed, 12 Feb 2014 08:02:29 +0000 (08:02 +0000)]
Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.

llvm-svn: 201215

10 years agoFix elf core file VMA-contiguous region collapsing.
Todd Fiala [Wed, 12 Feb 2014 07:29:44 +0000 (07:29 +0000)]
Fix elf core file VMA-contiguous region collapsing.

Elf core files were collapsing core segments when the virtual memory
addresses were contiguous without checking if the core-file-backed
memory region was the same size as the segment's VMA region. Without
this extra check, any time regions were collapsed but the core-backed
region was smaller (and thus had a zero-filled hole at the end), the
collapse operation would break VMA to core file lookups for subsequent
collapsed regions.

This change fixes the following bug:
http://llvm.org/bugs/show_bug.cgi?id=18769

llvm-svn: 201214

10 years ago[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag
Alexey Samsonov [Wed, 12 Feb 2014 07:26:40 +0000 (07:26 +0000)]
[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag

llvm-svn: 201213

10 years ago[Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext
Alexey Samsonov [Wed, 12 Feb 2014 07:24:11 +0000 (07:24 +0000)]
[Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext

llvm-svn: 201212

10 years ago[PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.
NAKAMURA Takumi [Wed, 12 Feb 2014 07:15:05 +0000 (07:15 +0000)]
[PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.

llvm-svn: 201211

10 years ago[sanitizer] added a bit vector class to be used in a deadlock detector
Kostya Serebryany [Wed, 12 Feb 2014 07:05:24 +0000 (07:05 +0000)]
[sanitizer] added a bit vector class to be used in a deadlock detector

llvm-svn: 201210

10 years agoFix r201205's use-after-free bug caught by sanitizer bot
Jonathan Roelofs [Wed, 12 Feb 2014 06:37:27 +0000 (06:37 +0000)]
Fix r201205's use-after-free bug caught by sanitizer bot

llvm-svn: 201209

10 years ago[libcxxabi] Fix broken codesourcery.com links in comments
Jonathan Roelofs [Wed, 12 Feb 2014 04:49:09 +0000 (04:49 +0000)]
[libcxxabi] Fix broken codesourcery.com links in comments

review: http://llvm-reviews.chandlerc.com/D2718
llvm-svn: 201208

10 years agoTest case I forgot to 'add' for r201126.
Craig Topper [Wed, 12 Feb 2014 03:58:47 +0000 (03:58 +0000)]
Test case I forgot to 'add' for r201126.

llvm-svn: 201207

10 years agoAvoid leaking namebuf in case of an early exit
Enrico Granata [Wed, 12 Feb 2014 03:37:33 +0000 (03:37 +0000)]
Avoid leaking namebuf in case of an early exit

llvm-svn: 201206

10 years agoAdd Multilib selection machinery
Jonathan Roelofs [Wed, 12 Feb 2014 03:21:20 +0000 (03:21 +0000)]
Add Multilib selection machinery

This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

This reverts r201203 (i.e. re-applying r201202 with small fixes in
unittests/CMakeLists.txtto make the build bots happy).

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201205

10 years agoFix formatting
Tobias Grosser [Wed, 12 Feb 2014 01:55:28 +0000 (01:55 +0000)]
Fix formatting

llvm-svn: 201204

10 years agoRevert 201202
Jonathan Roelofs [Wed, 12 Feb 2014 01:36:51 +0000 (01:36 +0000)]
Revert 201202

Breaks cmake configure of new unit tests directory

llvm-svn: 201203

10 years agoAdd Multilib selection machinery
Jonathan Roelofs [Wed, 12 Feb 2014 01:29:25 +0000 (01:29 +0000)]
Add Multilib selection machinery

This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201202

10 years agoRemove unneeded include
Matt Arsenault [Wed, 12 Feb 2014 01:00:24 +0000 (01:00 +0000)]
Remove unneeded include

llvm-svn: 201201

10 years agoFix cmake compilation on Mac OS X.
Filipe Cabecinhas [Wed, 12 Feb 2014 00:57:20 +0000 (00:57 +0000)]
Fix cmake compilation on Mac OS X.

llvm-svn: 201200

10 years agoMS ABI: vptr injection should obey alignment requirements
David Majnemer [Wed, 12 Feb 2014 00:43:02 +0000 (00:43 +0000)]
MS ABI: vptr injection should obey alignment requirements

vptr injection must inject padding equivalent to the alignment of the
most aligned non-virtual subobject, not the alignment of the enclosing
record.

To fascilitate this change, don't let record layout observe the
alignment of the record until we've injected our vptrs. Also, do not
allow the alignment of vbases to affect required alignment until just
before we insert the vtordisp field.

llvm-svn: 201199

10 years agoDwarfUnit: Include type unit's file strings in the defining compile unit's file_names...
David Blaikie [Wed, 12 Feb 2014 00:40:47 +0000 (00:40 +0000)]
DwarfUnit: Include type unit's file strings in the defining compile unit's file_names table

There's still one piece missing here, which is adding the
DW_AT_stmt_list to the type unit that refer's to the compile unit's line
table. Working on that.

llvm-svn: 201198

10 years agoFix some formatting in my last commit (r201196)
David Blaikie [Wed, 12 Feb 2014 00:32:05 +0000 (00:32 +0000)]
Fix some formatting in my last commit (r201196)

llvm-svn: 201197

10 years agoDwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.
David Blaikie [Wed, 12 Feb 2014 00:31:30 +0000 (00:31 +0000)]
DwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.

Type units need to insert their file strings into the compile unit's
line/file table. This is preliminary work to that end.

llvm-svn: 201196

10 years agoDwarfUnit: Refactor DW_AT_file creation into a common function.
David Blaikie [Wed, 12 Feb 2014 00:11:25 +0000 (00:11 +0000)]
DwarfUnit: Refactor DW_AT_file creation into a common function.

This is preliminary work to fix type unit file strings so they appear in
their originating CU's line table - but it's also just good/simple
cleanup, so I'm committing it ahead of time.

llvm-svn: 201195

10 years agoDwarfUnit: Replace unnecessary conditionals with asserts.
David Blaikie [Tue, 11 Feb 2014 23:57:03 +0000 (23:57 +0000)]
DwarfUnit: Replace unnecessary conditionals with asserts.

We used to be pretty vague about what debug entities were what, with
many conditionals to silently drop/skip/accept things. These don't seem
to be relevant anymore.

llvm-svn: 201194

10 years agoTweak ARM fastcc by adopting these two AAPCS rules:
Evan Cheng [Tue, 11 Feb 2014 23:49:31 +0000 (23:49 +0000)]
Tweak ARM fastcc by adopting these two AAPCS rules:
* CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers
* When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable

The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g.
7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause
stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various
calling conventions.

rdar://16039676

llvm-svn: 201193

10 years agoAdd link to polyhedral.info
Tobias Grosser [Tue, 11 Feb 2014 23:34:43 +0000 (23:34 +0000)]
Add link to polyhedral.info

This website provides general information about polyhedral compilation.

llvm-svn: 201192

10 years agoRemove MayAliasSet class
Tobias Grosser [Tue, 11 Feb 2014 23:34:40 +0000 (23:34 +0000)]
Remove MayAliasSet class

The MayAliasSet class is currently not used and just confuses people. We can
reintroduce it in case need a more precise tracking of alias sets.

llvm-svn: 201191

10 years agoReapply r201180 with an additional error path.
Adrian Prantl [Tue, 11 Feb 2014 22:22:15 +0000 (22:22 +0000)]
Reapply r201180 with an additional error path.
Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.

rdar://problem/16015314

llvm-svn: 201190

10 years agoFix build error caused by r201186 (GCC's "declaration of X changes meaning of Y").
Alexander Kornienko [Tue, 11 Feb 2014 22:14:03 +0000 (22:14 +0000)]
Fix build error caused by r201186 (GCC's "declaration of X changes meaning of Y").

llvm-svn: 201189

10 years agoRevert "Debug info: Emit values in subregisters that do not have a separate"
Adrian Prantl [Tue, 11 Feb 2014 22:03:30 +0000 (22:03 +0000)]
Revert "Debug info: Emit values in subregisters that do not have a separate"

This reverts commit r201179 for buildbot breakage.

llvm-svn: 201188

10 years agoDebugInfo: Don't include the name of the CU file in the line table file list when...
David Blaikie [Tue, 11 Feb 2014 21:49:46 +0000 (21:49 +0000)]
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

This comes up in empty files or files containing #file directives that
never reference the actual source file name. Came up in a small test of
line tables I was playing with.

llvm-svn: 201187

10 years agoExpose the name of the checker producing each diagnostic message.
Alexander Kornienko [Tue, 11 Feb 2014 21:49:21 +0000 (21:49 +0000)]
Expose the name of the checker producing each diagnostic message.

Summary:
In clang-tidy we'd like to know the name of the checker producing each
diagnostic message. PathDiagnostic has BugType and Category fields, which are
both arbitrary human-readable strings, but we need to know the exact name of the
checker in the form that can be used in the CheckersControlList option to
enable/disable the specific checker.

This patch adds the CheckName field to the CheckerBase class, and sets it in
the CheckerManager::registerChecker() method, which gets them from the
CheckerRegistry.

Checkers that implement multiple checks have to store the names of each check
in the respective registerXXXChecker method.

Reviewers: jordan_rose, krememek

Reviewed By: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2557

llvm-svn: 201186

10 years agoDebugInfo: Remove dependence on file numbering in the line table.
David Blaikie [Tue, 11 Feb 2014 21:46:46 +0000 (21:46 +0000)]
DebugInfo: Remove dependence on file numbering in the line table.

These tests were unnecessarily sensitive to the presence and ordering of
elements in the line table file_names list which will break on a future
change I'm working on.

llvm-svn: 201185

10 years agoRequire CMake 2.8.12.1 or later on Windows
Hans Wennborg [Tue, 11 Feb 2014 21:46:19 +0000 (21:46 +0000)]
Require CMake 2.8.12.1 or later on Windows

That version knows to use the /FS flag, which is needed for building
lib/interception with VS2013.

llvm-svn: 201184

10 years agoRemove bad debug info test.
David Blaikie [Tue, 11 Feb 2014 21:37:47 +0000 (21:37 +0000)]
Remove bad debug info test.

Another test that's testing through assembly from Clang which is
problematic. An attempt to upgrade this to just be an IR-generation test
was unsuccessful (I was unable to get this test to fail) but it looks
like there's other, better, test coverage in this area
(test/CodeGenObjC/debuginfo-properties.m) anyway.

llvm-svn: 201183

10 years agoupdate of the clang version (should probably managed in the configure)
Sylvestre Ledru [Tue, 11 Feb 2014 21:37:27 +0000 (21:37 +0000)]
update of the clang version (should probably managed in the configure)

llvm-svn: 201182

10 years agowhitespace
Adrian Prantl [Tue, 11 Feb 2014 21:23:02 +0000 (21:23 +0000)]
whitespace

llvm-svn: 201181

10 years agoDebug info: Emit values in subregisters that do not have a separate
Adrian Prantl [Tue, 11 Feb 2014 21:22:59 +0000 (21:22 +0000)]
Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.

rdar://problem/16015314

llvm-svn: 201180

10 years agomake llvm-dwarfdump a little more resilient when parsing .debug_loc
Adrian Prantl [Tue, 11 Feb 2014 21:22:53 +0000 (21:22 +0000)]
make llvm-dwarfdump a little more resilient when parsing .debug_loc
sections. The call to data.getUnsigned(&Offset, AddressSize) only
increments Offset if the read succeeds, which will result in an infinite
loop.

llvm-svn: 201179

10 years agoRemove bad debug info test.
David Blaikie [Tue, 11 Feb 2014 21:16:44 +0000 (21:16 +0000)]
Remove bad debug info test.

This test case doesn't belong in Clang (it's testing IndVarSimplify) but
in an effort to reproduce the test case this was intended to cover (by
essentially reverting r134441) I wasn't able to reproduce the failure
this test case should've produced. So I haven't ported this down to
LLVM, instead I'm just deleting it.

I suspect the test is just underconstrained, but I've no great interest
in trying hard to fix it right now - if anyone else wants to, I'd be
more than welcome to that.

llvm-svn: 201178

10 years agoR600/SI: Fix assertion on infinite loops.
Matt Arsenault [Tue, 11 Feb 2014 21:12:38 +0000 (21:12 +0000)]
R600/SI: Fix assertion on infinite loops.

This isn't the most useful case to fix in the real world,
but bugpoint runs into this.

llvm-svn: 201177

10 years agoInstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with...
Benjamin Kramer [Tue, 11 Feb 2014 21:09:03 +0000 (21:09 +0000)]
InstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with a power of 2.

This happens in bitfield code. While there reorganize the existing code
a bit.

llvm-svn: 201176

10 years agoMS ABI: Add support for the -vm{b,g,s,m,v} flags
David Majnemer [Tue, 11 Feb 2014 21:05:00 +0000 (21:05 +0000)]
MS ABI: Add support for the -vm{b,g,s,m,v} flags

These flags control the inheritance model initially used by the
translation unit.

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

llvm-svn: 201175

10 years agoTidy up a bit. Formatting only.
Jim Grosbach [Tue, 11 Feb 2014 20:48:41 +0000 (20:48 +0000)]
Tidy up a bit. Formatting only.

llvm-svn: 201174

10 years agoARM: Thumb2 LDR(literal) can target SP.
Jim Grosbach [Tue, 11 Feb 2014 20:48:39 +0000 (20:48 +0000)]
ARM: Thumb2 LDR(literal) can target SP.

Fix a slightly overzealous destination register restriction for the
'without .w' alias. Add some explicit testcases.

rdar://16033140

llvm-svn: 201173

10 years agoTest commit -- Remove an extra newline from Toolchains.cpp
Jonathan Roelofs [Tue, 11 Feb 2014 20:02:34 +0000 (20:02 +0000)]
Test commit -- Remove an extra newline from Toolchains.cpp

llvm-svn: 201172

10 years agoWhen a multiline expression produces output, the multi-line help message is printed...
Greg Clayton [Tue, 11 Feb 2014 19:11:11 +0000 (19:11 +0000)]
When a multiline expression produces output, the multi-line help message is printed twice.

<rdar://problem/16031890>

llvm-svn: 201171

10 years agoSCEV: Cast switched values to make -Wswitch more useful.
Benjamin Kramer [Tue, 11 Feb 2014 19:02:55 +0000 (19:02 +0000)]
SCEV: Cast switched values to make -Wswitch more useful.

llvm-svn: 201170

10 years agoRemove decorator for llvm.org/pr17233
Ed Maste [Tue, 11 Feb 2014 18:55:19 +0000 (18:55 +0000)]
Remove decorator for llvm.org/pr17233

This test was skipped as it used to segfault on FreeBSD.  It seems
the original issue has since been fixed, so have the test run again.

llvm-svn: 201169

10 years agoRemove FreeBSD decorator for llvm.org/pr17499 (no longer fails)
Ed Maste [Tue, 11 Feb 2014 18:36:26 +0000 (18:36 +0000)]
Remove FreeBSD decorator for llvm.org/pr17499 (no longer fails)

llvm-svn: 201168

10 years agoRemove decorators for llvm.org/pr17920 fixed by r200646
Ed Maste [Tue, 11 Feb 2014 18:34:26 +0000 (18:34 +0000)]
Remove decorators for llvm.org/pr17920 fixed by r200646

llvm-svn: 201167

10 years agoUpdate decorator for FreeBSD failure pr18066
Ed Maste [Tue, 11 Feb 2014 18:28:18 +0000 (18:28 +0000)]
Update decorator for FreeBSD failure pr18066

The test expects the inferior to have exited, but it is still stopped.

llvm.org/pr18066

llvm-svn: 201166

10 years ago[Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-liter...
Argyrios Kyrtzidis [Tue, 11 Feb 2014 17:53:22 +0000 (17:53 +0000)]
[Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-literal-null-conversion in C code.

It is actually useful to warn in such cases, thanks to Dmitri for pushing on this and making us see the light!

Related to rdar://15925483 and rdar://15922612. The latter radar is where the usefulness of the warning is most clear.

llvm-svn: 201165

10 years agoDon’t leak memory when reading memory and we do an early return for error conditions.
Greg Clayton [Tue, 11 Feb 2014 17:49:50 +0000 (17:49 +0000)]
Don’t leak memory when reading memory and we do an early return for error conditions.

llvm-svn: 201164

10 years agoImprove the declaration when LDPO_PIE is not available.
Sylvestre Ledru [Tue, 11 Feb 2014 17:30:18 +0000 (17:30 +0000)]
Improve the declaration when LDPO_PIE is not available.
Thanks to İsmail Dönmez for the better declaration.

llvm-svn: 201163

10 years ago'nonnull(1)' on a block parameter should apply to the block's argument.
Jordan Rose [Tue, 11 Feb 2014 17:27:59 +0000 (17:27 +0000)]
'nonnull(1)' on a block parameter should apply to the block's argument.

Thanks to r199467, __attribute__((nonnull)) (without arguments) can apply
directly to parameters, instead of being applied to the whole function.
However, the old form of nonnull (with an argument index) could also apply
to the arguments of function and block pointers, and both of these can be
passed as parameters.

Now, if 'nonnull' with an argument is found on a parameter, /and/ the
parameter is a function or block pointer, it is handled the old way.

PR18795

llvm-svn: 201162

10 years agoIf LDPO_PIE is not defined (before binutils 2.23 version),
Sylvestre Ledru [Tue, 11 Feb 2014 17:11:32 +0000 (17:11 +0000)]
If LDPO_PIE is not defined (before binutils 2.23 version),
use the hardcoded declaration 3
See r201110 for the initial change

llvm-svn: 201161

10 years agoAdd a note about using "Differential Revision:" in commit messages
Mark Seaborn [Tue, 11 Feb 2014 16:58:03 +0000 (16:58 +0000)]
Add a note about using "Differential Revision:" in commit messages

I noticed this convention from the commit logs.  It seems like it
would be useful to document it, to encourage other committers to link
back to code reviews in their commits.

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

llvm-svn: 201160

10 years agoScalarEvolution: Analyze trip count of loops with a switch guarding the exit.
Benjamin Kramer [Tue, 11 Feb 2014 15:44:32 +0000 (15:44 +0000)]
ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.

llvm-svn: 201159

10 years agoTeach the DAGCombiner how to fold concat_vector nodes when the input is two
Robert Lougher [Tue, 11 Feb 2014 15:42:46 +0000 (15:42 +0000)]
Teach the DAGCombiner how to fold concat_vector nodes when the input is two
BUILD_VECTOR nodes, e.g.:

(concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4))
->
(BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4)

This fixes an issue with AVX, where a sequence was not recognized as a 256-bit
vbroadcast due to the concat_vectors.

llvm-svn: 201158

10 years agoRename some PCH-related errors to have 'err_' as their prefix
Dmitri Gribenko [Tue, 11 Feb 2014 15:40:09 +0000 (15:40 +0000)]
Rename some PCH-related errors to have 'err_' as their prefix

llvm-svn: 201157

10 years agoFix a typo in the function name that I just introduced (r201155)
Dmitri Gribenko [Tue, 11 Feb 2014 15:02:48 +0000 (15:02 +0000)]
Fix a typo in the function name that I just introduced (r201155)

llvm-svn: 201156

10 years agolibclang: audit all APIs that accept a CXTranslationUnit to make sure that
Dmitri Gribenko [Tue, 11 Feb 2014 14:34:14 +0000 (14:34 +0000)]
libclang: audit all APIs that accept a CXTranslationUnit to make sure that
checks for invalid translation unit are in place.  Also, while there, add log
output for this case.

llvm-svn: 201155

10 years ago[asan] Fix Windows build.
Evgeniy Stepanov [Tue, 11 Feb 2014 13:57:17 +0000 (13:57 +0000)]
[asan] Fix Windows build.

llvm-svn: 201154

10 years agoAdd decorator for llvm.org/pr18805 until root cause is identified
Ed Maste [Tue, 11 Feb 2014 13:50:45 +0000 (13:50 +0000)]
Add decorator for llvm.org/pr18805 until root cause is identified

llvm-svn: 201153

10 years ago[sanitizer] Fix build.
Evgeniy Stepanov [Tue, 11 Feb 2014 13:45:01 +0000 (13:45 +0000)]
[sanitizer] Fix build.

llvm-svn: 201152

10 years ago[sanitizer] Use system unwinder in signal handlers on Android.
Evgeniy Stepanov [Tue, 11 Feb 2014 13:38:57 +0000 (13:38 +0000)]
[sanitizer] Use system unwinder in signal handlers on Android.

Because of the way Bionic sets up signal stack frames, libc unwinder is unable
to step through it, resulting in broken SEGV stack traces.

Luckily, libcorkscrew.so on Android implements an unwinder that can start with
a signal context, thus sidestepping the issue.

llvm-svn: 201151

10 years ago[Sanitizer] External symbolizer refactoring: split protocol for communicating with
Alexey Samsonov [Tue, 11 Feb 2014 13:03:09 +0000 (13:03 +0000)]
[Sanitizer] External symbolizer refactoring: split protocol for communicating with
llvm-symbolizer binary and external process handling into separate classes.

No functionality change.

llvm-svn: 201150

10 years ago[AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF
Bradley Smith [Tue, 11 Feb 2014 12:59:09 +0000 (12:59 +0000)]
[AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF

llvm-svn: 201149

10 years ago[LPM] Switch LICM to actively use LCSSA in addition to preserving it.
Chandler Carruth [Tue, 11 Feb 2014 12:52:27 +0000 (12:52 +0000)]
[LPM] Switch LICM to actively use LCSSA in addition to preserving it.

Fixes PR18753 and PR18782.

This is necessary for LICM to preserve LCSSA correctly and efficiently.
There is still some active discussion about whether we should be using
LCSSA, but we can't just immediately stop using it and we *need* LICM to
preserve it while we are using it. We can restore the old SSAUpdater
driven code if and when there is a serious effort to remove the reliance
on LCSSA from all of the loop passes.

However, this also serves as a great example of why LCSSA is very nice
to have. This change significantly simplifies the process of sinking
instructions for LICM, and makes it quite a bit less expensive.

It wouldn't even be as complex as it is except that I had to start the
process of removing the big recursive LCSSA formation hammer in order to
switch even this much of the re-forming code to asserting that LCSSA was
preserved. I'll fully remove that next just to tidy things up until the
LCSSA debate settles one way or the other.

llvm-svn: 201148

10 years agoRemove unused config.llvm_symbolizer_path
Alexey Samsonov [Tue, 11 Feb 2014 12:52:26 +0000 (12:52 +0000)]
Remove unused config.llvm_symbolizer_path

llvm-svn: 201147

10 years agolibclang: use namespace qualifiers in the macro, so that it does not require
Dmitri Gribenko [Tue, 11 Feb 2014 12:25:31 +0000 (12:25 +0000)]
libclang: use namespace qualifiers in the macro, so that it does not require
'using namespace clang::cxindex'.

llvm-svn: 201146

10 years agoAArch64: share slgihtly more NEON implementation with ARM.
Tim Northover [Tue, 11 Feb 2014 11:27:44 +0000 (11:27 +0000)]
AArch64: share slgihtly more NEON implementation with ARM.

The s64/u64 vcvt conversion operations are actually pretty much identical to
the s32/u32 ones in implementation, and can be shared with just one extra
variable.

llvm-svn: 201145

10 years agoXCore target: fix const section handling
Robert Lytton [Tue, 11 Feb 2014 10:36:26 +0000 (10:36 +0000)]
XCore target: fix const section handling

Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

Clang now emits ".cp.rodata" section information.

All other externally visible constant data will be placed in the DP section.

llvm-svn: 201144

10 years ago XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE
Robert Lytton [Tue, 11 Feb 2014 10:36:18 +0000 (10:36 +0000)]
 XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE

llvm-svn: 201143

10 years agoXCore target: add section information.
Robert Lytton [Tue, 11 Feb 2014 10:34:51 +0000 (10:34 +0000)]
XCore target: add section information.

Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

llvm-svn: 201142

10 years agoXCore target: Pass through "-fverbose-asm" flag to xcc assembler.
Robert Lytton [Tue, 11 Feb 2014 10:34:45 +0000 (10:34 +0000)]
XCore target: Pass through "-fverbose-asm" flag to xcc assembler.

llvm-svn: 201141

10 years agoAVX: fixed a bug in LowerVECTOR_SHUFFLE
Elena Demikhovsky [Tue, 11 Feb 2014 10:21:53 +0000 (10:21 +0000)]
AVX: fixed a bug in LowerVECTOR_SHUFFLE

llvm-svn: 201140

10 years agoclang-format: Support lambdas with namespace-qualified return types.
Daniel Jasper [Tue, 11 Feb 2014 10:16:55 +0000 (10:16 +0000)]
clang-format: Support lambdas with namespace-qualified return types.

E.g.:
  Foo([]()->std::vector<int> { return { 2 }; }());

llvm-svn: 201139

10 years agoclang-format: Fix alignment of comments inside statements.
Daniel Jasper [Tue, 11 Feb 2014 10:08:11 +0000 (10:08 +0000)]
clang-format: Fix alignment of comments inside statements.

Before:
  auto result = SomeObject
                // Calling someFunction on SomeObject
                    .someFunction();

After:
  auto result = SomeObject
                    // Calling someFunction on SomeObject
                    .someFunction();

llvm-svn: 201138

10 years agoAAPCS: Do not split structs after CPRC allocated on stack
Oliver Stannard [Tue, 11 Feb 2014 09:25:50 +0000 (09:25 +0000)]
AAPCS: Do not split structs after CPRC allocated on stack

According to the AAPCS, we can split structs between GPRs and the stack,
except for when an argument has already been allocated on the stack. This
can occur when a large number of floating-point arguments fill up the VFP
registers, and are alllocated on the stack before the general-purpose argument
registers are full.

llvm-svn: 201137

10 years agoRemove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and its
Dmitri Gribenko [Tue, 11 Feb 2014 09:11:18 +0000 (09:11 +0000)]
Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and its
only current user should be using toEpochTime() instead.

llvm-svn: 201136

10 years agoFix self-hosted -Werror build: delete comma at the end of enumerator list
Alexey Samsonov [Tue, 11 Feb 2014 08:07:54 +0000 (08:07 +0000)]
Fix self-hosted -Werror build: delete comma at the end of enumerator list

llvm-svn: 201135

10 years agoAVX-512: Optimized BUILD_VECTOR pattern;
Elena Demikhovsky [Tue, 11 Feb 2014 07:25:59 +0000 (07:25 +0000)]
AVX-512: Optimized BUILD_VECTOR pattern;
fixed encoding of VEXTRACTPS instruction.

llvm-svn: 201134

10 years ago[Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly
Simon Atanasyan [Tue, 11 Feb 2014 07:17:09 +0000 (07:17 +0000)]
[Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly
line by line.

llvm-svn: 201133

10 years ago[CodeGenPrepare] Test case for the promotions that bypass the
Quentin Colombet [Tue, 11 Feb 2014 06:55:43 +0000 (06:55 +0000)]
[CodeGenPrepare] Test case for the promotions that bypass the
profitability check due to some other checks in the addressing
mode matcher. I.e., test case for commit r201121.

<rdar://problem/16020230>

llvm-svn: 201132

10 years ago[Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if'...
Simon Atanasyan [Tue, 11 Feb 2014 06:36:16 +0000 (06:36 +0000)]
[Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one.

llvm-svn: 201131

10 years agoFix PCH deserialization bug with local static symbols being treated as local extern.
Ted Kremenek [Tue, 11 Feb 2014 06:29:29 +0000 (06:29 +0000)]
Fix PCH deserialization bug with local static symbols being treated as local extern.

This triggered a miscompilation of code using Boost's function_template.hpp
when it was included inside a PCH file.  A local static within
that header would be treated as local extern, resulting in the wrong
mangling.  This only occurred during PCH deserialization.

Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.

llvm-svn: 201130

10 years ago[Mips] Handle R_MIPS_COPY relocation.
Simon Atanasyan [Tue, 11 Feb 2014 05:34:02 +0000 (05:34 +0000)]
[Mips] Handle R_MIPS_COPY relocation.

llvm-svn: 201129