platform/upstream/llvm.git
8 years ago[STATS] fix output formatting when sample count is 0
Jonathan Peyton [Thu, 3 Mar 2016 21:24:13 +0000 (21:24 +0000)]
[STATS] fix output formatting when sample count is 0

Force 0.0 to be displayed for all statistics which have sample count equal to 0

llvm-svn: 262658

8 years ago[RuntimeDyld] Fix '_' stripping in RTDyldMemoryManager::getSymbolAddressInProcess.
Lang Hames [Thu, 3 Mar 2016 21:23:15 +0000 (21:23 +0000)]
[RuntimeDyld] Fix '_' stripping in RTDyldMemoryManager::getSymbolAddressInProcess.

The RTDyldMemoryManager::getSymbolAddressInProcess method accepts a
linker-mangled symbol name, but it calls through to dlsym to do the lookup (via
DynamicLibrary::SearchForAddressOfSymbol), and dlsym expects an unmangled
symbol name.

Historically we've attempted to "demangle" by removing leading '_'s on all
platforms, and fallen back to an extra search if that failed. That's broken, as
it can cause symbols to resolve incorrectly on platforms that don't do mangling
if you query '_foo' and the process also happens to contain a 'foo'.

Fix this by demangling conditionally based on the host platform. That's safe
here because this function is specifically for symbols in the host process, so
the usual cross-process JIT looking concerns don't apply.

M    unittests/ExecutionEngine/ExecutionEngineTest.cpp
M    lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp

llvm-svn: 262657

8 years ago[STATS] fix master and single timers
Jonathan Peyton [Thu, 3 Mar 2016 21:21:05 +0000 (21:21 +0000)]
[STATS] fix master and single timers

Only the thread which executes the single/master section will update its statistics.

llvm-svn: 262656

8 years agofix some minor typos in the doc
Sylvestre Ledru [Thu, 3 Mar 2016 20:57:16 +0000 (20:57 +0000)]
fix some minor typos in the doc

llvm-svn: 262655

8 years agoFix two minor syntax issues in the documentation
Sylvestre Ledru [Thu, 3 Mar 2016 20:54:26 +0000 (20:54 +0000)]
Fix two minor syntax issues in the documentation

llvm-svn: 262654

8 years agoDelete dead code.
Rafael Espindola [Thu, 3 Mar 2016 20:45:26 +0000 (20:45 +0000)]
Delete dead code.

llvm-svn: 262653

8 years agoAdd code generation for teams directive inside target region
Carlo Bertolli [Thu, 3 Mar 2016 20:34:23 +0000 (20:34 +0000)]
Add code generation for teams directive inside target region

llvm-svn: 262652

8 years ago[ELF] - Do not allow .bss to occupy the file space when producing relocatable output
George Rimar [Thu, 3 Mar 2016 20:24:14 +0000 (20:24 +0000)]
[ELF] - Do not allow .bss to occupy the file space when producing relocatable output

When generating relocatable output SHT_NOBITS sections
were still occupy the file space.

Differential revision: http://reviews.llvm.org/D17857

llvm-svn: 262650

8 years agotests: Fix some spelling mistakes
Tobias Grosser [Thu, 3 Mar 2016 19:51:03 +0000 (19:51 +0000)]
tests: Fix some spelling mistakes

llvm-svn: 262649

8 years ago[ValueTracking] "constant fold" an experimental hidden option
Philip Reames [Thu, 3 Mar 2016 19:50:32 +0000 (19:50 +0000)]
[ValueTracking] "constant fold" an experimental hidden option

llvm-svn: 262648

8 years agodocs: Fix some spelling mistakes
Tobias Grosser [Thu, 3 Mar 2016 19:48:30 +0000 (19:48 +0000)]
docs: Fix some spelling mistakes

llvm-svn: 262647

8 years ago[ValueTracking] Remove dead code from an old experiment
Philip Reames [Thu, 3 Mar 2016 19:44:06 +0000 (19:44 +0000)]
[ValueTracking] Remove dead code from an old experiment

This experiment was originally about trying to use facts implied dominating conditions to infer more precise known bits.  While the compile time was found to be acceptable on several large code bases, we never found sufficiently profitable examples to justify turning on the code by default.  Given this, it's time to abandon the experiment.

Several folks have commented that they've found this useful for experimentation, but nothing has come of those experiments.  Given how easy the patch is to apply, there's no reason to leave the code in tree.

For anyone interested in further investigation in this area, I recommend finding the summary email I sent on one of the original review threads.  In particular, I now believe the use-list based approach is strictly worse than the dom-tree-walking approach.

llvm-svn: 262646

8 years ago[InstCombine] transform bitcasted bitwise logic ops with constants (PR26702)
Sanjay Patel [Thu, 3 Mar 2016 19:19:04 +0000 (19:19 +0000)]
[InstCombine] transform bitcasted bitwise logic ops with constants (PR26702)

Given that we're not actually reducing the instruction count in the included
regression tests, I think we would call this a canonicalization step.

The motivation comes from the example in PR26702:
https://llvm.org/bugs/show_bug.cgi?id=26702

If we hoist the bitwise logic ahead of the bitcast, the previously unoptimizable
example of:

define <4 x i32> @is_negative(<4 x i32> %x) {
  %lobit = ashr <4 x i32> %x, <i32 31, i32 31, i32 31, i32 31>
  %not = xor <4 x i32> %lobit, <i32 -1, i32 -1, i32 -1, i32 -1>
  %bc = bitcast <4 x i32> %not to <2 x i64>
  %notnot = xor <2 x i64> %bc, <i64 -1, i64 -1>
  %bc2 = bitcast <2 x i64> %notnot to <4 x i32>
  ret <4 x i32> %bc2
}

Simplifies to the expected:

define <4 x i32> @is_negative(<4 x i32> %x) {
  %lobit = ashr <4 x i32> %x, <i32 31, i32 31, i32 31, i32 31>
  ret <4 x i32> %lobit
}

Differential Revision: http://reviews.llvm.org/D17583

llvm-svn: 262645

8 years ago[PGO] Add API for profile merge from buffer
Xinliang David Li [Thu, 3 Mar 2016 18:54:46 +0000 (18:54 +0000)]
[PGO] Add API for profile merge from buffer

Differential Revision: http://reviews.llvm.org/D17831

llvm-svn: 262644

8 years agoFix breakage caused by r262636.
Easwaran Raman [Thu, 3 Mar 2016 18:53:20 +0000 (18:53 +0000)]
Fix breakage caused by r262636.

Use LLVM_ATTRIBUTE_UNUSED instead of __attribute_((unused))

llvm-svn: 262643

8 years agoFix PR26818.
Rafael Espindola [Thu, 3 Mar 2016 18:44:38 +0000 (18:44 +0000)]
Fix PR26818.

The hack of using a plt address as the address of an undefined function
only works in executables. Don't try it with shared libraries.

llvm-svn: 262642

8 years ago[OpenCL] Improve diagnostics of address spaces for variables in function
Anastasia Stulova [Thu, 3 Mar 2016 18:38:40 +0000 (18:38 +0000)]
[OpenCL] Improve diagnostics of address spaces for variables in function

 - Prevent local variables to be declared in global AS
 - Diagnose AS of local variables with an extern storage class
   as if they would be in a program scope

Review: http://reviews.llvm.org/D17345
llvm-svn: 262641

8 years ago[ConstantRange] Rename test; NFC
Sanjoy Das [Thu, 3 Mar 2016 18:31:33 +0000 (18:31 +0000)]
[ConstantRange] Rename test; NFC

llvm-svn: 262640

8 years ago[SCEV] Prove no-overflow via constant ranges
Sanjoy Das [Thu, 3 Mar 2016 18:31:29 +0000 (18:31 +0000)]
[SCEV] Prove no-overflow via constant ranges

Exploit ScalarEvolution::getRange's newly acquired smartness (since
r262438) by using that to infer nsw and nuw when possible.

llvm-svn: 262639

8 years ago[SCEV] Be less eager about demoting zexts to sexts
Sanjoy Das [Thu, 3 Mar 2016 18:31:23 +0000 (18:31 +0000)]
[SCEV] Be less eager about demoting zexts to sexts

After r262438 we can have provably positive NSW SCEV expressions whose
zero extensions cannot be simplified (since r262438 makes SCEV better at
computing constant ranges).  This means demoting sexts of positive add
recurrences eagerly can result in an unsimplified zero extension where
we could have had a simplified sign extension.  This change fixes the
issue by teaching SCEV to demote sext of a positive SCEV expression to a
zext only if the sext could not be simplified.

llvm-svn: 262638

8 years ago[ConstantRange] Generalize makeGuaranteedNoWrapRegion to work on ranges
Sanjoy Das [Thu, 3 Mar 2016 18:31:16 +0000 (18:31 +0000)]
[ConstantRange] Generalize makeGuaranteedNoWrapRegion to work on ranges

This will be used in a later patch to ScalarEvolution.  Right now only
the unit tests exercise the newly added code.

llvm-svn: 262637

8 years agoInfrastructure for PGO enhancements in inliner
Easwaran Raman [Thu, 3 Mar 2016 18:26:33 +0000 (18:26 +0000)]
Infrastructure for PGO enhancements in inliner

This patch provides the following infrastructure for PGO enhancements in inliner:

Enable the use of block level profile information in inliner
Incremental update of block frequency information during inlining
Update the function entry counts of callees when they get inlined into callers.

Differential Revision: http://reviews.llvm.org/D16381

llvm-svn: 262636

8 years ago[X86][AVX] Better support for the variable mask form of VPERMILPD/VPERMILPS
Simon Pilgrim [Thu, 3 Mar 2016 18:13:53 +0000 (18:13 +0000)]
[X86][AVX] Better support for the variable mask form of VPERMILPD/VPERMILPS

The variable mask form of VPERMILPD/VPERMILPS were only partially implemented, with much of it still performed as an intrinsic.

This patch properly defines the instructions in terms of X86ISD::VPERMILPV, permitting the opcode to be easily combined as a target shuffle.

Differential Revision: http://reviews.llvm.org/D17681

llvm-svn: 262635

8 years agoUse LineLocation instead of CallsiteLocation to index callsite profile.
Dehao Chen [Thu, 3 Mar 2016 18:09:32 +0000 (18:09 +0000)]
Use LineLocation instead of CallsiteLocation to index callsite profile.

Summary: With discriminator, LineLocation can uniquely identify a callsite without the need to specifying callee name. Remove Callee function name from the key, and put it in the value (FunctionSamples).

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17827

llvm-svn: 262634

8 years ago[X86] Tidied up 256-bit -> 2 x 128-bit vector shift extraction.
Simon Pilgrim [Thu, 3 Mar 2016 17:54:35 +0000 (17:54 +0000)]
[X86] Tidied up 256-bit -> 2 x 128-bit vector shift extraction.

lowerShift was manually splitting BUILD_VECTOR cases when it could just call Extract128BitVector which does this anyway.

llvm-svn: 262633

8 years ago[test/ubsan/coverage-levels] Fix file references in UBSAN_OPTIONS
Filipe Cabecinhas [Thu, 3 Mar 2016 17:37:35 +0000 (17:37 +0000)]
[test/ubsan/coverage-levels] Fix file references in UBSAN_OPTIONS

llvm-svn: 262632

8 years ago[X86] Pulled out repeated code testing for constant vector shift amount. NFCI.
Simon Pilgrim [Thu, 3 Mar 2016 17:35:43 +0000 (17:35 +0000)]
[X86] Pulled out repeated code testing for constant vector shift amount. NFCI.

llvm-svn: 262631

8 years agoclang-format: Use stable_sort when sorting #includes.
Daniel Jasper [Thu, 3 Mar 2016 17:34:14 +0000 (17:34 +0000)]
clang-format: Use stable_sort when sorting #includes.

Otherwise, clang-format can output useless replacements in the presence
of identical #includes

llvm-svn: 262630

8 years ago[BlockGenerator] Fix PHI merges for MK_Arrays.
Michael Kruse [Thu, 3 Mar 2016 17:20:43 +0000 (17:20 +0000)]
[BlockGenerator] Fix PHI merges for MK_Arrays.

Value merging is only necessary for scalars when they are used outside
of the scop. While an array's base pointer can be used after the scop,
it gets an extra ScopArrayInfo of type MK_Value. We used to generate
phi's for both of them, where one was assuming the reault of the other
phi would be the original value, because it has already been replaced by
the previous phi. This resulted in IR that the current IR verifier
allows, but is probably illegal.

This reduces the number of LNT test-suite fails with
-polly-position=before-vectorizer -polly-process-unprofitable
from 16 to 10.

Also see llvm.org/PR26718.

llvm-svn: 262629

8 years agoMCU target has its own ABI, however X86 interrupt handler calling convention override...
Amjad Aboud [Thu, 3 Mar 2016 17:17:54 +0000 (17:17 +0000)]
MCU target has its own ABI, however X86 interrupt handler calling convention overrides this ABI.
Fixed the ordering to check first for X86 interrupt handler then for MCU target.

Differential Revision: http://reviews.llvm.org/D17801

llvm-svn: 262628

8 years ago[X86] Don't assume that shuffle non-mask operands starts at #0.
Ahmed Bougacha [Thu, 3 Mar 2016 16:53:50 +0000 (16:53 +0000)]
[X86] Don't assume that shuffle non-mask operands starts at #0.

That's not the case for VPERMV/VPERMV3, which cover all possible
combinations (the C intrinsics use a different order; the AVX vs
AVX512 intrinsics are different still).

Since:
  r246981 AVX-512: Lowering for 512-bit vector shuffles.
VPERMV is recognized in getTargetShuffleMask.

This breaks assumptions in most callers, as they expect
the non-mask operands to start at index 0.
VPERMV has the mask as operand #0; VPERMV3 has it in the middle.

Instead of the faulty assumption, have getTargetShuffleMask return
its operands as well.

One alternative we considered was to change the operand order of
VPERMV, but we agreed to stick to the instruction order, as there
are more AVX512 weirdness to cover (vpermt2/vpermi2 in particular).

Differential Revision: http://reviews.llvm.org/D17041

llvm-svn: 262627

8 years agoSimplify error handling.
Rafael Espindola [Thu, 3 Mar 2016 16:21:44 +0000 (16:21 +0000)]
Simplify error handling.

This makes fatal return T when there is no error. This avoids the need
for quite a few temporaries.

llvm-svn: 262626

8 years ago[OpenMP] Code generation for teams - kernel launching
Samuel Antao [Thu, 3 Mar 2016 16:20:23 +0000 (16:20 +0000)]
[OpenMP] Code generation for teams - kernel launching

Summary:
This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive.

The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch.

Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev

Subscribers: cfe-commits, caomhin, fraggamuffin

Differential Revision: http://reviews.llvm.org/D17019

llvm-svn: 262625

8 years ago[LoopUtils, LV] Fix PR26734
Matthew Simpson [Thu, 3 Mar 2016 16:12:01 +0000 (16:12 +0000)]
[LoopUtils, LV] Fix PR26734

The vectorization of first-order recurrences (r261346) caused PR26734. When
detecting these recurrences, we need to ensure that the previous value is
actually defined inside the loop. This patch includes the fix and test case.

llvm-svn: 262624

8 years ago[AArch64] fold 'isPositive' vector integer operations (PR26819)
Sanjay Patel [Thu, 3 Mar 2016 15:56:08 +0000 (15:56 +0000)]
[AArch64] fold 'isPositive' vector integer operations (PR26819)

This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26819

Shift and negate is what InstCombine prefers to produce (and I tried to make it do more of that
in http://reviews.llvm.org/rL262424 ), so we should recognize that pattern as something that might
come from autovectorization even if it's unlikely to be produced from C NEON intrinsics.

The patch is based on the x86 equivalent:
http://reviews.llvm.org/rL262036

Differential Revision: http://reviews.llvm.org/D17834

llvm-svn: 262623

8 years agoRevert "Fetch remote log files from LLGS tests"
Pavel Labath [Thu, 3 Mar 2016 15:19:14 +0000 (15:19 +0000)]
Revert "Fetch remote log files from LLGS tests"

Even after the last fixup, there still seems to be one failure left. Revert until I figure out
what is going on.

llvm-svn: 262622

8 years agoAVX512: Combine AND + TESTM instructions .
Igor Breger [Thu, 3 Mar 2016 14:18:38 +0000 (14:18 +0000)]
AVX512: Combine AND + TESTM instructions .

Differential Revision: http://reviews.llvm.org/D17844

llvm-svn: 262621

8 years agoMaking rem_crash.ll target-specific
Renato Golin [Thu, 3 Mar 2016 14:01:10 +0000 (14:01 +0000)]
Making rem_crash.ll target-specific

This test failed in some ARM bots after a divmod change because it was
running on a native llc, instead of targeted one. This makes sure the test
is target-specific (as intended), and also copies to ARM and AArch64
directories. If it is also supposed to work on other architectures, I'll
leave as an exercise to the respective maintainers.

llvm-svn: 262620

8 years ago[ARM] Add Clang targeting for ARMv8-M Baseline/Mainline
Bradley Smith [Thu, 3 Mar 2016 13:52:22 +0000 (13:52 +0000)]
[ARM] Add Clang targeting for ARMv8-M Baseline/Mainline

llvm-svn: 262619

8 years ago[clang-tidy] Improve the robustness of a test.
Gabor Horvath [Thu, 3 Mar 2016 13:43:23 +0000 (13:43 +0000)]
[clang-tidy] Improve the robustness of a test.

llvm-svn: 262618

8 years ago[CLANG][AVX512][BUILTIN] movddup{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 13:43:05 +0000 (13:43 +0000)]
[CLANG][AVX512][BUILTIN] movddup{128|256|512}

Differential Revision: http://reviews.llvm.org/D17826

llvm-svn: 262617

8 years ago[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0
Anastasia Stulova [Thu, 3 Mar 2016 13:33:19 +0000 (13:33 +0000)]
[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5):
 - __block storage class is disallowed
 - every block declaration must be const qualified and initialized
 - a block can't be used as a return type of a function
 - a blocks can't be used to declare a structure or union field
 - extern speficier is disallowed

Corrected image and sampler types diagnostics with struct and unions.

Review: http://reviews.llvm.org/D16928
llvm-svn: 262616

8 years ago[clang-tidy] Do not emit warnings from misc-suspicious-semicolon when the compilation...
Gabor Horvath [Thu, 3 Mar 2016 13:08:11 +0000 (13:08 +0000)]
[clang-tidy] Do not emit warnings from misc-suspicious-semicolon when the compilation fails.

llvm-svn: 262615

8 years agoFix typo [NFC]
Johannes Doerfert [Thu, 3 Mar 2016 12:30:19 +0000 (12:30 +0000)]
Fix typo [NFC]

llvm-svn: 262613

8 years ago[FIX] Consolidation of loads with same pointer but different access relation
Johannes Doerfert [Thu, 3 Mar 2016 12:26:58 +0000 (12:26 +0000)]
[FIX] Consolidation of loads with same pointer but different access relation

  This should fix PR19422.

  Thanks to Jeremy Huddleston Sequoia for reporting this.
  Thanks to Roman Gareev for his investigation and the reduced test case.

llvm-svn: 262612

8 years agoFixing a checkfile error in avx512vlbw-builtins.c
Michael Zuckerman [Thu, 3 Mar 2016 12:17:50 +0000 (12:17 +0000)]
Fixing a checkfile error in avx512vlbw-builtins.c

Differential Revision: http://reviews.llvm.org/D17814

llvm-svn: 262611

8 years agoFix for PR26812: possible overflow issue in std::allocator::allocate
Marshall Clow [Thu, 3 Mar 2016 12:04:39 +0000 (12:04 +0000)]
Fix for PR26812: possible overflow issue in std::allocator::allocate

llvm-svn: 262610

8 years ago[CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 11:34:52 +0000 (11:34 +0000)]
[CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}

Differential Revision: http://reviews.llvm.org/D17814

llvm-svn: 262609

8 years ago[DOC] Add documentation for the supported call instructions
Johannes Doerfert [Thu, 3 Mar 2016 11:33:49 +0000 (11:33 +0000)]
[DOC] Add documentation for the supported call instructions

llvm-svn: 262608

8 years ago[DOC] Add more documentation about the different element type support
Johannes Doerfert [Thu, 3 Mar 2016 11:33:30 +0000 (11:33 +0000)]
[DOC] Add more documentation about the different element type support

llvm-svn: 262607

8 years agoTweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.
NAKAMURA Takumi [Thu, 3 Mar 2016 11:09:43 +0000 (11:09 +0000)]
Tweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.

llvm-svn: 262606

8 years ago[docs] Fix docs to work with doxygen 1.8.11
Alexander Kornienko [Thu, 3 Mar 2016 10:45:59 +0000 (10:45 +0000)]
[docs] Fix docs to work with doxygen 1.8.11

llvm-svn: 262605

8 years ago[docs] Add missing file
Alexander Kornienko [Thu, 3 Mar 2016 10:44:10 +0000 (10:44 +0000)]
[docs] Add missing file

llvm-svn: 262604

8 years ago[docs] Updated doxygen files to work well with doxygen 1.8.11
Alexander Kornienko [Thu, 3 Mar 2016 10:42:46 +0000 (10:42 +0000)]
[docs] Updated doxygen files to work well with doxygen 1.8.11

Doxygen 1.8.11 doesn't seem to like files with ".intro" extension by default.

llvm-svn: 262603

8 years agoFix OSX breakage caused by r262597
Pavel Labath [Thu, 3 Mar 2016 10:39:24 +0000 (10:39 +0000)]
Fix OSX breakage caused by r262597

llvm-svn: 262602

8 years ago[clang-tidy] Documentation fixes.
Gabor Horvath [Thu, 3 Mar 2016 10:27:32 +0000 (10:27 +0000)]
[clang-tidy] Documentation fixes.

llvm-svn: 262601

8 years ago[AVR] Add calling convention parser tokens
Dylan McKay [Thu, 3 Mar 2016 10:08:02 +0000 (10:08 +0000)]
[AVR] Add calling convention parser tokens

Summary: Adds the 'avr_intrcc' and 'avr_signalcc' IR calling convention tokens to the parser.

Reviewers: arsenm

Subscribers: dylanmckay, llvm-commits

Differential Revision: http://reviews.llvm.org/D16348

llvm-svn: 262600

8 years ago[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG
Simon Pilgrim [Thu, 3 Mar 2016 09:43:28 +0000 (09:43 +0000)]
[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG

Generalise the existing SIGN_EXTEND to SIGN_EXTEND_VECTOR_INREG combine to support zero extension as well and get rid of a lot of unnecessary ANY_EXTEND + mask patterns.

Differential Revision: http://reviews.llvm.org/D17691

llvm-svn: 262599

8 years ago[CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 09:26:01 +0000 (09:26 +0000)]
[CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}

Differential Revision: http://reviews.llvm.org/D17812

llvm-svn: 262598

8 years agoFetch remote log files from LLGS tests
Pavel Labath [Thu, 3 Mar 2016 09:02:52 +0000 (09:02 +0000)]
Fetch remote log files from LLGS tests

Summary:
this enables download of remote log files for llgs and debugserver tests (previously we were just
passing the host file name which obviously did not work). Note this also changes the debugserver
logging to work only when logging has been requested on the command line, whereas previously it
would log unconditionally. I can change it back if anyone is relying on this, but I thought I'd
make this consistent.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17798

llvm-svn: 262597

8 years ago[libclang] Link clang-tidy plugin into libclang if present.
Benjamin Kramer [Thu, 3 Mar 2016 08:58:18 +0000 (08:58 +0000)]
[libclang] Link clang-tidy plugin into libclang if present.

This is a sad workaround for the lack of plugin support in libclang. Depends
on D17807, a tools-extra change that also contains the test case.

This is designed to be easy to remove again if libclang ever grows proper
plugin support.

Differential Revision: http://reviews.llvm.org/D17808

llvm-svn: 262596

8 years ago[clang-tidy] Add "clang-tidy as a clang plugin" skeleton.
Benjamin Kramer [Thu, 3 Mar 2016 08:58:12 +0000 (08:58 +0000)]
[clang-tidy] Add "clang-tidy as a clang plugin" skeleton.

This doesn't really do much at the moment. You can load it via libclang
and set the -checks via an extra command line argument as illustrated in
the test case. Support for other options (including headers check) is
currently missing. Also when using this with libclang some checks may
not work with the precompiled preamble in place.

This can be used to easily show clang-tidy warnings in an editor
integration as all that's needed is adding command line flags that are
passed into libclang. Warnings and FixIts are exposed via the existing
CXDiagnostic machinery.

Differential Revision: http://reviews.llvm.org/D17807

llvm-svn: 262595

8 years agoRevert "[ARM] Merging 64-bit divmod lib calls into one"
Renato Golin [Thu, 3 Mar 2016 08:57:44 +0000 (08:57 +0000)]
Revert "[ARM] Merging 64-bit divmod lib calls into one"

This reverts commit r262507, which broke some ARM buildbots.

llvm-svn: 262594

8 years ago[Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 08:55:20 +0000 (08:55 +0000)]
[Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}

Differential Revision: http://reviews.llvm.org/D17754

llvm-svn: 262593

8 years ago[LLVM][AVX512] PSRLWI Chnage imm8 to int
Michael Zuckerman [Thu, 3 Mar 2016 08:54:05 +0000 (08:54 +0000)]
[LLVM][AVX512] PSRLWI Chnage imm8 to int

Differential Revision: http://reviews.llvm.org/D17753

llvm-svn: 262592

8 years agoAllow the client of DependenceInfo to obtain dependences at different granularities.
Hongbin Zheng [Thu, 3 Mar 2016 08:15:33 +0000 (08:15 +0000)]
Allow the client of DependenceInfo to obtain dependences at different granularities.

llvm-svn: 262591

8 years ago[ELF] - add support for relocations against local symbols when producing relocatable...
George Rimar [Thu, 3 Mar 2016 07:49:35 +0000 (07:49 +0000)]
[ELF] - add support for relocations against local symbols when producing relocatable output.

There was a known limitation for -r option:
relocations against local symbols were not supported.
For example rel[a].eh_frame sections contained relocations against sections
and that was not supported for -r before. Patch fixes that.

Differential review: http://reviews.llvm.org/D17813

llvm-svn: 262590

8 years agowww: Add links to sphinx/doxygen documentation
Tobias Grosser [Thu, 3 Mar 2016 07:03:21 +0000 (07:03 +0000)]
www: Add links to sphinx/doxygen documentation

llvm-svn: 262589

8 years agodocs: Drop modindex from sphinx
Tobias Grosser [Thu, 3 Mar 2016 07:01:00 +0000 (07:01 +0000)]
docs: Drop modindex from sphinx

For an unknown reason modindex is not be built correctly by sphinx. Take it
out of the index until we can build it correctly.

llvm-svn: 262588

8 years agoSemantic analysis for the swiftcall calling convention.
John McCall [Thu, 3 Mar 2016 06:39:32 +0000 (06:39 +0000)]
Semantic analysis for the swiftcall calling convention.

I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.

llvm-svn: 262587

8 years agoReplace ECRAII class with a function.
Rui Ueyama [Thu, 3 Mar 2016 06:22:29 +0000 (06:22 +0000)]
Replace ECRAII class with a function.

RCRAII class was a bit tricky. This patch removes that.

llvm-svn: 262586

8 years agoTTI: Fix not using overload of getIntrinsicInstrCost
Matt Arsenault [Thu, 3 Mar 2016 05:43:49 +0000 (05:43 +0000)]
TTI: Fix not using overload of getIntrinsicInstrCost

This was always calling the generic version, so the target
custom implementation was never called.

llvm-svn: 262585

8 years ago[index] Report references of ObjC super class/protocols in interfaces and protocols.
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:54 +0000 (05:33 +0000)]
[index] Report references of ObjC super class/protocols in interfaces and protocols.

llvm-svn: 262584

8 years ago[test] Re-enable asan on the test, stack usage should be lower.
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:48 +0000 (05:33 +0000)]
[test] Re-enable asan on the test, stack usage should be lower.

llvm-svn: 262583

8 years ago[OPENMP 4.0] Initial support for 'omp declare reduction' construct.
Alexey Bataev [Thu, 3 Mar 2016 05:21:39 +0000 (05:21 +0000)]
[OPENMP 4.0] Initial support for 'omp declare reduction' construct.

Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct.
User-defined reductions are defined as

#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]
These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The
combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will
denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting
combined value after executing the combiner.
As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause
will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier
omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.
Differential Revision: http://reviews.llvm.org/D11182

llvm-svn: 262582

8 years ago[LSan] Enable use_registers test for MIPS
Mohit K. Bhakkad [Thu, 3 Mar 2016 05:05:20 +0000 (05:05 +0000)]
[LSan] Enable use_registers test for MIPS

Reviewers: samsonov

Subscribers: jaydeep, sagar, llvm-commits

Differential Revision: http://reviews.llvm.org/D17797

llvm-svn: 262581

8 years ago[BranchFolding] Change function name related with merging MMOs. NFC
Junmo Park [Thu, 3 Mar 2016 03:57:20 +0000 (03:57 +0000)]
[BranchFolding] Change function name related with merging MMOs. NFC

Summary:
Removing MMOs is not our prefer behavior any more.

Reviewers: mcrosier, reames

Differential Revision: http://reviews.llvm.org/D17668

llvm-svn: 262580

8 years agoAMDGPU: Insert two S_NOP instructions for every high level source statement.
Tom Stellard [Thu, 3 Mar 2016 03:53:29 +0000 (03:53 +0000)]
AMDGPU: Insert two S_NOP instructions for every high level source statement.

Patch by: Konstantin Zhuravlyov

Summary: Tools, such as debugger, need to pause execution based on user input (i.e. breakpoint). In order to do this, two S_NOP instructions are inserted for each high level source statement: one before first isa instruction of high level source statement, and one after last isa instruction of high level source statement. Further, debugger may replace S_NOP instructions with S_TRAP instructions based on user input.

Reviewers: tstellarAMD, arsenm

Subscribers: echristo, dblaikie, arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D17454

llvm-svn: 262579

8 years ago[OPENMP 4.5] Initial support for data members in 'linear' clause.
Alexey Bataev [Thu, 3 Mar 2016 03:52:24 +0000 (03:52 +0000)]
[OPENMP 4.5] Initial support for data members in 'linear' clause.

OpenMP 4.5 allows to privatize data members of current class in member
functions. Patch adds initial support for privatization of data members
in 'linear' clause, no codegen support.

llvm-svn: 262578

8 years agoAMDGPU/SI: Don't try to move scratch wave offset when there are no free SGPRs
Tom Stellard [Thu, 3 Mar 2016 03:45:09 +0000 (03:45 +0000)]
AMDGPU/SI: Don't try to move scratch wave offset when there are no free SGPRs

Summary:
When there were no free SGPRs, we were trying to move this value into
some of the reserved registers which was causing a segmentation fault.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D17590

llvm-svn: 262577

8 years agoCaught and fixed a typo in r262572.
Sean Callanan [Thu, 3 Mar 2016 02:22:05 +0000 (02:22 +0000)]
Caught and fixed a typo in r262572.

I should have checked and imported D's in-class initializer.
Instead I accidentally used ToField's in-class initializer,
which is always NULL so ToField will never get one.

<rdar://problem/24943405>

llvm-svn: 262576

8 years ago[X86] Enable forwarding bool arguments in tail calls (PR26305)
Hans Wennborg [Thu, 3 Mar 2016 02:06:32 +0000 (02:06 +0000)]
[X86] Enable forwarding bool arguments in tail calls (PR26305)

The code was previously not able to track a boolean argument
at a call site back to the formal argument of the caller.

Differential Revision: http://reviews.llvm.org/D17786

llvm-svn: 262575

8 years agoInline a trivial CMakeLists.txt.
Rui Ueyama [Thu, 3 Mar 2016 01:56:23 +0000 (01:56 +0000)]
Inline a trivial CMakeLists.txt.

llvm-svn: 262574

8 years ago[PPCVSXFMAMutate] Temporarily disable this pass
Tim Shen [Thu, 3 Mar 2016 01:27:35 +0000 (01:27 +0000)]
[PPCVSXFMAMutate] Temporarily disable this pass

llvm-svn: 262573

8 years agoFixed a problem where the ASTImporter mishandled in-class initializers.
Sean Callanan [Thu, 3 Mar 2016 01:21:28 +0000 (01:21 +0000)]
Fixed a problem where the ASTImporter mishandled in-class initializers.

Previously, the ASTImporter, when copying a FieldDecl, would make the
new FieldDecl use the exact same in-class initializer as the original
FieldDecl, which is a problem since the initializer is in the wrong AST.
The initializer must be imported, just like all the other parts of the
field.

Doug Gregor reviewed this fix.

<rdar://problem/24943405>

llvm-svn: 262572

8 years ago[MBP] Renaming a confusing variable and add clarifying comments
Philip Reames [Thu, 3 Mar 2016 00:58:43 +0000 (00:58 +0000)]
[MBP] Renaming a confusing variable and add clarifying comments

Was discussed as part of http://reviews.llvm.org/D17830

llvm-svn: 262571

8 years agoFix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other...
Eugene Zelenko [Thu, 3 Mar 2016 00:51:40 +0000 (00:51 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

llvm-svn: 262570

8 years agoSimplify string operations. NFC.
Rui Ueyama [Thu, 3 Mar 2016 00:51:23 +0000 (00:51 +0000)]
Simplify string operations. NFC.

llvm-svn: 262569

8 years agoUse StringRef member function instead of including StringExtras.h
Rui Ueyama [Thu, 3 Mar 2016 00:51:21 +0000 (00:51 +0000)]
Use StringRef member function instead of including StringExtras.h

llvm-svn: 262568

8 years ago[lanai] Fixing file path used in test
Jacques Pienaar [Thu, 3 Mar 2016 00:30:02 +0000 (00:30 +0000)]
[lanai] Fixing file path used in test

llvm-svn: 262567

8 years agoDon't build source/Plugins/Process/Linux in the Xcode project file.
Jason Molenda [Thu, 3 Mar 2016 00:21:32 +0000 (00:21 +0000)]
Don't build source/Plugins/Process/Linux in the Xcode project file.
These files won't build for ios etc arm builds of lldb and aren't
used for macosx native lldb's.

http://reviews.llvm.org/D17750
<rdar://problem/24287153>

llvm-svn: 262566

8 years agoThis patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.
Ekaterina Romanova [Thu, 3 Mar 2016 00:20:11 +0000 (00:20 +0000)]
This patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

llvm-svn: 262565

8 years agoSerialize `pragma pointers_to_members` state.
Nico Weber [Thu, 3 Mar 2016 00:17:35 +0000 (00:17 +0000)]
Serialize `pragma pointers_to_members` state.

Like r262539, but for pointers_to_members.

llvm-svn: 262552

8 years agoImprove some infrastructure for extended parameter infos and
John McCall [Thu, 3 Mar 2016 00:10:03 +0000 (00:10 +0000)]
Improve some infrastructure for extended parameter infos and
fix a bug with the instantiation of ns_consumed parameter
attributes in ARC.

llvm-svn: 262551

8 years agoAllow joined options to fix http://llvm.org/pr26730.
Rui Ueyama [Thu, 3 Mar 2016 00:09:02 +0000 (00:09 +0000)]
Allow joined options to fix llvm.org/pr26730.

llvm-svn: 262550

8 years agoTargetSchedule: Allow explicit Unsupported markers in InstRW
Matthias Braun [Thu, 3 Mar 2016 00:05:07 +0000 (00:05 +0000)]
TargetSchedule: Allow explicit Unsupported markers in InstRW

llvm-svn: 262549

8 years agoTableGen: Accept itinerary data when checking for schedmodel completeness
Matthias Braun [Thu, 3 Mar 2016 00:04:59 +0000 (00:04 +0000)]
TableGen: Accept itinerary data when checking for schedmodel completeness

llvm-svn: 262548

8 years ago[MBP] Avoid placing random blocks between loop preheader and header
Philip Reames [Thu, 3 Mar 2016 00:01:42 +0000 (00:01 +0000)]
[MBP] Avoid placing random blocks between loop preheader and header

If we have a loop with a rarely taken path, we will prune that from the blocks which get added as part of the loop chain. The problem is that we weren't then recognizing the loop chain as schedulable when considering the preheader when forming the function chain. We'd then fall to various non-predecessors before finally scheduling the loop chain (as if the CFG was unnatural.) The net result was that there could be lots of garbage between a loop preheader and the loop, even though we could have directly fallen into the loop. It also meant we separated hot code with regions of colder code.

The particular reason for the rejection of the loop chain was that we were scanning predecessor of the header, seeing the backedge, believing that was a globally more important predecessor (true), but forgetting to account for the fact the backedge precessor was already part of the existing loop chain (oops!.

Differential Revision: http://reviews.llvm.org/D17830

llvm-svn: 262547

8 years ago[X86] Don't give catch objects a displacement of zero
David Majnemer [Thu, 3 Mar 2016 00:01:25 +0000 (00:01 +0000)]
[X86] Don't give catch objects a displacement of zero

Catch objects with a displacement of zero do not initialize a catch
object.  The displacement is relative to %rsp at the end of the
function's prologue for x86_64 targets.

If we place an object at the top-of-stack, we will end up wit a
displacement of zero resulting in our catch object remaining
uninitialized.

Address this by creating our catch objects as fixed objects.  We will
ensure that the UnwindHelp object is created after the catch objects so
that no catch object will have a displacement of zero.

Differential Revision: http://reviews.llvm.org/D17823

llvm-svn: 262546

8 years agoAdd SymbolFilePDB to xcode project file to keep it
Jason Molenda [Wed, 2 Mar 2016 23:39:59 +0000 (23:39 +0000)]
Add SymbolFilePDB to xcode project file to keep it
up to date after 4262528.

llvm-svn: 262543