platform/upstream/llvm.git
10 years agoChange testcase to use FileCheck.
John McCall [Thu, 13 Feb 2014 00:50:02 +0000 (00:50 +0000)]
Change testcase to use FileCheck.

llvm-svn: 201281

10 years agoFix uninitialized read in vtordisp pragma code.
Reid Kleckner [Thu, 13 Feb 2014 00:44:34 +0000 (00:44 +0000)]
Fix uninitialized read in vtordisp pragma code.

llvm-svn: 201280

10 years agoFix misleading comment.
Lang Hames [Thu, 13 Feb 2014 00:31:14 +0000 (00:31 +0000)]
Fix misleading comment.

llvm-svn: 201279

10 years agoFix some -Wdocumentation warnings in Sema.h and try to fix test for win64
Reid Kleckner [Thu, 13 Feb 2014 00:22:04 +0000 (00:22 +0000)]
Fix some -Wdocumentation warnings in Sema.h and try to fix test for win64

llvm-svn: 201278

10 years agoThe new MCJIT C-API unit test is generating objects without constant data
Lang Hames [Thu, 13 Feb 2014 00:16:36 +0000 (00:16 +0000)]
The new MCJIT C-API unit test is generating objects without constant data
sections, at least on MachO. Relax expectations to keep the bots green while I
investigate.

llvm-svn: 201277

10 years agoSilence unused variable warning in CIndex.cpp with NDEBUG
Reid Kleckner [Wed, 12 Feb 2014 23:56:20 +0000 (23:56 +0000)]
Silence unused variable warning in CIndex.cpp with NDEBUG

llvm-svn: 201276

10 years agoRemove a very old instcombine where we would turn sequences of selects into
Owen Anderson [Wed, 12 Feb 2014 23:54:07 +0000 (23:54 +0000)]
Remove a very old instcombine where we would turn sequences of selects into
logical operations on the i1's driving them.  This is a bad idea for every
target I can think of (confirmed with micro tests on all of: x86-64, ARM,
AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into
a general purpose register, whereas consuming it directly into a select generally
allows it to exist only transiently in a predicate or flags register.

Chandler ran a set of performance tests with this change, and reported no
measurable change on x86-64.

llvm-svn: 201275

10 years agoMS ABI: Implement #pragma vtordisp() and clang-cl /vdN
Reid Kleckner [Wed, 12 Feb 2014 23:50:26 +0000 (23:50 +0000)]
MS ABI: Implement #pragma vtordisp() and clang-cl /vdN

These features are new in VS 2013 and are necessary in order to layout
std::ostream correctly.  Currently we have an ABI incompatibility when
self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper
in gtest.

This change adds another implicit attribute, MSVtorDispAttr, because
implicit attributes are currently the best way to make sure the
information stays on class templates through instantiation.

Reviewers: majnemer

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

llvm-svn: 201274

10 years agoFixed the TestLogging test.
Greg Clayton [Wed, 12 Feb 2014 23:46:08 +0000 (23:46 +0000)]
Fixed the TestLogging test.

llvm-svn: 201273

10 years ago[Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
Andrea Di Biagio [Wed, 12 Feb 2014 23:43:47 +0000 (23:43 +0000)]
[Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
'OK_NonUniformConstValue' to identify operands which are constants but
not constant splats.

The cost model now allows returning 'OK_NonUniformConstValue'
for non splat operands that are instances of ConstantVector or
ConstantDataVector.

With this change, targets are now able to compute different costs
for instructions with non-uniform constant operands.
For example, On X86 the cost of a vector shift may vary depending on whether
the second operand is a uniform or non-uniform constant.

This patch applies the following changes:
 - The cost model computation now takes into account non-uniform constants;
 - The cost of vector shift instructions has been improved in
   X86TargetTransformInfo analysis pass;
 - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
   between non-uniform and uniform constant operands.

Added a new test to verify that the output of opt
'-cost-model -analyze' is valid in the following configurations: SSE2,
SSE4.1, AVX, AVX2.

llvm-svn: 201272

10 years ago[X86] Teach the backend how to lower vector shift left into multiply rather than...
Andrea Di Biagio [Wed, 12 Feb 2014 23:42:28 +0000 (23:42 +0000)]
[X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.

Instead of expanding a packed shift into a sequence of scalar shifts,
the backend now tries (when possible) to convert the vector shift into a
vector multiply.

Before this change, a shift of a MVT::v8i16 vector by a
build_vector of constants was always scalarized into a long sequence of "vector
extracts + scalar shifts + vector insert".
With this change, if there is SSE2 support, we emit a single vector multiply.

This change also affects SSE4.1, AVX, AVX2 shifts:
 - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants
is now lowered when possible into a single SSE4.1 vector multiply.
 - Packed v16i16 shift left by constant build_vector are now expanded when
possible into a single AVX2 vpmullw.
This change also improves the lowering of AVX512f vector shifts.

Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected
by this change.

llvm-svn: 201271

10 years agoFixed the functionalities/abbreviation/TestAbbreviations.py test case.
Greg Clayton [Wed, 12 Feb 2014 23:40:31 +0000 (23:40 +0000)]
Fixed the functionalities/abbreviation/TestAbbreviations.py test case.

llvm-svn: 201270

10 years agoVS Integration: install toolsets for x64 too (PR18738)
Hans Wennborg [Wed, 12 Feb 2014 23:26:29 +0000 (23:26 +0000)]
VS Integration: install toolsets for x64 too (PR18738)

This does exactly the same thing as for Win32, except it passes -m64 to
the compiler and the files go in a different directory.

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

llvm-svn: 201269

10 years agoAdd support for DW_OP_piece and DW_OP_bit_piece.
Greg Clayton [Wed, 12 Feb 2014 23:16:19 +0000 (23:16 +0000)]
Add support for DW_OP_piece and DW_OP_bit_piece.

llvm-svn: 201268

10 years agoDebugInfo: Demonstrate that we're not currently uniquing address table entries in...
David Blaikie [Wed, 12 Feb 2014 23:03:54 +0000 (23:03 +0000)]
DebugInfo: Demonstrate that we're not currently uniquing address table entries in fission

Since I just discovered this while poking at other things, here's the
test case so I have it to come back to later.

llvm-svn: 201267

10 years agoDebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
David Blaikie [Wed, 12 Feb 2014 23:03:51 +0000 (23:03 +0000)]
DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.

llvm-svn: 201266

10 years agoReformat a few lines with clang-format.
Eric Christopher [Wed, 12 Feb 2014 22:47:09 +0000 (22:47 +0000)]
Reformat a few lines with clang-format.

llvm-svn: 201265

10 years ago80-col.
Eric Christopher [Wed, 12 Feb 2014 22:38:04 +0000 (22:38 +0000)]
80-col.

llvm-svn: 201264

10 years ago[Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.
Juergen Ributzka [Wed, 12 Feb 2014 22:17:13 +0000 (22:17 +0000)]
[Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.

We are now no longer relying on the target-specific call lowering implementation
to lower a stackmap intrinsic call. Instead we perform the call lowering in a
target-independent way directly in the stackmap lowering code. This simplifies
the code and removes the need to fixup the code after the target-specific call
lowering.

llvm-svn: 201263

10 years ago[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documena...
Juergen Ributzka [Wed, 12 Feb 2014 22:17:10 +0000 (22:17 +0000)]
[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documenation)

The ID type for the stackmap and patchpoint intrinsics are in both cases i64.
This fixes an zero extend in the SelectionDAGBuilder that still used i32. This
also updates the target independent instructions STACKMAP and PATCHPOINT to use
the correct type.

llvm-svn: 201262

10 years agoDon't try to build ExceptionDemo on ARM.
Rafael Espindola [Wed, 12 Feb 2014 21:47:15 +0000 (21:47 +0000)]
Don't try to build ExceptionDemo on ARM.

The demo uses _Unwind_GetIP which is not available on that platform.

llvm-svn: 201261

10 years agoRemove FIXME and hardcoded triple from this test (PR18251)
Hans Wennborg [Wed, 12 Feb 2014 21:40:46 +0000 (21:40 +0000)]
Remove FIXME and hardcoded triple from this test (PR18251)

We don't support using the MS ABI with non-x86/x86_64 targets anyway.

llvm-svn: 201260

10 years agoExtend RTDyld API to enable optionally precomputing the total amount of memory
Lang Hames [Wed, 12 Feb 2014 21:30:07 +0000 (21:30 +0000)]
Extend RTDyld API to enable optionally precomputing the total amount of memory
required for all sections in a module. This can be useful when targets or
code-models place strict requirements on how sections must be laid out
in memory.

If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return
true then the JIT will call the following method on the memory manager, which
can be used to preallocate the necessary memory.

void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize,
                                                 uintptr_t DataSizeRO,
                                                 uintptr_t DataSizeRW)

Patch by Vaidas Gasiunas. Thanks very much Viadas!

llvm-svn: 201259

10 years agoRename Windows.h to WindowsSupport.h to avoid ambiguity
Reid Kleckner [Wed, 12 Feb 2014 21:26:20 +0000 (21:26 +0000)]
Rename Windows.h to WindowsSupport.h to avoid ambiguity

llvm-svn: 201258

10 years agoRemove unused diagnostic.
Benjamin Kramer [Wed, 12 Feb 2014 21:25:40 +0000 (21:25 +0000)]
Remove unused diagnostic.

llvm-svn: 201257

10 years ago[examples] Use loadable modules instead of shared libraries for Clang plugins.
Jordan Rose [Wed, 12 Feb 2014 21:04:23 +0000 (21:04 +0000)]
[examples] Use loadable modules instead of shared libraries for Clang plugins.

This avoids linking in extra copies of, say, LLVMSupport.

llvm-svn: 201256

10 years ago_CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
David Fang [Wed, 12 Feb 2014 21:02:12 +0000 (21:02 +0000)]
_CS_DARWIN_USER macros available on darwin>=9.  Thanks, Dave Odell!

llvm-svn: 201255

10 years agoSema: Restrict alignment to 2**28.
David Majnemer [Wed, 12 Feb 2014 20:36:10 +0000 (20:36 +0000)]
Sema: Restrict alignment to 2**28.

Allowing alignment past this point causes wrap around within clang.

N.B.  GCC has the same restriction.

llvm-svn: 201254

10 years agoDebug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
Adrian Prantl [Wed, 12 Feb 2014 19:34:44 +0000 (19:34 +0000)]
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314

llvm-svn: 201253

10 years ago[sanitizer] Intercept capget()/capset().
Sergey Matveev [Wed, 12 Feb 2014 19:29:49 +0000 (19:29 +0000)]
[sanitizer] Intercept capget()/capset().

Also, fix incorrect syscall hooks for the corresponding syscalls.

llvm-svn: 201252

10 years agoAttributes: Avoid a big useless copy in the emitter
Reid Kleckner [Wed, 12 Feb 2014 19:26:24 +0000 (19:26 +0000)]
Attributes: Avoid a big useless copy in the emitter

llvm-svn: 201251

10 years agorelax testcase and make ppc64 buildbots happy.
Adrian Prantl [Wed, 12 Feb 2014 19:26:19 +0000 (19:26 +0000)]
relax testcase and make ppc64 buildbots happy.

llvm-svn: 201250

10 years agolibclang: report error code for bad PCH files
Dmitri Gribenko [Wed, 12 Feb 2014 19:12:37 +0000 (19:12 +0000)]
libclang: report error code for bad PCH files

This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file.  This allows
the caller, for example, to rebuild the PCH file and retry the request.

There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2.  These functions
return a CXTranslationUnit indirectly and also return an error code.  Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.

As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.

llvm-svn: 201249

10 years agoDocument and improve the debug-property-synth.m test based on the
Adrian Prantl [Wed, 12 Feb 2014 18:24:07 +0000 (18:24 +0000)]
Document and improve the debug-property-synth.m test based on the
information provided in the referenced radar.

llvm-svn: 201248

10 years agoRevert "Remove bad debug info test."
Adrian Prantl [Wed, 12 Feb 2014 18:24:04 +0000 (18:24 +0000)]
Revert "Remove bad debug info test."

This reverts commit r201183.
The test, albeit undocumented and badly written is still testing something
useful. It will be updated in a subsequent commit.

llvm-svn: 201247

10 years agoAttributes: Emit enumerators in td file declaration order
Reid Kleckner [Wed, 12 Feb 2014 18:22:18 +0000 (18:22 +0000)]
Attributes: Emit enumerators in td file declaration order

llvm-svn: 201246

10 years agoPass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
Akira Hatanaka [Wed, 12 Feb 2014 18:09:18 +0000 (18:09 +0000)]
Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
preserve branch probability information.

<rdar://problem/15893208>

llvm-svn: 201245

10 years agoChange TestAbbreviations test to expected failure on Linux.
Todd Fiala [Wed, 12 Feb 2014 17:50:26 +0000 (17:50 +0000)]
Change TestAbbreviations test to expected failure on Linux.

See http://llvm.org/bugs/show_bug.cgi?id=18816.
Likely the same issue as http://llvm.org/bugs/show_bug.cgi?id=18805.

llvm-svn: 201244

10 years agoPC-rel implemented in AArch64, test now pass
Renato Golin [Wed, 12 Feb 2014 17:17:41 +0000 (17:17 +0000)]
PC-rel implemented in AArch64, test now pass

llvm-svn: 201243

10 years agoMove more self-contained functionality away from tools/opt/opt.cpp
Eli Bendersky [Wed, 12 Feb 2014 16:48:02 +0000 (16:48 +0000)]
Move more self-contained functionality away from tools/opt/opt.cpp

BreakpointPrinter moves to its own module.

llvm-svn: 201242

10 years agoRevert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and...
Daniel Sanders [Wed, 12 Feb 2014 15:39:20 +0000 (15:39 +0000)]
Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

It introduced multiple test failures in the buildbots.

llvm-svn: 201241

10 years ago[asan] Handle OpenFile errors in CovDump.
Evgeniy Stepanov [Wed, 12 Feb 2014 15:29:22 +0000 (15:29 +0000)]
[asan] Handle OpenFile errors in CovDump.

llvm-svn: 201240

10 years agoRevert "Enforce python2 for systems that use python3 as their default."
Tom Stellard [Wed, 12 Feb 2014 14:54:17 +0000 (14:54 +0000)]
Revert "Enforce python2 for systems that use python3 as their default."

This reverts commit r200413.

This was breaking the build on systems where the python 2.x executable
was called python.

llvm-svn: 201239

10 years agoArcanist failed to commit the two clang test corrections that should have been in...
Daniel Sanders [Wed, 12 Feb 2014 14:46:15 +0000 (14:46 +0000)]
Arcanist failed to commit the two clang test corrections that should have been in r201237.

llvm-svn: 201238

10 years agoDemote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport...
Daniel Sanders [Wed, 12 Feb 2014 14:44:54 +0000 (14:44 +0000)]
Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler.

Reviewers: rafael

Reviewed By: rafael

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

llvm-svn: 201237

10 years agolibclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument
Dmitri Gribenko [Wed, 12 Feb 2014 14:17:58 +0000 (14:17 +0000)]
libclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument

llvm-svn: 201236

10 years ago[sanitizer] Fix wait4 interceptor on Android.
Evgeniy Stepanov [Wed, 12 Feb 2014 13:05:17 +0000 (13:05 +0000)]
[sanitizer] Fix wait4 interceptor on Android.

It's called __wait4 there.

llvm-svn: 201235

10 years agoWhitespace cleanup (mostly stray tabs, a few not-quite-empty lines).
Tim Northover [Wed, 12 Feb 2014 12:56:48 +0000 (12:56 +0000)]
Whitespace cleanup (mostly stray tabs, a few not-quite-empty lines).

llvm-svn: 201234

10 years agoARM & NEON: add test for r101232
Tim Northover [Wed, 12 Feb 2014 12:08:06 +0000 (12:08 +0000)]
ARM & NEON: add test for r101232

rdar://problem/16035743

llvm-svn: 201233

10 years agoARM NEON: fix range checking on immediates.
Tim Northover [Wed, 12 Feb 2014 12:04:59 +0000 (12:04 +0000)]
ARM NEON: fix range checking on immediates.

Previously, range checking on the __builtin_neon_XYZ_v Clang intrinsics didn't
take account of the type actually passed to the call, which meant a request
like "vext_s16(a, b, 7)" was allowed through (TableGen was conservative and
allowed 0-7 for all types). This caused an assert in the backend because the
lane doesn't make sense.

llvm-svn: 201232

10 years agoDon't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c
Dmitri Gribenko [Wed, 12 Feb 2014 11:50:37 +0000 (11:50 +0000)]
Don't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c

With -fdisable-module-hash, we can implement this with a simple 'cp'.

llvm-svn: 201231

10 years agoWindows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:22 +0000 (11:50 +0000)]
Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.

  I found that swapping the order of some header files helped fix a
  build issue that we're seeing on mingw32. Without the swap, windows.h
  was being included before _WIN32_WINNT was being defined and the
  CreateHardLinkW function was #ifdef'd out.

  It looks like the header is mainly used to get the SHGetFolderPathW
  function, so I don't think that there'll be much fallout from the
  switch.

Suggested by Alex Crichton. Thanks!

llvm-svn: 201230

10 years agoTeach tablegen() macro to check needed variables
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:11 +0000 (11:50 +0000)]
Teach tablegen() macro to check needed variables

This macro depends on several variables to be set in the calling
context.  Check them and report an error if they are not set.
Without this, custom commands may be silently specified that
will fail at build time.

Patch by Brad King.

llvm-svn: 201229

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