1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Commit Graph

205207 Commits

Author SHA1 Message Date
Fangrui Song
7035946398 [llvm-objdump][test] Unsupport system-windows for source-interleave-prefix.test 2020-10-16 11:44:33 -07:00
Fangrui Song
5cc9b5580a [llvm-objdump][test] Delete source-interleave-prefix-windows.test
It needs more work: http://45.33.8.238/win/25999/step_11.txt
2020-10-16 11:42:25 -07:00
Amara Emerson
d0c901f0e6 [AArch64][GlobalISel] Add selection support for v2s32 and v2s64 reductions for FADD/ADD.
We'll need legalizer lower() support for the other types to work.

Differential Revision: https://reviews.llvm.org/D89159
2020-10-16 11:41:57 -07:00
Arthur Eubanks
2e7520c9af [test] Pin null-function.ll to legacy PM
The NPM prints CGSCCs in a different way.
2020-10-16 11:24:28 -07:00
LLVM GN Syncbot
92111fd84e [gn build] Port 3d4bba302d2 2020-10-16 18:13:18 +00:00
Nico Weber
fac13d2341 [gn build] (manually) port 3d4bba302d246 2020-10-16 14:12:38 -04:00
Benjamin Kramer
d9c39c25a7 [Indvars][NFCI] Simplify assertion.
This should be semantically identical. Also avoids unused variable
warnings in Release builds.
2020-10-16 19:58:55 +02:00
Amara Emerson
2fc81fbf42 [AArch64][GlobalISel] Regbankselect reductions to use FPR bank for scalars.
Differential Revision: https://reviews.llvm.org/D89075
2020-10-16 10:42:15 -07:00
Amara Emerson
1442f94d86 [AArch64][GlobalISel] Add basic legalizer rules for supported add/fadd reductions.
NEON is pretty limited in it's reduction support. As a first step add some
basic rules for the legal types we can select.

Differential Revision: https://reviews.llvm.org/D89070
2020-10-16 10:35:46 -07:00
Amara Emerson
a4ad952c6e [GlobalISel] Add translation support for vector reduction intrinsics.
In order to prevent the ExpandReductions pass from expanding some intrinsics
before they get to codegen, I had to add a -disable-expand-reductions flag
for testing purposes.

Differential Revision: https://reviews.llvm.org/D89028
2020-10-16 10:17:53 -07:00
Vinicius Tinti
3f47e2d686 [llvm-objdump] Implement --prefix option
The prefix given to --prefix will be added to GNU absolute paths when
used with --source option (source interleaved with the disassembly).

This matches GNU's objdump behavior.

GNU and C++17 rules for absolute paths are different.

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

Fixes PR46368.

Differential Revision: https://reviews.llvm.org/D85024
2020-10-16 17:50:42 +01:00
Jay Foad
850a1db38c [AMDGPU] Add new llvm.amdgcn.fma.legacy intrinsic
Differential Revision: https://reviews.llvm.org/D89558
2020-10-16 17:10:21 +01:00
Jay Foad
7a2a70e48b [llc] Use -filetype=null to disable MIR printing
If you use -stop-after or similar options, llc will normally print MIR.
This patch checks for -filetype=null as a special case to disable MIR
printing. As the comment says, "The Null output is intended for use for
performance analysis ...", and I found this useful for timing a subset
of the passes that llc runs without the significant overhead of printing
MIR just to send it to /dev/null.

Differential Revision: https://reviews.llvm.org/D89476
2020-10-16 16:51:56 +01:00
Matt Arsenault
e3bfefd3cc Reapply "OpaquePtr: Add type to sret attribute"
This reverts commit eb9f7c28e5fe6d75fed3587023e17f2997c8024b.

Previously this was incorrectly handling linking of the contained
type, so this merges the fixes from D88973.
2020-10-16 11:05:02 -04:00
Krzysztof Parzyszek
45720e3d8e [Hexagon] Fix license headers in some .td files, NFC 2020-10-16 10:03:05 -05:00
Hans Wennborg
160568d2ef Disable DynamicLibraryTests when using LLVM_INTEGRATED_CRT_ALLOC (PR47881) 2020-10-16 16:49:58 +02:00
Simon Pilgrim
41b7f172d3 [InstCombine] visitAnd - pull out repeated I.getType() calls. NFCI. 2020-10-16 15:43:11 +01:00
Simon Pilgrim
1348ae0102 [InstCombine] visitAnd - add some ((val OP C1) & C2) vector test coverage 2020-10-16 15:43:11 +01:00
Simon Pilgrim
afd2da6ff6 [InstCombine] Remove custom and(trunc(and(x,c1)),c2) fold
This is more correctly handled by canEvaluateTruncated (one use checks etc.) and covers all the tests cases that were added for this fold.
2020-10-16 15:43:10 +01:00
Matt Arsenault
09bc15e2ca llvm-reduce: Don't replace intrinsic calls with undef
These don't really have function bodies to try to eliminate. This also
has a good chance of just producing invalid IR since intrinsics can
have special operand constraints (e.g. metadata arguments aren't valid
for an arbitrary call). This was wasting quite a bit of time producing
and failing on invalid IR when replacing dbg.values with undefs.
2020-10-16 10:10:53 -04:00
Matt Arsenault
b288dbc472 llvm-reduce: Fix typo in status message 2020-10-16 09:48:00 -04:00
Matt Arsenault
58e952431c AMDGPU: Don't kill super-register with overlapping copy
This would end up killing part of the result super-register, resulting
in a verifier error on a later use of the overlapping registers.  We
could add kills of any non-aliasing registers, but we should be moving
away from relying on kill flags.
2020-10-16 09:34:35 -04:00
Jeremy Morse
6e0168ca1b Revert "[llvm-cov] don't include all source files when provided source files are filtered out"
This reverts commit c2bd20ef652 and the follow up fix 16605bba6fb.

The tools/llvm-cov/warnings.h continues to fail on Windows platforms even
after the follow up, for example on the llvm-clang-win-x-armv7l builder:

    http://lab.llvm.org:8011/#/builders/60/builds/94
2020-10-16 13:46:12 +01:00
Michael Liao
8139d279fa [globalopt] Teach to look through addrspacecast.
- so that global variables in numbered address spaces could be properly
  analyzed.

Differential Revision: https://reviews.llvm.org/D89140
2020-10-16 08:43:09 -04:00
Max Kazantsev
90ee9123ed [Indvars][NFC] Merge two functions together
Logic of widenWithVariantUse is split into check and transform
part, unlike any other transform in IndVars. We want to pass some
extra flags from analysis to transform part and standartize
the code at once, so merging them together.
2020-10-16 19:21:57 +07:00
Simon Pilgrim
6f0e70a2de [InstCombine] foldSelectRotate - canonicalize to OR(SHL,LSHR). NFCI.
Match the canonicalization code that was added to matchFunnelShift at rG02295e6d1a15
2020-10-16 13:18:53 +01:00
Simon Pilgrim
2528c4c3da [InstCombine] Fix typo in narrow funnel shift test 2020-10-16 12:18:16 +01:00
Simon Pilgrim
f708dbd106 [InstCombine] Add trunc+zext 'narrow' funnel shift tests (PR35155)
Based on the rotation equivalents in rotate.ll
2020-10-16 12:06:47 +01:00
Max Kazantsev
f0ff93dd5c [Indvars][NFCI] Remove meaningless restrictive code in IndVars
Variable ExtendOperExpr only exists to check whether it is a SCEV ext.
We create it as SCEV ext right here, so semantically this check is
trivially true. In theory, it may fail if SCEV is smart enough and can
simplify the expression. However, no matter whether it is an ext or not,
we never use this fact for further reasoning. So this code is currently
useless and in theory may become harmful with SCEV's development.

We do not expect any behavior changes with removing it. If it caused
negative changes, the patch should be reverted.
2020-10-16 18:04:31 +07:00
Sebastian Neubauer
0669e7af20 [AMDGPU] Add a message to an assert 2020-10-16 13:03:20 +02:00
Max Kazantsev
2bb0a4698e [Indvars][NFC] Remove duplicating checks
Some facts have already been checked in widenWithVariantUse and then
checked again in widenWithVariantUseCodegen. The latter is redundant,
we can replace it with asserts.
2020-10-16 17:35:14 +07:00
Max Kazantsev
dee6c89ce3 Recommit "[SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs"
It was reverted because of negative compile time impact. In this version,
less powerful proof methods are used (non-recursive reasoning only), and
scope limited to constant End values to avoid explision of complex proofs.

Differential Revision: https://reviews.llvm.org/D89381
2020-10-16 17:35:13 +07:00
Cullen Rhodes
8ce9e66236 [ValueTracking] Clarify TypeSize comparisons
TypeSize comparisons using overloaded operators should be replaced by
the new isKnownXY comparators when the operands can be fixed-length or
scalable vectors.

In ValueTracking there are several uses of the overloaded operators in
`isKnownNonZero` and `ComputeMultiple`. In the former we already bail
out on scalable vectors since we currently have no way to represent
DemandedElts, and the latter is operating on scalar integers, so we can
assume fixed-size in both instances.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D89387
2020-10-16 10:31:12 +00:00
Simon Pilgrim
a8146af1a9 [InstCombine] narrowRotate - minor refactoring for funnel shift support. NFC.
Prep work for PR35155 - renamed narrowRotate to narrowFunnelShift, rewrote some comments and adjusted code to collect separate shift values, although we bail if they don't match (still only rotations are only actually folded).

I'm trying to match matchFunnelShift as much as possible in case we finally get to merge these one day.
2020-10-16 11:27:28 +01:00
Simon Pilgrim
b737414d3e [InstCombine] foldAndOrOfICmpsOfAndWithPow2 - add vector support
Support vector cases for folding:

 (iszero(A & K1) | iszero(A & K2)) -> (A & (K1 | K2)) != (K1 | K2)
 (!iszero(A & K1) & !iszero(A & K2)) -> (A & (K1 | K2)) == (K1 | K2)
2020-10-16 10:41:40 +01:00
Dávid Bolvanský
c2a0c98027 [MemLoc] Support memchr/memccpy in MemoryLocation::getForArgument
Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D89321
2020-10-16 11:37:29 +02:00
Florian Hahn
e399736e2e [SCEV] Add a few test cases where the max BTC is limited by wrapping. 2020-10-16 09:53:32 +01:00
Tony
2d8d8867e8 [AMDGPU] Correct comment typo in AMDGPUSubtarget.h 2020-10-16 08:49:02 +00:00
Florian Hahn
74a6666f95 Recommit "[DSE] Switch to MemorySSA-backed DSE by default."
After investigation by @asbirlea, the issue that caused the
revert appears to be an issue in the original source, rather
than a problem with the compiler.

This patch enables MemorySSA DSE again.

This reverts commit 915310bf14cbac58a81fd60e0fa9dc8d341108e2.
2020-10-16 09:02:53 +01:00
Nikita Popov
70a47d630d Revert "[SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs"
This reverts commit 905101c36025fe1c8ecdf9a20cd59db036676073.

This causes a large compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=cc175c2cc8e638462bab74e0781e06f9b6eb5017&to=905101c36025fe1c8ecdf9a20cd59db036676073&stat=instructions
2020-10-16 09:47:38 +02:00
Georgii Rymar
d9dfd4c8d4 [lib/ObjectYAML] - Simplify the code that handles Content/Size fields.
This is a follow-up for D89039 patch, which adds a support for
`Content`/`Size` for all sections.

Assuming that all of sections have a support of these 2 fields,
we can simplify and generalize the code.

Depends on D89039

Differential revision: https://reviews.llvm.org/D89120
2020-10-16 09:57:27 +03:00
Max Kazantsev
53455f1c68 [SCEV][NFC] Split out type balancing in implication engine
We plan to introduce more advanced ways of dealing with different types.
2020-10-16 13:40:24 +07:00
Fangrui Song
2a9d1c6d10 [RISCV] Fix -Wbraced-scalar-init after D89025 2020-10-15 23:29:11 -07:00
Kito Cheng
56f8ee5d8e [RISCV] Add -mtune support
- The goal of this patch is improve option compatible with RISCV-V GCC,
   -mcpu support on GCC side will sent patch in next few days.

 - -mtune only affect the pipeline model and non-arch/extension related
   target feature, e.g. instruction fusion; in td file it called
   TuneFeatures, which is introduced by X86 back-end[1].

 - -mtune accept all valid option for -mcpu and extra alias processor
   option, e.g. `generic`, `rocket` and `sifive-7-series`, the purpose is
   option compatible with RISCV-V GCC.

 - Processor alias for -mtune will resolve according the current target arch,
   rv32 or rv64, e.g. `rocket` will resolve to `rocket-rv32` or `rocket-rv64`.

 - Interaction between -mcpu and -mtune:
   * -mtune has higher priority than -mcpu for pipeline model and
     TuneFeatures.

[1] https://reviews.llvm.org/D85165

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D89025
2020-10-16 13:55:08 +08:00
Zequan Wu
fb37bbb612 [llvm-cov] Fix test cases.
`/dev/null` is treated as regualar file on Windows.
native_separators.c line 11 used relative path which was not correct but worked before because when `SourceFiles` is empty, it add all source files into `SourceFiles`.
2020-10-15 22:13:35 -07:00
Max Kazantsev
993fc2cded [SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs
We can sharpen the range of a AddRec if we know that it does not
self-wrap and know the symbolic iteration count in the loop. If we can
evaluate the value of AddRec on the last iteration and prove that at least
one its intermediate value lies between start and end, then no-wrap flag
allows us to conclude that all of them also lie between start and end. So
the estimate of range can be improved to union of ranges of start and end.

Differential Revision: https://reviews.llvm.org/D89381
Reviewed By: efriedma
2020-10-16 12:00:39 +07:00
Zequan Wu
1bb71afff1 [llvm-cov] don't include all source files when provided source files are filtered out
When all provided source files are filtered out either due to `--ignore-filename-regex` or not part of binary, don't generate coverage reults for all source files. Because if users want to generate coverage results for all source files, they don't even need to provid selected source files or `--ignore-filename-regex`.

Differential Revision: https://reviews.llvm.org/D89359
2020-10-15 18:11:01 -07:00
Vedant Kumar
cce078ae12 [PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting
This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
the splitting pass to be toggled on/off. The current method of passing
`-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
correctly (say, with `-O0` or `-Oz`).

To implement the -fsplit-cold-code option, an attribute is applied to
functions to indicate that they may be considered for splitting. This
removes some complexity from the old/new PM pipeline builders, and
behaves as expected when LTO is enabled.

Co-authored by: Saleem Abdulrasool <compnerd@compnerd.org>
Differential Revision: https://reviews.llvm.org/D57265
Reviewed By: Aditya Kumar, Vedant Kumar
Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
2020-10-15 23:13:33 +00:00
Jessica Paquette
4c585fded5 [AArch64][GlobalISel] NFC: Refactor emitIntegerCompare
Simplify emitIntegerCompare and improve comments + asserts.

Mostly making the code a little easier to follow.

Also, this code is only used for G_ICMP. The legalizer ensures that the LHS/RHS
for every G_ICMP is either a s32 or s64. So, there's no need to handle anything
else. This lets us remove a bunch of checks for whether or not we successfully
emitted the compare.

Differential Revision: https://reviews.llvm.org/D89433
2020-10-15 16:04:08 -07:00
Amara Emerson
03855295f3 [GlobalISel] Remove scalar src from non-sequential fadd/fmul reductions.
It's probably better to split these into separate G_FADD/G_FMUL + G_VECREDUCE
operations in the translator rather than carrying the scalar around. The
majority of the time it'll get simplified away as the scalars are probably
identity values.

Differential Revision: https://reviews.llvm.org/D89150
2020-10-15 15:51:44 -07:00