1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Commit Graph

200851 Commits

Author SHA1 Message Date
Alina Sbirlea
bb6015d9c6 [GraphDiff] Use class method getChildren instead of GraphTraits.
Summary:
Use getChildren() method in GraphDiff instead of GraphTraits.

This simplifies the code and allows for refactorigns inside GraphDiff.
All usecase need not have a light-weight/copyable range.
Clean GraphTraits implementation.

Reviewers: dblaikie

Subscribers: hiraditya, llvm-commits, george.burgess.iv

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84562
2020-07-27 16:12:34 -07:00
Matt Arsenault
7003ae0f90 GlobalISel: Don't fail translate on intrinsics with metadata 2020-07-27 19:00:25 -04:00
Matt Arsenault
6f129b2e3c AMDGPU/GlobalISel: Mark G_ATOMICRMW_{NAND|FSUB} as lower
These aren't implemented and we're still relying on the AtomicExpand
pass, but mark these as lower to eliminate a few of the few remaining
no rules defined cases.
2020-07-27 18:47:40 -04:00
Matt Arsenault
f814ba71a1 AMDGPU: global_atomic_csub is not always dereferenceable 2020-07-27 18:47:39 -04:00
Jonas Devlieghere
60d6da1cf2 [llvm] Make ZLIB handling compatible with multi-configuration generators
The CMAKE_BUILD_TYPE is only meaningful to single-configuration
generators (such as make and Ninja). For multi-configuration generators
like Xcode and MSVC this variable won't be set, resulting in a CMake
error.
2020-07-27 15:37:18 -07:00
Matt Arsenault
60ee3e2e8b TableGen/GlobalISel: Allow output instructions with multiple defs
The DAG behavior allows matchching input patterns with a single result
to the first result of an output instruction that defines multiple
results. The remaining defs are implicitly dead.

This starts to fix using manual selection for AMDGPU add/sub (although
it's still needed, mostly because it's also still needed for
G_PTR_ADD).
2020-07-27 18:31:13 -04:00
Francesco Petrogalli
79f86bfe26 [llvm][CodeGen] Addressing modes for SVE ldN.
Reviewers: c-rhodes, efriedma, sdesmalen

Subscribers: huihuiz, tschuett, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77251
2020-07-27 22:18:28 +00:00
Arthur Eubanks
8826e94360 [DFSan] Remove unused DataFlowSanitizer vars
Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D84704
2020-07-27 14:59:07 -07:00
Sridhar Gopinath
bb16a9f85f Fix the move constructor of MMI to move MachineFunctions map
The move constructor of MachineModuleInfo currently does not copy the
MachineFunctions map. This commit fixes this issue.

Patch by Sridhar Gopinath. Thanks!

Differential Revision: https://reviews.llvm.org/D84274
2020-07-27 14:10:05 -07:00
Jinsong Ji
89408b2ab3 Revert "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support"
This reverts commit adffce71538e219aab4eeb024819baa7687262ff.

This is breaking test-suite, revert while investigation.
2020-07-27 21:07:00 +00:00
Guillaume Chatelet
041ab5526b [NFC] Move BitcodeCommon.h from Bitstream to Bitcode 2020-07-27 20:49:17 +00:00
Arthur Eubanks
1e47ef76de Rename t2-reduce-size -> thumb2-reduce-size
For readability and consistency with other thumb2 passes like
"thumb2-it".

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D84696
2020-07-27 13:42:13 -07:00
Roman Lebedev
610300535f [OpenMPOpt] Most SCC's are uninteresting, don't waste time on them (up to 16x faster)
Summary:
This seems obvious in hindsight, but the result is surprising.
I've measured compile-time of `-openmpopt` pass standalone
on RawSpeed unity build, and while there is some OpenMP stuff,
most is not OpenMP. But nonetheless the pass does a lot of costly
preparations before ever trying to look for OpenMP stuff in SCC.

Numbers (n=25): 0.094624s  ->  0.005976s, an -93.68% improvement, or ~16x

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: yaxunl, hiraditya, guansong, llvm-commits, sstefan1

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84689
2020-07-27 23:36:34 +03:00
Jon Roelofs
f9714f9d78 [llvm][examples][SimplifyCFG] Fix pass's IR changed reporting
... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPM
that verifies whether a pass really did leave the IR alone when it reports no
changes back from its return status.
2020-07-27 13:39:58 -06:00
Jinsong Ji
2d65e976a4 [PowerPC] Remove QPX/A2Q BGQ/BGP CNK support
Per RFC http://lists.llvm.org/pipermail/llvm-dev/2020-April/141295.html
no one is making use of QPX/A2Q/BGQ/BGP CNK anymore.

This patch remove the support of QPX/A2Q in llvm, BGQ/BGP in clang,
CNK support in openmp/polly.

Reviewed By: hfinkel

Differential Revision: https://reviews.llvm.org/D83915
2020-07-27 19:24:39 +00:00
Shinji Okumura
6c85f2e60c [Attributor][NFC] Add tests to noalias.ll
Summary: Add tests to `noalias.ll` to make changes in D84665 clear

Reviewers: jdoerfert, sstefan1, uenoku, homerdin, baziotis

Subscribers: uenoku, kuter, bbn, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84688
2020-07-28 03:53:06 +09:00
Matt Morehouse
964edac32c Replace fuzzer::FuzzerDriver's INTERFACE marking with new LLVMRunFuzzerDriver.
This adds a new extern "C" function that serves the same purpose. This removes the need for external users to depend on internal headers in order to use this feature. It also standardizes the interface in a way that other fuzzing engines will be able to match.

Patch By: IanPudney

Reviewed By: kcc

Differential Revision: https://reviews.llvm.org/D84561
2020-07-27 18:38:04 +00:00
Arthur Eubanks
fca7fa2021 Prefix some AArch64/ARM passes with "aarch64-"/"arm-"
For consistency with other target specific passes.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D84560
2020-07-27 11:00:39 -07:00
Kazu Hirata
0d01902704 Use llvm::is_contained where appropriate (NFC)
Summary:
This patch replaces std::find with llvm::is_contained where
appropriate.

Reviewers: efriedma, nhaehnle

Reviewed By: nhaehnle

Subscribers: arsenm, jvesely, nhaehnle, hiraditya, rogfer01, kerbowa, llvm-commits, vkmr

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84489
2020-07-27 10:20:44 -07:00
Nadav Rotem
76b41521df [StackProtector] Speed up RequiresStackProtector
Speed up the method RequiresStackProtector by checking the intrinsic
value of the call. The original code calls getName() that returns an
allocating std::string on each check. This change removes about 96072
std::string instances when compiling sqlite3.c; The function was
discovered with a Facebook-internal performance tool.

Differential Revision: https://reviews.llvm.org/D84620
2020-07-27 10:07:47 -07:00
Craig Topper
5d2715ef8f [X86] Add back comment inadvertently lost in 1a1448e6568d9b11f198e510fa9c4cb6b1f4216a. 2020-07-27 10:02:38 -07:00
Francesco Petrogalli
cf52837bfc [NFC][AArch64] Replace some template methods/invocations...
...with the non-template version, as the template version might
increase the size of the compiler build.

Methods affected:

1.`findAddrModeSVELoadStore`
2. `SelectPredicatedStore`

Also, remove the `const` qualifier from the `unsigned` parameters of
the methods to conform with other similar methods in the class.
2020-07-27 16:52:08 +00:00
Simon Pilgrim
36541b4f1d [X86][SSE] Relax 128-bit restriction on extract_subvector(ext_vector_inreg(X),0) -> ext_vector_inreg(extract_subvector(X,0)) fold
We only need to ensure that the source is larger than the subvector result type
2020-07-27 17:50:36 +01:00
LLVM GN Syncbot
24a1f1e3a4 [gn build] Port ee7caa75939 2020-07-27 16:45:49 +00:00
Nico Weber
d54752f9dc [gn build] Make syncing to single-line source files work after 1afd889d0b43 2020-07-27 12:44:47 -04:00
Vy Nguyen
0724050861 Reland [llvm-exegesis] Add benchmark latency option on X86 that uses LBR for more precise measurements.
Starting with Skylake, the LBR contains the precise number of cycles between the two
        consecutive branches.
        Making use of this will hopefully make the measurements more precise than the
        existing methods of using RDTSC.

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

New change: check for existence of field `cycles` in perf_branch_entry before enabling this mode.
This should prevent compilation errors when building for older kernel whose headers don't support it.
2020-07-27 12:38:05 -04:00
Nico Weber
9d66423013 [gn build] (manually) merge 48c948abeb7 2020-07-27 12:30:09 -04:00
Jon Roelofs
f305e07c2d [TableGen][CGS] Print better errors on overlapping InstRW
Differential Revision: https://reviews.llvm.org/D83588
2020-07-27 09:41:10 -06:00
Logan Smith
78dc495935 Use INTERFACE_COMPILE_OPTIONS to disable -Wsuggest-override for any target that links to gtest
This cleans up several CMakeLists.txt's where -Wno-suggest-override was manually specified. These test targets now inherit this flag from the gtest target.

Some unittests CMakeLists.txt's, in particular Flang and LLDB, are not touched by this patch. Flang manually adds the gtest sources itself in some configurations, rather than linking to LLVM's gtest target, so this fix would be insufficient to cover those cases. Similarly, LLDB has subdirectories that manually add the gtest headers to their include path without linking to the gtest target, so those subdirectories still need -Wno-suggest-override to be manually specified to compile without warnings.

Differential Revision: https://reviews.llvm.org/D84554
2020-07-27 08:37:01 -07:00
Vy Nguyen
602a8b1df5 [llvm-exegesis] Check perf_branch_entry for field cycles
Summary: Follow up to breakages reported in D77422

Reviewers: ondrasej, gchatelet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84076
2020-07-27 11:31:13 -04:00
jasonliu
f9434ab9b2 [XCOFF][AIX] Handle llvm.used and llvm.compiler.used global array
For now, just return and do nothing when we see llvm.used and
llvm.compiler.used global array.
Hopefully, we could come up with a good solution later to prevent
linker from eliminating symbols in llvm.used array.

Reviewed By: DiggerLin, daltenty

Differential Revision: https://reviews.llvm.org/D84363
2020-07-27 15:28:32 +00:00
Jon Roelofs
c0e6798650 [AArch64] fjcvtzs,rmif,cfinv,setf* all clobber nzcv
Differential Revision: https://reviews.llvm.org/D83818
2020-07-27 09:17:53 -06:00
Sergej Jaskiewicz
8b9bd0fa18 [lit] Don't expand escapes until all substitutions have been applied
Otherwise, if a Lit script contains escaped substitutions (like %%p in this test https://github.com/llvm/llvm-project/blob/master/compiler-rt/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp#L10), they are unescaped during recursive application of substitutions, and the results are unexpected.

We solve it using the fact that double percent signs are first replaced with #_MARKER_#, and only after all the other substitutions have been applied, #_MARKER_# is replaced with a single percent sign. The only change is that instead of replacing #_MARKER_# at each recursion step, we replace it once after the last recursion step.

Differential Revision: https://reviews.llvm.org/D83894
2020-07-27 18:09:00 +03:00
Amy Kwan
fc21604c62 Revert "Re-apply:" Emit DW_OP_implicit_value for Floating point constants""
This patch reverts commit `59a76d957a26` as it has caused failure on the
big endian PowerPC buildbots (as well as the SystemZ buildbots).
2020-07-27 09:44:13 -05:00
Luofan Chen
023f114f4c [Attributor] Fix qualifier warning of the unittest
Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D84532
2020-07-27 22:28:39 +08:00
Guillaume Chatelet
d037bcfdd4 [NFC] Replace ".size() < 1" with ".empty()" 2020-07-27 13:54:53 +00:00
Simon Pilgrim
fbf73d6d1b [X86][AVX] Fold extract_subvector(truncate(x),0) -> truncate(extract_subvector(x),0)
This is currently only supported for VLX targets where the op should be legal.
2020-07-27 14:51:29 +01:00
Simon Pilgrim
b2a0b1f988 [X86] combineExtractSubvector - pull out repeated getSizeInBits() calls. NFCI. 2020-07-27 14:51:28 +01:00
Simon Pilgrim
6a70e74d4b IRPrintingPasses.h - simplify unnecessary header with forward declarations. NFC.
Remove duplicate PassManager.h include in IRPrintingPasses.cpp
2020-07-27 14:51:28 +01:00
Sergey Dmitriev
02505ee23a [CallGraph] Preserve call records vector when replacing call edge
Summary:
Try not to resize vector of call records in a call graph node when
replacing call edge. That would prevent invalidation of iterators
stored in the CG SCC pass manager's scc_iterator.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84295
2020-07-27 06:02:55 -07:00
Tim Northover
bb96b301c9 AArch64: avoid UB shift of negative value
Left shifting a negative value is undefined behaviour, so this just moves the
negation afterwards to avoid it.
2020-07-27 13:49:50 +01:00
Roman Lebedev
cd8f899c56 [JumpThreading] ProcessBranchOnXOR(): bailout if any pred ends in indirect branch (PR46857)
SplitBlockPredecessors() can not split blocks that have such terminators,
and in two other places we already ensure that we don't end up calling
SplitBlockPredecessors() on such blocks. Do so in one more place.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46857
2020-07-27 15:39:03 +03:00
Roman Lebedev
aa265a31e9 [Reduce] Argument reduction: shoe-horn new function into remaining uses of old function
Much like with function reduction, there may be remaining unhandled uses
of function, in particular in blockaddress. And in constants we can't
RAUW it with undef, because undef is not a function.
Instead, let's try to pretent that in the remaining cases, the new
signature didn't change, by bitcasting it.

A new (previously crashing) test case added.
2020-07-27 15:39:03 +03:00
Roman Lebedev
49caf4bfe4 [Reduce] Function reduction: replace all users of function with undef
There may be other users of a function other than CallInsts,
but what's more important, we can't actually replace function pointer
with undef, because for constants, that would not preserve the type
and RAUW would assert.

In particular, that affects blockaddress, however it proves to be
prohibitively complex to come up with a good test involving blockaddress:
we'd need to both ensure that the function body survives until
this pass, and is not interesting in this pass.
2020-07-27 15:39:02 +03:00
Nathan James
0c0782b95f [llvm][NFC] Silence unused variable warning by using isa over dyn_cast 2020-07-27 13:37:21 +01:00
Sanjay Patel
1555485a98 [InstSimplify] add tests for min/max intrinsics; NFC 2020-07-27 08:26:27 -04:00
Hans Wennborg
e73cfa27dc [gn] Set CLANGD_ENABLE_REMOTE=0
To fix the build after 37ac559fccd4.
2020-07-27 14:05:03 +02:00
Tim Northover
ebd705668f AArch64: diagnose out of range relocation addends on MachO.
MachO only has 24-bit addends for most relocations, small enough that it can
overflow in semi-reasonable functions and cause insidious bugs if compiled
without assertions enabled. Switch it to an actual error instead.

The condition isn't quite identical because ld64 treats the addend as a signed
number.
2020-07-27 13:01:22 +01:00
Juneyoung Lee
19be62e78d [JumpThreading] Add a test case that has a phi with undef; NFC 2020-07-27 19:08:45 +09:00
Juneyoung Lee
b6d1184186 [JumpThreading] Add a test that threads jumps with frozen branch conditions 2020-07-27 19:04:50 +09:00