1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

137794 Commits

Author SHA1 Message Date
Sam Kolton
80403ad897 [AMDGPU] Assembler: rename amd_kernel_code_t asm names according to spec
Summary:
Also removed duplicate code from AMDGPUTargetAsmStreamer.
This change only change how amd_kernel_code_t is parsed and printed. No variable names are changed.

Reviewers: vpykhtin, tstellarAMD

Subscribers: arsenm, wdng, nhaehnle

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

llvm-svn: 281028
2016-09-09 10:08:02 +00:00
James Molloy
98e9858311 [Thumb1] Teach optimizeCompareInstr about thumb1 compares
This avoids us doing a completely unneeded "cmp r0, #0" after a flag-setting instruction if we only care about the Z or C flags.

Add LSL/LSR to the whitelist while we're here and add testing. This code could really do with a spring clean.

llvm-svn: 281027
2016-09-09 09:51:06 +00:00
Sam Kolton
eb66ddf44a [AMDGPU] Assembler: match e32 VOP instructions before e64.
Summary:
Split assembler match table in 4 tables with assembler variants:

Default - all instructions except VOP3, SDWA and DPP
  - VOP3
  - SDWA
  - DPP
First match Default table then VOP3, SDWA and DPP.

Reviewers:  tstellarAMD, artem.tamazov, vpykhtin

Subscribers: arsenm, wdng, nhaehnle, AMDGPU

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

llvm-svn: 281023
2016-09-09 09:37:51 +00:00
Simon Dardis
449c500357 [mips] Fix c.<cc>.<fmt> instruction definition.
As part of this effort, remove MipsFCmp nodes and use tablegen
patterns rather than custom lowering through C++.

Unexpectedly, this improves codesize for microMIPS as previous floating
point setcc expansions would materialize 0 and 1 into GPRs before using
the relevant mov[tf].[sd] instruction. Now $zero is used directly.

Reviewers: dsanders, vkalintiris, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D23118

llvm-svn: 281022
2016-09-09 09:22:52 +00:00
Chris Dewhurst
fe8e059c74 [Sparc][LEON] Unit test for CASA instruction supported by some LEON processors added.
llvm-svn: 281021
2016-09-09 09:08:13 +00:00
Gor Nishanov
91fe7677db [Coroutines] Part13: Handle single edge PHINodes across suspends
Summary:
If one of the uses of the value is a single edge PHINode, handle it.

Original:

    %val = something
    <suspend>
    %p = PHINode [%val]

After Spill + Part13:

    %val = something
    %slot = gep val.spill.slot
    store %val, %slot
    <suspend>
    %p = load %slot

Plus tiny fixes/changes:
   * use correct index for coro.free in CoroCleanup
   * fixup id parameter in coro.free to allow authoring coroutine in plain C with __builtins

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 281020
2016-09-09 05:39:00 +00:00
Amaury Sechet
f1273caa0c Rationalise the attribute getter/setter methods on Function and CallSite.
Summary:
While woring on mapping attributes in the C API, it clearly appeared that the recent changes in the API on the C++ side left Function and Call/Invoke with an attribute API that grew in an ad hoc manner. This makes it difficult to work with it, because one doesn't know which overloads exists and which do not.

Make sure that getter/setter function exists for both enum and string version. Remove inconsistent getter/setter, unless they have many callsites.

This should make it easier to work with attributes in the future.

This doesn't change how attribute works.

Reviewers: bkramer, whitequark, mehdi_amini, void

Subscribers: llvm-commits

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

llvm-svn: 281019
2016-09-09 04:50:38 +00:00
Kostya Serebryany
436a6702d5 [libFuzzer] improve -print_pcs to not print new PCs coming from libFuzzer itself
llvm-svn: 281016
2016-09-09 02:38:28 +00:00
Kostya Serebryany
df4542584d [libFuzzer] remove unneeded call
llvm-svn: 281014
2016-09-09 01:57:38 +00:00
Craig Topper
3930ff6121 [AVX-512] Add VPCMP instructions to the load folding tables and make them commutable.
llvm-svn: 281013
2016-09-09 01:36:10 +00:00
Craig Topper
e7f151d9d1 [AVX-512] Add more integer vector comparison tests with loads. Some of these show opportunities where we can commute to fold loads.
Commutes will be added in a followup commit.

llvm-svn: 281012
2016-09-09 01:36:04 +00:00
Vedant Kumar
242bca6b0c [llvm-cov] Emit a summary in the report directory's index
llvm-cov writes out an index file in '-output-dir' mode, albeit not a
very informative one. Try to fix that by using the CoverageReport API to
include some basic summary information in the index file.

llvm-svn: 281011
2016-09-09 01:32:55 +00:00
Vedant Kumar
0ec982eddb [llvm-cov] Constify some methods (NFC)
llvm-svn: 281010
2016-09-09 01:32:51 +00:00
Vedant Kumar
cb15976e10 [llvm-cov] Add an API to prepare file reports (NFC)
It would be nice to prepare file reports (using the CoverageReport API)
without actually rendering them to the console. I plan on using this to
flesh out the 'index' files in the coverage views.

llvm-svn: 281009
2016-09-09 01:32:49 +00:00
Vedant Kumar
72fae94f4a [llvm-cov] Speculate fix for a Windows-only test (NFC)
This test should have broken after r280896. Fix up the test case
speculatively, since I don't have a way to test it.

I wonder why I didn't get any angry bot emails about this. Maybe none of
the win32 bots test llvm-cov? That could explain it, since the test says
it 'REQUIRES: system-windows', which is restricted to win32 hosts.

Also: why is 'system-windows' not defined for non-win32 Windows bots?
llvm-svn: 281008
2016-09-09 01:32:47 +00:00
Kostya Serebryany
8d5f2dcf39 [libFuzzer] remove use_traces=1 since use_value_profile seems to be strictly better
llvm-svn: 281007
2016-09-09 01:17:03 +00:00
David Majnemer
b6f8a142b2 [X86] Tighten up a comment which confused x64 ABI terminology.
The x64 ABI has two major function types:
 - frame functions
 - leaf functions

A frame function is one which requires a stack frame.  A leaf function
is one which does not.  A frame function may or may not have a frame
pointer.

A leaf function does not require a stack frame and may never modify SP
except via a return (RET, tail call via JMP).

A frame function which has a frame pointer is permitted to use the LEA
instruction in the epilogue, a frame function without which doesn't
establish a frame pointer must use ADD to adjust the stack pointer epilogue.

Fun fact: Leaf functions don't require a function table entry
(associated PDATA/XDATA).

llvm-svn: 281006
2016-09-09 01:07:01 +00:00
Michael Kuperstein
129b373246 [X86] Add more baseline tests for "irregular" shuffles. NFC.
This adds more tests for shuffles where the output width does not match
the input width and/or the output is generated from more than two inputs.

llvm-svn: 281005
2016-09-09 00:49:29 +00:00
Hans Wennborg
50bbc2de6d Win64: Don't use REX prefix for direct tail calls
The REX prefix should be used on indirect jmps, but not direct ones.
For direct jumps, the unwinder looks at the offset to determine if
it's inside the current function.

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

llvm-svn: 281003
2016-09-08 23:35:10 +00:00
Mike Aizatsky
be982989bb .clang-tidy: parameters and members should be CamelCased.
Summary: Not sure why is it missing.

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

llvm-svn: 281002
2016-09-08 23:29:37 +00:00
Saleem Abdulrasool
d60cccf70a llvm-objdump: add missing ) in help output, NFC
Add a missing ')' in the help output.  NFC.

llvm-svn: 281000
2016-09-08 23:17:34 +00:00
Kostya Serebryany
ef2e9c0918 [libFuzzer] add missing docs
llvm-svn: 280996
2016-09-08 22:21:13 +00:00
Dehao Chen
39b2cd9b12 Remove debug info when hoisting instruction from then/else branch.
Summary: The hoisted instruction is executed speculatively. It could affect the debugging experience as user would see gdb go into code that may not be expected to execute. It will also affect sample profile accuracy by assigning incorrect frequency to source within then/else branch.

Reviewers: davidxl, dblaikie, chandlerc, kcc, echristo

Subscribers: mehdi_amini, probinson, eric_niebler, andreadb, llvm-commits

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

llvm-svn: 280995
2016-09-08 21:53:33 +00:00
Sanjay Patel
3459b3d50b [InstCombine] regenerate checks
llvm-svn: 280993
2016-09-08 21:40:21 +00:00
Matthew Simpson
aa17e4a420 [LV] Ensure proper handling of multi-use case when collecting uniforms
The test case included in r280979 wasn't checking what it was supposed to be
checking for the predicated store case. Fixing the test revealed that the
multi-use case (when a pointer is used by both vectorized and scalarized memory
accesses) wasn't being handled properly. We can't skip over
non-consecutive-like pointers since they may have looked consecutive-like with
a different memory access.

llvm-svn: 280992
2016-09-08 21:38:26 +00:00
Sanjay Patel
33f51a0795 [InstCombine] regenerate checks
llvm-svn: 280991
2016-09-08 21:32:21 +00:00
Krzysztof Parzyszek
8753120a11 [RDF] Further improve handling of multiple phis reached from shadows
llvm-svn: 280987
2016-09-08 20:48:42 +00:00
Vedant Kumar
60cc519524 [llvm-cov] Fix issues with segment highlighting in the html view
The text and html coverage views take different approaches to emitting
highlighted regions. That's because this problem is easier in the text
view: there's no need to worry about escaping text or adding tooltip
content to a highlighted snippet.

Unfortunately, the html view didn't get region highlighting quite right.

This patch fixes the situation, bringing parity between the two views.

llvm-svn: 280981
2016-09-08 19:18:23 +00:00
Matthew Simpson
a98b17ce43 [LV] Don't mark pointers used by scalarized memory accesses uniform
Previously, all consecutive pointers were marked uniform after vectorization.
However, if a consecutive pointer is used by a memory access that is eventually
scalarized, the pointer won't remain uniform after all. An example is
predicated stores. Even though a predicated store may be consecutive, it will
still be scalarized, making it's pointer operand non-uniform.

This patch updates the logic in collectLoopUniforms to consider the cases where
a memory access may be scalarized. If a memory access may be scalarized, its
pointer operand is not marked uniform. The determination of whether a given
memory instruction will be scalarized or not has been moved into a common
function that is used by the vectorizer, cost model, and legality analysis.

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

llvm-svn: 280979
2016-09-08 19:11:07 +00:00
Zachary Turner
62327c7704 [pdb] Make YamlTypeDumperCallbacks reuse *this.
Previously we were making new instances of YamlTypeDumperCallbacks
in order to recurse down and serialize / deserialize nested
records such as field lists.  This meant you could not pass
context from a higher operation to a lower operation because
it would be using a new instance of the visitor callback
delegate.

YAMLIO library was updated to support context-sensitive mappings,
so now we can reuse the same instance of the visitor callback
delegate even for nested operations.

llvm-svn: 280978
2016-09-08 18:36:55 +00:00
Zachary Turner
d3d7371182 [YAMLIO] Add the ability to map with context.
mapping a yaml field to an object in code has always been
a stateless operation.  You could still pass state by using the
`setContext` function of the YAMLIO object, but this represented
global state for the entire yaml input.  In order to have
context-sensitive state, it is necessary to pass this state in
at the granularity of an individual mapping.

This patch adds support for this type of context-sensitive state.
You simply pass an additional argument of type T to the
`mapRequired` or `mapOptional` functions, and provided you have
specialized a `MappingContextTraits<U, T>` class with the
appropriate mapping function, you can pass this context into
the mapping function.

Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D24162

llvm-svn: 280977
2016-09-08 18:22:44 +00:00
Matt Arsenault
c2bf766536 AMDGPU: Sign extend constants when splitting them
This will confuse later passes which try to look at the
immediate value and don't truncate first.

llvm-svn: 280974
2016-09-08 17:44:36 +00:00
Krzysztof Parzyszek
b779c31861 [Hexagon] Expand sext- and zextloads of vector types, not just extloads
Recent change exposed this issue, breaking the Hexagon buildbots.

llvm-svn: 280973
2016-09-08 17:42:14 +00:00
Matt Arsenault
c556c1a865 AMDGPU: Try to commute when selecting s_addk_i32/s_mulk_i32
llvm-svn: 280972
2016-09-08 17:35:41 +00:00
Eric Christopher
7bd2028162 AArch64 .arch directive - Include default arch attributes with extensions.
Fix the .arch asm parser to use the full set of features for the architecture
and any extensions on the command line. Add and update testcases accordingly
as well as add an extension that was used but not supported.

llvm-svn: 280971
2016-09-08 17:27:03 +00:00
Matt Arsenault
dc9ca763fb AMDGPU: Support commuting with immediate in src0
llvm-svn: 280970
2016-09-08 17:19:29 +00:00
Renato Golin
37671f07f9 Revert "[XRay] ARM 32-bit no-Thumb support in LLVM"
And associated commits, as they broke the Thumb bots.

This reverts commit r280935.
This reverts commit r280891.
This reverts commit r280888.

llvm-svn: 280967
2016-09-08 17:10:39 +00:00
Balaram Makam
73565ebed9 [LoopDataPrefetch] Use range based for loop; NFCI
Switch to range based for loop.
No functional change, but more readable code.

llvm-svn: 280966
2016-09-08 17:08:20 +00:00
Sanjay Patel
e89744b91f [InstCombine] return a vector-safe true/false constant
I introduced this potential bug by missing this diff in:
https://reviews.llvm.org/rL280873

...however, I'm not sure how to reach this code path with a regression test.
We may be able to remove this code and assume that the transform to a constant
is always handled by InstSimplify?

llvm-svn: 280964
2016-09-08 16:54:02 +00:00
Dehao Chen
7a4989ecf6 Add unittest for r280760
llvm-svn: 280963
2016-09-08 16:53:40 +00:00
Simon Pilgrim
a977d53d49 [InstCombine][X86] Regenerate masked memory op combine tests
llvm-svn: 280960
2016-09-08 16:32:37 +00:00
Simon Pilgrim
663e1289e0 [InstCombine][X86] Regenerate vperm2f128/vperm2i128 combine tests
llvm-svn: 280959
2016-09-08 16:30:46 +00:00
Simon Pilgrim
6a2f19cf26 [InstCombine][X86] Regenerate insertps combine tests
llvm-svn: 280957
2016-09-08 16:15:21 +00:00
Vedant Kumar
c7bd3b1048 [Coverage] Delete some dead code (NFC)
llvm-svn: 280956
2016-09-08 16:14:14 +00:00
Sam Kolton
6ad991b7fc [TableGen] AsmMatcher: Add AsmVariantName to Instruction class.
Summary:
This allows specifying instructions that are available only in specific assembler variant. If AsmVariantName is specified then instruction will be presented only in MatchTable for this variant. If not specified then assembler variants will be determined based on AsmString.
Also this allows splitting assembler match tables in same way as it is done in dissasembler.

Reviewers: ab, tstellarAMD, craig.topper, vpykhtin

Subscribers: wdng

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

llvm-svn: 280952
2016-09-08 15:50:52 +00:00
Reid Kleckner
f1340c0f4c Remove restriction that 'sret' must be on the first parameter
On Windows, it is often applied to the second parameter, and the x86
backend is prepared to deal with sret appearing on any parameter.

Other backends assume it only appears on parameter zero, but those are
target-specific requirements, and not an IR-level rule.

llvm-svn: 280951
2016-09-08 15:45:27 +00:00
Reid Kleckner
b3db5d89ab Give an x86 assembler test a triple
llvm-svn: 280950
2016-09-08 15:40:43 +00:00
Dehao Chen
498c9245e3 revert r280427
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.

Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update after sinking.
llvm-svn: 280949
2016-09-08 15:25:12 +00:00
Renato Golin
a44e0e8a5f [ARM XRay] Try to fix Thumb-only failure
I mised the check that it had to support ARM to work. This commit tries
to fix that, to make sure we don't emit ARM code in Thumb-only mode.

llvm-svn: 280935
2016-09-08 13:45:10 +00:00
James Molloy
7a3a8a12b2 [SDAGBuilder] Don't create a binary tree for switches in minsize mode
This bloats codesize - all of the non-leaf nodes are extra code.

llvm-svn: 280932
2016-09-08 13:12:22 +00:00