1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

181787 Commits

Author SHA1 Message Date
Evgeniy Stepanov
d38d077cb1 Factor out resolveFrameOffsetReference (NFC).
Split AArch64FrameLowering::resolveFrameIndexReference in two parts
* Finding frame offset for the index.
* Finding base register and offset to that register.

The second part will be used to implement a virtual frame pointer in
armv8.5 MTE stack instrumentation lowering.

Reviewers: pcc, vitalybuka, hctim, ostannard

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365958
2019-07-12 21:13:55 +00:00
Matt Arsenault
cccd12337a AMDGPU: Drop remnants of byval support for shaders
Before 2018, mesa used to use byval interchangably with inreg, which
didn't really make sense. Fix tests still using it to avoid breaking
in a future commit.

llvm-svn: 365953
2019-07-12 20:12:17 +00:00
David Tenty
c0757a2f72 Fix missing use of defined() in include guard
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365952
2019-07-12 20:12:15 +00:00
Nikita Popov
882c74ee42 [SystemZ] Fix addcarry of addcarry of const carry (PR42606)
This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
D64213. Instead of only checking if the carry comes from a matching
operation, we now check the full chain of carries. Otherwise we might
custom lower the outermost addcarry, but then generically legalize
an inner addcarry.

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

llvm-svn: 365949
2019-07-12 20:03:34 +00:00
Craig Topper
238fa1a861 [X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI
llvm-svn: 365946
2019-07-12 19:26:35 +00:00
Jonas Devlieghere
007f6b3016 [DebugInfo] Add column info for inline sites
The column field is missing for all inline sites, currently it's always
zero. This changes populates DW_AT_call_column field for inline sites.
Test case modified to cover this change.

Patch by: Wenlei He

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

llvm-svn: 365945
2019-07-12 19:25:45 +00:00
Sterling Augustine
64b39b6689 The variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG" fail with unused variable messages.
Summary: Move the logic into the assert itself.

Subscribers: hiraditya, sanjoy, llvm-commits

Tags: #llvm

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

llvm-svn: 365943
2019-07-12 18:51:08 +00:00
Ulrich Weigand
b70dffb65e [SystemZ] Fix build bot failure after r365932
Insert LLVM_FALLTHROUGH to avoid compiler warning.

llvm-svn: 365942
2019-07-12 18:44:51 +00:00
Sanjay Patel
754405cb22 [x86] add test for bogus cmov (PR40483); NFC
llvm-svn: 365941
2019-07-12 18:38:29 +00:00
Stanislav Mekhanoshin
fc66d260f5 [AMDGPU] Extend MIMG opcode to 8 bits
This is NFC, but required for future commit.

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

llvm-svn: 365940
2019-07-12 18:38:06 +00:00
Stefan Stipanovic
0bfb39ca4b Addition to rL365925, removing remaining virtuals
llvm-svn: 365938
2019-07-12 18:34:06 +00:00
Nico Weber
fb12a4dfa5 Slightly simplify MappedBlockStream::createIndexedStream() calls
All callers had a PDBFile object at hand, so call
Pdb.createIndexedStream() instead, which pre-populates all the arguments
(and returns nullptr for kInvalidStreamIndex).

Also change safelyCreateIndexedStream() to only take the string index,
and update callers. Make the method public and call it in two places
that manually did the bounds checking before.

No intended behavior change.

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

llvm-svn: 365936
2019-07-12 18:24:38 +00:00
Nico Weber
3173717585 Add explicit newline at end of llvm-pdbutil dump
All dump modes I checked didn't print a trailing newline, so add one.

llvm-svn: 365934
2019-07-12 18:22:47 +00:00
Ulrich Weigand
1d5f4c66da [SystemZ] Add support for new cpu architecture - arch13
This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.

This includes:
- Basic support for the new processor and its features.
- Assembler/disassembler support for new instructions.
- CodeGen for new instructions, including new LLVM intrinsics.
- Scheduler description for the new processor.
- Detection of arch13 as host processor.

Note: No currently available Z system supports the arch13
architecture.  Once new systems become available, the
official system name will be added as supported -march name.

llvm-svn: 365932
2019-07-12 18:13:16 +00:00
Leonard Chan
d10c8bf511 Remove unused methods in Sancov.
llvm-svn: 365931
2019-07-12 18:09:09 +00:00
Craig Topper
a262a2636b [X86] Add NEG to isUseDefConvertible.
We can use the C flag from NEG to detect that the input was zero.

Really we could probably use the Z flag too. But C matches what
we'd do for usubo 0, X.

Haven't found a test case for this due to the usubo formation
in CGP. But I verified if I comment out the CGP code this
transformation catches some of the same cases.

llvm-svn: 365929
2019-07-12 17:52:17 +00:00
Simon Pilgrim
7f2a0e6b10 [X86][AVX] Add PR34359 shuffle test case.
llvm-svn: 365926
2019-07-12 17:42:32 +00:00
Stefan Stipanovic
db0c03ccab [Attributor] Removing unnecessary virtual keywords.
Some function in the Attributor framework are unnecessarily
marked virtual. This patch removes virtual keyword

Reviewers: jdoerfert

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 365925
2019-07-12 17:42:14 +00:00
Hideto Ueno
99b1ea457c [Attributor] Deduce "nofree" function attribute
Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365924
2019-07-12 17:38:51 +00:00
Philip Reames
4edda29b32 [IndVars] Use exit count reasoning to discharge obviously untaken exits
Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.

As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.

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

llvm-svn: 365920
2019-07-12 17:05:35 +00:00
James Y Knight
443f7255d2 Fix some minor coding-style issues in git-llvm.
llvm-svn: 365918
2019-07-12 16:41:28 +00:00
James Y Knight
902e0a60c1 Allow the 'git-llvm' tool to push to svn from the split repositories
for 'test-suite', 'lnt', 'zorg', and 'www'.

This is done by looking at the pathname of the git remote named
'origin', which is not 100% reliable, but should work in most cases.

llvm-svn: 365917
2019-07-12 16:40:46 +00:00
Hideto Ueno
f2b21cc133 [FunctionAttrs] Add a test for "nofree" function attribute
This patch adds a test for nofree function attribute.

llvm-svn: 365916
2019-07-12 16:29:14 +00:00
Fangrui Song
9aeee7bc57 [Support] Move the static initializer install_out_memory_new_handler to InitLLVM
An application linking against LLVMSupport should not get the gratuitous
set::std_new_handler call.

Reviewed By: jfb

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

llvm-svn: 365915
2019-07-12 16:23:25 +00:00
Simon Pilgrim
ff5c1896b1 Add missing <atomic> include to appease MSVC builds.
llvm-svn: 365914
2019-07-12 16:16:23 +00:00
Artem Belevich
094f90bc65 Minor cleanup.
Simplify things a bit by removing unnecessary full type qualification.
This also happens to avoid a build break with now-unsupported
Visual Studio 2015.

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

llvm-svn: 365913
2019-07-12 16:13:29 +00:00
Hideto Ueno
845b0733cb Test commit
llvm-svn: 365912
2019-07-12 16:08:32 +00:00
Jordan Rose
598654b4db Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)
Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
long-running jobs are doing, as inspired by BSD tools (including on
macOS), by dumping the current PrettyStackTrace.

This adds a new kind of signal handler for non-fatal "info" signals,
similar to the "interrupt" handler that already exists for SIGINT
(Ctrl-C). It then uses that handler to update a "generation count"
managed by the PrettyStackTrace infrastructure, which is then checked
whenever a PrettyStackTraceEntry is pushed or popped on each
thread. If the generation has changed---i.e. if the user has pressed
Ctrl-T---the stack trace is dumped, though unfortunately it can't
include the deepest entry because that one is currently being
constructed/destructed.

https://reviews.llvm.org/D63750

llvm-svn: 365911
2019-07-12 16:05:09 +00:00
Jay Foad
631612d948 [AMDGPU] Fix DPP combiner check for exec modification
Summary:
r363675 changed the exec modification helper function, now called
execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
all instructions in the basic block, even beyond the last use. That
meant that the DPP combiner no longer worked in any basic block that
ended with a control flow instruction, and in particular it didn't work
on code sequences generated by the atomic optimizer.

Fix it by reinstating the old behaviour but in a new helper function
execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
scanned.

Reviewers: arsenm, vpykhtin

Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 365910
2019-07-12 15:59:40 +00:00
Fangrui Song
d812aa1a3c [LegacyPassManager] Small ModuleCount cleanup
llvm-svn: 365907
2019-07-12 15:18:29 +00:00
Jay Foad
393984bc1e [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32
Summary:
D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
make any sense to apply them to f16 operands; they would interpret the
bits of the value as an f32, giving nonsensical results. This patch
restricts them to f32 operands.

Reviewers: arsenm, hakzsam

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365904
2019-07-12 15:02:59 +00:00
Fangrui Song
409092918d Delete dead stores
llvm-svn: 365903
2019-07-12 14:58:15 +00:00
Tom Stellard
e4db61b17f cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Summary:
This will simplify the macros by allowing us to remove the hard-coded
list of libraries that should be installed when
LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.

Reviewers: beanz, smeenai

Reviewed By: beanz

Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 365902
2019-07-12 14:40:18 +00:00
Bryant Wong
33a7a98680 [gn] Tag unneeded variable.
When only building targets without assembly parsers (e.g. `llvm_targets_to_build
= ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
assigned-but-unused variable.

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

llvm-svn: 365897
2019-07-12 13:09:39 +00:00
Simon Pilgrim
e93978cee8 [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.
First step towards supporting 'free' subvector extractions other than concat_vectors.

llvm-svn: 365896
2019-07-12 13:00:35 +00:00
Alexey Bader
125995b2cd [LIT] Emit timeout error message only if timeout was reached
Summary:
This improves readability of LIT output: previously
error messages gets emitted that say that there was no error:

error: command reached timeout: False

Patch by Alexey Sachkov.

Reviewers: ddunbar, mgorny, modocache

Reviewed By: mgorny

Subscribers: delcypher, llvm-commits

Tags: #llvm

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

llvm-svn: 365895
2019-07-12 12:48:43 +00:00
David Bolvansky
85b7b16172 [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))
Summary:
(select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y))
(select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y))

Fixes PR41173

Alive proof by @lebedev.ri (thanks)
Name: PR41173
  %cmp = icmp slt i32 %x, 1
  %shr = lshr i32 %x, %y
  %shr1 = ashr i32 %x, %y
  %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr
  =>
  %retval.0 = ashr i32 %x, %y

Optimization: PR41173
Done: 1
Optimization is correct!

Reviewers: lebedev.ri, spatel

Reviewed By: lebedev.ri

Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri

Tags: #llvm

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

llvm-svn: 365893
2019-07-12 11:31:16 +00:00
Alex Brachet
257f3196b6 Fix test case of llvm-nm using implicit a.out
llvm-svn: 365892
2019-07-12 10:44:06 +00:00
George Rimar
00b2899f15 [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.
test/Object is not correct place to have tests that check obj2yaml
functionality, because we have test/tools/obj2yaml folder for that.

In this patch I merged a few test cases with their YAMLs from Inputs
folder, converted one of binary inputs and moved them to
tools/obj2yaml folder.

There are still another tests that might need the same, so it is initial step. 

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

llvm-svn: 365891
2019-07-12 10:29:29 +00:00
Alex Brachet
c32a25d72b [tools] [llvm-nm] Default to reading from stdin not a.out
Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]].

Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson

Reviewed By: jhenderson, MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 365889
2019-07-12 10:20:01 +00:00
Djordje Todorovic
4cf81cc46f Revert "[DwarfDebug] Dump call site debug info"
A build failure was found on the SystemZ platform.

This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc.

llvm-svn: 365886
2019-07-12 09:45:12 +00:00
George Rimar
e1ce548141 [Object/ELF] - Improve error reporting for notes.
This patch improves the error messages reported for
note sections and phdrs and also makes a cleanup for
existent test case.

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

llvm-svn: 365884
2019-07-12 09:29:12 +00:00
Kai Luo
79dc588c53 [NFC][PowerPC] Added test for MachinePRE.
llvm-svn: 365883
2019-07-12 09:10:35 +00:00
Sam Elliott
1283665ffc [RISCV] Allow parsing dot '.' in assembly
Summary:
Useful for jumps, such as `j .`.

I am not sure who should review this. Do not hesitate to change the reviewers if needed.

Reviewers: asb, jrtc27, lenary

Reviewed By: lenary

Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

Tags: #llvm

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

Patch by John LLVM (JohnLLVM)

llvm-svn: 365881
2019-07-12 08:36:07 +00:00
Bryant Wong
1a0188146e Test commit. NFC.
Formatting fix.

llvm-svn: 365878
2019-07-12 08:25:59 +00:00
Fangrui Song
cb9fd7d443 [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots
llvm-svn: 365876
2019-07-12 06:23:24 +00:00
Stanislav Mekhanoshin
f7755fdd44 [AMDGPU] Fixed comment. NFC.
llvm-svn: 365871
2019-07-12 05:13:10 +00:00
Simon Atanasyan
42e0928a60 [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6
There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink
tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly
selects the `JALRC16` compact 2-byte instruction which takes a target
instruction address from a register only and assign `R_MIPS_32` relocation
for this instruction. This relocation completely overwrites `JALRC16`
and nearby instructions.

This patch adds missed matching patterns, selects `BALC` instruction and
assign a correct `R_MICROMIPS_PC26_S1` relocation.

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

llvm-svn: 365870
2019-07-12 04:58:45 +00:00
Fangrui Song
1bbd63ef60 [YAMLIO] Remove trailing spaces when outputting maps
llvm::yaml::Output::paddedKey unconditionally outputs spaces, which
are superfluous if the value to be dumped is a sequence or map.
Change `bool NeedsNewLine` to `StringRef Padding` so that it can be
overridden to `\n` if the value is a sequence or map.

An empty map/sequence is special. It is printed as `{}` or `[]` without
a newline, while a non-empty map/sequence follows a newline. To handle
this distinction, add another variable `PaddingBeforeContainer` and does
the special handling in endMapping/endSequence.

Reviewed By: grimar, jhenderson

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

llvm-svn: 365869
2019-07-12 04:51:31 +00:00
Tom Stellard
35fa871df5 docs/GithubMove.rst: Add link to GitHub migration status page
llvm-svn: 365865
2019-07-12 02:31:50 +00:00