]> granicus.if.org Git - llvm/log
llvm
8 years agoOnly print architecture dependent flags for that architecture.
Rafael Espindola [Mon, 30 Jan 2017 15:38:43 +0000 (15:38 +0000)]
Only print architecture dependent flags for that architecture.

Different architectures can have different meaning for flags in the
SHF_MASKPROC mask, so we should always check what the architecture use
before checking the flag.

NFC for now, but will allow fixing the value of an xmos flag.

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

8 years agoTableGen: Fix infinite recursion in RegisterBankEmitter
Tom Stellard [Mon, 30 Jan 2017 15:07:01 +0000 (15:07 +0000)]
TableGen: Fix infinite recursion in RegisterBankEmitter

Summary:
AMDGPU has two register classes with the same set of registers, and this
was causing this tablegen backend would get stuck in infinite recursion.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: tpr, wdng, llvm-commits

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

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

8 years ago[Hexagon] Make header self-contained.
Benjamin Kramer [Mon, 30 Jan 2017 14:55:33 +0000 (14:55 +0000)]
[Hexagon] Make header self-contained.

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

8 years agoRevert "Fix the values of two xcore ELF flags."
Rafael Espindola [Mon, 30 Jan 2017 14:39:48 +0000 (14:39 +0000)]
Revert "Fix the values of two xcore ELF flags."

This reverts commit r293480.

The patch is correct, but found bugs in other areas that need to be fixed.

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

8 years agoFix the values of two xcore ELF flags.
Rafael Espindola [Mon, 30 Jan 2017 14:07:43 +0000 (14:07 +0000)]
Fix the values of two xcore ELF flags.

The values in llvm grew from a pre-MC day when they would not show up
in .o files and are outside of the SHF_MASKPROC.

Fortunately the MC output is not currently used as xcore has its own
assemble and that assembler uses valid values. This updates llvm to
use the same values as the xmos assembler.

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

8 years ago[X86][MCU] Minor bug fix for r293469 + test case
Asaf Badouh [Mon, 30 Jan 2017 13:14:37 +0000 (13:14 +0000)]
[X86][MCU] Minor bug fix for r293469 + test case

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

8 years agoAMDGPU: Remove a useless VI SMRD pattern
Marek Olsak [Mon, 30 Jan 2017 12:25:14 +0000 (12:25 +0000)]
AMDGPU: Remove a useless VI SMRD pattern

Summary: already covered by complex patterns

Reviewers: arsenm, nhaehnle, tstellarAMD

Subscribers: kzhuravl, wdng, yaxunl, tony-tye

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

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

8 years agoAMDGPU: Fix assembler encoding for EXP instructions on VI
Marek Olsak [Mon, 30 Jan 2017 12:25:03 +0000 (12:25 +0000)]
AMDGPU: Fix assembler encoding for EXP instructions on VI

Reviewers: arsenm, tstellarAMD

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

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

8 years agoRevert "[MemorySSA] Revert r293361 and r293363, as the tests fail under asan."
Daniel Berlin [Mon, 30 Jan 2017 11:35:39 +0000 (11:35 +0000)]
Revert "[MemorySSA] Revert r293361 and r293363, as the tests fail under asan."

This reverts commit r293471, reapplying r293361 and r293363 with a fix
for an out-of-bounds read.

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

8 years ago[MemorySSA] Revert r293361 and r293363, as the tests fail under asan.
Sam McCall [Mon, 30 Jan 2017 09:19:50 +0000 (09:19 +0000)]
[MemorySSA] Revert r293361 and r293363, as the tests fail under asan.

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

8 years ago[GlobalISel] Add support for indirectbr
Kristof Beyls [Mon, 30 Jan 2017 09:13:18 +0000 (09:13 +0000)]
[GlobalISel] Add support for indirectbr

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

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

8 years ago[X86][MCU] replace select with bit manipulation instead of branches
Asaf Badouh [Mon, 30 Jan 2017 08:16:59 +0000 (08:16 +0000)]
[X86][MCU] replace select with bit manipulation instead of branches

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

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

8 years ago[LanRef] Fix typo in getelementptr example.
Alexey Bader [Mon, 30 Jan 2017 07:38:58 +0000 (07:38 +0000)]
[LanRef] Fix typo in getelementptr example.

Summary: Change B type from double to pointer to double.

Reviewers: delena, sanjoy

Reviewed By: sanjoy

Subscribers: sanjoy, llvm-commits

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

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

8 years ago[AVX-512] Remove duplicate CodeGenOnly patterns for scalar register broadcast. We...
Craig Topper [Mon, 30 Jan 2017 06:59:06 +0000 (06:59 +0000)]
[AVX-512] Remove duplicate CodeGenOnly patterns for scalar register broadcast. We can use COPY_TO_REGCLASS like AVX does.

This causes stack spill slots be oversized sometimes, but the same should already be happening with AVX.

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

8 years agoInclude LLVMDumpValue in release builds.
Sam McCall [Mon, 30 Jan 2017 05:40:52 +0000 (05:40 +0000)]
Include LLVMDumpValue in release builds.

This part of the C API is still used in language bindings.

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

8 years ago[LoopVectorize] Improve getVectorCallCost() getScalarizationOverhead() call.
Jonas Paulsson [Mon, 30 Jan 2017 05:38:05 +0000 (05:38 +0000)]
[LoopVectorize] Improve getVectorCallCost() getScalarizationOverhead() call.

By calling getScalarizationOverhead with the CallInst instead of the types of
its arguments, we make sure that only unique call arguments are added to the
scalarization cost.

getScalarizationOverhead() is extended to handle calls by only passing on the
actual call arguments (which is not all the operands).

This also eliminates a wrapper function with the same name.

review: Hal Finkel

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

8 years ago[AVX-512] Remove KSET0B/KSET1B in favor of the patterns that select KSET0W/KSET1W...
Craig Topper [Mon, 30 Jan 2017 05:37:47 +0000 (05:37 +0000)]
[AVX-512] Remove KSET0B/KSET1B in favor of the patterns that select KSET0W/KSET1W for v8i1.

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

8 years ago[MemorySSA] Correct an assertion surrounding with parentheses.
Davide Italiano [Mon, 30 Jan 2017 03:16:43 +0000 (03:16 +0000)]
[MemorySSA] Correct an assertion surrounding with parentheses.

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

8 years agoTest RuntimeDyld doesn't crash with R_X86_64_NONE (r293388).
Will Dietz [Mon, 30 Jan 2017 01:28:42 +0000 (01:28 +0000)]
Test RuntimeDyld doesn't crash with R_X86_64_NONE (r293388).

Largely based on LLD test for dtrace.

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

8 years ago[AVX-512] Don't reuse VSHLI/VSRLI for mask register shifts. VSHLI/VSHRI shift within...
Craig Topper [Mon, 30 Jan 2017 00:06:01 +0000 (00:06 +0000)]
[AVX-512] Don't reuse VSHLI/VSRLI for mask register shifts. VSHLI/VSHRI shift within elements while KSHIFT moves whole elements.

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

8 years ago[X86][Disassembler] Added SALC instruction
Chris Ray [Sun, 29 Jan 2017 23:02:47 +0000 (23:02 +0000)]
[X86][Disassembler] Added SALC instruction

Reviewers: joe.abbey, craig.topper

Reviewed By: craig.topper

Subscribers: majnemer, llvm-commits

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

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

8 years ago[AVX-512] Fix lowering for mask register concatenation with undef in the lower half.
Craig Topper [Sun, 29 Jan 2017 22:53:33 +0000 (22:53 +0000)]
[AVX-512] Fix lowering for mask register concatenation with undef in the lower half.

Previously this test case fired an assertion in getNode because we tried to create an insert_subvector with both input types the same size and the index pointing to half the vector width.

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

8 years ago[X86] Fixing flag usage for RCL and RCR
Chris Ray [Sun, 29 Jan 2017 20:05:30 +0000 (20:05 +0000)]
[X86] Fixing flag usage for RCL and RCR

Summary: The RCL and RCR instructions use the carry flag.

Reviewers: craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

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

8 years agoMachineInstr: Remove parameter from dump()
Matthias Braun [Sun, 29 Jan 2017 18:20:42 +0000 (18:20 +0000)]
MachineInstr: Remove parameter from dump()

The primary use of the dump() functions in LLVM is for use in a
debugger. Unfortunately lldb does not seem to handle default arguments
so using `p SomeMI.dump()` fails and you have to type the longer `p
SomeMI.dump(nullptr)`. Remove the paramter to make the most common use
easy. (You can always construct something like `p
SomeMI.print(dbgs(),MyTII)` if you need more features).

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

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

8 years ago[X86][SSE] Lower scalar_to_vector(0) to zero vector
Simon Pilgrim [Sun, 29 Jan 2017 18:13:37 +0000 (18:13 +0000)]
[X86][SSE] Lower scalar_to_vector(0) to zero vector

Replaces an xor+movd/movq with an xorps which will be shorter in codesize, avoid an int-fpu transfer, allow modern cores to fast path the result during decode and helps other combines recognise an all-zero vector.

The only reason I can think of that we'd want to keep scalar_to_vector in this case is to help recognise the upper elts are undef but this doesn't seem to be a problem.

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

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

8 years ago[X86] Reproducer for pr31719. NFC
Zvi Rackover [Sun, 29 Jan 2017 17:57:26 +0000 (17:57 +0000)]
[X86] Reproducer for pr31719. NFC

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

8 years agollvm-c: Keep LLVMDumpModule() even in release builds
Matthias Braun [Sun, 29 Jan 2017 17:52:03 +0000 (17:52 +0000)]
llvm-c: Keep LLVMDumpModule() even in release builds

While this probably should be considered a dump debugger utility, the C
API currently has no other ways to print a module to stderr for error
reporting purposes, so keep it even in release builds.

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

8 years ago[InstCombine] enable (X >>?,exact C1) << C2 --> X << (C2 - C1) for vectors with splats
Sanjay Patel [Sun, 29 Jan 2017 17:11:18 +0000 (17:11 +0000)]
[InstCombine] enable (X >>?,exact C1) << C2 --> X << (C2 - C1) for vectors with splats

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

8 years ago[InstCombine] add tests for shl(shr X, C1), C2 transforms; NFC
Sanjay Patel [Sun, 29 Jan 2017 16:52:59 +0000 (16:52 +0000)]
[InstCombine] add tests for shl(shr X, C1), C2 transforms; NFC

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

8 years agoARM: support `-mlong-calls` with AEABI TLS on ELF
Saleem Abdulrasool [Sun, 29 Jan 2017 16:46:22 +0000 (16:46 +0000)]
ARM: support `-mlong-calls` with AEABI TLS on ELF

Support lowering AEABI TLS access (__aeabi_read_tp) with long calls.
This requires adjusting the call sequence to use an indirect call to get
full addressability.

Resolves PR31769!

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

8 years ago[ValueTracking] clean up lookThroughCast; NFCI
Sanjay Patel [Sun, 29 Jan 2017 16:34:57 +0000 (16:34 +0000)]
[ValueTracking] clean up lookThroughCast; NFCI

1. Use auto with dyn_cast.
2. Don't use else after return.
3. Convert chain of 'else if' to switch.
4. Improve variable names.

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

8 years ago[X86 Codegen] Fixed a bug in unsigned saturation
Elena Demikhovsky [Sun, 29 Jan 2017 13:18:30 +0000 (13:18 +0000)]
[X86 Codegen] Fixed a bug in unsigned saturation

PACKUSWB converts Signed word to Unsigned byte, (the same about DW) and it can't be used for umin+truncate pattern.
AVX-512 VPMOVUS* instructions fit the pattern since they convert Unsigned to Unsigned.

See https://llvm.org/bugs/show_bug.cgi?id=31773

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

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

8 years agoAdd -mtriple=aarch64-unknown to llvm/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll.
NAKAMURA Takumi [Sun, 29 Jan 2017 11:10:34 +0000 (11:10 +0000)]
Add -mtriple=aarch64-unknown to llvm/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll.

Unsupported target might be induced if default target is neither macho nor elf. (e.g. *-win32)

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

8 years agoNewGVN: Fix where newline is printed in debug printing of memory equivalence
Daniel Berlin [Sun, 29 Jan 2017 10:26:03 +0000 (10:26 +0000)]
NewGVN: Fix where newline is printed in debug printing of memory equivalence

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

8 years ago[X86][GlobalISel] Add limited argument lowering support to the IRTranslator.
Igor Breger [Sun, 29 Jan 2017 08:35:42 +0000 (08:35 +0000)]
[X86][GlobalISel] Add limited argument lowering support to the IRTranslator.

Summary:
Add limited (i8/i16/i32/i64)  argument lowering support to the IRTranslator.
Inspired by commit 289940.

Reviewers: t.p.northover, qcolombet, ab, zvi, rovka

Reviewed By: rovka

Subscribers: dberris, rovka, kristof.beyls, llvm-commits

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

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

8 years ago[ArgPromote] Move static helpers to modern LLVM naming conventions while
Chandler Carruth [Sun, 29 Jan 2017 08:03:21 +0000 (08:03 +0000)]
[ArgPromote] Move static helpers to modern LLVM naming conventions while
here. NFC.

Simple refactoring while prepping a port to the new PM.

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

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

8 years ago[ArgPromote] Run clang-format to normalize remarkably idiosyncratic
Chandler Carruth [Sun, 29 Jan 2017 08:03:19 +0000 (08:03 +0000)]
[ArgPromote] Run clang-format to normalize remarkably idiosyncratic
formatting that has evolved here over the past years prior to making
somewhat invasive changes to thread new PM support through the business
logic.

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

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

8 years ago[ArgPromote] Re-arrange the code in a more typical, logical way.
Chandler Carruth [Sun, 29 Jan 2017 08:03:16 +0000 (08:03 +0000)]
[ArgPromote] Re-arrange the code in a more typical, logical way.

This arranges the static helpers in an order where they are defined
prior to their use to avoid the need of forward declarations, and
collect the core pass components at the bottom below their helpers.

This also folds one trivial function into the pass itself. Factoring
this 'runImpl' was an attempt to help porting to the new pass manager,
however in my attempt to begin this port in earnest it turned out to not
be a substantial help. I think it will be easier to factor things
without it.

This is an NFC change and does a minimal amount of edits over all.
Subsequent NFC cleanups will normalize the formatting with clang-format
and improve the basic doxygen commenting.

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

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

8 years ago[SelectionDAG] Make SDNode::getConstantOperandVal an inline method.
Craig Topper [Sun, 29 Jan 2017 06:08:02 +0000 (06:08 +0000)]
[SelectionDAG] Make SDNode::getConstantOperandVal an inline method.

It's operation already exists manually in many places without using the method.

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

8 years agoAdd some Book-E instructions to the asm parser and printer.
Justin Hibbits [Sun, 29 Jan 2017 04:55:57 +0000 (04:55 +0000)]
Add some Book-E instructions to the asm parser and printer.

Summary:
Adds the following instructions:
* mfpmr
* mtpmr
* icblc
* icblq
* icbtls

Fix the scheduling for mtspr on e5500, which uses CFX0, instead of
SFX0/SFX1 as on e500mc.

Addresses PR 31538.

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

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

8 years ago[DAGCombiner] Use unsigned for a constant vector index instead of APInt.
Craig Topper [Sun, 29 Jan 2017 04:38:21 +0000 (04:38 +0000)]
[DAGCombiner] Use unsigned for a constant vector index instead of APInt.

The type system requires that the number of vector elements should fit in 32-bits so this should be safe.

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

8 years ago[DAGCombiner] Remove unnecessary check on the size of the type of the index of EXTRAC...
Craig Topper [Sun, 29 Jan 2017 04:38:19 +0000 (04:38 +0000)]
[DAGCombiner] Remove unnecessary check on the size of the type of the index of EXTRACT_SUBVECTOR.

The type system already requires that the number of vector elements must fit in 32-bits so an index should as well. Even if the type of the index were larger all we care about is that the constant index can fit in 64-bits so that we can call getZExtValue.

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

8 years ago[DAGCombiner] Make sure index of EXTRACT_SUBVECTOR is a constant before trying to...
Craig Topper [Sun, 29 Jan 2017 04:38:16 +0000 (04:38 +0000)]
[DAGCombiner] Make sure index of EXTRACT_SUBVECTOR is a constant before trying to use getConstantOperandVal.

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

8 years ago[Orc][RPC] Have handleOne abandon pending responses upon channel failure.
Lang Hames [Sun, 29 Jan 2017 04:25:16 +0000 (04:25 +0000)]
[Orc][RPC] Have handleOne abandon pending responses upon channel failure.

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

8 years ago[Orc][RPC] Remove redundant braces. NFC.
Lang Hames [Sun, 29 Jan 2017 04:09:01 +0000 (04:09 +0000)]
[Orc][RPC] Remove redundant braces. NFC.

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

8 years agoAdd support to dump dot graph block layout after MBP
Xinliang David Li [Sun, 29 Jan 2017 01:57:02 +0000 (01:57 +0000)]
Add support to dump dot graph block layout after MBP

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

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

8 years agoRemove inclusion of SSAUpdater from several passes.
Davide Italiano [Sun, 29 Jan 2017 01:55:24 +0000 (01:55 +0000)]
Remove inclusion of SSAUpdater from several passes.

It is, in fact, unused. Found while reviewing Danny's new
SSAUpdater and porting passes to it to see how the new API
looked like.

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

8 years ago[Target] Add NoSignedZerosFPMath to the TargetOptions constructor
David Majnemer [Sun, 29 Jan 2017 01:27:08 +0000 (01:27 +0000)]
[Target] Add NoSignedZerosFPMath to the TargetOptions constructor

Most flags were already initialized by the TargetOptions constructor but
we missed out on one.  Also, simplify the constructor by using field
initializers when possible.

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

8 years ago[Orc][RPC] Remove a couple of redundant calls to abandonAllPendingResponses.
Lang Hames [Sun, 29 Jan 2017 00:51:17 +0000 (00:51 +0000)]
[Orc][RPC] Remove a couple of redundant calls to abandonAllPendingResponses.

appendCallAsync, which all RPC call functions ultimately build on, will call
abandonAllPendingResponses on channel error. These extra calls are redundant.

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

8 years ago[X86] Fix vector ANDN matching to work correctly when both inputs to the AND are...
Craig Topper [Sat, 28 Jan 2017 23:52:09 +0000 (23:52 +0000)]
[X86] Fix vector ANDN matching to work correctly when both inputs to the AND are XORs.

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

8 years ago[X86] Add test case that shows failure to use a vector ANDN when both inputs to the...
Craig Topper [Sat, 28 Jan 2017 23:52:04 +0000 (23:52 +0000)]
[X86] Add test case that shows failure to use a vector ANDN when both inputs to the AND are XORs.

The matching code tries to canonicalize XOR to the left, but if there are two XORs and only one is a vnot, this canonicalization can prevent matching.

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

8 years ago[PM] MLSM has been enabled for a way. Reclaim a cl::opt.
Davide Italiano [Sat, 28 Jan 2017 23:45:37 +0000 (23:45 +0000)]
[PM] MLSM has been enabled for a way. Reclaim a cl::opt.

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

8 years ago[libfuzzer] include errno.h. On Ubuntu 14.04 we got away w/o it, but other systems...
Kostya Serebryany [Sat, 28 Jan 2017 18:56:05 +0000 (18:56 +0000)]
[libfuzzer] include errno.h. On Ubuntu 14.04 we got away w/o it, but other systems seem to require it

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

8 years agoRuntimeDyldELF: Don't abort on R_X86_64_NONE, it's a no-oop.
Will Dietz [Sat, 28 Jan 2017 18:39:01 +0000 (18:39 +0000)]
RuntimeDyldELF: Don't abort on R_X86_64_NONE, it's a no-oop.

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

8 years agoAMDGPU: Add GlobalISel to required_libraries.
Will Dietz [Sat, 28 Jan 2017 18:13:08 +0000 (18:13 +0000)]
AMDGPU: Add GlobalISel to required_libraries.

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

8 years ago[SLP] Vectorize loads of consecutive memory accesses, accessed in non-consecutive...
Mohammad Shahid [Sat, 28 Jan 2017 17:59:44 +0000 (17:59 +0000)]
[SLP] Vectorize loads of consecutive memory accesses, accessed in non-consecutive (jumbled) way.
The jumbled scalar loads will be sorted while building the tree and these accesses will be marked to generate shufflevector after the vectorized load with proper mask.

Reviewers: hfinkel, mssimpso, mkuper

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

Change-Id: I9c0c8e6f91a00076a7ee1465440a3f6ae092f7ad

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

8 years ago[NVPTX] Add intrinsics to support named barriers.
Arpith Chacko Jacob [Sat, 28 Jan 2017 16:38:15 +0000 (16:38 +0000)]
[NVPTX] Add intrinsics to support named barriers.

Support for barrier synchronization between a subset of threads
in a CTA through one of sixteen explicitly specified barriers.
These intrinsics are not directly exposed in CUDA but are
critical for forthcoming support of OpenMP on NVPTX GPUs.

The intrinsics allow the synchronization of an arbitrary
(multiple of 32) number of threads in a CTA at one of 16
distinct barriers. The two intrinsics added are as follows:

call void @llvm.nvvm.barrier.n(i32 10)
waits for all threads in a CTA to arrive at named barrier #10.

call void @llvm.nvvm.barrier(i32 15, i32 992)
waits for 992 threads in a CTA to arrive at barrier #15.

Detailed description of these intrinsics are available in the PTX manual.
http://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions

Reviewers: hfinkel, jlebar
Differential Revision: https://reviews.llvm.org/D17657

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

8 years agoRemove unused 'using' declaration. Found by clang-tidy: misc-unused-using-decls NFC
Sylvestre Ledru [Sat, 28 Jan 2017 13:42:54 +0000 (13:42 +0000)]
Remove unused 'using' declaration. Found by clang-tidy: misc-unused-using-decls NFC

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

8 years agostripDebugInfo() should remove DILocation's found in !llvm.loop metadata
Daniel Sanders [Sat, 28 Jan 2017 11:22:05 +0000 (11:22 +0000)]
stripDebugInfo() should remove DILocation's found in !llvm.loop metadata

Summary:
Patch by Michele Scandale
(with a small tweak to 'CHECK-NOT' the last DILocation in the test)

Subscribers: bogner, llvm-commits

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

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

8 years ago[globalisel] Rename emitCxxPredicatesExpr() following post-commit review of r293172
Daniel Sanders [Sat, 28 Jan 2017 11:10:42 +0000 (11:10 +0000)]
[globalisel] Rename emitCxxPredicatesExpr() following post-commit review of r293172

It's now emitCxxPredicateListExpr() to better match the class name.

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

8 years ago[Orc][RPC] Unlock message send/receive locks on failure.
Lang Hames [Sat, 28 Jan 2017 10:19:47 +0000 (10:19 +0000)]
[Orc][RPC] Unlock message send/receive locks on failure.

This fixes some destruction-of-locked-mutex errors in RawByteChannel.

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

8 years agoThis addresses LLDB bug 31699, which was caused by LLVM using static linking on Windows.
Vadim Chugunov [Sat, 28 Jan 2017 07:39:52 +0000 (07:39 +0000)]
This addresses LLDB bug 31699, which was caused by LLVM using static linking on Windows.

In order to make sure that LLVM continues to work on machines that do not have the Universal CRT yet,
we'll need to ship a copy of UCRT in the Windows installation package. Fortunately, CMake 3.6+ already
supports app-local deployment of UCRT dlls, we just need to turn this on.

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

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

8 years ago[InstCombine] Merge DebugLoc when speculatively hoisting store instruction
Taewook Oh [Sat, 28 Jan 2017 07:05:43 +0000 (07:05 +0000)]
[InstCombine] Merge DebugLoc when speculatively hoisting store instruction

Summary: Along with https://reviews.llvm.org/D27804, debug locations need to be merged when hoisting store instructions as well. Not sure if just dropping debug locations would make more sense for this case, but as the branch instruction will have at least different discriminator with the hoisted store instruction, I think there will be no difference in practice.

Reviewers: aprantl, andreadb, danielcdh

Reviewed By: aprantl

Subscribers: llvm-commits

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

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

8 years agoUse print() instead of dump() in code
Matthias Braun [Sat, 28 Jan 2017 06:53:55 +0000 (06:53 +0000)]
Use print() instead of dump() in code

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

8 years ago[WebAssembly] Use print instead of dump method.
Richard Trieu [Sat, 28 Jan 2017 03:23:49 +0000 (03:23 +0000)]
[WebAssembly] Use print instead of dump method.

This fixes non-debug non-assert builds after r293359.

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

8 years agoUse print() instead of dump() in code
Matthias Braun [Sat, 28 Jan 2017 02:47:46 +0000 (02:47 +0000)]
Use print() instead of dump() in code

The dump() functions are meant to be used in a debugger, code should
typically use something like print(errs());

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

8 years agoMemorySSA: Allow movement to arbitrary places
Daniel Berlin [Sat, 28 Jan 2017 02:26:39 +0000 (02:26 +0000)]
MemorySSA: Allow movement to arbitrary places

Summary: Extend the MemorySSAUpdater API to allow movement to arbitrary places

Reviewers: davide, george.burgess.iv

Subscribers: llvm-commits

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

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

8 years ago[RegisterBankInfo] Emit proper type for remapped registers.
Quentin Colombet [Sat, 28 Jan 2017 02:23:48 +0000 (02:23 +0000)]
[RegisterBankInfo] Emit proper type for remapped registers.

When the OperandsMapper creates virtual registers, it used to just create
plain scalar register with the right size. This may confuse the
instruction selector because we lose the information of the instruction
using those registers what supposed to do. The MachineVerifier complains
about that already.

With this patch, the OperandsMapper still creates plain scalar register,
but the expectation is for the mapping function to remap the type
properly. The default mapping function has been updated to do that.

rdar://problem/30231850

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

8 years agoMemorySSA: Fix block numbering invalidation and replacement bugs discovered by updater
Daniel Berlin [Sat, 28 Jan 2017 02:22:52 +0000 (02:22 +0000)]
MemorySSA: Fix block numbering invalidation and replacement bugs discovered by updater

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

8 years agoCleanup dump() functions.
Matthias Braun [Sat, 28 Jan 2017 02:02:38 +0000 (02:02 +0000)]
Cleanup dump() functions.

We had various variants of defining dump() functions in LLVM. Normalize
them (this should just consistently implement the things discussed in
http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html

For reference:
- Public headers should just declare the dump() method but not use
  LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
- The definition of a dump method should look like this:
  #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  LLVM_DUMP_METHOD void MyClass::dump() {
    // print stuff to dbgs()...
  }
  #endif

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

8 years agoMemorySSA: Move updater to its own file
Daniel Berlin [Sat, 28 Jan 2017 01:35:02 +0000 (01:35 +0000)]
MemorySSA: Move updater to its own file

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

8 years agoIntroduce a basic MemorySSA updater, that supports insertDef,
Daniel Berlin [Sat, 28 Jan 2017 01:23:13 +0000 (01:23 +0000)]
Introduce a basic MemorySSA updater, that supports insertDef,
insertUse, moveBefore and moveAfter operations.

Summary:
This creates a basic MemorySSA updater that handles arbitrary
insertion of uses and defs into MemorySSA, as well as arbitrary
movement around the CFG. It replaces the current splice API.

It can be made to handle arbitrary control flow changes.
Currently, it uses the same updater algorithm from D28934.

The main difference is because MemorySSA is single variable, we have
the complete def and use list, and don't need anyone to give it to us
as part of the API.  We also have to rename stores below us in some
cases.

If we go that direction in that patch, i will merge all the updater
implementations (using an updater_traits or something to provide the
get* functions we use, called read*/write* in that patch).

Sadly, the current SSAUpdater algorithm is way too slow to use for
what we are doing here.

I have updated the tests we have to basically build memoryssa
incrementally using the updater api, and make sure it still comes out
the same.

Reviewers: george.burgess.iv

Subscribers: llvm-commits

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

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

8 years ago[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".
Quentin Colombet [Sat, 28 Jan 2017 01:05:27 +0000 (01:05 +0000)]
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".

In r292621, the recommit fixes a bug related with live interval update
after the partial redundent copy is moved.

This recommit solves an additional bug related to the lack of update of
subranges.

The original patch is to solve the performance problem described in
PR27827. Register coalescing sometimes cannot remove a copy because of
interference. But if we can find a reverse copy in one of the predecessor
block of the copy, the copy is partially redundent and we may remove the
copy partially by moving it to the predecessor block without the
reverse copy.

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

Re-apply r292621

Revert "Revert rL292621. Caused some internal build bot failures in apple."

This reverts commit r292984.

Original patch: Wei Mi <wmi@google.com>
Subrange fix: Mostly Matthias Braun <matze@braunis.de>

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

8 years agoFix memory leak in globalisel.
Evgeniy Stepanov [Sat, 28 Jan 2017 00:46:30 +0000 (00:46 +0000)]
Fix memory leak in globalisel.

    #0 0x89cdeb in operator new[](unsigned long) /code/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:84:37
    #1 0x4ec87c4 in llvm::RegisterBankInfo::ValueMapping const* llvm::RegisterBankInfo::getOperandsMapping<llvm::RegisterBankInfo::ValueMapping const* const*>(llvm::RegisterBankInfo::ValueMapping const* const*, llvm::RegisterBankInfo::ValueMapping const* const*) const /code/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:297:9
    #2 0x9327ee in llvm::AArch64RegisterBankInfo::getInstrMapping(llvm::MachineInstr const&) const /code/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp:540:30
    #3 0x4eb8d07 in llvm::RegBankSelect::assignInstr(llvm::MachineInstr&) /code/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:546:24
    #4 0x4eb9dd2 in llvm::RegBankSelect::runOnMachineFunction(llvm::MachineFunction&) /code/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:624:12
    #5 0x3141875 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /code/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:13
    #6 0x396128d in llvm::FPPassManager::runOnFunction(llvm::Function&) /code/llvm/lib/IR/LegacyPassManager.cpp:1513:27
    #7 0x3961832 in llvm::FPPassManager::runOnModule(llvm::Module&) /code/llvm/lib/IR/LegacyPassManager.cpp:1534:16
    #8 0x3962540 in runOnModule /code/llvm/lib/IR/LegacyPassManager.cpp:1590:27
    #9 0x3962540 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /code/llvm/lib/IR/LegacyPassManager.cpp:1693
    #10 0x8ae368 in compileModule(char**, llvm::LLVMContext&) /code/llvm/tools/llc/llc.cpp:562:8
    #11 0x8a7a1b in main /code/llvm/tools/llc/llc.cpp:316:22

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

8 years agoTest commit.
Vadim Chugunov [Fri, 27 Jan 2017 23:59:26 +0000 (23:59 +0000)]
Test commit.

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

8 years ago[ARM] Fix some Clang-tidy modernize and Include What You Use warnings; other minor...
Eugene Zelenko [Fri, 27 Jan 2017 23:58:02 +0000 (23:58 +0000)]
[ARM] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

8 years agoGlobalISel: don't leak super-entry BB when merging with IR-level one.
Tim Northover [Fri, 27 Jan 2017 23:54:31 +0000 (23:54 +0000)]
GlobalISel: don't leak super-entry BB when merging with IR-level one.

We have to delete the block manually or it leaks. That triggers failures in
-fsanitize=leak bots (unsurprisingly), which should be fixed by this patch.

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

8 years ago[InstCombine] move icmp transforms that might be recognized as min/max and inf-loop...
Sanjay Patel [Fri, 27 Jan 2017 23:26:27 +0000 (23:26 +0000)]
[InstCombine] move icmp transforms that might be recognized as min/max and inf-loop (PR31751)

This is a minimal patch to avoid the infinite loop in:
https://llvm.org/bugs/show_bug.cgi?id=31751

But the general problem is bigger: we're not canonicalizing all of the min/max forms reported
by value tracking's matchSelectPattern(), and we don't define min/max consistently. Some code
uses matchSelectPattern(), other code uses matchers like m_Umax, and others have their own
inline definitions which may be subtly different from any of the above.

The reason that the test cases in this patch need a cast op to trigger is because we don't
(yet) canonicalize all min/max forms based on matchSelectPattern() in
canonicalizeMinMaxWithConstant(), but we do make min/max+cast transforms based on
matchSelectPattern() in visitSelectInst().

The location of the icmp transforms that trigger the inf-loop seems arbitrary at best, so
I'm moving those behind the min/max fence in visitICmpInst() as the quick fix.

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

8 years agoAnalysis: Add appropriate const qualification to functions in TypeMetadataUtils.cpp...
Peter Collingbourne [Fri, 27 Jan 2017 22:55:30 +0000 (22:55 +0000)]
Analysis: Add appropriate const qualification to functions in TypeMetadataUtils.cpp. NFC.

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

8 years ago[libFuzzer] make shmem more robust in the presence of signals
Kostya Serebryany [Fri, 27 Jan 2017 22:41:30 +0000 (22:41 +0000)]
[libFuzzer] make shmem more robust in the presence of signals

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

8 years ago[AMDGPU][mc] Fix memory corruption uncovered by AddressSanitizer during coverage...
Artem Tamazov [Fri, 27 Jan 2017 22:19:42 +0000 (22:19 +0000)]
[AMDGPU][mc] Fix memory corruption uncovered by AddressSanitizer during coverage/smoke Gfx7/8 testing.

Coverage/smoke Gfx7/8 tests were committed r292922 but then reverted
by r292974 due to AddressSanitizer failure, which is fixed by this patch.
Tests to be re-committed soon.

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

8 years agoGlobalISel: set correct regclass for LOAD_STACK_GUARD.
Tim Northover [Fri, 27 Jan 2017 21:31:24 +0000 (21:31 +0000)]
GlobalISel: set correct regclass for LOAD_STACK_GUARD.

Since it's not actually a generic MI, its register operands need a RegClass,
which is conveniently the target's pointer RegClass.

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

8 years agoGlobalISel: mark incoming landing-pad registers as live.
Tim Northover [Fri, 27 Jan 2017 21:31:17 +0000 (21:31 +0000)]
GlobalISel: mark incoming landing-pad registers as live.

Should fix machine verifier failures.

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

8 years ago[Hexagon] Remove unused variable (and silence a warning)
Krzysztof Parzyszek [Fri, 27 Jan 2017 20:40:14 +0000 (20:40 +0000)]
[Hexagon] Remove unused variable (and silence a warning)

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

8 years agoFix ASAN failure in cxa_demangle
Mehdi Amini [Fri, 27 Jan 2017 20:32:16 +0000 (20:32 +0000)]
Fix ASAN failure in cxa_demangle

Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com>

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

8 years agoGlobal DCE performance improvement
Mehdi Amini [Fri, 27 Jan 2017 19:48:57 +0000 (19:48 +0000)]
Global DCE performance improvement

Change the original algorithm so that it scales better when meeting
very large bitcode where every instruction does not implies a global.

The target query is "how to you get all the globals referenced by
another global"?

Before this patch, it was doing this by walking the body (or the
initializer) and collecting the references. What this patch is doing,
it precomputing the answer to this query for the whole module by
walking the use-list of every global instead.

Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>

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

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

8 years agoUpdate NVVMReflect usage doc to new idiom for adding target-specific early passes.
Justin Lebar [Fri, 27 Jan 2017 19:44:24 +0000 (19:44 +0000)]
Update NVVMReflect usage doc to new idiom for adding target-specific early passes.

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

8 years ago[PGO] add debug option to view raw count after prof use annotation
Xinliang David Li [Fri, 27 Jan 2017 19:06:25 +0000 (19:06 +0000)]
[PGO] add debug option to view raw count after prof use annotation

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

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

8 years agoScheduleDAGInstrs: Do not try to toggle kill flags on debug uses
Matthias Braun [Fri, 27 Jan 2017 18:53:07 +0000 (18:53 +0000)]
ScheduleDAGInstrs: Do not try to toggle kill flags on debug uses

Preparation for upcoming changes. No testcase as none of the public
targets bundles early enough and has a post machine scheduler enabled at
the same time. The error is also easily catched by asserts.

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

8 years agoScheduleDAGInstrs: Cleanup toggleKillFlag(); NFC
Matthias Braun [Fri, 27 Jan 2017 18:53:05 +0000 (18:53 +0000)]
ScheduleDAGInstrs: Cleanup toggleKillFlag(); NFC

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

8 years agoScheduleDAGInstrs: Cleanup; NFC
Matthias Braun [Fri, 27 Jan 2017 18:53:00 +0000 (18:53 +0000)]
ScheduleDAGInstrs: Cleanup; NFC

Comment, doxygen and a bit of whitespace cleanup.

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

8 years agoAMDGPU/SI: Move some ISel helpers into utils so they can be shared with GISel
Tom Stellard [Fri, 27 Jan 2017 18:41:14 +0000 (18:41 +0000)]
AMDGPU/SI: Move some ISel helpers into utils so they can be shared with GISel

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

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

8 years ago[AMDGPU] Grab MCSubtargetInfo from TargetMachine instead of constructing it
Konstantin Zhuravlyov [Fri, 27 Jan 2017 18:32:40 +0000 (18:32 +0000)]
[AMDGPU] Grab MCSubtargetInfo from TargetMachine instead of constructing it

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

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

8 years ago[X86] Adding FFREEP instruction.
Chris Ray [Fri, 27 Jan 2017 18:02:53 +0000 (18:02 +0000)]
[X86] Adding FFREEP instruction.

Summary: Small change to get the FREEP instruction to decode properly.

Reviewers: craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

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

8 years agoNFC: Add debug tracing for more cases where loop unrolling fails.
Anna Thomas [Fri, 27 Jan 2017 17:57:05 +0000 (17:57 +0000)]
NFC: Add debug tracing for more cases where loop unrolling fails.

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

8 years agoAMDGPU: Enable FeatureFlatForGlobal on Volcanic Islands
Matt Arsenault [Fri, 27 Jan 2017 17:42:26 +0000 (17:42 +0000)]
AMDGPU: Enable FeatureFlatForGlobal on Volcanic Islands

Accomplishes what r292982 was supposed to, which ended up
only really making the necessary test changes.

This should be applied to the 4.0 branch.

Patch by Vedran Miletić <vedran@miletic.net>

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

8 years ago[ARM/AArch64] Relocate and update InterleavedAccessPass tests (NFC)
Matthew Simpson [Fri, 27 Jan 2017 17:33:16 +0000 (17:33 +0000)]
[ARM/AArch64] Relocate and update InterleavedAccessPass tests (NFC)

The interleaved access pass is an IR-to-IR transformation that runs before code
generation. It matches interleaved memory operations to target-specific
intrinsics (that are later lowered to load and store multiple instructions on
ARM/AArch64). We place tests for similar passes (e.g., GlobalMergePass) under
test/Transforms. This patch moves the InterleavedAccessPass tests out of
test/CodeGen and into target-specific directories under
test/Transforms/InterleavedAccess.

Although the pass is an IR pass, many of the existing tests were llc tests
rather opt tests. For example, the tests would check for ldN/stN instructions
generated by llc rather than the intrinsic calls the pass actually inserts.
Thus, this patch updates all tests to be opt tests that check for the inserted
intrinsics. We already have separate CodeGen tests that ensure we lower the
interleaved access intrinsics to their corresponding ldN/stN instructions. In
addition to migrating the tests to opt, this patch also performs some minor
clean-up (to ensure consistent naming, etc.).

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

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

8 years agoNVPTX: Make NVPTXInferAddressSpaces preserve CFG
Matt Arsenault [Fri, 27 Jan 2017 17:30:39 +0000 (17:30 +0000)]
NVPTX: Make NVPTXInferAddressSpaces preserve CFG

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

8 years ago[CodeGenPrep]No negative cost in the ExtLd promotion
Jun Bum Lim [Fri, 27 Jan 2017 17:16:37 +0000 (17:16 +0000)]
[CodeGenPrep]No negative cost in the ExtLd promotion

Summary: This change prevent the signed value of cost from being negative as the value is passed as an unsigned argument.

Reviewers: mcrosier, jmolloy, qcolombet, javed.absar

Reviewed By: mcrosier, qcolombet

Subscribers: llvm-commits

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

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

8 years ago[AMDGPU] Turn AMDGPUUnifyMetadata back into module pass
Stanislav Mekhanoshin [Fri, 27 Jan 2017 16:38:10 +0000 (16:38 +0000)]
[AMDGPU] Turn AMDGPUUnifyMetadata back into module pass

With the adjustPassManager interface that is now possible to use
custom early module passes.

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

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