1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
Commit Graph

203833 Commits

Author SHA1 Message Date
Fangrui Song
64799c106c Fix some clang-tidy bugprone-argument-comment issues 2020-09-19 20:41:25 -07:00
Lang Hames
6ab9d78a52 [ORC][examples] Add an OrcV2 example for IR optimization via IRTransformLayer.
Shows how to write a custom IR transform to apply a legacy::PassManager
pipeline.
2020-09-19 18:59:52 -07:00
Nikita Popov
2428bdcb45 [Local] Clean up enforceKnownAlignment() (NFC)
I want to export this function, and the current API was a bit
weird: It took an additional Alignment argument that didn't really
have anything to do with what the function does. Drop it, and
perform a max at the callsite.

Also rename it to tryEnforceAlignment().
2020-09-19 22:29:40 +02:00
Nikita Popov
5a88990a71 [InstCombine] Regenerate test checks (NFC) 2020-09-19 21:07:54 +02:00
Roman Lebedev
4c7d81897d [NFC][PhaseOrdering] Add test showing SROA not being performed after loop unrolling 2020-09-19 21:18:35 +03:00
Dávid Bolvanský
7aaf91a742 [BasicAA] Regenerate test checks 2020-09-19 19:36:10 +02:00
Florian Hahn
03e16aab4f [SCEVExpander] Support expanding nonintegral pointers with constant base.
Currently SCEVExpander creates inttoptr for non-integral pointers if the
base is a null constant for example. This results in invalid IR.

This patch changes InsertNoopCastOfTo to emit a GEP & bitcast to convert
to a non-integral pointer. First, a GEP of i8* null is generated and the
integral value is used as index. The GEP is then bitcasted to the target
type.

This was exposed by D71539.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87827
2020-09-19 17:19:53 +01:00
Dávid Bolvanský
0126c354e7 [MemLoc] Support bcmp in MemoryLocation::getForArgument
Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D87964
2020-09-19 17:12:43 +02:00
Sanjay Patel
7799c41807 [InstCombine] auto-generate test checks; NFC 2020-09-19 11:06:47 -04:00
Sanjay Patel
c6580be685 [InstCombine] regenerate test checks; NFC 2020-09-19 10:43:18 -04:00
Sanjay Patel
883809adba [ConstantFolding] add undef handling for fmin/fmax intrinsics
The output here may not be optimal (yet), but it should be
consistent for commuted operands (it was not before) and
correct. We can do better by checking FMF and NaN if needed.

Code in InstSimplify generally assumes that we have already
folded code like this, so it was not handling 2 constant
inputs by commuting consistently.
2020-09-19 10:31:01 -04:00
Paul C. Anagnostopoulos
58f51bc97c Change name of Record::TheInit to CorrespondingDefInit to make code clearer.
Differential Revision: https://reviews.llvm.org/D87919
2020-09-19 09:18:44 -04:00
Nico Weber
fa66d9af58 [gn build] Port 2124ca1d5cb 2020-09-19 08:34:58 -04:00
Nico Weber
d4bdf8df2e [gn build] (manually) merge 2124ca1d5 2020-09-19 08:29:55 -04:00
Nico Weber
9723fed320 Revert "Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups"
This reverts commit 90fffdd0f705bfb480810cef087305567dc4f6cf.
The original change relanded.
2020-09-19 08:28:38 -04:00
Simon Pilgrim
c3b840e49c InstCombiner.h - remove unnecessary KnownBits forward declaration. NFCI.
We already include KnownBits.h
2020-09-19 12:53:07 +01:00
Joachim Meyer
d06a70e02e Add -Wno-error=unknown flag to clang-format.
Currently newer clang-format options cannot be included in .clang-format files, if not all users can be forced to use an updated version.
This patch tries to solve this by adding an option to clang-format, enabling to ignore unknown (newer) options.

Differential Revision: https://reviews.llvm.org/D86137
2020-09-19 10:17:57 +02:00
Craig Topper
cba5d6bed8 [X86] Return from SimplifyDemandedBitsForTargetNode after calculating known bits for VSHLI/VSRAI/VSRLI.
We were breaking out of the switch which falls into the default
implementation of SimplifyDemandedBitsForTargetNode which is a
wrapper around computeKnownBits. So we end up doing the recursion
and known bits calculation all over again. Instead we should return
with the known bits we calculated in the switch.
2020-09-18 23:57:01 -07:00
Amara Emerson
3e4cfa99b8 [AArch64][GlobalISel] Add legalization and selection support for <4 x s16> G_SHL. 2020-09-18 23:32:01 -07:00
Xun Li
bc3710453a [ASAN] Properly deal with musttail calls in ASAN
When address sanitizing a function, stack unpinsoning code is inserted before each ret instruction. However if the ret instruciton is preceded by a musttail call, such transformation broke the musttail call contract and generates invalid IR.
This patch fixes the issue by moving the insertion point prior to the musttail call if there is one.

Differential Revision: https://reviews.llvm.org/D87777
2020-09-18 23:10:34 -07:00
Andrew Litteken
c53dab65b4 [IRSim] Adding ilist for IRInstructionData.
The IRInstructionData structs are a different representation of the
program.  This list treats the program as if it was "flattened" and
the only parent is this list.  This lets us easily create ranges of
instructions.

Differential Revision: https://reviews.llvm.org/D86969
2020-09-19 00:18:39 -05:00
Craig Topper
e9b884a465 [X86] Fix copy paste mistake in @ccnp flag.
We were treating @ccp and @ccnp the same.
2020-09-18 21:28:01 -07:00
Craig Topper
2ad28d9322 [X86] Invert the compares in inline-asm-flag-output.ll so that the setcc instruction condition matches the test name. NFC
Also add nounwind to the tests to remove cfi directives.
2020-09-18 21:23:53 -07:00
David Blaikie
4e8a4f6d62 DebugInfo: Cleanup RLE dumping, using a length-constrained DataExtractor rather than carrying the end offset separately 2020-09-18 19:32:38 -07:00
Nico Weber
a5b0afab2f [gn build] (manually) port 5495b691646 2020-09-18 21:27:49 -04:00
Alexander Shaposhnikov
8837f43bbb [llvm-objcopy][MachO] Clean up the interface of Object
Remove the method addLoadCommand which was used only in a single place.
NFC.

Test plan: make check-all
2020-09-18 18:23:27 -07:00
Nico Weber
6200c8c5c9 Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups
9b6765e784b3 was reverted in 549e55b3d5634.

This reverts commit 442801a7b9b5460114498c48c12b8af40e495188.
This reverts commit 929d91a55616d4fcf4754044b063644807b87fbe.
This reverts commit 7c2d83347f4ea146af1aca72fe289294aaf212be.
2020-09-18 21:14:27 -04:00
Alexander Shaposhnikov
a6c5914f99 [llvm-objcopy][MachO] Add llvm-bitcode-strip driver
This diff adds llvm-bitcode-strip driver to llvm-objcopy.
In the future this will enable us to build a replacement for the tool bitcode_strip.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87212
2020-09-18 18:13:05 -07:00
Eric Christopher
907ccb4712 Temporarily Revert "RegAllocFast: Rewrite and improve"
as it's breaking a few tests in the lldb test suite.

Bot: http://lab.llvm.org:8011/builders/lldb-arm-ubuntu/builds/4226/steps/test/logs/stdio

This reverts commit c8757ff3aa7dd7a25a6343f6ef74a70c7be04325.
2020-09-18 18:11:21 -07:00
Alexander Shaposhnikov
01222be640 [llvm-install-name-tool] Validate -id value early
The code which validates the value of -id is moved into the function parseInstallNameToolOptions.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87855
2020-09-18 17:50:08 -07:00
Fangrui Song
90b9ef1425 [LiveDebugValues] Add #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) to suppress -Wunused-function 2020-09-18 17:25:37 -07:00
Amara Emerson
61a3b2fb2b [AArch64][GlobalISel] Add tests for pre-existing selection support for <4 x s16> arithmetic/bitwise ops. 2020-09-18 17:13:55 -07:00
Amara Emerson
7600b7ba0c [AArch64][GlobalISel] Legalize arithmetic ops for <4 x s16> 2020-09-18 17:13:55 -07:00
Vitaly Buka
f298c20805 [NFC][StackSafety] Replace auto with type
Fixes static analyzer is warning.
2020-09-18 17:10:28 -07:00
Fangrui Song
07bdca3215 [SCEV] Fix an unused variable in -DLLVM_ENABLE_ASSERTIONS=off build 2020-09-18 16:19:05 -07:00
Amara Emerson
c373bb64ff [GlobalISel] Add lowering support for G_ABS and use for AArch64.
Differential Revision: https://reviews.llvm.org/D87952
2020-09-18 16:17:18 -07:00
Amy Kwan
be427da523 [PowerPC] Implement Move to VSR Mask builtins in LLVM/Clang
This patch implements the vec_gen[b|h|w|d|q]m function prototypes in altivec.h
in order to utilize the move to VSR with mask instructions introduced in Power10.

Differential Revision: https://reviews.llvm.org/D82725
2020-09-18 18:16:14 -05:00
Philip Reames
eaea7ba7a7 [instcombine][x86] Converted pdep/pext with shifted mask to simple arithmetic
If the mask of a pdep or pext instruction is a shift masked (i.e. one contiguous block of ones) we need at most one and and one shift to represent the operation without the intrinsic. One all platforms I know of, this is faster than the pdep/pext.

The cost modelling for multiple contiguous blocks might be worth exploring in a follow up, but it's not relevant for my current use case. It would almost certainly be a win on AMDs where these are really really slow though.

Differential Revision: https://reviews.llvm.org/D87861
2020-09-18 14:54:24 -07:00
Arthur Eubanks
d4bfedd5af [test][InstrProf] Fix always_inline.ll under NPM
NPM's inliner does not clean up dead functions.

Differential Revision: https://reviews.llvm.org/D87922
2020-09-18 14:50:47 -07:00
Reid Kleckner
e747f6900b [COFF] Move per-global .drective emission from AsmPrinter to TLOFCOFF
This changes the order of output sections and the output assembly, but
is otherwise NFC.

It simplifies the TLOF interface by removing two COFF-only methods.
2020-09-18 14:31:01 -07:00
Vedant Kumar
ea70c5e0ce [llvm-cov] Allow commas in filenames passed to -object flag
Currently, -object takes a comma separated list of objects as an
argument, which prevents it working with path names that contain a
comma. Drop comma-separated support, which requires to set pass the
-object flag multiple times to set multiple objects.

Patch by Andrew Gallagher!

Differential Revision: https://reviews.llvm.org/D87003
2020-09-18 13:46:29 -07:00
Nico Weber
6640720520 clang: Make changes in 7c8bb409f31e py2.7-compatible 2020-09-18 16:15:37 -04:00
Sanjay Patel
8bd14e026c [InstSimplify] add tests for constant folding fmin/fmax with undef op; NFC 2020-09-18 16:09:44 -04:00
Nico Weber
671cddeebe [gn build] add file i forgot to add in 929d91a55616 2020-09-18 16:01:00 -04:00
Nico Weber
28eea2351a [gn build] (manually) port 9b6765e784b3 more 2020-09-18 15:56:34 -04:00
Eric Christopher
f617455845 Temporarily Revert "[SLP] Allow reordering of vectorization trees with reused instructions."
as it's infinite looping on occasion.

This reverts commit 455ca0ebb69210046928fedffe292420a30f89ad.
2020-09-18 12:50:04 -07:00
Nico Weber
9376a275d8 [gn build] Do not sync filenames containing variable references 2020-09-18 15:34:33 -04:00
Krzysztof Parzyszek
f161c48716 Pre-commit test for CSEing masked loads/stores 2020-09-18 14:30:53 -05:00
Nico Weber
cbeef0ae5c [gn build] (manually) port 9b6765e784b3 2020-09-18 15:26:58 -04:00
Simon Pilgrim
327da60d2d [X86][AVX] lowerBuildVectorAsBroadcast - improve BROADCASTM lowering on non-VLX targets
Broadcast to a ZMM type then extract the low subvector.
2020-09-18 19:52:02 +01:00