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

204355 Commits

Author SHA1 Message Date
Sam Parker
a28cbccef7 [ARM] Find VPT implicitly predicated by VCTP
On failing to find a VCTP in the list of instructions that explicitly
predicate the entry of a VPT block, inspect whether the block is
controlled via VPT which is implicitly predicated due to it's
predicated operand(s).

Differential Revision: https://reviews.llvm.org/D87819
2020-09-25 08:50:53 +01:00
Ian Levesque
919066e494 [xray] Function coverage groups
Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting different groups over time you could cover the entire application incrementally with lower overhead than instrumenting the entire application at once.

Differential Revision: https://reviews.llvm.org/D87953
2020-09-24 22:09:53 -04:00
Mehdi Amini
ded74e922b Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes
Most users of LLVM tools hit the raw traces and don't know how to get LLVM to
symbolize automatically for them.

When we print the non-symbolized stack trace, we will add information about
how to get it symbolized.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D88269
2020-09-25 01:52:20 +00:00
Krzysztof Parzyszek
df96f62f63 [Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types
Legal vector element types may not be legal as scalar types. When
CONCAT_VECTORS is converted to BUILD_VECTOR, the individual vector
elements become standalone operands to the build operation. If they
have illegal (scalar) types, they need to be made legal. In doing
so, the case of TRUNCATE was not handled, causing an assertion to
fail.
2020-09-24 20:05:23 -05:00
Juneyoung Lee
c5b0e93f4a [ValueTracking] Make isGuaranteedNotToBeUndefOrPoison exit early when MetadataAsValue is given
It is set to conservatively return false, otherwise noundef attributes are added to function calls with metadata arguments.
2020-09-25 09:50:09 +09:00
Juneyoung Lee
4311585bec [ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison
This is a patch that allows isGuaranteedNotToBeUndefOrPoison to return more precise result
when an argument is given, by looking through its uses at the entry block (and following blocks as well, if it is checking poison only).

This is useful when there is a function call with noundef arguments at the entry block.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D88207
2020-09-25 08:57:57 +09:00
Reid Kleckner
f65a8ef6d2 Revert "[NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing"
This reverts commit 9bcf7b1c7a139a455400df109d81c638b9e75150.

Breaks build with MSVC.
2020-09-24 16:47:45 -07:00
Stanislav Mekhanoshin
e11a72e504 [AMDGPU] Fixes typo in the test. NFC.
denormal-fp-math-fp32 -> denormal-fp-math-f32
2020-09-24 16:07:15 -07:00
Evandro Menezes
5ab2ab0db7 [RISCV] Merge the pipeline models for Rocket
Merge the 32 and 64 bit pipeline models for Rocket into a single file.

Differential Revision: https://reviews.llvm.org/D87873
2020-09-24 17:30:40 -05:00
Snehasish Kumar
74d368792a [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section.
This change adds an option to basic block sections to allow cold
clusters to be assigned a custom text prefix. With a custom prefix such
as ".text.split." (D87840), lld can place them in a separate output section.
The benefits are -

* Empirically shown to improve icache and itlb metrics by 3-5%
(absolute) compared to placing split parts in .text.unlikely.
* Mitigates against poor profiles, eg samplePGO profiles used with the
machine function splitter. Optimizations such as hugepage remapping can
make different decisions at the section granularity.
* Enables section granularity hotness monitoring (checking on the
decisions made during compilation vs sample data from production).

Differential Revision: https://reviews.llvm.org/D87813
2020-09-24 15:26:15 -07:00
Joseph Huber
7b42f2f140 [OpenMP] OpenMPOpt Support for Globalization Remarks
Summary:
This patch add support for printing analysis messages relating to data
globalization on the GPU. This occurs when data is shared between the
threads in a GPU context and must be pushed to global or shared memory.

Reviewers: jdoerfert

Subscribers: guansong hiraditya llvm-commits ormris sstefan1 yaxunl

Tags: #OpenMP #LLVM

Differential Revision: https://reviews.llvm.org/D88243
2020-09-24 18:23:12 -04:00
Vedant Kumar
20166f03cc [Instruction] Add dropLocation and updateLocationAfterHoist helpers
Introduce a helper which can be used to update the debug location of an
Instruction after the instruction is hoisted. This can be used to safely
drop a source location as recommended by the docs.

For more context, see the discussion in https://reviews.llvm.org/D60913.

Differential Revision: https://reviews.llvm.org/D85670
2020-09-24 15:00:04 -07:00
Thomas Lively
48b2723da4 [WebAssembly] Make SjLj lowering globals thread-local
Emscripten's longjump and exception mechanism depends on two global variables,
`__THREW__` and `__threwValue`, which are changed to be defined as thread-local
in https://github.com/emscripten-core/emscripten/pull/12056. This patch updates
the corresponding code in the WebAssembly backend to properly declare these
globals as thread-local as well.

Differential Revision: https://reviews.llvm.org/D88262
2020-09-24 14:56:19 -07:00
Sriraman Tallam
9dacabdaa9 Temporary fix for D85085 debug_loc bug with basic block sections.
Until then, this one line fix removes the assert fail with basic block sections
with debug info. Bug tracking this: #47549
This fix does not generate loc list or DW_AT_const_value if the argument is
mentioned in a different section than the start of the function.

Temporarily fixes bugzilla : https://bugs.llvm.org/show_bug.cgi?id=47549

Differential Revision: https://reviews.llvm.org/D87787
2020-09-24 14:41:49 -07:00
Zequan Wu
e7cf57fa10 Reland [CodeGen] emit CG profile for COFF object file
This reverts commit 90242caca2074dab5a9b76e5bc36d9fafd2179a7.

Error fixed at f5435399e823746bbe1737b95c853d77a42e1ac3

Differential Revision: https://reviews.llvm.org/D87811
2020-09-24 14:38:53 -07:00
Roman Lebedev
d61f9b2a1c [NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing
I have long complained that while we have exhaustive tests
for ConstantRange, they are, uh, not good.

The approach of groking our own constant range
via exhaustive enumeration is, mysterious.

It neither tells us without doubt that the result is
conservatively correct, nor the precise match to the ConstantRange
result tells us that the result is precise.
But yeah, it's fast, i give it that.

In short, there are three things that we need to check:
1. That ConstantRange result is conservatively correct
2. That ConstantRange range is reasonable
3. That ConstantRange result is reasonably precise

So let's not just check the middle one, but all three.

This provides precision test coverage for D88178.
2020-09-25 00:36:42 +03:00
Roman Lebedev
c3aa9783b9 [NFCI][IR] ConstantRangeTest: refactor operation range gatherers
We do the same dance to acquire the "exact" range of an op via
an exhaustive approach in many places.
Let's not invent the wheel each time.
2020-09-25 00:36:41 +03:00
Bill Wendling
7ac7c22894 Revert "[CodeGen] Postprocess PHI nodes for callbr"
Accidental commit.

This reverts commit 7f4c940bd0b526f25e11c51bb4d58a85024330ae.
2020-09-24 14:35:23 -07:00
Bill Wendling
acbbbf10d7 [CodeGen] Postprocess PHI nodes for callbr
When processing PHI nodes after a callbr, we need to make sure that the
PHI nodes on the default branch are resolved after the callbr
(inserted after INLINEASM_BR). The PHI node values on the indirect
branches are processed before the INLINEASM_BR.

Differential Revision: https://reviews.llvm.org/D86260
2020-09-24 14:34:28 -07:00
Daniel Kiss
5f9dfa91a0 [AArch64] __builtin_return_address for PAuth.
This change adds the support for __builtin_return_address
for ARMv8.3A Pointer Authentication.
Location of the authentication code in the pointer depends on
the system configuration, therefore a dedicated instruction is used for
effectively removing the authentication code without
authenticating the pointer.

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D75044
2020-09-24 23:23:49 +02:00
David Tenty
3be6da9e43 [CMake][AIX] Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR appropriately for AIX
AIX by default usually folds 32-bit & 64-bit arch libraries into a single
archive, a behaviour we may want for the runtime libraries in the future,
so we don't necessarily want to opt into the multlib layout introduce in
D45604, which is currently the default for runtime builds.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D88169
2020-09-24 16:37:25 -04:00
Andrew Litteken
c432043c07 [IRSim] Adding wrapper pass for IRSimilarityIdentfier
This introduces an analysis pass that wraps IRSimilarityIdentifier,
and adds a printer pass to examine in what function similarities are
being found.

Test for what the printer pass can find are in
test/Analysis/IRSimilarityIdentifier.

Reviewed by: paquette, jroelofs

Differential Revision: https://reviews.llvm.org/D86973
2020-09-24 14:59:41 -05:00
Matt Arsenault
d92e22a706 AArch64/GlobalISel: Add testcase for bug 47619
This is asserting on the 11 release branch, and wasn't covered by
exisiting tests at the time. This was fixed by
b98f902f1877c3d679f77645a267edc89ffcd5d6.
2020-09-24 15:44:26 -04:00
Volodymyr Sapsai
3eb1604b6b Revert "[Modules] Add stats to measure performance of building and loading modules."
This reverts commit c4bacc3c9b333bb7032fb96f41d6f5b851623132.

Test "LLVM :: ThinLTO/X86/funcimport-stats.ll" is failing. Reverting now
and will recommit after making the test not fail with the added stats.
2020-09-24 12:36:06 -07:00
Sanjay Patel
a056cc9998 [SLP] clean up - use 'const' and ArrayRef constructor; NFC
Follow-on tidying suggested in the post-commit review of 6a23668.
2020-09-24 15:31:07 -04:00
Mircea Trofin
387c33466b [NFC][regalloc] Remove unused API in AllocationOrder
Differential Revision: https://reviews.llvm.org/D88197
2020-09-24 12:25:56 -07:00
Volodymyr Sapsai
2f39756f8b [Modules] Add stats to measure performance of building and loading modules.
Measure amount of high-level or fixed-cost operations performed during
building/loading modules and during header search. High-level operations
like building a module or processing a .pcm file are motivated by
previous issues where clang was re-building modules or re-reading .pcm
files unnecessarily. Fixed-cost operations like `stat` calls are tracked
because clang cannot change how long each operation takes but it can
perform fewer of such operations to improve the compile time.

Also tracking such stats over time can help us detect compile-time
regressions. Added stats are more stable than the actual measured
compilation time, so expect the detected regressions to be less noisy.

rdar://problem/55715134

Reviewed By: aprantl, bruno

Differential Revision: https://reviews.llvm.org/D86895
2020-09-24 12:23:47 -07:00
Matt Arsenault
a2ad33a6d6 GlobalISel: Use unmerge when copying wide vectors to result registers
Avoid using G_EXTRACT and move towards a more consistent vector
legalization strategy.
2020-09-24 15:19:51 -04:00
Mehdi Amini
af187cbe83 Add support for setting the path to llvm-symbolizer through an environment variable
This allows to point to an executable that isn't named exactly
"llvm-symbolizer" and not necessarily in the current PATH.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D88192
2020-09-24 19:14:04 +00:00
Jinsong Ji
bd991f7d1b [llvm-exegesis] Add whitespace between words in error message 2020-09-24 18:20:57 +00:00
Sanjay Patel
fa38e7f7a2 [APFloat] prevent NaN morphing into Inf on conversion (PR43907)
We shift the significand right on a truncation, but that needs to be made NaN-safe:
always set at least 1 bit in the significand.
https://llvm.org/PR43907

See D88238 for the likely follow-up (but needs some plumbing fixes before it can proceed).

Differential Revision: https://reviews.llvm.org/D87835
2020-09-24 14:02:19 -04:00
Craig Topper
56fc2e53b2 [SLP] Remove LHS and RHS from OperationData.
These were only really used for 2 things. One was to check if the operand matches the phi if it exists. The other was for the createOp method to build the reduction.

For the first case we still have the operation we just need to know how to index its operands. So I've modified getLHS/getRHS to just use the opcode/kind to know how to find the right operands on an instruction that is now passed in.

For the other case we had to create an OperationData object to set the LHS/RHS values and copy the opcode/kind from another object. We would then just call createOp on that temporary object. Instead I've made LHS/RHS arguments to createOp and removed all these temporary objects.

Differential Revision: https://reviews.llvm.org/D88193
2020-09-24 10:57:11 -07:00
Simon Pilgrim
ea52620cf0 [Scalar] ConstantHoistingPass - iterate with const references. NFCI.
Fix some clang-tidy warnings.
2020-09-24 18:40:50 +01:00
Simon Pilgrim
dfd2bb96aa [AArch64] Regenerate dag-numsignbits.ll checks
To improve the codegen diff in D87502
2020-09-24 18:40:49 +01:00
Stanislav Mekhanoshin
2cf078023e [AMDGPU] global-isel support for RT
Differential Revision: https://reviews.llvm.org/D87847
2020-09-24 10:29:45 -07:00
Momchil Velikov
51a98824c1 [AArch64][GlobalISel] Implement __builtin_return_address for PAC-RET
This patch implements stripping of the PAC in the return address for GlobalISel.

Implementation for when not using GLobalISel is in
https://reviews.llvm.org/D75044 The analogous GCC patch is
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=a70d5d81c41048556fd86eaa1036018a6bfba115

Differential Revision: https://reviews.llvm.org/D84502
2020-09-24 18:04:37 +01:00
Andrew Litteken
0165409db3 [IRSim][NFC] Removing dead variables from IRSimilarityIdentifier.cpp
As informed by danielkiss.

Follow up to Differential Revision: https://reviews.llvm.org/D86972
2020-09-24 11:43:33 -05:00
Simon Pilgrim
c6d82937d7 [X86][SSE] combineVectorTruncation - enable (pre-SSSE3) vXi16->vXi8 truncation.
Shuffle combining can now handle this output, and by performing this early in combineVectorTruncation we avoid a scalarization that caused a regression on D87502.
2020-09-24 15:51:36 +01:00
Sam Parker
0cfd951be4 [NFC][ARM] Remove dead loop.
Remove a loop that just calculated a couple of values that were now
longer needed.
2020-09-24 15:37:26 +01:00
vpykhtin
dc2ad33083 [RegisterCoalescer] Fix IMPLICIT_DEF init removal for a register on joining
This patch removes redundant IMPLICIT_DEF for subregs which was leading to
incorrect register initialization on joining in some cases.

Reviewed by: qcolombet

Differential revision: https://reviews.llvm.org/D82258
2020-09-24 17:37:03 +03:00
Jay Foad
0bdda499b7 [AMDGPU] Use cast instead of dyn_cast 2020-09-24 15:20:49 +01:00
Sebastian Neubauer
7e06b6334e [AMDGPU] Fix v3f16 handling for getresinfo
v3f32 should not be expanded to v4f32. getresinfo with a dmask of 7
created an image sample with a v3f32 return value, which was bitcasted
to a v4f32 in constructRetValue.

Differential Revision: https://reviews.llvm.org/D88206
2020-09-24 16:03:02 +02:00
Matt Arsenault
73fd87a05e IR: Have byref imply dereferenceable
The langref already states it does, but this wasn't implemented. Also
covers inalloca and preallocated. Also helps fix a dependence on
pointer element types.
2020-09-24 09:57:28 -04:00
Matt Arsenault
8bd5d0338f OpaquePtr: Add helpers for sret to mirror byval
Sret should really have a type parameter like byval does.
2020-09-24 09:57:28 -04:00
Sanjay Patel
914ad0b6f1 [PhaseOrdering] move test with target requirement to x86 dir
I'm not sure if the target is actually necessary,
but since it was specified, I'm moving to the
appropriate dir to avoid bot fallout.
2020-09-24 09:54:14 -04:00
Sanjay Patel
e54cf3aa69 [PhaseOrdering] move an 'opt' test from x86 codegen; NFC
This file comes from 2007, and I'm not entirely sure of the
motivation, but it was going through all of opt and llc.
The llc part is almost certainly unnecessary as shown in
the now auto-generated FileCheck lines.

This test may be affected by a logic change suggested in:
D87835
2020-09-24 09:47:38 -04:00
Sanjay Patel
fde7ead841 [InstCombine] regenerate test checks; NFC 2020-09-24 09:34:17 -04:00
Alexandre Ganea
eb8d1073bd Fix f5314d15af4f4514103ea12c74cb208538b8bef5 - [Support] On Unix, let the CrashRecoveryContext return the signal code
This was causing bots to fail: http://green.lab.llvm.org/green/job/clang-stage1-RA/14828/consoleFull#6384962949ba4694-19c4-4d7e-bec5-911270d8a58c
2020-09-24 09:07:22 -04:00
Alexandre Ganea
8b839e28ec Improve 723fea23079f9c85800e5cdc90a75414af182bfd - Silence 'warning: unused variable' when compiling with Clang 10.0 2020-09-24 09:07:22 -04:00
Simon Pilgrim
2dca188cb2 [AArch64] Regenerate dag-combine-mul-shl.ll checks 2020-09-24 13:42:03 +01:00