1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

146015 Commits

Author SHA1 Message Date
Artyom Skrobov
01252fcee1 imm_comp_XFORM (defined in ARMInstrThumb.td) duplicates imm_not_XFORM (defined in ARMInstrInfo.td)
Reviewers: grosbach, rengolin, jmolloy

Reviewed By: jmolloy

Subscribers: aemerson, llvm-commits

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

llvm-svn: 297456
2017-03-10 13:21:12 +00:00
Sanne Wouda
d5bfb023b4 [Assembler] Add location info to unary expressions.
Summary:
This is a continuation of D28861.  Add an SMLoc to MCUnaryExpr such that
a better diagnostic can be given in case of an error in later stages of
assembling.

Reviewers: rengolin, grosbach, javed.absar, olista01

Reviewed By: olista01

Subscribers: llvm-commits

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

llvm-svn: 297454
2017-03-10 13:08:20 +00:00
Artyom Skrobov
2817f1c979 Refactor the multiply-accumulate combines to act on
ARMISD::ADD[CE] nodes, instead of the generic ISD::ADD[CE].

Summary:
This allows for some simplification because the combines
are no longer limited to just one go at the node before
it gets legalized into an ARM target-specific one.

Reviewers: jmolloy, rogfer01

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 297453
2017-03-10 12:41:33 +00:00
George Rimar
c06573fb51 WholeProgramDevirt: Fixed compilation error under MSVS2015.
It was introduced in:

r296945
WholeProgramDevirt: Implement exporting for single-impl devirtualization.
---------------------
r296939
WholeProgramDevirt: Add any unsuccessful llvm.type.checked.load devirtualizations to the list of llvm.type.test users.
---------------------

Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL
Does not compile that code without additional brackets, showing multiple error like below:

WholeProgramDevirt.cpp(1216): error C2958: the left bracket '[' found at 'c:\access_softek\llvm\lib\transforms\ipo\wholeprogramdevirt.cpp(1216)' was not matched correctly
WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ']' before '}'
WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ';' before '}'
WholeProgramDevirt.cpp(1216): error C2059: syntax error: ']'

llvm-svn: 297451
2017-03-10 10:31:56 +00:00
Simon Atanasyan
1dc8afc38d [llvm-readobj] Support SHT_MIPS_DWARF section type flag
llvm-svn: 297448
2017-03-10 08:22:25 +00:00
Simon Atanasyan
0544b76d15 [MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPS
All MIPS .debug_* sections should be marked with ELF type SHT_MIPS_DWARF
accordingly the specification [1]. Also the same section type is assigned
to these sections by GNU tools.

[1] ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf

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

llvm-svn: 297447
2017-03-10 08:22:20 +00:00
Simon Atanasyan
50a486e76f [MC] Accept a numeric value as an ELF section header's type
GAS supports specification of section header's type using a numeric
value [1]. This patch brings the same functionality to LLVM. That allows
to setup some target-specific section types belong to the SHT_LOPROC -
SHT_HIPROC range. If we attempt to print unknown section type, MCSectionELF
class shows an error message. It's better than print sole '@' sign
without any section type name.

In case of MIPS, example of such section's type is SHT_MIPS_DWARF.
Without the patch we will have to implement some workarounds
in probably not-MIPS-specific part of code base to convert SHT_MIPS_DWARF
to the @progbits while printing assembly and to assign SHT_MIPS_DWARF for
@progbits sections named .debug_* if we encounter such section in
an input assembly.

[1] https://sourceware.org/binutils/docs/as/Section.html

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

llvm-svn: 297446
2017-03-10 08:22:13 +00:00
Artyom Skrobov
2afb482430 For Thumb1, lower ADDC/ADDE/SUBC/SUBE via the glueless ARMISD nodes,
same as already done for ARM and Thumb2.

Reviewers: jmolloy, rogfer01, efriedma

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 297443
2017-03-10 07:40:27 +00:00
Yaron Keren
25f86e230e Implement getPassName() for IR printing passes.
llvm-svn: 297442
2017-03-10 07:09:20 +00:00
Matt Arsenault
bf9b9c28c6 AMDGPU: Fix insertion point when reducing load intrinsics
The insertion point may be later than the next instruction,
so it is necessary to set it when replacing the call.

llvm-svn: 297439
2017-03-10 05:25:49 +00:00
Daniel Berlin
98a331dc9e Move memory coercion functions from GVN.cpp to VNCoercion.cpp so they can be shared between GVN and NewGVN.
Summary:
These are the functions used to determine when values of loads can be
extracted from stores, etc, and to perform the necessary insertions to
do this.  There are no changes to the functions themselves except
reformatting, and one case where memdep was informed of a removed load
(which was pushed into the caller).

Reviewers: davide

Subscribers: mgorny, llvm-commits, Prazek

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

llvm-svn: 297438
2017-03-10 04:54:10 +00:00
Dehao Chen
fada41d5e0 Do not use branch metadata to check if a basic block is hot.
Summary: We should not use that to check basic block hotness as optimization may mess it up.

Reviewers: eraman

Reviewed By: eraman

Subscribers: llvm-commits

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

llvm-svn: 297437
2017-03-10 01:44:37 +00:00
Sanjay Patel
5cdc61055e [x86] add tests for vec div/rem with 0 element in divisor; NFC
llvm-svn: 297433
2017-03-10 00:55:29 +00:00
Matt Arsenault
35ef8307dc PatternMatch; Add m_ZExtOrSExt matcher
llvm-svn: 297432
2017-03-10 00:47:35 +00:00
Daniel Berlin
85c7b63250 NewGVN: Rewrite DCE during elimination so we do it as well as old GVN did.
llvm-svn: 297428
2017-03-10 00:32:33 +00:00
Daniel Berlin
8e3e3341da NewGVN: Rename a few things for clarity
llvm-svn: 297427
2017-03-10 00:32:26 +00:00
Ahmed Bougacha
bd7d76ba0b [GlobalISel] Use ImmutableCallSite instead of templates. NFC.
ImmutableCallSite abstracts away CallInst and InvokeInst. Use it!

llvm-svn: 297426
2017-03-10 00:25:44 +00:00
Ahmed Bougacha
b4377637bf [GlobalISel] Fallback when failing to translate invoke.
We unintentionally stopped falling back in r293670.

While there, change an unusual construct.

llvm-svn: 297425
2017-03-10 00:25:35 +00:00
Daniel Berlin
294f6c0958 Add support for DenseMap/DenseSet count and find using const pointers
Summary:
Similar to SmallPtrSet, this makes find and count work with both const
referneces and const pointers.

Reviewers: dblaikie

Subscribers: llvm-commits, mzolotukhin

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

llvm-svn: 297424
2017-03-10 00:25:26 +00:00
Davide Italiano
9c0549c6f8 [Unittests] Fix a build failure with clang 3.8. NFCI.
llvm-svn: 297423
2017-03-09 23:48:58 +00:00
Tim Northover
c6c9bc0cd8 GlobalISel: support trivial inlineasm calls.
They're used for nefarious purposes by ObjC.

llvm-svn: 297422
2017-03-09 23:36:26 +00:00
Eli Friedman
ed6c98dcd2 Refactor alias check from MISched into common helper. NFC.
Differential Revision: https://reviews.llvm.org/D30598

llvm-svn: 297421
2017-03-09 23:33:36 +00:00
Dan Gohman
b0f5f84f3f [WebAssembly] Fix the opcode numbers for floating-point le and gt.
llvm-svn: 297420
2017-03-09 23:08:21 +00:00
Amaury Sechet
717154f88c [DAGCombiner] Do various combine on uaddo.
Summary: This essentially does the same transform as for ADC.

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

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

llvm-svn: 297416
2017-03-09 22:47:00 +00:00
Krzysztof Parzyszek
567f2a41da [Hexagon] Fixes to the bitsplit generation
- Fix the insertion point, which occasionally could have been incorrect.
- Avoid creating multiple bitsplits with the same operands, if an old one
  could be reused.

llvm-svn: 297414
2017-03-09 22:02:14 +00:00
Tim Northover
e1f79517e3 GlobalISel: inform FrameLowering when we emit a function call.
Amongst other things (I expect) this is necessary to ensure decent backtraces
when an "unreachable" is involved.

llvm-svn: 297413
2017-03-09 22:00:39 +00:00
Sanjay Patel
e2ca5c2bc4 [InstSimplify] allow folds for bool vector div/rem
llvm-svn: 297411
2017-03-09 21:56:03 +00:00
Tim Northover
70348d6165 GlobalISel: put debug info for static allocas in the MachineFunction.
The good reason to do this is that static allocas are pretty simple to handle
(especially at -O0) and avoiding tracking DBG_VALUEs throughout the pipeline
should give some kind of performance benefit.

The bad reason is that the debug pipeline is an unholy mess of implicit
contracts, where determining whether "DBG_VALUE %reg, imm" actually implies a
load or not involves the services of at least 3 soothsayers and the sacrifice
of at least one chicken.  And it still gets it wrong if the variable is at SP
directly.

llvm-svn: 297410
2017-03-09 21:12:06 +00:00
Sanjay Patel
e2ddb72a54 [ConstantFold] vector div/rem with any zero element in divisor is undef
Follow-up for:
https://reviews.llvm.org/D30665
https://reviews.llvm.org/rL297390

llvm-svn: 297409
2017-03-09 20:42:30 +00:00
Matt Arsenault
1ba425d265 AMDGPU: Support for SimplifyDemandedVectorElts for load intrinsics
llvm-svn: 297408
2017-03-09 20:34:27 +00:00
Sanjay Patel
f42f8b4215 [InstSimplify] add tests for vector constant folding div/rem-by-0; NFC
llvm-svn: 297407
2017-03-09 20:31:20 +00:00
Yaxun Liu
ad8f18c8f2 AMDGPU: Add GCCBuiltin for ds_permute ds_bpermute
Differential Revision: https://reviews.llvm.org/D30580

llvm-svn: 297406
2017-03-09 20:04:50 +00:00
Amaury Sechet
fb8c6d9814 [DAGCombiner] Do various combine on usubo.
Summary: This essentially does the same transform as for SUBC.

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

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

llvm-svn: 297404
2017-03-09 19:28:00 +00:00
Tom Stellard
18aa6f59ce CMake: Don't install llvm-tblgen twice
Summary:
The add_tablegen macros defines its own install target, and it was also calling
add_llvm_utility which adds another install target.

Configuring with -DLLVM_TOOLS_INSTALL_DIR set to something other than
'bin' along with -DLLVM_INSTALL_UTILS=ON was causing llvm-tablgen
to be installed to two separate directories.

Reviewers: beanz, hans

Reviewed By: beanz

Subscribers: llvm-commits, mgorny

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

llvm-svn: 297403
2017-03-09 19:24:07 +00:00
Krzysztof Parzyszek
c52879fff7 [Hexagon] Refactor the DAG preprocessing code, NFC
Extract individual transformations into their own functions.

llvm-svn: 297401
2017-03-09 19:14:23 +00:00
Rong Xu
f1c2435755 Minor format change. nfc.
llvm-svn: 297400
2017-03-09 19:08:55 +00:00
Rong Xu
78ba7376be [PGO] Refactor profile dumping function for ease of adding other profile kind
Refactor the dumping function so that we can add other value profile kind easily.

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

llvm-svn: 297399
2017-03-09 19:03:57 +00:00
Jan Sjodin
f699e1cb43 Add front() method to SetVector.
Differential Revision: https://reviews.llvm.org/D27262

llvm-svn: 297398
2017-03-09 18:25:07 +00:00
Artem Belevich
9ae008d11e [FileCheck] Added --enable-var-scope option to enable scope for regex variables.
If `--enable-var-scope` is in effect, variables with names that
start with `$` are considered to be global. All other variables are
local. All local variables get undefined at the beginning of each
CHECK-LABEL block. Global variables are not affected by CHECK-LABEL.
This makes it easier to ensure that individual tests are not affected
by variables set in preceding tests.

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

llvm-svn: 297396
2017-03-09 17:59:04 +00:00
Krzysztof Parzyszek
c236ef34ef [Hexagon] Add -mhvx option to the Hexagon backend
llvm-svn: 297393
2017-03-09 17:05:11 +00:00
Krzysztof Parzyszek
91ee3c678b [Hexagon] Propagate zext of i1 into arithmetic code in selection DAG
(op ... (zext i1 c) ...) -> (select c (op ... 1 ...),
                                      (op ... 0 ...))

llvm-svn: 297391
2017-03-09 16:29:30 +00:00
Sanjay Patel
891bf2b484 [InstSimplify] vector div/rem with any zero element in divisor is undef
This was suggested as a DAG simplification in the review for rL297026 :
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170306/435253.html
...but let's start with IR since we have actual docs for IR (LangRef).

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

llvm-svn: 297390
2017-03-09 16:20:52 +00:00
Sam Parker
e2243cc305 [ARM] Remove t2xtpk feature from tests
I previously removed the T2XtPk feature from the ARM backend, but it
looks like I missed some of the tests that were using the feature.

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

llvm-svn: 297386
2017-03-09 15:14:32 +00:00
Sanjay Patel
9d801bd5a1 [DAG] recognize div/rem by 0 as undef before trying constant folding
As discussed in the review thread for rL297026, this is actually 2 changes that 
would independently fix all of the test cases in the patch:

1. Return undef in FoldConstantArithmetic for div/rem by 0.
2. Move basic undef simplifications for div/rem (simplifyDivRem()) before 
   foldBinopIntoSelect() as a matter of efficiency.

I will handle the case of vectors with any zero element as a follow-up. That change
is the DAG sibling for D30665 + adding a check of vector elements to FoldConstantVectorArithmetic().

I'm deleting the test for PR30693 because it does not test for the actual bug any more
(dangers of using bugpoint).

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

llvm-svn: 297384
2017-03-09 15:02:25 +00:00
Simon Pilgrim
aa5013fecf [X86][SSE] Speed up constant pool shuffle mask decoding with direct copy (PR32037).
If the constants are already the correct size, we can copy them directly into the shuffle mask.

llvm-svn: 297381
2017-03-09 14:06:39 +00:00
Simon Dardis
5556ec2bac [mips] Revert fixes for PR32020.
The fix introduces segfaults and clobbers the value to be stored when
the atomic sequence loops.

Revert "[Target/MIPS] Kill dead code, no functional change intended."

This reverts commit r296153.

Revert "Recommit "[mips] Fix atomic compare and swap at O0.""

This reverts commit r296134.

llvm-svn: 297380
2017-03-09 14:03:26 +00:00
Simon Pilgrim
966ef0146a Fixed typos in comments. NFCI.
llvm-svn: 297379
2017-03-09 13:57:04 +00:00
Nuno Lopes
611b0a719b fix build on Cygwin
llvm-svn: 297378
2017-03-09 13:43:31 +00:00
Joey Gouly
14e9c77536 [SelectionDAG] Make SelectCode return void
SelectCode has been returning nullptr since 182dac0 ("SDAG: Make
SelectCodeCommon return void", 2016-05-10). Make SelectCode also
return void instead, as all callers have been updated.

Patch by Sven van Haastregt.

Review: https://reviews.llvm.org/D30497
llvm-svn: 297377
2017-03-09 13:38:06 +00:00
Sjoerd Meijer
f7f11a5353 [ARM] remove FIXMEs and add vcmp MC test
Minor cleanup in ARMInstrVFP.td: removed some FIXMEs and added a MC test for
vcmp that was actually missing.

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

llvm-svn: 297376
2017-03-09 13:28:37 +00:00