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

194847 Commits

Author SHA1 Message Date
Stefanos Baziotis
f5bcf98c90 [LoopTerminology] LCSSA: Fix typo in code sample 2020-04-12 04:40:55 +03:00
Matt Arsenault
6a077dd7a8 AMDGPU/GlobalISel: Fix RegBankSelect for v2s16 shifts
These need to be promoted and scalarized for the SALU.
2020-04-11 20:55:33 -04:00
David Blaikie
356c6ad409 Revert "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries"
Broke an LLDB build bot & I can't seem to build LLDB locally to fix
forward...
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/15567/steps/test/logs/stdio

This reverts commit 416fa7720e30750939c53935051c6c750dfad2c2.
2020-04-11 16:54:49 -07:00
Matt Arsenault
e12ddb0e52 AMDGPU/GlobalISel: Legalize 16-bit shift amounts to s16
The current selector depends on 16-bit shifts using 16-bit shift
amount types, but really it should accept either for all types.
2020-04-11 18:12:26 -04:00
Craig Topper
9127250ae4 [X86] Cleanup ISD::BRIND handling code in X86DAGToDAGISel::Select. NFC
-Drop llvm:: on MVT::i32
-Use getValueType instead of getSimpleValueType for an equality
check just cause its shorter and doesn't matter.
-Don't create a const SDValue & since its cheap to copy.
-Remove explicit case from MVT enum to EVT.
-Add message to assert.
2020-04-11 15:01:05 -07:00
Craig Topper
87799e9feb [X86] Move code that replaces ISD::VSELECT with X86ISD::BLENDV from X86DAGToDAGISel::Select to PreprocessISelDAG 2020-04-11 15:01:05 -07:00
Eli Friedman
5bf90476ea [DenseMap] Add assertion that end() iterator isn't derefenced.
This would have saved me some time this morning.
2020-04-11 14:53:09 -07:00
Simon Pilgrim
7bbe4c6008 ModuleUtils.h - include and forward declaration cleanup. NFC.
Replace SmallSet.h include with SmallVector.h - only SmallVector.h is used from inside SmallSet.h
Remove llvm::StringRef forward declaration (we include StringRef.h)
Remove unused llvm::GlobalVariable forward declaration.
2020-04-11 21:25:53 +01:00
Craig Topper
b596a19170 [CallSite removal][SelectionDAGBuilder] Use CallBase instead of ImmutableCallSite in visitPatchpoint.
Differential Revision: https://reviews.llvm.org/D77932
2020-04-11 13:07:31 -07:00
Matt Arsenault
0fdb14b861 GlobalISel: Fix typo in assert message 2020-04-11 16:02:26 -04:00
Matt Arsenault
f678530c6e AMDGPU/GlobalISel: Fix legalizing <3 x s16> vselects 2020-04-11 15:59:51 -04:00
Hongtao Yu
e7db5b116b [CodeGen] Allow partial tail duplication in Machine Block Placement.
Summary: A count profile may affect tail duplication's heuristic causing a block to be duplicated in only a part of its predecessors. This is not allowed in the Machine Block Placement pass where an assert will go off. I'm removing the assert and making the optimization bail out when such case happens.

Reviewers: wenlei, davidxl, Carrot

Reviewed By: Carrot

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77748
2020-04-11 12:20:31 -07:00
Aaron Puchert
c19e55e1a6 Use more LLVM_ENABLE_ABI_BREAKING_CHECKS in Error.h
Summary:
If we don't read the flag, we don't need to set it. Then we also don't
need to filter it out to get the pointer.

This should have a (small) positive impact on code size and performance.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D76259
2020-04-11 21:14:18 +02:00
Fangrui Song
3c474aa8ad [MC] Default MCAsmInfo::UseIntegratedAssembler to true 2020-04-11 10:13:52 -07:00
Fangrui Song
89981ade6c [MC] Add UseIntegratedAssembler = false. NFC 2020-04-11 10:13:49 -07:00
Benjamin Kramer
d4c4773e87 Simplify string joins. NFCI. 2020-04-11 17:20:11 +02:00
Matt Arsenault
70f3ab2891 AMDGPU/GlobalISel: Work around forming illegal zextload after legalize
Selection would fail after the post legalize combiner put an illegal
zextload back together.

The base combiner has parameter to only allow legal operations, but
they appear to not be used. I also don't see a nice way to remove a
single entry from all_combines, so just hack around this.
2020-04-11 10:52:58 -04:00
Sanjay Patel
8105dac4cc [VectorUtils] rename scaleShuffleMask to narrowShuffleMaskElts; NFC
As proposed in D77881, we'll have the related widening operation,
so this name becomes too vague.

While here, change the function signature to take an 'int' rather
than 'size_t' for the scaling factor, add an assert for overflow of
32-bits, and improve the documentation comments.
2020-04-11 10:05:49 -04:00
Simon Pilgrim
c68409d10e TargetLoweringObjectFileImpl.h - replace MCExpr.h and Module.h includes with forward declarations. NFC.
Also remove unused llvm::Mangler forward declaration.
2020-04-11 14:13:39 +01:00
Benjamin Kramer
dda49c99ab [FormatVariadic] Put back return type in an attempt to make GCC happy 2020-04-11 15:11:44 +02:00
Benjamin Kramer
9f3f98bdcb [argpromote] Use formatv to simplify code. NFCI. 2020-04-11 14:54:32 +02:00
Benjamin Kramer
b25315e825 [FormatVariadic] Reduce allocations
- Move Adapters array to the stack, we know the size precisely
- Parse format string on demand into a SmallVector. In theory this could
  lead to parsing it multiple times, but I couldn't find a single instance
  of that in LLVM.
- Make more of the implementation details private.
2020-04-11 14:54:32 +02:00
Nemanja Ivanovic
1af021cea8 [PowerPC] Handle f16 as a storage type only
The PPC back end currently crashes (fails to select) with f16 input. This patch
expands it on subtargets prior to ISA 3.0 (Power9) and uses the HW conversions
on Power9.

Fixes https://bugs.llvm.org/show_bug.cgi?id=39865

Differential revision: https://reviews.llvm.org/D68237
2020-04-11 07:34:47 -05:00
Florian Hahn
150d22f2af [VPlan] Drop redundant private: at beginning of class defs (NFC).
Default visibility for classes is private, so the private: at the top of
various class definitions is redundant.

Reviewers: gilr, rengolin, Ayal, hsaito

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D77810
2020-04-11 13:27:10 +01:00
Simon Pilgrim
e0512a5d06 CodeGen/EdgeBundles - move Twine.h include down into EdgeBundles.cpp. NFC.
EdgeBundles.h has no use for it.
2020-04-11 12:21:04 +01:00
Simon Pilgrim
3f1d22de55 Local.h - remove unnecessary Twine.h include. NFC. 2020-04-11 12:21:04 +01:00
Simon Pilgrim
32c17c7efe PhiValues.h - remove unused llvm::Use forward declaration. NFC. 2020-04-11 12:21:04 +01:00
Simon Pilgrim
9ae669cb5c ObjCARCAnalysisUtils.h - remove unused llvm::raw_ostream forward declaration. NFC. 2020-04-11 12:21:04 +01:00
Simon Pilgrim
38c517ba07 SyntheticCountsUtils.h - remove unused llvm::CallGraph/Function forward declarations. NFC. 2020-04-11 12:21:03 +01:00
Simon Pilgrim
7ba4485ee9 OptimizationRemarkEmitter.h - remove unused llvm::DebugLoc/Loop/Pass/Twine forward declarations. NFC. 2020-04-11 12:21:03 +01:00
Simon Pilgrim
e8d212820a Passes.h - remove unused llvm::LoopPass/Pass/PassInfo forward declarations. NFC. 2020-04-11 12:21:03 +01:00
Simon Pilgrim
8d7f4c85f5 PredicateInfo.h - remove unused llvm::Instruction/MemoryAccess/LLVMContext forward declarations. NFC. 2020-04-11 11:25:48 +01:00
Simon Pilgrim
e93b439d86 IntrinsicLowering.h - remove unused llvm::Module forward declaration. NFC. 2020-04-11 11:25:48 +01:00
Simon Pilgrim
43bac524ac ExecutionDomainFix.h - remove unused llvm::MachineBasicBlock forward declaration. NFC. 2020-04-11 11:25:48 +01:00
Simon Pilgrim
c47a97aa1f CallingConvLower.h - remove unused llvm::TargetMachine forward declaration. NFC. 2020-04-11 11:25:48 +01:00
Simon Pilgrim
cb8d27c3e9 Analysis.h - remove unused SDNode/SDValue/SelectionDAG forward declarations. NFC. 2020-04-11 11:25:48 +01:00
Simon Pilgrim
c27abd65b5 [PDB] Remove defunct PDBFileBuilder::commitFpm declaration. NFC. 2020-04-11 09:58:11 +01:00
Craig Topper
efb31fbe06 Change FastISel::CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.
This is the same as what was done to the CallLoweringInfo in
TargetLowering.h in r309159.

This is just a step on the way to replacing this with CallBase.
2020-04-10 23:45:36 -07:00
Shengchen Kan
61346d1bb4 [NFC][test] Refine tests for branch align
Remove some redundant blank and triple description. And rename some
files.
2020-04-11 13:04:52 +08:00
Shengchen Kan
f8ad88c396 [X86][MC] Make -x86-pad-max-prefix-size compatible with --mc-relax-all
Summary: We allow non-relaxable instructions emitted into relaxable Fragment when we prefix padding branch. So we need to check if the instruction need relaxation before relaxing it.  Without this patch, it currently triggers a `report_fatal_error` in `llvm::MCAsmBackend::relaxInstruction` when we prefix padding branch along with `--mc-relax-all`.

Reviewers: LuoYuanke, reames, MaskRay

Reviewed By: MaskRay

Subscribers: MaskRay, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77851
2020-04-11 11:30:15 +08:00
Julian Lettner
55b035f2b5 [lit] Temporarily disable failing tests on Windows 2020-04-10 20:03:44 -07:00
Craig Topper
aed65c8e1b [CallSite removal][SelectionDAGBuilder] Remove most CallSite usage from visitInlineAsm.
I only left it at the interface to ParseConstraints since that
needs updates to other callers in different files. I'll do that
as a follow up.

Differential Revision: https://reviews.llvm.org/D77892
2020-04-10 19:23:33 -07:00
Nemanja Ivanovic
f3d07ae265 [PowerPC] Another folow-up fix for 6c4b40def776
There was another issue introduced by this commit that the OP
initially missed. Namely, for functions that are free to use
R2 as a callee-saved register, we emit a TOC expression based
on the address of the GEP label without emitting the GEP label.
Since we only emit such expressions for the large code model, this
issue only surfaced there.

I have confirmed that with this fix, the kernel build is successful
with target "all".
2020-04-10 21:09:59 -05:00
Scott Constable
bb552531fd [X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault
`MBB.back()` could segfault if `MBB.empty()`. Fixed by checking for `MBB.empty()` in the loop.

Differential Revision: https://reviews.llvm.org/D77584
2020-04-10 18:28:08 -07:00
Mehdi Amini
bc03517248 Revert "[TLI] Per-function fveclib for math library used for vectorization"
This reverts commit 60c642e74be6af86906d9f3d982728be7bd4329f.

This patch is making the TLI "closed" for a predefined set of VecLib
while at the moment it is extensible for anyone to customize when using
LLVM as a library.
Reverting while we figure out a way to re-land it without losing the
generality of the current API.

Differential Revision: https://reviews.llvm.org/D77925
2020-04-11 01:05:01 +00:00
Matt Arsenault
176b02c44e GlobalISel: Fix incorrect lowering G_FCOPYSIGN
In the basic case, this was reading the sign from the wrong operand.
2020-04-10 21:00:25 -04:00
Huihui Zhang
5295decd39 [GVN] Fix VNCoercion for Scalable Vector.
Summary:
For VNCoercion, skip scalable vector when analysis rely on fixed size,
otherwise call TypeSize::getFixedSize() explicitly.

Add unit tests to check funtionality of GVN load elimination for scalable type.

Reviewers: sdesmalen, efriedma, spatel, fhahn, reames, apazos, ctetreau

Reviewed By: efriedma

Subscribers: bjope, hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76944
2020-04-10 17:49:07 -07:00
Julian Lettner
db6e460f3e [lit] Fix tests on Windows
max-time.py:
  Windows does not have a native `sleep` command, use `time.sleep()` in
  Python instead.

max-failures.py:
  The max-failure test reused the shtest-shell test inputs instead of
  defining its own "test domain".  However, the output of this
  shtest-shell "test domain" is slightly different on Windows, which now
  bites us since we made the max-failures test stricter.  Let's define
  our own "max failures" test domain.
2020-04-10 17:33:49 -07:00
David Blaikie
f04e26215b llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries
This probably isn't ideal - the error was being printed specifically
inline with the dumping that was more legible - but then the error
wasn't reported to stderr and didn't produce a non-zero exit code.

Probably the error message could be improved by adding more context now
that it isn't printed in-situ of the DIE dumping as much.
2020-04-10 17:28:09 -07:00
Eric Christopher
b6ec05b57d Exclude bitcast and ext/trunc signbit optimization on ppc_fp128
Revision a1c05fe <https://reviews.llvm.org/rGa1c05fe20f3def1f1be9f50d2adefc6b6f1578ad>
removed bitcast from the list of problematic transformations, however:

  %97 = fptrunc ppc_fp128 %2 to double            // we need to check ppc_fp128 here to prevent the transformation
  %98 = bitcast double %97 to i64                 // a1c05fe checks ppc_fp128 at here
  %99 = icmp slt i64 %98, 0
  %100 = zext i1 %99 to i8
  store i8 %100, i8* %7, align 1

so this patch does that. I'm also disabling it in the presence of extend just in case.

I verified separately that the hash of -std::infinity and std::infinity don't match now.

Differential Revision: https://reviews.llvm.org/D77911
2020-04-10 17:07:55 -07:00