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

203817 Commits

Author SHA1 Message Date
Fangrui Song
1bd4869627 [llvm-cov gcov] Add --demangled-names (-m)
gcov 4.9 introduced the option.
2020-09-16 23:18:50 -07:00
Igor Kudrin
2fc6c9d1e9 [DebugInfo] Simplify DIEInteger::SizeOf().
An AsmPrinter should always be provided to the method because some forms
depend on its parameters. The only place in the codebase which passed
a nullptr value was found in the unit tests, so the patch updates it to
use some dummy AsmPrinter instead.

Differential Revision: https://reviews.llvm.org/D85293
2020-09-17 12:47:38 +07:00
Fangrui Song
c5286d0793 [llvm-cov gcov][test] Move tests to gcov/
And rename llvm-cov.test (misnomer) to basic.test
2020-09-16 22:42:49 -07:00
Jianzhou Zhao
58b21e82ac Fix the arguments of std::min
fixing
11201315d5
2020-09-17 04:03:31 +00:00
Jianzhou Zhao
a32b89877c Add the header of std::min
fixing
11201315d5
2020-09-17 03:48:36 +00:00
Jianzhou Zhao
76fc5249d5 Flush bitcode incrementally for LTO output
Bitcode writer does not flush buffer until the end by default. This is
fine to small bitcode files. When -flto,--plugin-opt=emit-llvm,-gmlt are
used, the final bitcode file is large, for example, >8G. Keeping all
data in memory consumes a lot of memory.

This change allows bitcode writer flush data to disk early when buffered
data size is above some threshold. This is only enabled when lld emits
LLVM bitcode.

One issue to address is backpatching bitcode: subblock length, function
body indexes, meta data indexes need to backfill. If buffer can be
flushed partially, we introduced raw_fd_stream that supports
read/seek/write, and enables backpatching bitcode flushed in disk.

Reviewed-by: tejohnson, MaskRay

Differential Revision: https://reviews.llvm.org/D86905
2020-09-17 03:32:31 +00:00
LLVM GN Syncbot
0dbccab8b5 [gn build] Port a895040eb02 2020-09-17 03:02:00 +00:00
Stella Stamenova
0778e74e6b Revert "[IRSim] Adding IR Instruction Mapper"
This reverts commit b04c1a9d3127730c05e8a22a0e931a12a39528df.
2020-09-16 20:00:43 -07:00
David Blaikie
2d08a455d6 debug_rnglists/symbolizing: reduce memory usage by not caching rnglists
This matches the debug_ranges behavior - though is currently implemented
differently. (the debug_ranges parsing was handled by creating a new
ranges parser during DIE address querying, and just destroying it after
the query - whereas the rnglists parser is a member of the DWARFUnit
currently - so the API doesn't cache anymore)

I think this could/should be improved by not parsing debug_rnglists
headers at all when dumping debug_info or symbolizing - do it the way
DWARF (roughly) intended: take the rnglists_base, add addr*index to it,
read the offset, parse the list at rnglists_base+offset. This would have
no error checking for valid index (because the number of valid indexes
is stored in the header, which has a negative offset from rnglists_base
- and is sort of only intended for use by dumpers, not by parsers going
from debug_info to a rnglist) or out of contribution bounds access
(since it wouldn't know the length of the contribution, also in the
header) - nor any error-checking that the rnglist contribution was using
the same properties as the debug_info (version, DWARF32/64, address
size, etc).
2020-09-16 19:36:07 -07:00
Qiu Chaofan
51f005dc6b [PowerPC] Fix store-fptoi combine of f128 on Power8
llc would crash for (store (fptosi-f128-i32)) when -mcpu=pwr8, we should
not generate FP_TO_(S|U)INT_IN_VSR for f128 types at this time. This
patch fixes it.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D86686
2020-09-17 10:21:35 +08:00
Chen Zheng
adc072cade [MachineSink] add one more mir case - nfc 2020-09-16 22:03:06 -04:00
LLVM GN Syncbot
94a2e109f9 [gn build] Port b04c1a9d312 2020-09-17 01:54:10 +00:00
Andrew Litteken
5831702c50 [IRSim] Adding IR Instruction Mapper
This introduces the IRInstructionMapper, and the associated wrapper for
instructions, IRInstructionData, that maps IR level Instructions to
unsigned integers.

Mapping is done mainly by using the "isSameOperationAs" comparison
between two instructions.  If they return true, the opcode, result type,
and operand types of the instruction are used to hash the instruction
with an unsigned integer.  The mapper accepts instruction ranges, and
adds each resulting integer to a list, and each wrapped instruction to
a separate list.

At present, branches, phi nodes are not mapping and exception handling
is illegal.  Debug instructions are not considered.

The different mapping schemes are tested in
unittests/Analysis/IRSimilarityIdentifierTest.cpp

Differential Revision: https://reviews.llvm.org/D86968
2020-09-16 20:49:21 -05:00
Arthur Eubanks
42f2f416c4 [NewPM] Port -print-alias-sets to NPM
Really it should be named print<alias-sets>, but for the sake of
changing fewer tests, added a TODO to rename after NPM switch and test
cleanup.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D87713
2020-09-16 18:34:56 -07:00
Alina Sbirlea
1da924dccf [MemorySSA] Rename uses in blocks with Phis.
Renaming should include blocks with existing Phis.

Resolves PR45927.

Differential Revision: https://reviews.llvm.org/D87661
2020-09-16 17:24:17 -07:00
Craig Topper
5e975a1c0f [DAGCombiner] Teach visitMSTORE to replace an all ones mask with an unmasked store.
Similar to what done in D87788 for MLOAD.

Again I've skipped indexed, truncating, and compressing stores.
2020-09-16 16:42:22 -07:00
Daniel Kiss
3aa2ecd346 [AArch64] Add -mmark-bti-property flag.
Writing the .note.gnu.property manually is error prone and hard to
maintain in the assembly files.
The -mmark-bti-property is for the assembler to emit the section with the
GNU_PROPERTY_AARCH64_FEATURE_1_BTI. To be used when C/C++ is compiled
with -mbranch-protection=bti.

This patch refactors the .note.gnu.property handling.

Reviewed By: chill, nickdesaulniers

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

Reland with test dependency on aarch64 target.
2020-09-17 01:18:36 +02:00
Daniel Kiss
2099a5d915 Revert "[AArch64] Add -mmark-bti-property flag."
This reverts commit 95e43f84b7b9c61011aece7583c0367297dd67d8.
2020-09-17 01:17:23 +02:00
Michael Liao
aa0a69fb07 [EarlyCSE] Simplify max/min pattern matching. NFC. 2020-09-16 18:34:46 -04:00
Nico Weber
54684569c2 [gn build] (manually) port 1321160a2 2020-09-16 18:29:07 -04:00
Daniel Kiss
6c5fe458bd [AArch64] Add -mmark-bti-property flag.
Writing the .note.gnu.property manually is error prone and hard to
maintain in the assembly files.
The -mmark-bti-property is for the assembler to emit the section with the
GNU_PROPERTY_AARCH64_FEATURE_1_BTI. To be used when C/C++ is compiled
with -mbranch-protection=bti.

This patch refactors the .note.gnu.property handling.

Reviewed By: chill, nickdesaulniers

Differential Revision: https://reviews.llvm.org/D81930
2020-09-17 00:24:14 +02:00
jasonliu
989dca51e1 Disable a large test for EXPENSIVE_CHECKS and debug build
Summary:
When running a large test in LLVM_ENABLE_EXPENSIVE_CHECKS=ON mode,
buildbot could hit timeout.
Disable the test when this mode is on.
Also disable it for debug so that the test won't hang for too long.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D87794
2020-09-16 21:57:34 +00:00
Rahman Lavaee
e3e9dd3c7b [obj2yaml] - Match ".stack_size" with the original section name, and not the uniquified name.
Without this patch, obj2yaml decodes the content of only one ".stack_size" section. Other sections are dumped with their full contents.

Reviewed By: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D87727
2020-09-16 14:17:29 -07:00
Mircea Trofin
e41d0852e6 [NFC][regalloc] type LiveInterval::reg() as Register
We have the Register type which precisely captures the role of this
member. Storage-wise, it's an unsigned.

This helps readability & maintainability.

Differential Revision: https://reviews.llvm.org/D87768
2020-09-16 14:11:26 -07:00
Stanislav Mekhanoshin
c2dd96e0bf [AMDGPU] gfx1030 test update. NFC. 2020-09-16 13:56:16 -07:00
Lang Hames
a2132fa761 [ORC] Add operations to create and lookup JITDylibs to OrcV2 C bindings. 2020-09-16 13:49:30 -07:00
Craig Topper
dcfdc54cf8 [DAGCombiner] Teach visitMLOAD to replace an all ones mask with an unmasked load
If we have an all ones mask, we can just a regular masked load. InstCombine already gets this in IR. But the all ones mask can appear after type legalization.

Only avx512 test cases are affected because X86 backend already looks for element 0 and the last element being 1. It replaces this with an unmasked load and blend. The all ones mask is a special case of that where the blend will be removed. That transform is only enabled on avx2 targets. I believe that's because a non-zero passthru on avx2 already requires a separate blend so its more profitable to handle mixed constant masks.

This patch adds a dedicated all ones handling to the target independent DAG combiner. I've skipped extending, expanding, and index loads for now. X86 doesn't use index so I don't know much about it. Extending made me nervous because I wasn't sure I could trust the memory VT had the right element count due to some weirdness in vector splitting. For expanding I wasn't sure if we needed different undef handling.

Differential Revision: https://reviews.llvm.org/D87788
2020-09-16 13:21:16 -07:00
Craig Topper
87cd53cd27 [X86] Add test case for a masked load mask becoming all ones after type legalization.
We should be able to turn this into a unmasked load. X86 has an
optimization to detect that the first and last element aren't masked
and then turn the whole thing into an unmasked load and a blend.
That transform is disabled on avx512 though.

But if we know the blend isn't needed, then the unmasked load by
itself should always be profitable.
2020-09-16 13:10:04 -07:00
Philip Reames
1d6082b5e3 [aarch64][tests] Add tests which show current lack of implicit null support
I will be posting a patch which adds appropriate target support shortly; landing the tests so that the diffs are clear.
2020-09-16 12:55:29 -07:00
David Greene
eb1409d08e [UpdateTestChecks] Allow $ in function names
Some compilers generation functions with '$' in their names, so recognize those
functions.

This also requires recognizing function names inside quotes in some contexts in
order to escape certain characters.

Differential Revision: https://reviews.llvm.org/D82995
2020-09-16 14:34:18 -05:00
LLVM GN Syncbot
05cd8277f1 [gn build] Port 56069b5c71c 2020-09-16 19:03:25 +00:00
Nikita Popov
4a43cab9e0 Reapply [InstCombine] Simplify select operand based on equality condition
Reapply after fixing SimplifyWithOpReplaced() to never return
the original value, which would lead to an infinite loop in this
transform.

-----

For selects of the type X == Y ? A : B, check if we can simplify A
by using the X == Y equality and replace the operand if that's
possible. We already try to do this in InstSimplify, but will only
fold if the result of the simplification is the same as B, in which
case the select can be dropped entirely. Here the select will be
retained, just one operand simplified.

As we are performing an actual replacement here, we don't have
problems with refinement / poison values.

Differential Revision: https://reviews.llvm.org/D87480
2020-09-16 20:53:58 +02:00
Nikita Popov
3a8ed708c6 [InstSimplify] Clarify SimplifyWithOpReplaced() return value
If SimplifyWithOpReplaced() cannot simplify the value, null should
be returned. Make sure this really does happen in all cases,
including those where SimplifyBinOp() returns the original value.

This does not matter for existing users, but does mattter for
D87480, which would go into an infinite loop otherwise.
2020-09-16 20:53:26 +02:00
Nikita Popov
f88393ae10 [InstCombine] Add test for infinite combine loop (NFC)
Test courtesy of bkramer for the infinite combine loop introduced
by D87480.
2020-09-16 20:53:25 +02:00
Michael Liao
18f35c5544 Fix build. 2020-09-16 14:52:00 -04:00
Nico Weber
aa432b5dba [gn build] unconfuse sync script about "sources = []" in clang/lib/Headers/BUILD.gn 2020-09-16 14:50:29 -04:00
Rahman Lavaee
c08157a6ed Revert "[obj2yaml] - Match ".stack_size" with the original section name, and not the uniquified name."
This reverts commit 14e55f82980cf1342d4d3eea4885a5375e829496.
2020-09-16 11:42:37 -07:00
Stanislav Mekhanoshin
26c2b984ef [AMDGPU] gfx1030 RT support
Differential Revision: https://reviews.llvm.org/D87782
2020-09-16 11:40:58 -07:00
Johannes Doerfert
facd70cf60 [OpenMP] Context selector extensions for template functions
With this extension the effects of `omp begin declare variant` will be
applied to template function declarations. The behavior is opt-in and
controlled by the `extension(allow_templates)` trait. While generally
useful, this will enable us to implement complex math function calls by
overloading the templates of the standard library with the ones in
libc++.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D85735
2020-09-16 13:37:10 -05:00
Johannes Doerfert
bb8acd5a57 [OpenMP] Context selector extensions for return value overloading
This extension allows to declare variants in between `omp begin/end
declare variant` that do not match the type of the existing function
with that name. Without this extension we would not find a base function
(with a compatible type), therefore create a new one, which would
cause conflicting declarations. With this extension we will not create
"missing" base functions, which basically renders these specializations
harmless. They will be generated but never called.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D85878
2020-09-16 13:37:09 -05:00
Johannes Doerfert
c187f80294 [UpdateTestChecks][NFC] Fix spelling 2020-09-16 13:37:08 -05:00
Rahman Lavaee
848731407e [obj2yaml] - Match ".stack_size" with the original section name, and not the uniquified name.
Without this patch, obj2yaml decodes the content of only one ".stack_size" section. Other sections are dumped with their full contents.

Reviewed By: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D87727
2020-09-16 11:33:20 -07:00
Matt Arsenault
07bfd23edb GlobalISel: Lift store value widening restriction
This doesn't change the memory size and doesn't need to worry about
non-power-of-2 sizes.
2020-09-16 14:25:07 -04:00
Nico Weber
1db80af6a3 [gn build] make "all" target build
If you want to build everything, building the default target
via just `ninja` is better, but `ninja all` shouldn't give you
compile errors -- this fixes that.
2020-09-16 14:21:48 -04:00
Amara Emerson
684834aea1 [AArch64][GlobalISel] Make G_BUILD_VECTOR os <16 x s8> legal. 2020-09-16 11:19:47 -07:00
Michael Kitzan
fec094fca1 [GISel] Add new combines for unary FP instrs with constant operand
https://reviews.llvm.org/D86393

Patch adds five new `GICombinerRules`, one for each of the following unary
FP instrs: `G_FNEG`, `G_FABS`, `G_FPTRUNC`, `G_FSQRT`, and `G_FLOG2`. The
combine rules perform the FP operation on the constant operand and replace
the original instr with the result. Patch additionally adds new combiner
tests for the AArch64 target to test these new combiner rules.
2020-09-16 10:34:15 -07:00
Simon Pilgrim
b6c38b504d DwarfUnit.h - remove unnecessary includes. NFCI. 2020-09-16 18:32:29 +01:00
Simon Pilgrim
c0364fac98 raw_ostream.cpp - remove duplicate includes. NFCI.
Remove headers already included in raw_ostream.h
2020-09-16 18:32:28 +01:00
Simon Pilgrim
0f41e280da InterferenceCache.cpp - remove duplicate includes. NFCI.
Remove headers already included in InterferenceCache.h
2020-09-16 18:32:28 +01:00
Simon Pilgrim
2041d8607d ValueEnumerator.cpp - remove duplicate includes. NFCI.
Remove headers already included in ValueEnumerator.h
2020-09-16 18:32:28 +01:00