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

199173 Commits

Author SHA1 Message Date
dfukalov
cfda63f7ad SpeculativeExecution: fix incorrect debug info move
Summary:
Debug info related instructions got zero cost so hoisted unconditionally

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=46267

Reviewers: arsenm, nhaehnle, chandlerc, aprantl

Reviewed By: aprantl

Subscribers: ormris, uabelho, wdng, aprantl, hiraditya, llvm-commits

Tags: #llvm, #debug-info

Differential Revision: https://reviews.llvm.org/D81730
2020-06-28 14:35:00 +03:00
Simon Pilgrim
9a2f885bc0 [X86] Rename dagcombine-cse.ll i386 test prefix X86 instead of X32. 2020-06-28 12:11:56 +01:00
Chen Zheng
47d79b5f12 [MachineLICM] testcase for hoisting rematerializable instruction, nfc 2020-06-28 03:16:57 -04:00
Brad Smith
2b7d43c46c Add OpenBSD support to be able to retrieve the thread id 2020-06-27 21:14:44 -04:00
Mike Edwards
5e9ac43a7a [LIT] Correcting max-failures option in lit documentation. 2020-06-27 14:57:04 -07:00
Benjamin Kramer
5780dfaa2c [RISCV] Silence unused variable warning in Release builds. NFC. 2020-06-27 23:24:28 +02:00
Nikita Popov
0df95ef5c0 [ValueTracking] Use a switch statement (NFC) 2020-06-27 22:42:43 +02:00
Simon Pilgrim
b174494694 [X86] SimplifyDemandedVectorEltsForTargetNode - merge shuffle/pack lower demanded elements handling.
Generalize the vector operand extraction code for shuffle/pack ops - we can assume that the vector operands are the same width as the result, and any non-vector values can be reused directly in the smaller width op.
2020-06-27 19:10:13 +01:00
Hsiangkai Wang
baee917da3 [RISCV] Assemble/Disassemble v-ext instructions.
Assemble/disassemble RISC-V V extension instructions according to
latest version spec in https://github.com/riscv/riscv-v-spec/.

I have tested this patch using GNU toolchain. The encoding is aligned
to GNU assembler output. In this patch, there is a test case for each
instruction at least.

The V register definition is just for assemble/disassemble. Its type
is not important in this stage. I think it will be reviewed and modified
as we want to do codegen for scalable vector types.

This patch does not include Zvamo, Zvlsseg, and Zvediv.

Differential revision: https://reviews.llvm.org/D69987
2020-06-28 00:54:07 +08:00
Roman Lebedev
e1cb0d103c [Analysis] isDereferenceableAndAlignedPointer(): don't crash on bitcast <1 x ???*> to ???* 2020-06-27 18:30:59 +03:00
Simon Pilgrim
f33e8eac86 [X86][AVX] SimplifyDemandedVectorEltsForTargetNode - reduce width of X86ISD::VPERMIL2
If we don't need the elements of the upper lanes, reduce the width of the X86ISD::VPERMIL2 node.
2020-06-27 15:06:49 +01:00
Simon Pilgrim
b5d324a7e9 [X86][AVX] SimplifyDemandedVectorEltsForTargetNode - reduce width of X86ISD::VPERMILPV
If we don't need the elements of the upper lanes, reduce the width of the X86ISD::VPERMILPV node.
2020-06-27 14:43:03 +01:00
Simon Pilgrim
95062c5395 ThreadPool.h - remove unused BitVector.h include. NFC. 2020-06-27 11:37:46 +01:00
Simon Pilgrim
ad5f8ef5db FileCollector.h - reduce Twine.h include to forward declaration. NFC. 2020-06-27 11:16:25 +01:00
Simon Pilgrim
652fd662fd [DAG] reduceBuildVecExtToExtBuildVec - don't combine if it would break a splat.
reduceBuildVecExtToExtBuildVec was breaking a splat(zext(x)) pattern into buildvector(x, 0, x, 0, ..) resulting in much more complex insert+shuffle codegen.

We already go to some lengths to avoid this in SimplifyDemandedVectorElts etc. when we encounter splat buildvectors.

It should be OK to fold all splat(aext(x)) patterns - we might need to tighten this if we find a case where we mustn't introduce a buildvector(x, undef, x, undef, ..) but I can't find one.

Fixes PR46461.
2020-06-27 11:03:57 +01:00
Simon Pilgrim
78d47ed6bf [X86] Add PR46461 test case 2020-06-27 10:43:11 +01:00
Simon Pilgrim
25bbd05823 [X86] Add AVX tests buildvec-insertvec.ll 2020-06-27 10:43:11 +01:00
Simon Pilgrim
236b1ecd2b Fix unused type alias warning. NFC.
The "using InsertPointTy" line is an unnecessary copy + paste from other builder tests.
2020-06-27 10:43:10 +01:00
David Zarzycki
48aa39a9ee Reland: [clang driver] Move default module cache from system temporary directory
This fixes a unit test. Otherwise here is the original commit:

1) Shared writable directories like /tmp are a security problem.
2) Systems provide dedicated cache directories these days anyway.
3) This also refines LLVM's cache_directory() on Darwin platforms to use
   the Darwin per-user cache directory.

Reviewers: compnerd, aprantl, jakehehrlich, espindola, respindola, ilya-biryukov, pcc, sammccall

Reviewed By: compnerd, sammccall

Subscribers: hiraditya, llvm-commits, cfe-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D82362
2020-06-27 05:35:15 -04:00
Simon Pilgrim
139cbe87ac Error.h - GenericBinaryError - pass Twine arg by reference not value.
This allows us to reduce the Twine.h include to a forward declaration.
2020-06-27 10:12:20 +01:00
Simon Pilgrim
25f590cc77 CompileOnDemandLayer.h - remove unused Twine.h include. NFC. 2020-06-27 10:03:34 +01:00
Simon Pilgrim
dab79782ef IndirectionUtils.h - reduce Twine.h include to forward declaration. NFC. 2020-06-27 10:03:34 +01:00
Simon Pilgrim
74afdd5cc2 MCSectionWasm.h - reduce includes to forward declarations. NFC. 2020-06-27 10:03:34 +01:00
Simon Pilgrim
c9efaa6f02 AsmPrinter.h - reduce includes to forward declarations. NFC. 2020-06-27 10:03:33 +01:00
Nikita Popov
59d7b160ef [IR] Store attributes that are available "somewhere" (NFC)
I noticed that for some benchmarks we spend quite a bit of time
inside AttributeList::hasAttrSomewhere(), mainly when checking
for the "returned" attribute. Most of the time the attribute will
not be present, in which case this function has to walk through
the whole attribute list and check for the attribute at each index.

This patch adds a cache of all "available somewhere" attributes
inside AttributeListImpl. This makes the structure 12 bytes larger,
but I don't think that's problematic, as attribute lists are uniqued.
Compile-time in terms of instructions retired improves by 0.4% on
average, but >1% for sqlite.

Differential Revision: https://reviews.llvm.org/D81867
2020-06-27 10:44:59 +02:00
Simon Pilgrim
aa0c6eadb5 AsmWriter - printConstVCalls/printNonConstVCalls - avoid std::vector pass by value. NFCI. 2020-06-27 09:38:37 +01:00
Roman Lebedev
11158670ff [SCEV] Make SCEVAddExpr actually always return pointer type if there is pointer operand (PR46457)
Summary:
The added assertion fails on the added test without the fix.

Reduced from test-suite/MultiSource/Benchmarks/MiBench/office-ispell/correct.c
In IR, getelementptr, obviously, takes pointer as it's base,
and returns a pointer.

When creating an SCEV expression, SCEV operands are sorted in hope
that it increases folding potential, and at the same time SCEVAddExpr's
type is the type of the last(!) operand.

Which means, in some exceedingly rare cases, pointer operand may happen to
end up not being the last operand, and as a result SCEV for GEP
will suddenly have a non-pointer return type.
We should ensure that does not happen.

In the end, actually storing the `Type *`, at the cost of increasing
memory footprint of `SCEVAddExpr`, appears to be the solution.
We can't just store a 'is a pointer' bit and create pointer type
on the fly since we don't have data layout in getType().

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=46457 | PR46457 ]]

Reviewers: efriedma, mkazantsev, reames, nikic

Reviewed By: efriedma

Subscribers: hiraditya, javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82633
2020-06-27 11:37:17 +03:00
Roman Lebedev
279b9dd84b [NFCI][SCEV] getPointerBase(): de-recursify
Summary:
This is boringly straight-forward, each iteration we see if
V is some expression that we can look into, and if it has
a single pointer operand, then set V to that operand
and repeat.

Reviewers: efriedma, mkazantsev, reames, nikic

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82632
2020-06-27 11:37:17 +03:00
Fady Ghanim
3b19cc4c92 [OpenMP][OMPBuilder] Remove unused variable in Unittest
Relating to buildbot errors to commit 82b8236cf248ef91968b67d18af23890322cde43
2020-06-27 02:49:43 -04:00
Gui Andrade
7e14b9cae5 [MSAN] Handle x86 {round,min,max}sd intrinsics
These need special handling over the simple vector intrinsics as they
behave more like a shuffle operation: taking the top half of the vector
from one input, and the bottom half separately. Previously, these were
being handled as though all bits of all operands were combined.

Differential Revision: https://reviews.llvm.org/D82398
2020-06-27 06:46:04 +00:00
Gui Andrade
98ed949306 [Docs] BitCodeFormat.rst: List missing attribute codes 2020-06-27 06:34:36 +00:00
Craig Topper
bc6a0246d4 [X86] Add MOVBE and RDRND features to BDVER4.
Only 6 years behind gcc. https://gcc.gnu.org/legacy-ml/gcc-patches/2014-08/msg00231.html

Found while working on improving how we define CPU features for
clang and auditing for correctness.
2020-06-26 23:32:17 -07:00
Fady Ghanim
14e4558751 [OpenMP][OMPBuilder] Adding privatization related createXXXX to OMPBuilder 2020-06-27 01:54:41 -04:00
Fangrui Song
db9e62be62 [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
Fangrui Song
ae62035cf0 [BasicAA] Rename deprecated -basicaa to -basic-aa
Follow-up to D82607
Revert an accidental change (empty.ll) of D82683
2020-06-26 20:41:37 -07:00
Arthur Eubanks
fc1584be52 [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN
Summary: Following https://reviews.llvm.org/D82607.

Reviewers: ychen

Subscribers: asbirlea, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82688
2020-06-26 20:28:18 -07:00
Arthur Eubanks
0e1409e029 [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination
Summary: Following https://reviews.llvm.org/D82607.

Reviewers: ychen

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82689
2020-06-26 20:13:37 -07:00
Nico Weber
2d39538671 Revert "Disable a JSONTest.Integers test with all MSVCs, PR46470"
This reverts commit 63bcf89125fdfe8a41b0125454b006b49abb0184.
Turns out the more targeted disablement in the previous change
was good enough.
2020-06-26 22:30:24 -04:00
Alexander Shaposhnikov
1b6db69257 [llvm-install-name-tool] Add support for -rpath option
This diff implements -rpath option for llvm-install-name-tool
which replaces the rpath value in the specified Mach-O binary.

Patch by Sameer Arora!

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D82051
2020-06-26 17:23:03 -07:00
Vedant Kumar
a8ceafb85b [InstCombine] Drop debug loc in TryToSinkInstruction (reland)
Summary:
The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug
location of an instruction if the instruction either remains in its
basic block, or if its basic block is folded into a predecessor that
branches unconditionally".

TryToSinkInstruction doesn't seem to satisfy the criteria as it's
sinking an instruction to some successor block. Preserving the debug loc
can make single-stepping appear to go backwards, or make a breakpoint
hit on that location happen "too late" (since single-stepping from that
breakpoint can cause the function to return unexpectedly).

So, drop the debug location.

This was reverted in ee3620643dfc because it removed source locations
from inlinable calls, breaking a verifier rule. I've added an exception
for calls because the alternative (setting a line 0 location) is not
better. I tested the updated patch by completing a stage2 RelWithDebInfo
build.

Reviewers: aprantl, davide

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82487
2020-06-26 17:18:15 -07:00
Nico Weber
74b82e9a7e Disable a JSONTest.Integers test with all MSVCs, PR46470 2020-06-26 20:02:04 -04:00
Nico Weber
79ca9c7eae Disable a JSONTest.Integers test with newer MSVCs, PR46470 2020-06-26 19:57:52 -04:00
Puyan Lotfi
af1edd8d68 [NFCi] Fixing build failures on Windows due to std::tie used w/o proper include.
From https://reviews.llvm.org/D81236 /
55fe7b79bb

std::tie is used without including <tuple>. This patch includes <tuple>
so that some downstream Windows bots succesfully build.
2020-06-26 16:30:25 -07:00
Arthur Eubanks
619da1955e Fix full-store-partial-alias.ll
Accidentally renamed -disable-basicaa -> -disable-basic-aa
2020-06-26 15:46:47 -07:00
Matt Arsenault
e686e7788e LLParser: Accept align(N) as new syntax for parameter attribute
Every other value parameter attribute uses parentheses, so accept this
as the preferred modern syntax. Updating everything to use the new
syntax is left for a future change.
2020-06-26 18:10:21 -04:00
Matt Arsenault
24fd7356d5 AMDGPU/GlobalISel: Fix some legalization of < dword vector stores
This avoids many instances of failing to legalize a vector truncstore
of <4 x s8> to 2 bytes. We don't perfectly handle every truncstore
yet, largely because the given set of legalization actions can't
actually differentiate between changing the result type and changing
the memory type.
2020-06-26 18:07:39 -04:00
Vedant Kumar
478502f993 Revert "[InstCombine] Drop debug loc in TryToSinkInstruction"
This reverts commit 903cf140d0118cf0d3f0f6f8967c6a20d9c5be6b.

This might be causing verifier failures on the bots, such as: "inlinable
function call in a function with debug info must have a !dbg location"
--

http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/16976/steps/bootstrap%20clang/logs/stdio
2020-06-26 14:59:40 -07:00
Arthur Eubanks
892e0e61d0 [NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer
Following https://reviews.llvm.org/D82607.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D82681
2020-06-26 14:58:41 -07:00
Arthur Eubanks
7a90a95ac2 [NewPM][BasicAA] basicaa -> basic-aa in Analysis/BasicAA
Following https://reviews.llvm.org/D82607.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D82683
2020-06-26 14:58:01 -07:00
Yuanfang Chen
fe432a7db2 [MemorySSA] Update comment in PassBuilder
Is teaching the LoopFullUnrollPass to preserve MemorySSA very hard or
just impossible?

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D82618
2020-06-26 14:55:31 -07:00