platform/upstream/llvm.git
8 years agoIslNodeBuilder: Make finalize() virtual
Tobias Grosser [Mon, 25 Jul 2016 09:15:57 +0000 (09:15 +0000)]
IslNodeBuilder: Make finalize() virtual

This allows the finalization routine of the IslNodeBuilder to be overwritten
by derived classes. Being here, we also drop the unnecessary 'Scop' postfix
and the unnecessary 'Scop' parameter.

llvm-svn: 276622

8 years agoGPURuntime: Check for debug-mode early on
Tobias Grosser [Mon, 25 Jul 2016 09:15:53 +0000 (09:15 +0000)]
GPURuntime: Check for debug-mode early on

Before this change, the debug statements in polly_initDevice would all be
skipped, as debug-mode would only be enabled _after_ they have already been run.

llvm-svn: 276621

8 years ago[clang-rename] fix typos in tests
Kirill Bobyrev [Mon, 25 Jul 2016 08:56:11 +0000 (08:56 +0000)]
[clang-rename] fix typos in tests

TemplateFunctionFindBy{Declaration|Use}.cpp contained typos and therefore were
failing. clang-rename passes these tests after typos are fixed.

llvm-svn: 276620

8 years ago[ELF] - Linkerscript: implemented output section [address] attribute.
George Rimar [Mon, 25 Jul 2016 08:29:46 +0000 (08:29 +0000)]
[ELF] - Linkerscript: implemented output section [address] attribute.

Output section description in SECTIONS looks like that:

section [address] [(type)] :
...
{
...
}

Patch implements support of address atribute.

Differential revision: https://reviews.llvm.org/D22689

llvm-svn: 276619

8 years agoUpdate description for CLANG_DEFAULT_CXX_STDLIB and add comment. NFC
Jonas Hahnfeld [Mon, 25 Jul 2016 08:04:26 +0000 (08:04 +0000)]
Update description for CLANG_DEFAULT_CXX_STDLIB and add comment. NFC

We agreed to call it "platform default" instead of "architecture default".
(see D17286)

llvm-svn: 276618

8 years agoGPURuntime: Drop timing functionality (some leftover II)
Tobias Grosser [Mon, 25 Jul 2016 08:03:08 +0000 (08:03 +0000)]
GPURuntime: Drop timing functionality (some leftover II)

llvm-svn: 276617

8 years ago[NFC] Refactor creation of the BLIS mirco-kernel and improve documentation
Roman Gareev [Mon, 25 Jul 2016 07:27:59 +0000 (07:27 +0000)]
[NFC] Refactor creation of the BLIS mirco-kernel and improve documentation

Reviewed-by: Tobias Grosser <tobias@grosser.es>
llvm-svn: 276616

8 years ago[AVX512] Add load folding support for the unmasked forms of the FMA instructions.
Craig Topper [Mon, 25 Jul 2016 07:20:35 +0000 (07:20 +0000)]
[AVX512] Add load folding support for the unmasked forms of the FMA instructions.

llvm-svn: 276615

8 years ago[AVX512] Add some additional patterns so that we can fold broadcast loads in the...
Craig Topper [Mon, 25 Jul 2016 07:20:31 +0000 (07:20 +0000)]
[AVX512] Add some additional patterns so that we can fold broadcast loads in the first argument of an FMADD/FMSUB/FNMADD/FNMSUB/FMADDSUB/FMSUBADD node. Also add patterns to support all combinations of the broadcast input and the preserved input for masked versions.

llvm-svn: 276614

8 years ago[AVX512] Cleanup FMA operand order in patterns to match the VEX versions and to reall...
Craig Topper [Mon, 25 Jul 2016 07:20:28 +0000 (07:20 +0000)]
[AVX512] Cleanup FMA operand order in patterns to match the VEX versions and to really be 213, 231, and 132.

llvm-svn: 276613

8 years agoGPURuntime: Drop timing functionality (some leftover)
Tobias Grosser [Mon, 25 Jul 2016 07:11:49 +0000 (07:11 +0000)]
GPURuntime: Drop timing functionality (some leftover)

llvm-svn: 276612

8 years agoGPURuntime: Drop timing functionality
Tobias Grosser [Mon, 25 Jul 2016 07:10:45 +0000 (07:10 +0000)]
GPURuntime: Drop timing functionality

This functionality won't be used in the current iteration. Drop it for now to
reduce the surface of the library. We can always add it back in when we need
it again.

llvm-svn: 276611

8 years agoCleanup : Reformat PartialInliner.cpp to have current LLVM style conventions
Sean Silva [Mon, 25 Jul 2016 05:57:59 +0000 (05:57 +0000)]
Cleanup : Reformat PartialInliner.cpp to have current LLVM style conventions

Modify the variable names and code style to be that of modern LLVM.

Patch by River Riddle!

Differential Revision: https://reviews.llvm.org/D22743

llvm-svn: 276610

8 years agoFix : Partial Inliner requires AssumptionCacheTracker
Sean Silva [Mon, 25 Jul 2016 05:00:00 +0000 (05:00 +0000)]
Fix : Partial Inliner requires AssumptionCacheTracker

The public InlineFunction utility assumes that the passed in
InlineFunctionInfo has a valid AssumptionCacheTracker.

Patch by River Riddle!

Differential Revision: https://reviews.llvm.org/D22706

llvm-svn: 276609

8 years agoRemove use of C++1z static assert in C++11 test
Eric Fiselier [Mon, 25 Jul 2016 04:56:32 +0000 (04:56 +0000)]
Remove use of C++1z static assert in C++11 test

llvm-svn: 276608

8 years agoUpdate test to account for r276604
David Majnemer [Mon, 25 Jul 2016 04:47:45 +0000 (04:47 +0000)]
Update test to account for r276604

llvm-svn: 276607

8 years ago[MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32
David Majnemer [Mon, 25 Jul 2016 04:47:44 +0000 (04:47 +0000)]
[MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32

Paths like C:/foo will never work on UNIX platforms, don't bother
implicitly adding them to the search path.

llvm-svn: 276606

8 years agoImplement the std::pair parts of "Improving pair and tuple". Completes N4387.
Eric Fiselier [Mon, 25 Jul 2016 04:32:07 +0000 (04:32 +0000)]
Implement the std::pair parts of "Improving pair and tuple". Completes N4387.

llvm-svn: 276605

8 years ago[InstSimplify] Fold trunc([zs]ext(%V)) -> %V
David Majnemer [Mon, 25 Jul 2016 03:39:21 +0000 (03:39 +0000)]
[InstSimplify] Fold trunc([zs]ext(%V)) -> %V

Truncates can completely cancel out a zext or sext instruction.

llvm-svn: 276604

8 years agoRecommit r276548 - Make pair/tuples assignment operators SFINAE properly.
Eric Fiselier [Mon, 25 Jul 2016 02:36:42 +0000 (02:36 +0000)]
Recommit r276548 - Make pair/tuples assignment operators SFINAE properly.

I think I've solved issues with is_assignable and references to incomplete
types. The updated patch adds tests for this case.

llvm-svn: 276603

8 years ago[GVNHoist] Merge metadata on hoisted instructions less conservatively
David Majnemer [Mon, 25 Jul 2016 02:21:25 +0000 (02:21 +0000)]
[GVNHoist] Merge metadata on hoisted instructions less conservatively

We can combine metadata from multiple instructions intelligently for
certain metadata nodes.

llvm-svn: 276602

8 years ago[GVNHoist] Properly merge alignments when hoisting
David Majnemer [Mon, 25 Jul 2016 02:21:23 +0000 (02:21 +0000)]
[GVNHoist] Properly merge alignments when hoisting

If we two loads of two different alignments, we must use the minimum of
the two alignments when hoisting.  Same deal for stores.

For allocas, use the maximum of the two allocas.

llvm-svn: 276601

8 years ago[Utils] Simplify combineMetadata
David Majnemer [Mon, 25 Jul 2016 02:21:19 +0000 (02:21 +0000)]
[Utils] Simplify combineMetadata

Use a range-based for loop, no functional change is intended.

llvm-svn: 276600

8 years agoMake std::is_assignable tolerate references to incomplete types.
Eric Fiselier [Mon, 25 Jul 2016 02:08:55 +0000 (02:08 +0000)]
Make std::is_assignable tolerate references to incomplete types.

llvm-svn: 276599

8 years agoRevert r276548 - Make pair/tuples assignment operators SFINAE properly.
Eric Fiselier [Mon, 25 Jul 2016 01:45:07 +0000 (01:45 +0000)]
Revert r276548 - Make pair/tuples assignment operators SFINAE properly.

This is a breaking change. The SFINAE required is instantiated the second
the class is instantiated, and this can cause hard SFINAE errors
when applied to references to incomplete types. Ex.

struct IncompleteType;
extern IncompleteType it;
std::tuple<IncompleteType&> t(it); // SFINAE will blow up.

llvm-svn: 276598

8 years agoUntabify.
NAKAMURA Takumi [Mon, 25 Jul 2016 00:59:51 +0000 (00:59 +0000)]
Untabify.

llvm-svn: 276597

8 years agoTrailing whitespace.
NAKAMURA Takumi [Mon, 25 Jul 2016 00:59:46 +0000 (00:59 +0000)]
Trailing whitespace.

llvm-svn: 276596

8 years agoMake dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
Eric Fiselier [Mon, 25 Jul 2016 00:50:32 +0000 (00:50 +0000)]
Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com

llvm-svn: 276595

8 years agoDon't SFINAE pair's copy assignment operator in C++03 mode.
Eric Fiselier [Mon, 25 Jul 2016 00:48:36 +0000 (00:48 +0000)]
Don't SFINAE pair's copy assignment operator in C++03 mode.

In C++03 mode evaluating the SFINAE can cause a hard error due to
access control violations. This is a problem because the SFINAE
is evaluated as soon as the class is instantiated, and not later.

llvm-svn: 276594

8 years agoMark bucket_count() assertions as non-portable. Patch from STL@microsoft.com
Eric Fiselier [Mon, 25 Jul 2016 00:26:41 +0000 (00:26 +0000)]
Mark bucket_count() assertions as non-portable. Patch from STL@microsoft.com

llvm-svn: 276593

8 years ago[ELF] Fix the semantic of PROVIDE in linker scripts.
Davide Italiano [Mon, 25 Jul 2016 00:25:18 +0000 (00:25 +0000)]
[ELF] Fix the semantic of PROVIDE in linker scripts.

PROVIDE request us to define a symbol only if it is referenced and is
not defined by any object included in the link. We created the
symbol in the symbol table no matter what.

Differential Revision:  https://reviews.llvm.org/D22739

llvm-svn: 276592

8 years agoMake move_assign_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
Eric Fiselier [Mon, 25 Jul 2016 00:18:12 +0000 (00:18 +0000)]
Make move_assign_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com

llvm-svn: 276591

8 years agoMake swap_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com.
Eric Fiselier [Mon, 25 Jul 2016 00:15:29 +0000 (00:15 +0000)]
Make swap_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com.

See D21820 for more information (https://reviews.llvm.org/D21820).

llvm-svn: 276590

8 years agoWork around MSVC's non-standard ABI for enums. Patch from STL@microsoft.com
Eric Fiselier [Mon, 25 Jul 2016 00:02:23 +0000 (00:02 +0000)]
Work around MSVC's non-standard ABI for enums. Patch from STL@microsoft.com

llvm-svn: 276589

8 years agoFix a non-standard allocator in vector tests. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:49:42 +0000 (23:49 +0000)]
Fix a non-standard allocator in vector tests. Patch from STL@microsoft.com

llvm-svn: 276588

8 years agoFix unique_ptr.runtime tests for null inputs. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:48:26 +0000 (23:48 +0000)]
Fix unique_ptr.runtime tests for null inputs. Patch from STL@microsoft.com

llvm-svn: 276587

8 years agoSimplify. NFC.
Rui Ueyama [Sun, 24 Jul 2016 23:47:31 +0000 (23:47 +0000)]
Simplify. NFC.

llvm-svn: 276586

8 years agoFix portability issues in <random> tests. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:36:18 +0000 (23:36 +0000)]
Fix portability issues in <random> tests. Patch from STL@microsoft.com

llvm-svn: 276585

8 years agoMark bucket() assertions as non-portable. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:34:18 +0000 (23:34 +0000)]
Mark bucket() assertions as non-portable. Patch from STL@microsoft.com

llvm-svn: 276584

8 years agoFix MSVC unreferenced parameter warning. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:32:48 +0000 (23:32 +0000)]
Fix MSVC unreferenced parameter warning. Patch from STL@microsoft.com

llvm-svn: 276583

8 years ago[ELF] Move linker script tests to a subdirectory. NFCI.
Davide Italiano [Sun, 24 Jul 2016 23:29:18 +0000 (23:29 +0000)]
[ELF] Move linker script tests to a subdirectory. NFCI.

llvm-svn: 276582

8 years agoMake move_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:19:51 +0000 (23:19 +0000)]
Make move_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com

llvm-svn: 276581

8 years agoMake bucket_count() greater-equal assertions portable. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:16:37 +0000 (23:16 +0000)]
Make bucket_count() greater-equal assertions portable. Patch from STL@microsoft.com

llvm-svn: 276580

8 years ago[ELF] Support PROVIDE/PROVIDE_HIDDEN inside output sections description.
Davide Italiano [Sun, 24 Jul 2016 23:13:48 +0000 (23:13 +0000)]
[ELF] Support PROVIDE/PROVIDE_HIDDEN inside output sections description.

Differential Revision:  https://reviews.llvm.org/D22738

llvm-svn: 276579

8 years agoMark bucket_size() assertions as non-portible. Patch from STL@microsoft.com
Eric Fiselier [Sun, 24 Jul 2016 23:13:36 +0000 (23:13 +0000)]
Mark bucket_size() assertions as non-portible. Patch from STL@microsoft.com

llvm-svn: 276578

8 years ago[Sema] Replace mem_fn with lambdas. NFC.
George Burgess IV [Sun, 24 Jul 2016 23:12:40 +0000 (23:12 +0000)]
[Sema] Replace mem_fn with lambdas. NFC.

I'm told that some optimizers like lambdas a lot more than mem_fn.
Given that the readability difference is basically nil, and we seem to
use lambdas basically everywhere else, it seems sensible to just use
lambdas.

llvm-svn: 276577

8 years agoGuard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL@micro...
Eric Fiselier [Sun, 24 Jul 2016 23:08:21 +0000 (23:08 +0000)]
Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL@microsoft.com

llvm-svn: 276576

8 years agoMerge readSymbolAssignment with readAssignment. NFC.
Rui Ueyama [Sun, 24 Jul 2016 23:05:57 +0000 (23:05 +0000)]
Merge readSymbolAssignment with readAssignment. NFC.

llvm-svn: 276575

8 years agoMake readExpr return an Expr object instead of a vector of tokens.
Rui Ueyama [Sun, 24 Jul 2016 18:19:40 +0000 (18:19 +0000)]
Make readExpr return an Expr object instead of a vector of tokens.

Previously, we handled an expression as a vector of tokens. In other
words, an expression was a vector of uncooked raw StringRefs.
When we need a value of an expression, we used ExprParser to run
the expression.

The separation was needed essentially because parse time is too
early to evaluate an expression. In order to evaluate an expression,
we need to finalize section sizes. Because linker script parsing
is done at very early stage of the linking process, we can't
evaluate expressions while parsing.

The above mechanism worked fairly well, but there were a few
drawbacks.

One thing is that we sometimes have to parse the same expression
more than once in order to find the end of the expression.
In some contexts, linker script expressions have no clear end marker.
So, we needed to recognize balanced expressions and ternary operators.

The other is poor error reporting. Since expressions are parsed
basically twice, and some information that is available at the first
stage is lost in the second stage, it was hard to print out
apprpriate error messages.

This patch fixes the issues with a new approach.

Now the expression parsing is integrated into ScriptParser.
ExprParser class is removed. Expressions are represented as lambdas
instead of vectors of tokens. Lambdas captures information they
need to run themselves when they are created.

In this way, ends of expressions are naturally detected, and
errors are handled in the usual way. This patch also reduces
the amount of code.

Differential Revision: https://reviews.llvm.org/D22728

llvm-svn: 276574

8 years ago[Driver] Switch some getenv calls to llvm::sys::Process::GetEnv
David Majnemer [Sun, 24 Jul 2016 17:44:03 +0000 (17:44 +0000)]
[Driver] Switch some getenv calls to llvm::sys::Process::GetEnv

No functional change is intended.

llvm-svn: 276573

8 years ago[CommandLine] Use Process::GetEnv instead of _wgetenv
David Majnemer [Sun, 24 Jul 2016 17:19:59 +0000 (17:19 +0000)]
[CommandLine] Use Process::GetEnv instead of _wgetenv

Process::GetEnv does the right thing across our platforms.
CommandLine.cpp had, more or less, the same logic.  Let's remove the
duplication.

No functional change is intended.

llvm-svn: 276572

8 years ago[X86][SSE] Added PR27854 tests
Simon Pilgrim [Sun, 24 Jul 2016 16:39:50 +0000 (16:39 +0000)]
[X86][SSE] Added PR27854 tests

llvm-svn: 276571

8 years ago[X86] Add shift double tests for PR14593
Simon Pilgrim [Sun, 24 Jul 2016 16:10:21 +0000 (16:10 +0000)]
[X86] Add shift double tests for PR14593

llvm-svn: 276570

8 years ago[X86] Add 'FeatureSlowSHLD' to cpu 'bdver4'
Simon Pilgrim [Sun, 24 Jul 2016 16:00:53 +0000 (16:00 +0000)]
[X86] Add 'FeatureSlowSHLD' to cpu 'bdver4'

As with all AMD CPUs, excavator has poor SHLD/SHRD performance. Also added bdver3 to the test as it was missing.

llvm-svn: 276569

8 years ago[X86] Add SHRD shift combine tests
Simon Pilgrim [Sun, 24 Jul 2016 15:47:44 +0000 (15:47 +0000)]
[X86] Add SHRD shift combine tests

llvm-svn: 276568

8 years ago[X86] Regenerate shift by parts tests
Simon Pilgrim [Sun, 24 Jul 2016 15:38:51 +0000 (15:38 +0000)]
[X86] Regenerate shift by parts tests

llvm-svn: 276567

8 years ago[X86][SSE] Regenerate shifts tests
Simon Pilgrim [Sun, 24 Jul 2016 15:25:36 +0000 (15:25 +0000)]
[X86][SSE] Regenerate shifts tests

llvm-svn: 276566

8 years ago[X86][SSE] Regenerate SSE copysign tests
Simon Pilgrim [Sun, 24 Jul 2016 15:17:50 +0000 (15:17 +0000)]
[X86][SSE] Regenerate SSE copysign tests

llvm-svn: 276565

8 years ago[X86] Block pbroadcastq instructions on 32-bit targets instead of pbroadcastb.
Craig Topper [Sun, 24 Jul 2016 14:58:06 +0000 (14:58 +0000)]
[X86] Block pbroadcastq instructions on 32-bit targets instead of pbroadcastb.

Thanks to Simon Pilgrim for catching the mistake.

llvm-svn: 276564

8 years ago[X86][AVX512VL] Added AVX512VL half2float vector conversions tests to demonstrate...
Simon Pilgrim [Sun, 24 Jul 2016 13:01:51 +0000 (13:01 +0000)]
[X86][AVX512VL] Added AVX512VL half2float vector conversions tests to demonstrate PR23941

llvm-svn: 276563

8 years ago[X86] Make the FMA3 instruction names consistent between VEX and EVEX encoded versions.
Craig Topper [Sun, 24 Jul 2016 08:26:38 +0000 (08:26 +0000)]
[X86] Make the FMA3 instruction names consistent between VEX and EVEX encoded versions.

This places the 132/213/231 form number in front of the SS/SD/PS/PD. Move the Y for 256-bit versions to be after the PS/PD. Change the AVX512 scalar forms to include a Z in the their name. This new format should be consistent with the general naming of instructions.

llvm-svn: 276559

8 years agocommit test missing from r276556
Eric Fiselier [Sun, 24 Jul 2016 08:16:37 +0000 (08:16 +0000)]
commit test missing from r276556

llvm-svn: 276558

8 years ago[analyzer] Pring LocationContext in ExplodedGraph dumps.
Artem Dergachev [Sun, 24 Jul 2016 08:15:58 +0000 (08:15 +0000)]
[analyzer] Pring LocationContext in ExplodedGraph dumps.

Remove some FIXMEs in the surrounding code,
which have been addressed long time ago
by introducing checker-specific tags.

Differential Revision: https://reviews.llvm.org/D22622

llvm-svn: 276557

8 years agoAdd __is_inplace_type metafunction helper
Eric Fiselier [Sun, 24 Jul 2016 07:42:13 +0000 (07:42 +0000)]
Add __is_inplace_type metafunction helper

llvm-svn: 276556

8 years ago[X86] Replace CodeGenOnly VPSRAVW/D/Q_Int instructions with patterns since the operan...
Craig Topper [Sun, 24 Jul 2016 07:32:45 +0000 (07:32 +0000)]
[X86] Replace CodeGenOnly VPSRAVW/D/Q_Int instructions with patterns since the operand types exactly match the normal VPSRAVW/D/Q instructions.

llvm-svn: 276555

8 years ago[Loop Vectorizer] Handling loops FP induction variables.
Elena Demikhovsky [Sun, 24 Jul 2016 07:24:54 +0000 (07:24 +0000)]
[Loop Vectorizer] Handling loops FP induction variables.

Allowed loop vectorization with secondary FP IVs. Like this:
float *A;
float x = init;
for (int i=0; i < N; ++i) {
  A[i] = x;
  x -= fp_inc;
}

The auto-vectorization is possible when the induction binary operator is "fast" or the function has "unsafe" attribute.

Differential Revision: https://reviews.llvm.org/D21330

llvm-svn: 276554

8 years ago[MSSA] Make EXPENSIVE_CHECKS check more.
George Burgess IV [Sun, 24 Jul 2016 07:03:49 +0000 (07:03 +0000)]
[MSSA] Make EXPENSIVE_CHECKS check more.

checkClobberSanity will now be run for all results of `ClobberWalk`,
instead of just the crazy phi-optimized ones. This can help us catch
cases where our cache is being wonky.

llvm-svn: 276553

8 years agoStart adding benchmarks for vector
Eric Fiselier [Sun, 24 Jul 2016 06:51:55 +0000 (06:51 +0000)]
Start adding benchmarks for vector

llvm-svn: 276552

8 years agoGPGPU: Optimize kernel IR before generating assembly code
Tobias Grosser [Sun, 24 Jul 2016 06:43:21 +0000 (06:43 +0000)]
GPGPU: Optimize kernel IR before generating assembly code

We optimize the kernel _after_ dumping the IR we generate to make the IR we
dump easier readable and independent of possible changes in the general
purpose LLVM optimizers.

llvm-svn: 276551

8 years agoGPGPU: Verify kernel IR before generating assembly
Tobias Grosser [Sun, 24 Jul 2016 06:43:17 +0000 (06:43 +0000)]
GPGPU: Verify kernel IR before generating assembly

llvm-svn: 276550

8 years agoSkip chash computation in insert/emplace if the unconstrained hash matches.
Eric Fiselier [Sun, 24 Jul 2016 06:22:25 +0000 (06:22 +0000)]
Skip chash computation in insert/emplace if the unconstrained hash matches.

llvm-svn: 276549

8 years agoMake pair/tuples assignment operators SFINAE properly.
Eric Fiselier [Sun, 24 Jul 2016 05:51:11 +0000 (05:51 +0000)]
Make pair/tuples assignment operators SFINAE properly.

llvm-svn: 276548

8 years agoFix memory leak in test.
Eric Fiselier [Sun, 24 Jul 2016 04:41:44 +0000 (04:41 +0000)]
Fix memory leak in test.

llvm-svn: 276547

8 years agoImplement LWG 2393. Check for LValue-callability.
Eric Fiselier [Sun, 24 Jul 2016 04:16:40 +0000 (04:16 +0000)]
Implement LWG 2393. Check for LValue-callability.

llvm-svn: 276546

8 years agoImplement LWG2328. Rvalue stream extraction should perfect forward.
Eric Fiselier [Sun, 24 Jul 2016 04:07:22 +0000 (04:07 +0000)]
Implement LWG2328. Rvalue stream extraction should perfect forward.

llvm-svn: 276545

8 years agoImplement P0040r3: Extending memory management tools
Eric Fiselier [Sun, 24 Jul 2016 03:51:39 +0000 (03:51 +0000)]
Implement P0040r3: Extending memory management tools

llvm-svn: 276544

8 years agoRollback r276538 and r276540 to unbreak asan bot.
Rui Ueyama [Sun, 24 Jul 2016 02:05:09 +0000 (02:05 +0000)]
Rollback r276538 and r276540 to unbreak asan bot.

llvm-svn: 276543

8 years ago[MSSA] Remove useless assert. NFC.
George Burgess IV [Sun, 24 Jul 2016 01:50:07 +0000 (01:50 +0000)]
[MSSA] Remove useless assert. NFC.

liveOnEntry is always a MemoryDef; asserting that a MemoryPhi isn't
liveOnEntry, while correct, isn't very helpful. :)

llvm-svn: 276542

8 years agoRevert r276539 "Silence -Wpointer-bool-conversion warning after r276324"
Bruno Cardoso Lopes [Sun, 24 Jul 2016 01:27:07 +0000 (01:27 +0000)]
Revert r276539 "Silence -Wpointer-bool-conversion warning after r276324"

Some bots are not happy with the change.
This reverts commit d307ca28083065851ad969444f3c063562f2d4bd.

llvm-svn: 276541

8 years agoSimplify. NFC.
Rui Ueyama [Sun, 24 Jul 2016 01:18:18 +0000 (01:18 +0000)]
Simplify. NFC.

llvm-svn: 276540

8 years agoSilence -Wpointer-bool-conversion warning after r276324
Bruno Cardoso Lopes [Sun, 24 Jul 2016 01:09:03 +0000 (01:09 +0000)]
Silence -Wpointer-bool-conversion warning after r276324

sanitizer_common_interceptors.inc:667:12: warning: address of function 'memchr' will always evaluate to 'true' [-Wpointer-bool-conversion]
  if (REAL(memchr)) {
  ~~       ^~~~~~

llvm-svn: 276539

8 years agoSplit LinkerScript::createSections.
Rui Ueyama [Sun, 24 Jul 2016 01:06:18 +0000 (01:06 +0000)]
Split LinkerScript::createSections.

createSections is getting longer, so it is probably time to split.

Differential Revision: https://reviews.llvm.org/D22730

llvm-svn: 276538

8 years agoImplement the in_place tags from p0032r3.
Eric Fiselier [Sat, 23 Jul 2016 22:19:19 +0000 (22:19 +0000)]
Implement the in_place tags from p0032r3.

That paper also has changes to any/optional but those will
be implemented later.

llvm-svn: 276537

8 years ago[ELF/Linkerscript] Define an absolute if we find an undefined.
Davide Italiano [Sat, 23 Jul 2016 22:09:04 +0000 (22:09 +0000)]
[ELF/Linkerscript] Define an absolute if we find an undefined.

Otherwhise undefined references to symbols defined in linker scripts
are never resolved.

Differential Revision:  https://reviews.llvm.org/D22664

llvm-svn: 276536

8 years ago[X86][SSE] Added float widened broadcast tests
Simon Pilgrim [Sat, 23 Jul 2016 21:24:02 +0000 (21:24 +0000)]
[X86][SSE] Added float widened broadcast tests

llvm-svn: 276535

8 years ago[X86][SSE] Added more widened broadcast tests
Simon Pilgrim [Sat, 23 Jul 2016 21:15:31 +0000 (21:15 +0000)]
[X86][SSE] Added more widened broadcast tests

Added more vXi16 and vXi8 tests

llvm-svn: 276534

8 years agoFix undefined behavior in __hash_table
Eric Fiselier [Sat, 23 Jul 2016 20:36:55 +0000 (20:36 +0000)]
Fix undefined behavior in __hash_table

Summary:
This patch attempts to fix the undefined behavior in __hash_table by changing the node pointer types used throughout. The pointer types are changed for raw pointers in the current ABI and for fancy pointers in ABI V2 (since the fancy pointer types may not be ABI compatible).

The UB in `__hash_table` arises because tree downcasts the embedded end node and then deferences that pointer. Currently there are 2 node types in __hash_table:

* `__hash_node_base` which contains the `__next_` pointer.
* `__hash_node` which contains `__hash_` and `__value_`.

Currently the bucket list, iterators, and `__next_` pointers store pointers to `__hash_node` even though they all need to store `__hash_node_base` pointers.
This patch makes that change by introducing a `__next_pointer` typedef which is a pointer to `__hash_node` in the current ABI and `__hash_node_base` afterwards.

One notable change is to the type of `__bucket_list` which used to be defined as `unique_ptr<__node_pointer[], ...>` and is now `unique_ptr<__next_pointer[], ...>` meaning that we now allocate and deallocate different types using a different allocator. I'm going to give this part of the change more thought since it may introduce compatibility issues.

This change is similar to D20786.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D20787

llvm-svn: 276533

8 years agoChange some more llvm highlighting instances to be text instead. It seems that Pygmen...
Aaron Ballman [Sat, 23 Jul 2016 20:11:21 +0000 (20:11 +0000)]
Change some more llvm highlighting instances to be text instead. It seems that Pygment does not handle "token" or "none" yet, and this caused the documentation bot to go red.

Patch by Gor Nishanov.

llvm-svn: 276532

8 years agoSwitching the highlighting from llvm to none in an attempt to appease the build bot...
Aaron Ballman [Sat, 23 Jul 2016 18:53:35 +0000 (18:53 +0000)]
Switching the highlighting from llvm to none in an attempt to appease the build bot (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11984/steps/docs-llvm-html/logs/stdio).

llvm-svn: 276531

8 years agoRemoves a warning about duplicate label named _strings from CommandLine.rst.
Aaron Ballman [Sat, 23 Jul 2016 18:52:21 +0000 (18:52 +0000)]
Removes a warning about duplicate label named _strings from CommandLine.rst.

llvm-svn: 276530

8 years agoCODE_OWNERS: Take ownership of the MIPS backend
Simon Dardis [Sat, 23 Jul 2016 17:40:48 +0000 (17:40 +0000)]
CODE_OWNERS: Take ownership of the MIPS backend

As agreed with Daniel Sanders, I'm taking over as code owner
for the MIPS backend.

llvm-svn: 276529

8 years ago[X86] Fix typo in comment.
Craig Topper [Sat, 23 Jul 2016 16:44:08 +0000 (16:44 +0000)]
[X86] Fix typo in comment.

llvm-svn: 276528

8 years ago[X86][SSE] Added tests where we should be trying to widen a load+splat into a broadcast
Simon Pilgrim [Sat, 23 Jul 2016 16:19:17 +0000 (16:19 +0000)]
[X86][SSE] Added tests where we should be trying to widen a load+splat into a broadcast

llvm-svn: 276527

8 years ago[X86][SSE] Regenerated uitofp <2 x i32> -> <2 x float> conversion tests
Simon Pilgrim [Sat, 23 Jul 2016 15:55:42 +0000 (15:55 +0000)]
[X86][SSE] Regenerated uitofp <2 x i32> -> <2 x float> conversion tests

Demonstrate difference in codegen discussed on PR14760

llvm-svn: 276526

8 years agoRemove Phdr typedef.
Rui Ueyama [Sat, 23 Jul 2016 14:18:48 +0000 (14:18 +0000)]
Remove Phdr typedef.

I don't think this typedef contributes to readability.

llvm-svn: 276525

8 years agoMake a pure function a non-member file-scoped function.
Rui Ueyama [Sat, 23 Jul 2016 14:09:58 +0000 (14:09 +0000)]
Make a pure function a non-member file-scoped function.

llvm-svn: 276524

8 years ago[InstCombine] allow icmp (bit-manipulation-intrinsic(), C) folds for vectors
Sanjay Patel [Sat, 23 Jul 2016 13:06:49 +0000 (13:06 +0000)]
[InstCombine] allow icmp (bit-manipulation-intrinsic(), C) folds for vectors

llvm-svn: 276523

8 years agoFix a GCC error due to this member name also being a type name. This
Chandler Carruth [Sat, 23 Jul 2016 07:50:05 +0000 (07:50 +0000)]
Fix a GCC error due to this member name also being a type name. This
should fix the build with GCC 4.9 at least. Not sure if this is the
right name or fix, but I've followed up on the original commit.

llvm-svn: 276522

8 years ago[AVX512] Implement commuting support for EVEX encoded FMA3 instructions.
Craig Topper [Sat, 23 Jul 2016 07:16:56 +0000 (07:16 +0000)]
[AVX512] Implement commuting support for EVEX encoded FMA3 instructions.

llvm-svn: 276521

8 years ago[X86] Make one of the FMA3 commuting methods static. Remove a call to isFMA3 just...
Craig Topper [Sat, 23 Jul 2016 07:16:53 +0000 (07:16 +0000)]
[X86] Make one of the FMA3 commuting methods static. Remove a call to isFMA3 just to get the IsIntrisic flag, instead get it during the first call and pass it along. NFC

llvm-svn: 276520