OSDN Git Service

android-x86/external-llvm.git
7 years ago[IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warning...
Eugene Zelenko [Mon, 5 Dec 2016 21:55:02 +0000 (21:55 +0000)]
[IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warnings; other minor fixes (NFC).

Also remove obsolete comment from CommandLine.h spotted by Malcolm Parsons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288714 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: translate constants larger than 64 bits.
Tim Northover [Mon, 5 Dec 2016 21:54:17 +0000 (21:54 +0000)]
GlobalISel: translate constants larger than 64 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288713 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: make G_CONSTANT take a ConstantInt rather than int64_t.
Tim Northover [Mon, 5 Dec 2016 21:47:07 +0000 (21:47 +0000)]
GlobalISel: make G_CONSTANT take a ConstantInt rather than int64_t.

This makes it more similar to the floating-point constant, and also allows for
larger constants to be translated later. There's no real functional change in
this patch though, just syntax updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288712 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: improve translation fallback for constants.
Tim Northover [Mon, 5 Dec 2016 21:40:33 +0000 (21:40 +0000)]
GlobalISel: improve translation fallback for constants.

Returning 0 (NoReg) from getOrCreateVReg leads to unexpected situations later
in the translation. It's better to return a valid (if undefined) register and
let the rest of the instruction carry on as planned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288709 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGlobalISel: handle 1-element aggregates during ABI lowering.
Tim Northover [Mon, 5 Dec 2016 21:25:33 +0000 (21:25 +0000)]
GlobalISel: handle 1-element aggregates during ABI lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288706 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LAA] Prevent invalid IR for loop-invariant bound in loop body
Keno Fischer [Mon, 5 Dec 2016 21:25:03 +0000 (21:25 +0000)]
[LAA] Prevent invalid IR for loop-invariant bound in loop body

Summary:
If LAA expands a bound that is loop invariant, but not hoisted out
of the loop body, it used to use that value anyway, causing a
non-domination error, because the memcheck block is of course not
dominated by the scalar loop body. Detect this situation and expand
the SCEV expression instead.

Fixes PR31251

Reviewers: anemet
Subscribers: mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288705 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Fix non-intrinsic roundss/roundsd to not read the destination register
Michael Kuperstein [Mon, 5 Dec 2016 20:57:37 +0000 (20:57 +0000)]
[X86] Fix non-intrinsic roundss/roundsd to not read the destination register

This changes the scalar non-intrinsic non-avx roundss/sd instruction
definitions not to read their destination register - allowing partial dependency
breaking.

This fixes PR31143.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288703 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Assembler support for exp
Matt Arsenault [Mon, 5 Dec 2016 20:42:41 +0000 (20:42 +0000)]
AMDGPU: Assembler support for exp

compr is not currently parsed (or printed) correctly,
but that should probably be fixed along with
intrinsic changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288698 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Change how exp is printed
Matt Arsenault [Mon, 5 Dec 2016 20:31:49 +0000 (20:31 +0000)]
AMDGPU: Change how exp is printed

This is an improvement over a long list of unreadable numbers.
A follow up patch will try to match how sc formats these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288697 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Refactor exp instructions
Matt Arsenault [Mon, 5 Dec 2016 20:23:10 +0000 (20:23 +0000)]
AMDGPU: Refactor exp instructions

Structure the definitions a bit more like the other classes.

The main change here is to split EXP with the done bit set
to a separate opcode, so we can set mayLoad = 1 so that it won't
be reordered before the other exp stores, since this has the special
constraint that if the done bit is set then this should be the last
exp in she shader.

Previously all exp instructions were inferred to have unmodeled
side effects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288695 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Support custom parsers in parseIntegratedTestScript
Eric Fiselier [Mon, 5 Dec 2016 20:21:21 +0000 (20:21 +0000)]
[lit] Support custom parsers in parseIntegratedTestScript

Summary:
Libc++ frequently has the need to parse more than just the builtin *test keywords* (`RUN`, `REQUIRES`, `XFAIL`, ect). For example libc++ currently needs a new keyword `MODULES-DEFINES: macro list...`. Instead of re-implementing the script parsing in libc++ this patch allows `parseIntegratedTestScript` to take custom parsers.

This patch introduces a new class `IntegratedTestKeywordParser` which implements the logic to parse/process a test keyword. Parsing of various keyword "kinds" are supported out of the box, including 'TAG', 'COMMAND', and 'LIST', which parse keywords such as `END.`, `RUN:` and `XFAIL:` respectively.

As an example after this change libc++ can implement the `MODULES-DEFINES` simply using:
```
mparser = IntegratedTestKeywordParser('MODULES-DEFINES:', ParserKind.LIST)
parseIntegratedTestScript(test, additional_parsers=[mparser])
macro_list = mparser.getValue()
```

Reviewers: ddunbar, modocache, rnk, danalbert, jroelofs

Subscribers: mgrang, llvm-commits, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288694 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/AsmMatcherEmitter: Bring sorting check back under EXPENSIVE_CHECKS
Matthias Braun [Mon, 5 Dec 2016 19:44:31 +0000 (19:44 +0000)]
TableGen/AsmMatcherEmitter: Bring sorting check back under EXPENSIVE_CHECKS

Bring the sorting check back that I removed in r288655 but put it under
EXPENSIVE_CHECKS this time. Also document that this the check isn't
purely about having a sorted list but also about operator < having the
correct transitive behavior.

Apply the same to the other check in the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288693 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Fix typo in the logic used in assert.
Quentin Colombet [Mon, 5 Dec 2016 19:02:37 +0000 (19:02 +0000)]
[AArch64][RegisterBankInfo] Fix typo in the logic used in assert.

Thanks to David Binderman <dcb314@hotmail.com> for bringing it to my
attention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288688 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation
Adrian Prantl [Mon, 5 Dec 2016 18:04:47 +0000 (18:04 +0000)]
[DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation
so we can stop using DW_OP_bit_piece with the wrong semantics.

The entire back story can be found here:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161114/405934.html

The gist is that in LLVM we've been misinterpreting DW_OP_bit_piece's
offset field to mean the offset into the source variable rather than
the offset into the location at the top the DWARF expression stack. In
order to be able to fix this in a subsequent patch, this patch
introduces a dedicated DW_OP_LLVM_fragment operation with the
semantics that we used to apply to DW_OP_bit_piece, which is what we
actually need while inside of LLVM. This patch is complete with a
bitcode upgrade for expressions using the old format. It does not yet
fix the DWARF backend to use DW_OP_bit_piece correctly.

Implementation note: We discussed several options for implementing
this, including reserving a dedicated field in DIExpression for the
fragment size and offset, but using an custom operator at the end of
the expression works just fine and is more efficient because we then
only pay for it when we need it.

Differential Revision: https://reviews.llvm.org/D27361
rdar://problem/29335809

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288683 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[CMake] Fix symlink refactor for multi-configuration generators
Chris Bieneman [Mon, 5 Dec 2016 17:02:11 +0000 (17:02 +0000)]
[CMake] Fix symlink refactor for multi-configuration generators

This fix, while a bit complicated, preserves the reusability while fixing the issues reported on llvm-commits with visual studio generators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288679 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[TargetLowering] add special-case for demanded bits analysis of 'not'
Sanjay Patel [Mon, 5 Dec 2016 15:58:21 +0000 (15:58 +0000)]
[TargetLowering] add special-case for demanded bits analysis of 'not'

We treat bitwise 'not' as a special operation and try not to reduce its all-ones mask.
Presumably, this is because a 'not' may be cheaper than a generic 'xor' or it may get
folded into another logic op if the target has those. However, if we can remove a logic
instruction by changing the xor's constant mask value, that should always be a win.

Note that the IR version of SimplifyDemandedBits() does not treat 'not' as a special-case
currently (although that's marked with a FIXME). So if you run this IR through -instcombine,
you should get the same end result. I'm hoping to add a different backend transform that
will expose this problem though, so I need to solve this first.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288676 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[x86] fold fand (fxor X, -1) Y --> fandn X, Y
Sanjay Patel [Mon, 5 Dec 2016 15:45:27 +0000 (15:45 +0000)]
[x86] fold fand (fxor X, -1) Y --> fandn X, Y

I noticed this gap in the scalar FP-logic matching with:
D26712
and:
rL287171

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288675 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse range based for loop. NFCI.
Simon Pilgrim [Mon, 5 Dec 2016 14:25:04 +0000 (14:25 +0000)]
Use range based for loop. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288671 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PPC] Slightly Improve Assembly Parsing errors and add EOL comment
Nirav Dave [Mon, 5 Dec 2016 14:11:03 +0000 (14:11 +0000)]
[PPC] Slightly Improve Assembly Parsing errors and add EOL comment
parsing tests.

NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288667 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[mips][ias] N32/N64 must not sort the relocation table.
Simon Dardis [Mon, 5 Dec 2016 12:55:19 +0000 (12:55 +0000)]
[mips][ias] N32/N64 must not sort the relocation table.

Doing so changes the evaluation order for relocation composition.

Patch By: Daniel Sanders

Reviewers: vkalintiris, atanasyan

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288666 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Add support for combining target shuffles to UNPCKL/UNPCKH.
Simon Pilgrim [Mon, 5 Dec 2016 11:25:13 +0000 (11:25 +0000)]
[X86][SSE] Add support for combining target shuffles to UNPCKL/UNPCKH.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288663 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Add helper function to create UNPCKL/UNPCKH shuffle masks. NFCI.
Simon Pilgrim [Mon, 5 Dec 2016 11:00:25 +0000 (11:00 +0000)]
[X86][SSE] Add helper function to create UNPCKL/UNPCKH shuffle masks. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288659 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[GlobalISel] Extract handleAssignments out of AArch64CallLowering
Diana Picus [Mon, 5 Dec 2016 10:40:33 +0000 (10:40 +0000)]
[GlobalISel] Extract handleAssignments out of AArch64CallLowering

This function seems target-independent so far: all the target-specific behaviour
is isolated in the CCAssignFn and the ValueHandler (which we're also extracting
into the generic CallLowering).

The intention is to use this in the ARM backend.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288658 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Disassembler: fix s_buffer_store_dword instructions
Sam Kolton [Mon, 5 Dec 2016 09:58:51 +0000 (09:58 +0000)]
[AMDGPU] Disassembler: fix s_buffer_store_dword instructions

Summary: s_buffer_store_dword instructions sdata operand was called sdst in encoding. This caused disassembler to fail.

Reviewers: tstellarAMD, vpykhtin, artem.tamazov

Subscribers: arsenm, nhaehnle, rampitec

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288657 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[cmake] Include component in Sphinx install rules
Michal Gorny [Mon, 5 Dec 2016 09:15:05 +0000 (09:15 +0000)]
[cmake] Include component in Sphinx install rules

Include component in install rules for Sphinx targets. Based on
a similar suggestion for other doc targets in D24935.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288656 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/AsmMatcherEmitter: Trust that stable_sort works
Matthias Braun [Mon, 5 Dec 2016 08:15:57 +0000 (08:15 +0000)]
TableGen/AsmMatcherEmitter: Trust that stable_sort works

A debug build of AsmMatcherEmitter would use a quadratic algorithm to
check whether std::stable_sort() actually sorted. Let's hope the authors
of our C++ standard library did that testing for us. Removing the check
gives a 3x speedup in the X86 case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288655 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Some more std::string->StringInit* replacements
Matthias Braun [Mon, 5 Dec 2016 07:35:13 +0000 (07:35 +0000)]
TableGen: Some more std::string->StringInit* replacements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288653 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/Record: Shortcut member access in hottest function
Matthias Braun [Mon, 5 Dec 2016 07:35:09 +0000 (07:35 +0000)]
TableGen/Record: Shortcut member access in hottest function

This may seem unusual, but makes most debug tblgen builds ~10% faster.
Usually we wouldn't care about speed that much in debug builds, but for
tblgen that also translates into build time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288652 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: TableGenStringKey is no longer necessary as of r288642
Matthias Braun [Mon, 5 Dec 2016 07:04:19 +0000 (07:04 +0000)]
TableGen: TableGenStringKey is no longer necessary as of r288642

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288651 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use range based for; reserve vectors where possible
Matthias Braun [Mon, 5 Dec 2016 07:00:44 +0000 (07:00 +0000)]
TableGen: Use range based for; reserve vectors where possible

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288650 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/TGParser: Prefer SmallVector/ArrayRef over std::vector
Matthias Braun [Mon, 5 Dec 2016 06:41:54 +0000 (06:41 +0000)]
TableGen/TGParser: Prefer SmallVector/ArrayRef over std::vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288649 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/Record: Replace std::vector with SmallVector/ArrayRef
Matthias Braun [Mon, 5 Dec 2016 06:41:51 +0000 (06:41 +0000)]
TableGen/Record: Replace std::vector with SmallVector/ArrayRef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288648 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoListInit::convertInitializerTo: avoid foldingset lookup if nothing changed
Matthias Braun [Mon, 5 Dec 2016 06:41:47 +0000 (06:41 +0000)]
ListInit::convertInitializerTo: avoid foldingset lookup if nothing changed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288647 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Remove unnecessary explicit uses of .SimpleTy just to do an equality comparison...
Craig Topper [Mon, 5 Dec 2016 06:09:55 +0000 (06:09 +0000)]
[X86] Remove unnecessary explicit uses of .SimpleTy just to do an equality comparison. MVT's operator== already takes care of this. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288646 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use StringInit instead of std::string for DagInit arg names
Matthias Braun [Mon, 5 Dec 2016 06:00:46 +0000 (06:00 +0000)]
TableGen: Use StringInit instead of std::string for DagInit arg names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288644 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use StringInit instead of std::string for DagInit name
Matthias Braun [Mon, 5 Dec 2016 06:00:41 +0000 (06:00 +0000)]
TableGen: Use StringInit instead of std::string for DagInit name

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288643 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use more StringInit instead of StringRef
Matthias Braun [Mon, 5 Dec 2016 06:00:36 +0000 (06:00 +0000)]
TableGen: Use more StringInit instead of StringRef

This forces the code to call StringInit::get on the string early and
avoids storing duplicates in std::string and sometimes allows pointer
comparisons instead of string comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288642 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Teach fast isel to handle 512-bit vector bitcasts.
Craig Topper [Mon, 5 Dec 2016 05:50:51 +0000 (05:50 +0000)]
[AVX-512] Teach fast isel to handle 512-bit vector bitcasts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288641 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse Darwin libtool's -no_warning_for_no_symbols if available to silence the "has...
Kuba Mracek [Mon, 5 Dec 2016 05:21:44 +0000 (05:21 +0000)]
Use Darwin libtool's -no_warning_for_no_symbols if available to silence the "has no symbols" link warning

Building compiler-rt on Darwin produces dozens of meaningless warnings about object files having no symbols during static archive creation. This is very intentional as compiler-rt uses #ifdefs to conditionally compile platform-specific code, and we even have a .cpp source file that only contains static asserts to make sure the environment is configured right. On Linux, this situation is fine and no warning is produced. This patch adds a libtool version detection and if it's new enough, we'll use the -no_warning_for_no_symbols flag that suppresses this warning. Build logs should be much cleaner now!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288640 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Factor out STRCONCAT constructor, add shortcut.
Matthias Braun [Mon, 5 Dec 2016 05:21:18 +0000 (05:21 +0000)]
TableGen: Factor out STRCONCAT constructor, add shortcut.

Introduce new constructor for STRCONCAT binop with a shortcut that
immediately concatenates if the two arguments are StringInits.
Makes the QualifyName code more readable and tablegen 2-3% faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288639 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen/Record: Move PointerIntPair to less used field of RecordVal
Matthias Braun [Mon, 5 Dec 2016 05:21:13 +0000 (05:21 +0000)]
TableGen/Record: Move PointerIntPair to less used field of RecordVal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288638 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Adding additional tokenization characters in preparation for removing spaci...
Colin LeMahieu [Mon, 5 Dec 2016 04:52:28 +0000 (04:52 +0000)]
[Hexagon] Adding additional tokenization characters in preparation for removing spacing from syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288637 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Teach fast isel to use masked compare and movss for handling scalar cmp...
Craig Topper [Mon, 5 Dec 2016 04:51:31 +0000 (04:51 +0000)]
[AVX-512] Teach fast isel to use masked compare and movss for handling scalar cmp and select sequence when AVX-512 is enabled. This matches the behavior of normal isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288636 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add avx512f command lines to fast isel SSE select test.
Craig Topper [Mon, 5 Dec 2016 04:51:28 +0000 (04:51 +0000)]
[AVX-512] Add avx512f command lines to fast isel SSE select test.

Currently the fast isel code emits an avx1 instruction sequence even with avx512. This is different than normal isel. A follow up commit will fix this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288635 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Changing from literal numeric value to argument since #-1 will not parse...
Colin LeMahieu [Mon, 5 Dec 2016 04:29:00 +0000 (04:29 +0000)]
[Hexagon] Changing from literal numeric value to argument since #-1 will not parse when '-' is converted to a token.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288634 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[CMake] Refactor add_llvm_tool_symlink for reuse
Chris Bieneman [Mon, 5 Dec 2016 03:28:03 +0000 (03:28 +0000)]
[CMake] Refactor add_llvm_tool_symlink for reuse

The old implementation of add_llvm_tool_symlink could fail in odd ways when building out of tree. This version solves that problem by not using the LLVM_* variables, and instead reaeding the target's properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288632 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][XOP] Add target shuffle tests showing missing UNPCKL combine.
Simon Pilgrim [Sun, 4 Dec 2016 22:55:57 +0000 (22:55 +0000)]
[X86][XOP] Add target shuffle tests showing missing UNPCKL combine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288628 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX512] Add target shuffle tests showing missing UNPCK combines.
Simon Pilgrim [Sun, 4 Dec 2016 22:54:21 +0000 (22:54 +0000)]
[X86][AVX512] Add target shuffle tests showing missing UNPCK combines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288627 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Mark 256-bit DPPS intrinsic as commutable to increase load matching opportunities.
Craig Topper [Sun, 4 Dec 2016 21:13:05 +0000 (21:13 +0000)]
[X86] Mark 256-bit DPPS intrinsic as commutable to increase load matching opportunities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288622 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add Commutative property to several MMX arithmetic and logic intrinsics.
Craig Topper [Sun, 4 Dec 2016 21:13:01 +0000 (21:13 +0000)]
[X86] Add Commutative property to several MMX arithmetic and logic intrinsics.

I think these intrinsics were added after the Commutative was added to most of the rest of the intrinsics and it must have been forgotten.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288621 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[stl-extras] Provide an adaptor of std::count for ranges.
Michael Gottesman [Sun, 4 Dec 2016 10:26:53 +0000 (10:26 +0000)]
[stl-extras] Provide an adaptor of std::count for ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288619 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Remove 'XFAIL' from a CodeGen test
Dylan McKay [Sun, 4 Dec 2016 09:50:42 +0000 (09:50 +0000)]
[AVR] Remove 'XFAIL' from a CodeGen test

This seems to be fixed as of r288052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288618 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAlways use / as the path separator.
Rafael Espindola [Sun, 4 Dec 2016 07:27:02 +0000 (07:27 +0000)]
Always use / as the path separator.

It is not clear if it is worth the complexity to use \ on
windows. This should fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288616 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoPrefix path when displaying thin archives.
Rafael Espindola [Sun, 4 Dec 2016 06:52:30 +0000 (06:52 +0000)]
Prefix path when displaying thin archives.

Patch by Mark Santaniello.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288615 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Store Records on a BumpPtrAllocator
Matthias Braun [Sun, 4 Dec 2016 05:48:20 +0000 (05:48 +0000)]
TableGen: Store Records on a BumpPtrAllocator

All these records are internalized and will live until exit.  This makes
them perfect candidates for a fast BumpPtrAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288613 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use StringRef instead of const std::string& in return vals.
Matthias Braun [Sun, 4 Dec 2016 05:48:16 +0000 (05:48 +0000)]
TableGen: Use StringRef instead of const std::string& in return vals.

This will allow to switch to a different string storage in an upcoming
commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288612 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Optimize common string concatenation with SmallString
Matthias Braun [Sun, 4 Dec 2016 05:48:06 +0000 (05:48 +0000)]
TableGen: Optimize common string concatenation with SmallString

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288611 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTableGen: Use StringRef instead of const std::string& for parameters
Matthias Braun [Sun, 4 Dec 2016 05:48:03 +0000 (05:48 +0000)]
TableGen: Use StringRef instead of const std::string& for parameters

This avoid an extra construction of a std::string (and a heap
allocation) when the caller only has a StringRef but no std::string at
hand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288610 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Object][MachO] Reference-ify some helper function arguments. NFC.
Lang Hames [Sun, 4 Dec 2016 01:56:10 +0000 (01:56 +0000)]
[Object][MachO] Reference-ify some helper function arguments. NFC.

Changes all static helper functions in MachOObjectFile.cpp that expect a
non-null MachOObjectFile pointer to take a reference instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288608 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[MC] Generalize MCContext's SectionSymbols field.
Dan Gohman [Sat, 3 Dec 2016 23:55:57 +0000 (23:55 +0000)]
[MC] Generalize MCContext's SectionSymbols field.

Change SectionSymbols so that it doesn't hard-code ELF types, so that
it can be used for non-ELF targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288607 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDAG: Fold out out of bounds insert_vector_elt
Matt Arsenault [Sat, 3 Dec 2016 23:03:26 +0000 (23:03 +0000)]
DAG: Fold out out of bounds insert_vector_elt

getNode already prevents formation of out of bounds constant
extract_vector_elts. Do the same for insert_vector_elt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288603 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[WebAssembly] Eliminate an ad-hoc command-line argument.
Dan Gohman [Sat, 3 Dec 2016 23:00:12 +0000 (23:00 +0000)]
[WebAssembly] Eliminate an ad-hoc command-line argument.

Use the target triple to determine whether to run the explicit-locals
pass, rather than using a separate command-line argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288602 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: remove a couple of unused variables
Saleem Abdulrasool [Sat, 3 Dec 2016 22:25:21 +0000 (22:25 +0000)]
AMDGPU: remove a couple of unused variables

lib/Target/AMDGPU/SIRegisterInfo.cpp: In member function 'void llvm::SIRegisterInfo::spillSGPR(llvm::MachineBasicBlock::iterator, int, llvm::RegScavenger*) const':
lib/Target/AMDGPU/SIRegisterInfo.cpp:572:30: warning: variable 'SubRC' set but not used [-Wunused-but-set-variable]
   const TargetRegisterClass *SubRC = nullptr;
                              ^
lib/Target/AMDGPU/SIRegisterInfo.cpp: In member function 'void llvm::SIRegisterInfo::restoreSGPR(llvm::MachineBasicBlock::iterator, int, llvm::RegScavenger*) const':
lib/Target/AMDGPU/SIRegisterInfo.cpp:723:30: warning: variable 'SubRC' set but not used [-Wunused-but-set-variable]
   const TargetRegisterClass *SubRC = nullptr;
                              ^

The variable was assigned to, but never used.  The functions called did not
mutate state.  Simplify the logic and remove the variable.  Identified by gcc
5.4.0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288601 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agobuild: allow specifying the component to `llvm_install_symlink`
Saleem Abdulrasool [Sat, 3 Dec 2016 22:03:24 +0000 (22:03 +0000)]
build: allow specifying the component to `llvm_install_symlink`

Add an optional parameter to `llvm_install_symlink` which allows the symlink
installation to be placed into a specific component rather than the default
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288600 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Rename lookupPass to lookUpPass.
Justin Lebar [Sat, 3 Dec 2016 19:49:35 +0000 (19:49 +0000)]
[PM] Rename lookupPass to lookUpPass.

Summary:
"Lookup" is a noun ("lookup table"), "look up" is a verb ("look up
'table' in the dictionary").

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288598 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Get rid of an unused variable in AnalysisManager::clear(IRUnitT&).
Justin Lebar [Sat, 3 Dec 2016 19:49:31 +0000 (19:49 +0000)]
[PM] Get rid of an unused variable in AnalysisManager::clear(IRUnitT&).

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288597 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Consistently use curly braces rather than std::make_pair in AnalysisResults...
Justin Lebar [Sat, 3 Dec 2016 19:49:27 +0000 (19:49 +0000)]
[PM] Consistently use curly braces rather than std::make_pair in AnalysisResults.find().

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288596 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Don't walk the AM's ResultsList if nothing was invalidated.
Justin Lebar [Sat, 3 Dec 2016 19:49:23 +0000 (19:49 +0000)]
[PM] Don't walk the AM's ResultsList if nothing was invalidated.

Summary:
Previously in AnalysisManager::invalidate(), we would walk the full
ResultsList even if we knew that nothing was invalidated.

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288595 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Make AnalysisManager::registerPass take its parameter by universal reference.
Justin Lebar [Sat, 3 Dec 2016 19:49:19 +0000 (19:49 +0000)]
[PM] Make AnalysisManager::registerPass take its parameter by universal reference.

Summary:
Previously, we were forcing a copy if you passed an lvalue argument; now
we'll take it by reference.

Reviewers: chandlerc

Subscribers: mehdi_amini, silvas, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288594 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Make PassManager's constructor explicit.
Justin Lebar [Sat, 3 Dec 2016 19:49:15 +0000 (19:49 +0000)]
[PM] Make PassManager's constructor explicit.

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288593 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PM] Make PreservedAnalyses::preserved take its parameter by const ref.
Justin Lebar [Sat, 3 Dec 2016 19:49:12 +0000 (19:49 +0000)]
[PM] Make PreservedAnalyses::preserved take its parameter by const ref.

Summary: Previously we were unnecessarily copying the argument.

Reviewers: chandlerc

Subscribers: mehdi_amini, silvas, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288592 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add many of the VPERM instructions to the load folding table. Move VPERMPDZ...
Craig Topper [Sat, 3 Dec 2016 19:37:39 +0000 (19:37 +0000)]
[AVX-512] Add many of the VPERM instructions to the load folding table. Move VPERMPDZri to the correct table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288591 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Clean up struct initializers
Matt Arsenault [Sat, 3 Dec 2016 18:22:49 +0000 (18:22 +0000)]
AMDGPU: Clean up struct initializers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288590 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] add more helper functions for SimplifyICmpInst; NFCI
Sanjay Patel [Sat, 3 Dec 2016 18:03:53 +0000 (18:03 +0000)]
[InstSimplify] add more helper functions for SimplifyICmpInst; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288589 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] add helper functions for SimplifyICmpInst; NFCI
Sanjay Patel [Sat, 3 Dec 2016 17:30:22 +0000 (17:30 +0000)]
[InstSimplify] add helper functions for SimplifyICmpInst; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288588 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add EVEX VPMADDUBSW and VPMADDWD to the load folding tables.
Craig Topper [Sat, 3 Dec 2016 17:19:15 +0000 (17:19 +0000)]
[AVX-512] Add EVEX VPMADDUBSW and VPMADDWD to the load folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288587 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] change select type to eliminate bitcasts
Sanjay Patel [Sat, 3 Dec 2016 15:25:16 +0000 (15:25 +0000)]
[InstCombine] change select type to eliminate bitcasts

This solves a secondary problem seen in PR6137:
https://llvm.org/bugs/show_bug.cgi?id=6137#c6

This is similar to the bitwise logic op fold added with:
https://reviews.llvm.org/rL287707

And like that patch, I'm artificially restricting the
transform from vector <-> scalar types until we're sure
that the backend can handle that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288584 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Fix VEX encoded VPMADDUBSW to not be marked commutable.
Craig Topper [Sat, 3 Dec 2016 05:35:44 +0000 (05:35 +0000)]
[X86] Fix VEX encoded VPMADDUBSW to not be marked commutable.

This was accidentallly broken in r285515 when we started lowering the intrinsic to an ISD node. Should fix PR31241.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288578 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add test cases demonstrating where we incorrectly commute VEX VPMADDUSBW due...
Craig Topper [Sat, 3 Dec 2016 05:35:38 +0000 (05:35 +0000)]
[X86] Add test cases demonstrating where we incorrectly commute VEX VPMADDUSBW due to a bug introduced in r285515.

I believe this is the cause of PR31241.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288577 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove stale comment. NFC.
Michael Kuperstein [Sat, 3 Dec 2016 01:59:13 +0000 (01:59 +0000)]
Remove stale comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288572 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[TTI/CostModel] Correct the way getGEPCost() calls isLegalAddressingMode()
Haicheng Wu [Sat, 3 Dec 2016 01:57:24 +0000 (01:57 +0000)]
[TTI/CostModel] Correct the way getGEPCost() calls isLegalAddressingMode()

Fix a bug when we call isLegalAddressingMode() from getGEPCost().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288569 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint
Kostya Serebryany [Sat, 3 Dec 2016 01:43:30 +0000 (01:43 +0000)]
[sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288568 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agotestcase only works in a debug build
Matthias Braun [Sat, 3 Dec 2016 01:42:32 +0000 (01:42 +0000)]
testcase only works in a debug build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288567 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[doc] Add .arcconfig setup to the "how to work with a monorepo" section
Mehdi Amini [Sat, 3 Dec 2016 01:04:40 +0000 (01:04 +0000)]
[doc] Add .arcconfig setup to the "how to work with a monorepo" section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288562 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAArch64CollectLOH: Rewrite as block-local analysis.
Matthias Braun [Sat, 3 Dec 2016 00:52:56 +0000 (00:52 +0000)]
AArch64CollectLOH: Rewrite as block-local analysis.

Previously this pass was using up to 5% compile time in some cases which
is a bit much for what it is doing. The pass featured a full blown
data-flow analysis which in the default configuration was restricted to a
single block.

This rewrites the pass under the assumption that we only ever work on a
single block. This is done in a single pass maintaining a state machine
per general purpose register to catch LOH patterns.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288561 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ppc] Correctly compute the cost of loading 32/64 bit memory into VSR
Guozhi Wei [Sat, 3 Dec 2016 00:41:43 +0000 (00:41 +0000)]
[ppc] Correctly compute the cost of loading 32/64 bit memory into VSR

VSX has instructions lxsiwax/lxsdx that can load 32/64 bit value into VSX register cheaply. That patch makes it known to memory cost model, so the vectorization of the test case in pr30990 is beneficial.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288560 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSupport escaping in TrigramIndex.
Ivan Krasin [Fri, 2 Dec 2016 23:30:16 +0000 (23:30 +0000)]
Support escaping in TrigramIndex.

Summary:
This is a follow up to r288303, where I have introduced TrigramIndex
to speed up SpecialCaseList for the cases when all rules are
simple wildcards, like *hello*wor.d*.

Here, I add support for escaping, so that it's possible to
specify rules like *c\+\+abi*.

Reviewers: pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288553 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoResubmit "[LibFuzzer] Split FuzzerUtil for Posix and Windows."
Zachary Turner [Fri, 2 Dec 2016 23:02:01 +0000 (23:02 +0000)]
Resubmit "[LibFuzzer] Split FuzzerUtil for Posix and Windows."

This resubmits r288529, which was resubmitted because it broke a
fuzzer bot.  According to kcc@ the test that broke was flakey
and it is unlikely to be a result of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288549 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lanai] Custom lowering of SHL_PARTS
Jacques Pienaar [Fri, 2 Dec 2016 22:01:28 +0000 (22:01 +0000)]
[lanai] Custom lowering of SHL_PARTS

Summary: Implement custom lowering of SHL_PARTS to enable lowering of left shift with larger than 32-bit shifts.

Reviewers: eliben, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288541 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warning...
Eugene Zelenko [Fri, 2 Dec 2016 22:00:59 +0000 (22:00 +0000)]
[IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warnings; other minor fixes (NFC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288540 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[LibFuzzer] Split FuzzerUtil for Posix and Windows."
Zachary Turner [Fri, 2 Dec 2016 20:54:56 +0000 (20:54 +0000)]
Revert "[LibFuzzer] Split FuzzerUtil for Posix and Windows."

This reverts commit r288529, as it seems to introduce some
problems on the Linux bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288533 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[WebAssembly] Fix a compiler warning. NFC.
Dan Gohman [Fri, 2 Dec 2016 20:13:05 +0000 (20:13 +0000)]
[WebAssembly] Fix a compiler warning. NFC.

Fix a warning about a comparison between signed and unsigned integer
expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288532 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LibFuzzer] Introduce a portable WeakAlias implementation.
Zachary Turner [Fri, 2 Dec 2016 19:41:17 +0000 (19:41 +0000)]
[LibFuzzer] Introduce a portable WeakAlias implementation.

Windows doesn't really support weak aliases, but with some
linker magic we can get something that's pretty close on
Windows.  This introduces an interface to accessing weakly
aliased symbols that will work on any platform.  Linker
magic changes to come in a separate patch.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288530 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LibFuzzer] Split FuzzerUtil for Posix and Windows.
Zachary Turner [Fri, 2 Dec 2016 19:38:19 +0000 (19:38 +0000)]
[LibFuzzer] Split FuzzerUtil for Posix and Windows.

Pave the way for separating out platform specific
utility functions into separate files.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27234

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288529 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PGO] Fix PGO use ICE when there are unreachable BBs
Rong Xu [Fri, 2 Dec 2016 19:10:29 +0000 (19:10 +0000)]
[PGO] Fix PGO use ICE when there are unreachable BBs

For -O0 there might be unreachable BBs, which breaks the assumption that all the
BBs have an auxiliary data structure.  In this patch, we add another interface
called findBBInfo() so that a nullptr can be returned for the unreachable BBs
(and the callers can ignore those BBs).

This fixes the bug reported
https://llvm.org/bugs/show_bug.cgi?id=31209

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288528 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SystemZ] Support remaining atomic instructions
Ulrich Weigand [Fri, 2 Dec 2016 18:24:16 +0000 (18:24 +0000)]
[SystemZ] Support remaining atomic instructions

Add assembler support for all atomic instructions that weren't already
supported.  Some of those could be used to implement codegen for 128-bit
atomic operations, but this isn't done here yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288526 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SystemZ] Support floating-point control register instructions
Ulrich Weigand [Fri, 2 Dec 2016 18:21:53 +0000 (18:21 +0000)]
[SystemZ] Support floating-point control register instructions

Add assembler support for instructions manipulating the FPC.

Also add codegen support via the GCC compatibility builtins:
  __builtin_s390_sfpc
  __builtin_s390_efpc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288525 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SystemZ] Refactor hasSideEffects setting
Ulrich Weigand [Fri, 2 Dec 2016 18:19:22 +0000 (18:19 +0000)]
[SystemZ] Refactor hasSideEffects setting

Move setting of hasSideEffects out of SystemZInstrFormats.td,
to allow use of the format classes for instructions where this
flag shouldn't be set.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288524 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Implement isCheapAddrSpaceCast
Matt Arsenault [Fri, 2 Dec 2016 18:12:53 +0000 (18:12 +0000)]
AMDGPU: Implement isCheapAddrSpaceCast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288523 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[x86] add common check prefix to reduce duplication; NFC
Sanjay Patel [Fri, 2 Dec 2016 17:58:26 +0000 (17:58 +0000)]
[x86] add common check prefix to reduce duplication; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288522 91177308-0d34-0410-b5e6-96231b3b80d8