OSDN Git Service

android-x86/external-llvm.git
7 years ago[AArch64] Extend CallingConv::X86_64_Win64 to AArch64 as well
Martin Storsjo [Mon, 17 Jul 2017 20:05:19 +0000 (20:05 +0000)]
[AArch64] Extend CallingConv::X86_64_Win64 to AArch64 as well

Rename the enum value from X86_64_Win64 to plain Win64.

The symbol exposed in the textual IR is changed from 'x86_64_win64cc'
to 'win64cc', but the numeric value is kept, keeping support for
old bitcode.

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

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

7 years agoRevert "Restore with fix "[ThinLTO] Ensure we always select the same function copy...
Teresa Johnson [Mon, 17 Jul 2017 19:25:38 +0000 (19:25 +0000)]
Revert "Restore with fix "[ThinLTO] Ensure we always select the same function copy to import""

This reverts commit r308114 (and follow on fixes to test).

There is a linking failure in a ThinLTO bot:
http://green.lab.llvm.org/green/job/clang-stage2-configure-Rthinlto_build/3663/

(and undefined reference). It seems like it must be a second order
effect of the heuristic change I made, and may take some time to try
to reproduce locally and track down. Therefore, reverting for now.

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

7 years ago[ORC] Remove extraneous else.
Lang Hames [Mon, 17 Jul 2017 18:36:35 +0000 (18:36 +0000)]
[ORC] Remove extraneous else.

As suggested by Dave Blaikie in review on r307952. Thanks Dave!

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

7 years agoRevert "[libFuzzer] Add a dependency on symbolizer from libFuzzer tests"
George Karpenkov [Mon, 17 Jul 2017 18:18:03 +0000 (18:18 +0000)]
Revert "[libFuzzer] Add a dependency on symbolizer from libFuzzer tests"

This reverts commit 546e006a023cccd0fd32afd442ab992d3515d4b8.

Reverting until I can figure out llvm-symbolizer breakages on mac os.

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

7 years ago[opt-viewer] Accept directories that are searched for opt.yaml files
Adam Nemet [Mon, 17 Jul 2017 18:00:41 +0000 (18:00 +0000)]
[opt-viewer] Accept directories that are searched for opt.yaml files

This allows to pass the build directory where all the opt.yaml files are
rather than find | xargs which may invoke opt-viewer multiple times producing
incomplete html output.

The patch generalizes the same functionality from opt-diff.

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

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

7 years ago[SystemZ] Add support for IBM z14 processor (3/3)
Ulrich Weigand [Mon, 17 Jul 2017 17:44:20 +0000 (17:44 +0000)]
[SystemZ] Add support for IBM z14 processor (3/3)

This adds support for the new 128-bit vector float instructions of z14.
Note that these instructions actually only operate on the f128 type,
since only each 128-bit vector register can hold only one 128-bit
float value.  However, this is still preferable to the legacy 128-bit
float instructions, since those operate on pairs of floating-point
registers (so we can hold at most 8 values in registers), while the
new instructions use single vector registers (so we hold up to 32
value in registers).

Adding support includes:
- Enabling the instructions for the assembler/disassembler.
- CodeGen for the instructions.  This includes allocating the f128
  type now to the VR128BitRegClass instead of FP128BitRegClass.
- Scheduler description support for the instructions.

Note that for a small number of operations, we have no new vector
instructions (like integer <-> 128-bit float conversions), and so
we use the legacy instruction and then reformat the operand
(i.e. copy between a pair of floating-point registers and a
vector register).

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

7 years ago[SystemZ] Add support for IBM z14 processor (2/3)
Ulrich Weigand [Mon, 17 Jul 2017 17:42:48 +0000 (17:42 +0000)]
[SystemZ] Add support for IBM z14 processor (2/3)

This adds support for the new 32-bit vector float instructions of z14.
This includes:
- Enabling the instructions for the assembler/disassembler.
- CodeGen for the instructions, including new LLVM intrinsics.
- Scheduler description support for the instructions.
- Update to the vector cost function calculations.

In general, CodeGen support for the new v4f32 instructions closely
matches support for the existing v2f64 instructions.

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

7 years ago[SystemZ] Add support for IBM z14 processor (1/3)
Ulrich Weigand [Mon, 17 Jul 2017 17:41:11 +0000 (17:41 +0000)]
[SystemZ] Add support for IBM z14 processor (1/3)

This patch series adds support for the IBM z14 processor.  This part includes:
- Basic support for the new processor and its features.
- Support for new instructions (except vector 32-bit float and 128-bit float).
- CodeGen for new instructions, including new LLVM intrinsics.
- Scheduler description for the new processor.
- Detection of z14 as host processor.

Support for the new 32-bit vector float and 128-bit vector float
instructions is provided by separate patches.

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

7 years ago[llvm] Remove redundant check-prefix=CHECK from tests. NFC.
Mandeep Singh Grang [Mon, 17 Jul 2017 17:32:45 +0000 (17:32 +0000)]
[llvm] Remove redundant check-prefix=CHECK from tests. NFC.

Reviewers: t.p.northover, oren_ben_simhon, niravd, mcrosier

Reviewed By: oren_ben_simhon, mcrosier

Subscribers: nhaehnle, javed.absar, llvm-commits

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

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

7 years ago[Hexagon] Remove custom lowering of loads of v4i16
Krzysztof Parzyszek [Mon, 17 Jul 2017 15:45:45 +0000 (15:45 +0000)]
[Hexagon] Remove custom lowering of loads of v4i16

The target-independent lowering works fine, except concatenating 32-bit
words. Add a pattern to generate A2_combinew instead of 64-bit asl/or.

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

7 years agoAvoid store merge to f128 in context of noimpiccitfloat NFCI.
Nirav Dave [Mon, 17 Jul 2017 15:09:47 +0000 (15:09 +0000)]
Avoid store merge to f128 in context of noimpiccitfloat NFCI.

Prevent store merge from merging stores into an invalid 128-bit store
(realized as a f128 value in the context of the noimplicitfloat
attribute). Previously, such stores are immediately split back into
valid stores.

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

7 years ago[X86] Add LEA scheduling tests
Simon Pilgrim [Mon, 17 Jul 2017 14:37:17 +0000 (14:37 +0000)]
[X86] Add LEA scheduling tests

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

7 years ago[AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3...
Sam Kolton [Mon, 17 Jul 2017 14:23:38 +0000 (14:23 +0000)]
[AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions

Summary:
Previously, CodeGen checked first src operand type to determine if omod is supported by instruction. This isn't correct for some instructions: e.g. V_CMP_EQ_F32 has floating-point src operands but desn't support omod.
Changed .td files to check if dst operand instead of src operand.

Reviewers: arsenm, vpykhtin

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

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

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

7 years ago[X86][AVX512] Add lowering of vXi32/vXi64 ISD::ROTL/ISD::ROTR
Simon Pilgrim [Mon, 17 Jul 2017 14:11:30 +0000 (14:11 +0000)]
[X86][AVX512] Add lowering of vXi32/vXi64 ISD::ROTL/ISD::ROTR

Add support for lowering to ISD::ROTL/ISD::ROTR, including rotate by immediate

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

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

7 years agoFixed line endings. NFCI.
Simon Pilgrim [Mon, 17 Jul 2017 13:58:20 +0000 (13:58 +0000)]
Fixed line endings. NFCI.

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

7 years ago[CodeGen] Add begin-end iterators to MachineInstr
Javed Absar [Mon, 17 Jul 2017 13:15:26 +0000 (13:15 +0000)]
[CodeGen] Add begin-end iterators to MachineInstr

Convert iteration over operands to range-loop.

Reviewed by: @rovka, @echristo
Differential Revision: https://reviews.llvm.org/D35419

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

7 years ago[YAMLTraits] Add filename support to yaml::Input
Alex Bradbury [Mon, 17 Jul 2017 11:41:30 +0000 (11:41 +0000)]
[YAMLTraits] Add filename support to yaml::Input

Summary:
The current yaml::Input constructor takes a StringRef of data as its
first parameter, discarding any filename information that may have been
present when a YAML file was opened. Add an alterate yaml::Input
constructor that takes a MemoryBufferRef, which can have a filename
associated with it. This leads to clearer diagnostic messages.

Sponsored By: DARPA, AFRL

Reviewed By: arphaman

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

Patch by: Jonathan Anderson (trombonehero)

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

7 years ago[X86][AVX] Fix typo in vector rotate tests
Simon Pilgrim [Mon, 17 Jul 2017 10:35:51 +0000 (10:35 +0000)]
[X86][AVX] Fix typo in vector rotate tests

Was preventing rotate matching

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

7 years ago[X86][AVX512] Add constant splat vector rotate tests for D35463
Simon Pilgrim [Mon, 17 Jul 2017 10:09:48 +0000 (10:09 +0000)]
[X86][AVX512] Add constant splat vector rotate tests for D35463

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

7 years ago[X86][AVX512] Regenerate shift tests
Simon Pilgrim [Mon, 17 Jul 2017 09:53:45 +0000 (09:53 +0000)]
[X86][AVX512] Regenerate shift tests

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

7 years agoRemove unnecessary cast. NFCI.
Simon Pilgrim [Mon, 17 Jul 2017 09:35:03 +0000 (09:35 +0000)]
Remove unnecessary cast. NFCI.

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

7 years ago[X86] Use MSVC's __cpuidex intrinsic instead of inline assembly in getHostCPUName...
Craig Topper [Mon, 17 Jul 2017 05:16:16 +0000 (05:16 +0000)]
[X86] Use MSVC's __cpuidex intrinsic instead of inline assembly in getHostCPUName/getHostCPUFeatures for 32-bit builds too.

We're already using it in 64-bit builds because 64-bit MSVC doesn't support inline assembly.

As far as I know we were using inline assembly because at the time the code was added we had to support MSVC 2008 pre-SP1 while the intrinsic was added to MSVC in SP1. Now that we don't have to support that we should be able to just use the intrinsic.

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

7 years agoAnalysis/MemorySSA.cpp: Prune unused "llvm/Transforms/Scalar.h".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:26 +0000 (04:31 +0000)]
Analysis/MemorySSA.cpp: Prune unused "llvm/Transforms/Scalar.h".

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

7 years agoIR/Core.cpp: Prune unused "llvm/Bitcode/BitcodeReader.h".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:23 +0000 (04:31 +0000)]
IR/Core.cpp: Prune unused "llvm/Bitcode/BitcodeReader.h".

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

7 years agoSupport/Path.cpp: Prune unused "llvm/BinaryFormat".
NAKAMURA Takumi [Mon, 17 Jul 2017 04:31:20 +0000 (04:31 +0000)]
Support/Path.cpp: Prune unused "llvm/BinaryFormat".

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

7 years ago[COFF, ARM64] Add initial relocation types
Mandeep Singh Grang [Mon, 17 Jul 2017 00:05:32 +0000 (00:05 +0000)]
[COFF, ARM64] Add initial relocation types

Reviewers: compnerd, ruiu, rnk

Reviewed By: compnerd

Subscribers: mstorsjo, aemerson, javed.absar, kristof.beyls, llvm-commits

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

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

7 years ago[AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests
Dylan McKay [Sun, 16 Jul 2017 23:33:50 +0000 (23:33 +0000)]
[AVR] Add/remove XFAILs to get the backend passing Generic CodeGen tests

A few tests have since been fixed, and a few since now fail.

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

7 years ago[DAGCombiner] Recognise vector rotations with non-splat constants
Andrew Zhogin [Sun, 16 Jul 2017 23:11:45 +0000 (23:11 +0000)]
[DAGCombiner] Recognise vector rotations with non-splat constants

Fixes PR33691.

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

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

7 years ago[AVR] Fix a typo in the tests
Dylan McKay [Sun, 16 Jul 2017 22:31:07 +0000 (22:31 +0000)]
[AVR] Fix a typo in the tests

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

7 years agoAMDGPU: Fix amdgpu-flat-work-group-size/amdgpu-waves-per-eu check
Konstantin Zhuravlyov [Sun, 16 Jul 2017 19:38:47 +0000 (19:38 +0000)]
AMDGPU: Fix amdgpu-flat-work-group-size/amdgpu-waves-per-eu check

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

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

7 years ago[X86][AVX512] Add 512-bit vector rotate tests
Simon Pilgrim [Sun, 16 Jul 2017 19:26:49 +0000 (19:26 +0000)]
[X86][AVX512] Add 512-bit vector rotate tests

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

7 years agoAMDGPU: Remove duplicate print outs from .AMDGPU.csdata
Konstantin Zhuravlyov [Sun, 16 Jul 2017 19:24:08 +0000 (19:24 +0000)]
AMDGPU: Remove duplicate print outs from .AMDGPU.csdata

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

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

7 years ago[InstCombine] Don't violate dominance when replacing instructions.
Davide Italiano [Sun, 16 Jul 2017 18:56:30 +0000 (18:56 +0000)]
[InstCombine] Don't violate dominance when replacing instructions.

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

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

7 years agoStrip trailing whitespace. NFCI
Simon Pilgrim [Sun, 16 Jul 2017 18:37:23 +0000 (18:37 +0000)]
Strip trailing whitespace. NFCI

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

7 years ago[X86] X86::CMOV to Branch heuristic based optimization.
Amjad Aboud [Sun, 16 Jul 2017 17:39:56 +0000 (17:39 +0000)]
[X86] X86::CMOV to Branch heuristic based optimization.

LLVM compiler recognizes opportunities to transform a branch into IR select instruction(s) - later it will be lowered into X86::CMOV instruction, assuming no other optimization eliminated the SelectInst.
However, it is not always profitable to emit X86::CMOV instruction. For example, branch is preferable over an X86::CMOV instruction when:
1. Branch is well predicted
2. Condition operand is expensive, compared to True-value and the False-value operands

In CodeGenPrepare pass there is a shallow optimization that tries to convert SelectInst into branch, but it is not enough.
This commit, implements machine optimization pass that converts X86::CMOV instruction(s) into branch, based on a conservative heuristic.

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

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

7 years agoApply explicit instantiation workaround to DominanceFrontier
Jakub Kuderski [Sun, 16 Jul 2017 17:29:19 +0000 (17:29 +0000)]
Apply explicit instantiation workaround to DominanceFrontier

This is a workaround for the same explicit instantiation bug
as in DominatorTreeBase.

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

7 years ago[Dominators] Workaround explicit instantiation bug.
Jakub Kuderski [Sun, 16 Jul 2017 17:01:40 +0000 (17:01 +0000)]
[Dominators] Workaround explicit instantiation bug.

Some platforms have problems with emmiting constructors when class
templates get explicitly instantiated.
This patch fixes the bug reported in D35315 by replacing `= default`
with an empty constructor body.

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

7 years ago[X86] Add F16C scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:34:18 +0000 (14:34 +0000)]
[X86] Add F16C scheduling tests

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

7 years ago[X86] Add POPCNT scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:22:39 +0000 (14:22 +0000)]
[X86] Add POPCNT scheduling tests

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

7 years ago[X86] Add BMI2 scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 14:09:15 +0000 (14:09 +0000)]
[X86] Add BMI2 scheduling tests

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

7 years ago[X86] Add BMI1 scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 13:59:44 +0000 (13:59 +0000)]
[X86] Add BMI1 scheduling tests

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

7 years ago[X86] Add LZCNT scheduling tests
Simon Pilgrim [Sun, 16 Jul 2017 13:40:44 +0000 (13:40 +0000)]
[X86] Add LZCNT scheduling tests

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

7 years ago[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model
Simon Pilgrim [Sun, 16 Jul 2017 12:06:06 +0000 (12:06 +0000)]
[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model

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

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:43:16 +0000 (11:43 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

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

7 years ago[X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:40:23 +0000 (11:40 +0000)]
[X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments

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

7 years ago[X86][AVX] Regenerate vector idiv tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:38:14 +0000 (11:38 +0000)]
[X86][AVX] Regenerate vector idiv tests with constant broadcast comments

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

7 years ago[X86][AVX] Regenerate combine tests with constant broadcast comments
Simon Pilgrim [Sun, 16 Jul 2017 11:36:11 +0000 (11:36 +0000)]
[X86][AVX] Regenerate combine tests with constant broadcast comments

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

7 years agofix typos in comments; NFC
Hiroshi Inoue [Sun, 16 Jul 2017 08:11:56 +0000 (08:11 +0000)]
fix typos in comments; NFC

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

7 years agofix typos in comments; NFC
Hiroshi Inoue [Sun, 16 Jul 2017 07:48:48 +0000 (07:48 +0000)]
fix typos in comments; NFC

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

7 years ago[InstSimplify] Use commutable matchers to simplify some code. NFC
Craig Topper [Sun, 16 Jul 2017 06:57:41 +0000 (06:57 +0000)]
[InstSimplify] Use commutable matchers to simplify some code. NFC

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

7 years ago[InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.
Craig Topper [Sun, 16 Jul 2017 05:37:58 +0000 (05:37 +0000)]
[InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.

This removes a dedicated matcher and allows us to support more than just an AND masking the lower bit.

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

7 years agoFix bot failures from r308114
Teresa Johnson [Sun, 16 Jul 2017 00:28:22 +0000 (00:28 +0000)]
Fix bot failures from r308114

Finally figured out that some bots were failing from r308114
with the message:
  llvm-lto2: LTO::run failed: No available targets are compatible with this triple.
after adding in some other checking that finally caused this to show up
in the FileCheck output.

Added "REQUIRES: x86-registered-target" which should fix it.

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

7 years agoAttempt 2 to debug bot failures
Teresa Johnson [Sun, 16 Jul 2017 00:01:16 +0000 (00:01 +0000)]
Attempt 2 to debug bot failures

Modify checks from r308114 even more, to see if I can narrow down
why some bots are still failing.

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

7 years agoAttempt to debug bot failures
Teresa Johnson [Sat, 15 Jul 2017 23:31:32 +0000 (23:31 +0000)]
Attempt to debug bot failures

Simplifying checks from r308114, to see if I can narrow down why some
bots are still failing.

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

7 years agoRestore with fix "[ThinLTO] Ensure we always select the same function copy to import"
Teresa Johnson [Sat, 15 Jul 2017 22:58:06 +0000 (22:58 +0000)]
Restore with fix "[ThinLTO] Ensure we always select the same function copy to import"

This restores r308078/r308079 with a fix for bot non-determinisim (make
sure we run llvm-lto in single threaded mode so the debug output doesn't get
interleaved).

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

7 years ago[IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue...
Craig Topper [Sat, 15 Jul 2017 22:06:19 +0000 (22:06 +0000)]
[IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue/isMinSignedValue for ConstantDataVector without going through getElementAsConstant

Summary:
Currently these methods call ConstantDataVector::getSplatValue which uses getElementsAsConstant to create a Constant object representing the element value. This method incurs a map lookup to see if we already have created such a Constant before and if not allocates a new Constant object.

This patch changes these methods to use getElementAsAPFloat and getElementAsInteger so we can just examine the data values directly.

Reviewers: spatel, pcc, dexonsmith, bogner, craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

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

7 years ago[InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases...
Craig Topper [Sat, 15 Jul 2017 21:49:49 +0000 (21:49 +0000)]
[InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value

Summary:
If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.

I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.

Reviewers: spatel, majnemer, hfinkel, dberlin

Reviewed By: spatel

Subscribers: grandinj, llvm-commits, spatel

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

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

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sat, 15 Jul 2017 21:17:35 +0000 (21:17 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

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

7 years ago[X86][AVX] Regenerate tests with constant broadcast comments
Simon Pilgrim [Sat, 15 Jul 2017 20:28:09 +0000 (20:28 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments

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

7 years agoStrip trailing whitespace. NFCI
Simon Pilgrim [Sat, 15 Jul 2017 19:29:19 +0000 (19:29 +0000)]
Strip trailing whitespace. NFCI

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

7 years ago[CodeView] Dump BuildInfoSym and ProcSym type indices
Reid Kleckner [Sat, 15 Jul 2017 18:10:39 +0000 (18:10 +0000)]
[CodeView] Dump BuildInfoSym and ProcSym type indices

I need to print the type index in hex so that I can match it in
FileCheck for a test I'm writing.

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

7 years agoFix mis-use of std::lower_bound
Reid Kleckner [Sat, 15 Jul 2017 18:10:15 +0000 (18:10 +0000)]
Fix mis-use of std::lower_bound

Binary search in C++ is such a PITA. =/

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

7 years ago[InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding
Sanjay Patel [Sat, 15 Jul 2017 17:26:01 +0000 (17:26 +0000)]
[InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding

1. Add a one-use check to prevent increasing instruction count.
2. Generalize the pattern matching to include vector types.

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

7 years ago[InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an invert...
Craig Topper [Sat, 15 Jul 2017 17:09:23 +0000 (17:09 +0000)]
[InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an inverted compare. NFC

Do the same for (X | (Y & ~X)) -> (X | Y)

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

7 years ago[InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them...
Craig Topper [Sat, 15 Jul 2017 17:09:22 +0000 (17:09 +0000)]
[InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them into a existing test file. NFC

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

7 years ago[InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC
Sanjay Patel [Sat, 15 Jul 2017 15:55:07 +0000 (15:55 +0000)]
[InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC

This fold hit the trifecta:
1. It was untested.
2. It oversteps (multiuse is not checked, so increases instruction count).
3. It is incomplete (doesn't work for vectors).

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

7 years ago[wasm] Update two tests for r308025 which causes scheduling changes due
Chandler Carruth [Sat, 15 Jul 2017 15:44:36 +0000 (15:44 +0000)]
[wasm] Update two tests for r308025 which causes scheduling changes due
to the newly improved AA information.

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

7 years ago[InstCombine] allow (0 - x) & 1 --> x & 1 for vectors
Sanjay Patel [Sat, 15 Jul 2017 15:29:47 +0000 (15:29 +0000)]
[InstCombine] allow (0 - x) & 1 --> x & 1 for vectors

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

7 years ago[InstCombine] remove dead code/tests; NFCI
Sanjay Patel [Sat, 15 Jul 2017 15:01:33 +0000 (15:01 +0000)]
[InstCombine] remove dead code/tests; NFCI

These patterns and tests were added to InstSimplify with:
https://reviews.llvm.org/rL303004

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

7 years agoRevert r308078 (and subsequent tweak in r308079) which introduces a test
Chandler Carruth [Sat, 15 Jul 2017 13:50:26 +0000 (13:50 +0000)]
Revert r308078 (and subsequent tweak in r308079) which introduces a test
that appears to exhibit non-determinism and is flaking on the bots
pretty consistently.

r308078: [ThinLTO] Ensure we always select the same function copy to import
r308079: Require asserts in new test that uses debug flag

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

7 years ago[LoopInterchange] Add some optimization remarks.
Florian Hahn [Sat, 15 Jul 2017 13:13:19 +0000 (13:13 +0000)]
[LoopInterchange] Add some optimization remarks.

Reviewers: anemet, karthikthecool, blitz.opensource

Reviewed By: anemet

Subscribers: mzolotukhin, llvm-commits

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

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

7 years ago[docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
Nuno Lopes [Sat, 15 Jul 2017 09:09:24 +0000 (09:09 +0000)]
[docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
objects to start at the same address

As discussed on the ML, there's consensus that this is what the implementations
do and it seems sensible.

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

7 years ago[PM/LCG] Teach the LazyCallGraph to maintain reference edges from every
Chandler Carruth [Sat, 15 Jul 2017 08:08:19 +0000 (08:08 +0000)]
[PM/LCG] Teach the LazyCallGraph to maintain reference edges from every
function to every defined function known to LLVM as a library function.

LLVM can introduce calls to these functions either by replacing other
library calls or by recognizing patterns (such as memset_pattern or
vector math patterns) and replacing those with calls. When these library
functions are actually defined in the module, we need to have reference
edges to them initially so that we visit them during the CGSCC walk in
the right order and can effectively rebuild the call graph afterward.

This was discovered when building code with Fortify enabled as that is
a common case of both inline definitions of library calls and
simplifications of code into calling them.

This can in extreme cases of LTO-ing with libc introduce *many* more
reference edges. I discussed a bunch of different options with folks but
all of them are unsatisfying. They either make the graph operations
substantially more complex even when there are *no* defined libfuncs, or
they introduce some other complexity into the callgraph. So this patch
goes with the simplest possible solution of actual synthetic reference
edges. If this proves to be a memory problem, I'm happy to implement one
of the clever techniques to save memory here.

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

7 years ago[mips] Handle the `long-calls` feature flags in the MIPS backend
Simon Atanasyan [Sat, 15 Jul 2017 07:14:25 +0000 (07:14 +0000)]
[mips] Handle the `long-calls` feature flags in the MIPS backend

If the `long-calls` feature flags is enabled, disable use of the `jal`
instruction. Instead of that call a function by by first loading its
address into a register, and then using the contents of that register.

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

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

7 years agoSystemZCodeGen: Update libdeps. r308024 introduced LoopDataPrefetchPass.
NAKAMURA Takumi [Sat, 15 Jul 2017 06:32:12 +0000 (06:32 +0000)]
SystemZCodeGen: Update libdeps. r308024 introduced LoopDataPrefetchPass.

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

7 years agobpf: fix a compilation bug due to unused variable for release build
Yonghong Song [Sat, 15 Jul 2017 06:08:08 +0000 (06:08 +0000)]
bpf: fix a compilation bug due to unused variable for release build

Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308083 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Return correct type during argument lowering
Matt Arsenault [Sat, 15 Jul 2017 05:52:59 +0000 (05:52 +0000)]
AMDGPU: Return correct type during argument lowering

The type needs to be casted back to the original argument type.
Fixes an assert that for some reason is only run when
using -debug.

Includes an additional combine to avoid test regressions
from having conversions mixed with multiple Assert[SZ]ext
nodes. On subtargets where i16 is legal, this was producing an i32
register with an i16 AssertZExt, truncated to i16 with another i8
AssertZExt.

t2: i32,ch = CopyFromReg t0, Register:i32 %vreg0
t3: i16 = truncate t2
t5: i16 = AssertZext t3, ValueType:ch:i8
t6: i8 = truncate t5
t7: i32 = zero_extend t6

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

7 years ago[SLPVectorizer] Add an extra parameter to tryScheduleBundle function, NFCI.
Dinar Temirbulatov [Sat, 15 Jul 2017 05:43:54 +0000 (05:43 +0000)]
[SLPVectorizer] Add an extra parameter to tryScheduleBundle function, NFCI.

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

7 years agobpf: generate better lowering code for certain select/setcc instructions
Yonghong Song [Sat, 15 Jul 2017 05:41:42 +0000 (05:41 +0000)]
bpf: generate better lowering code for certain select/setcc instructions

Currently, for code like below,
===
  inner_map = bpf_map_lookup_elem(outer_map, &port_key);
  if (!inner_map) {
    inner_map = &fallback_map;
  }
===
the compiler generates (pseudo) code like the below:
===
  I1: r1 = bpf_map_lookup_elem(outer_map, &port_key);
  I2: r2 = 0
  I3: if (r1 == r2)
  I4:   r6 = &fallback_map
  I5: ...
===

During kernel verification process, After I1, r1 holds a state
map_ptr_or_null. If I3 condition is not taken
(path [I1, I2, I3, I5]), supposedly r1 should become map_ptr.
Unfortunately, kernel does not recognize this pattern
and r1 remains map_ptr_or_null at insn I5. This will cause
verificaiton failure later on.

Kernel, however, is able to recognize pattern "if (r1 == 0)"
properly and give a map_ptr state to r1 in the above case.

LLVM here generates suboptimal code which causes kernel verification
failure. This patch fixes the issue by changing BPF insn pattern
matching and lowering to generate proper codes if the righthand
parameter of the above condition is a constant. A test case
is also added.

Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308080 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRequire asserts in new test that uses debug flag
Teresa Johnson [Sat, 15 Jul 2017 05:27:57 +0000 (05:27 +0000)]
Require asserts in new test that uses debug flag

This should fix bot failures from r308078.

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

7 years ago[ThinLTO] Ensure we always select the same function copy to import
Teresa Johnson [Sat, 15 Jul 2017 04:53:05 +0000 (04:53 +0000)]
[ThinLTO] Ensure we always select the same function copy to import

Summary:
Check if the first eligible callee is under the instruction threshold.
Checking this on the first eligible callee ensures that we don't end
up selecting different callees to import when we invoke this routine
with different thresholds due to reaching the callee via paths that
are shallower or hotter (when there are multiple copies, i.e. with
weak or linkonce linkage). We don't want to leave the decision of which
copy to import up to the backend.

Reviewers: mehdi_amini

Subscribers: inglorion, fhahn, llvm-commits

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

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

7 years ago[TTI] Refine the cost of EXT in getUserCost()
Haicheng Wu [Sat, 15 Jul 2017 02:12:16 +0000 (02:12 +0000)]
[TTI] Refine the cost of EXT in getUserCost()

Now, getUserCost() only checks the src and dst types of EXT to decide it is free
or not. This change first checks the types, then calls isExtFreeImpl(), and
check if EXT can form ExtLoad at last. Currently, only AArch64 has customized
implementation of isExtFreeImpl() to check if EXT can be folded into its use.

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

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

7 years ago[libFuzzer] remove stale code
Kostya Serebryany [Sat, 15 Jul 2017 01:31:40 +0000 (01:31 +0000)]
[libFuzzer] remove stale code

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

7 years ago[Dominators] Fix reachable visitation and reenable a unit test
Jakub Kuderski [Sat, 15 Jul 2017 01:27:16 +0000 (01:27 +0000)]
[Dominators] Fix reachable visitation and reenable a unit test

This fixes a minor bug in insertion to a reachable node that caused
DominatorTree.InsertDeleteExhaustive flakiness. The patch also adds
a new testcase for this exact failure.

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

7 years ago[Dominators] Temporarily disable a flaky unit test
Jakub Kuderski [Fri, 14 Jul 2017 23:49:12 +0000 (23:49 +0000)]
[Dominators] Temporarily disable a flaky unit test

The DominatorTree.InsertDeleteExhaustive uses a RNG with a
constant seed to generate different sequences of updates. The test
fails on some buildbots and this patch disables it for now.

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

7 years ago[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1
Justin Bogner [Fri, 14 Jul 2017 23:33:04 +0000 (23:33 +0000)]
[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1

With this change, libFuzzer will ignore any arguments after a sigil
argument, but it will preserve these arguments at the end of the
command line when launching subprocesses. Using this, its possible to
handle positional and single-dash arguments to the program under test
by discarding everything up to -ignore_remaining_args=1 in
LLVMFuzzerInitialize.

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

7 years agoAdd missing space to comment
Adrian Prantl [Fri, 14 Jul 2017 23:23:58 +0000 (23:23 +0000)]
Add missing space to comment

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

7 years ago[Dominators] Remove an extra semicolon and add a missing include.
Jakub Kuderski [Fri, 14 Jul 2017 22:24:15 +0000 (22:24 +0000)]
[Dominators] Remove an extra semicolon and add a missing include.

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

7 years ago[Dominators] Implement incremental deletions
Jakub Kuderski [Fri, 14 Jul 2017 21:58:53 +0000 (21:58 +0000)]
[Dominators] Implement incremental deletions

Summary:
This patch implements incremental edge deletions.

It also makes DominatorTreeBase store a pointer to the parent function. The parent function is needed to perform full rebuilts during some deletions, but it is also used to verify that inserted and deleted edges come from the same function.

Reviewers: dberlin, davide, grosser, sanjoy, brzycki

Reviewed By: dberlin

Subscribers: llvm-commits

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

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

7 years ago[libFuzzer] fix stats during merge
Kostya Serebryany [Fri, 14 Jul 2017 21:48:19 +0000 (21:48 +0000)]
[libFuzzer] fix stats during merge

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

7 years ago[AArch64] Avoid selecting XZR inline ASM memory operand
Yi Kong [Fri, 14 Jul 2017 21:46:16 +0000 (21:46 +0000)]
[AArch64] Avoid selecting XZR inline ASM memory operand

Restricting register class to PointerRegClass for memory operands.

Also fix the PointerRegClass for AArch64 from GPR64 to GPR64sp, since
XZR cannot hold a memory pointer while SP is.

Fixes PR33134.

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

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

7 years ago[AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)
Geoff Berry [Fri, 14 Jul 2017 21:44:12 +0000 (21:44 +0000)]
[AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)

Summary:
This patch is the first step in reducing HW prefetcher instruction tag
collisions in inner loops for Falkor.  It adds a pass that annotates IR
loads with metadata to indicate that they are known to be strided loads,
and adds a target lowering hook that translates this metadata to a
target-specific MachineMemOperand flag.

A follow on change will use this MachineMemOperand flag to re-write
instructions to reduce tag collisions.

Reviewers: mcrosier, t.p.northover

Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits

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

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

7 years ago[Dominators] Add a missing include
Jakub Kuderski [Fri, 14 Jul 2017 21:38:15 +0000 (21:38 +0000)]
[Dominators] Add a missing include

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

7 years ago[AMDGPU] Throw away more dead code. NFCI.
Davide Italiano [Fri, 14 Jul 2017 21:20:29 +0000 (21:20 +0000)]
[AMDGPU] Throw away more dead code. NFCI.

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

7 years ago[Dominators] Implement incremental insertions
Jakub Kuderski [Fri, 14 Jul 2017 21:17:33 +0000 (21:17 +0000)]
[Dominators] Implement incremental insertions

Summary:
This patch introduces incremental edge insertions based on the Depth Based Search algorithm.

Insertions should work for both dominators and postdominators.

Reviewers: dberlin, grosser, davide, sanjoy, brzycki

Reviewed By: dberlin

Subscribers: llvm-commits

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

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

7 years agoFix mixed line terminators. NFC.
Dimitry Andric [Fri, 14 Jul 2017 21:14:58 +0000 (21:14 +0000)]
Fix mixed line terminators. NFC.

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

7 years ago[EarlyCSE] Handle calls with no MemorySSA info.
Geoff Berry [Fri, 14 Jul 2017 20:13:21 +0000 (20:13 +0000)]
[EarlyCSE] Handle calls with no MemorySSA info.

Summary:
When checking for memory dependencies between calls using MemorySSA,
handle cases where the calls have no MemoryAccess associated with them
because the AA analysis being used has determined that the call does not
read/write memory.

Fixes PR33756

Reviewers: dberlin, davide

Subscribers: mcrosier, llvm-commits, Prazek

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

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

7 years ago[JumpThreading] Add a pattern to TryToUnfoldSelectInCurrBB()
Haicheng Wu [Fri, 14 Jul 2017 19:16:47 +0000 (19:16 +0000)]
[JumpThreading] Add a pattern to TryToUnfoldSelectInCurrBB()

Add the following pattern to TryToUnfoldSelectInCurrBB()

bb:
   %p = phi [0, %bb1], [1, %bb2], [0, %bb3], [1, %bb4], ...
   %c = cmp %p, 0
   %s = select %c, trueval, falseval

The Select in the above pattern will be unfolded and then jump-threaded. The
current implementation does not allow CMP in the middle of PHI and Select.

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

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

7 years ago[Hexagon] Replace ISD opcode VPACK with VPACKE/VPACKO, NFC
Krzysztof Parzyszek [Fri, 14 Jul 2017 19:02:32 +0000 (19:02 +0000)]
[Hexagon] Replace ISD opcode VPACK with VPACKE/VPACKO, NFC

This breaks up pack-even and pack-odd into two separate operations.

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

7 years ago[AMDGPU] Garbage collect dead code. NFCI.
Davide Italiano [Fri, 14 Jul 2017 18:47:29 +0000 (18:47 +0000)]
[AMDGPU] Garbage collect dead code. NFCI.

Unbreaks the build with GCC7.

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