Commit Graph

352571 Commits

Author SHA1 Message Date
Sanjay Patel b53fd70b9e [x86] add tests for FP->int->FP with different FP types; NFC 2020-04-23 17:07:16 -04:00
Christopher Tetreault 18c611ed92 [SVE] Remove calls to isScalable from Hexagon
Reviewers: efriedma, sdesmalen, kparzysz, colinl

Reviewed By: kparzysz

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77757
2020-04-23 14:02:14 -07:00
Roman Lebedev 5a159ed2a8
[InstCombine] Negator: don't negate multi-use `sub`
While we can do that, it doesn't increase instruction count,
if the old `sub` sticks around then the transform is not only
not a unlikely win, but a likely regression, since we likely
now extended live range and use count of both of the `sub` operands,
as opposed to just the result of `sub`.

As Kostya Serebryany notes in post-commit review in
https://reviews.llvm.org/D68408#1998112
this indeed can degrade final assembly,
increase register pressure, and spilling.

This isn't what we want here,
so at least for now let's guard it with an use check.
2020-04-23 23:59:15 +03:00
Christopher Tetreault 7ca56c90bd [SVE] Remove calls to isScalable from Transforms
Reviewers: efriedma, chandlerc, reames, aprantl, sdesmalen

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77756
2020-04-23 13:50:07 -07:00
MaheshRavishankar 542668d1e2 [mlir][Linalg] Add support for fusing linalg.tensor_reshape with
linalg.generic operations.

Differential Revision: https://reviews.llvm.org/D78464
2020-04-23 13:41:47 -07:00
MaheshRavishankar d27ab5c240 [mlir][Linalg] NFC: Refactor fusion on tensors to enable extending
it to fusing different kinds of linalg operations on tensors.

The implementation of fusion on tensor was initially planned for just
GenericOps (and maybe IndexedGenericOps). With addition of
linalg.tensor_reshape, and potentially other such non-structured ops,
refactor the existing implementation to allow easier specification of
fusion between different linalg operations on tensors.

Differential Revision: https://reviews.llvm.org/D78463
2020-04-23 13:41:47 -07:00
Christopher Tetreault 0d9144a21e [SVE] Remove isScalable from Bitcode
Reviewers: efriedma, dexonsmith, tejohnson, sdesmalen

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77695
2020-04-23 13:28:15 -07:00
Sergej Jaskiewicz abe827be9e [libcxx] Add FILE_DEPENDENCIES line to the func.blocks.sh.cpp test
This should fix the bots that use ssh.py to execute tests
2020-04-23 23:17:57 +03:00
Christopher Tetreault 84584b0d29 [SVE] Remove calls to isScalable from AARCH64
Reviewers: efriedma, sdesmalen, t.p.northover, mcrosier

Reviewed By: efriedma

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77758
2020-04-23 13:09:17 -07:00
Jay Foad 479145a5c2 [AMDGPU] Avoid hard-coded line numbers in error message checks
This makes it easier for us to maintain downstream changes to some of
these tests. NFC.

Differential Revision: https://reviews.llvm.org/D78716
2020-04-23 21:06:09 +01:00
Christopher Tetreault ccd623eae3 [SVE] Remove calls to isScalable from CodeGen
Reviewers: efriedma, sdesmalen, stoklund, sunfish

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77755
2020-04-23 12:58:52 -07:00
Christopher Tetreault 9174e0229f [SVE] Remove calls to VectorType::isScalable from analysis
Reviewers: efriedma, sdesmalen, chandlerc, sunfish

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77692
2020-04-23 12:44:22 -07:00
Matt Arsenault 156afb2253 AMDGPU: Fix inlining logic for denormals
This was backwards from intended and missing a test. We perhaps should
just ignored the FP mode here, since it shouldn't be legal to mix code
with different default modes in the absence of strictfp.
2020-04-23 15:30:48 -04:00
Matt Arsenault 89c8c80bd5 AMDGPU: Change pre-gfx9 implementation of fcanonicalize to mul
If f32 denormals were enabled pre-gfx9, we would still try to
implement this with v_max_f32. Pre-gfx9, these instructions ignored
the denormal mode and did not flush. Switch to the multiply form for
f32 as a workaround which should always work in any case.

This fixes conformance failures when the library implementation of
fmin/fmax were accidentally not inlined, forcing the assumption of no
flushing on targets where denormals are not enabled by default. This
is a workaround, since really we should not be mixing code with
different FP mode expectations, but prefer the lowering that will work
in any mode.

Now this will always use max to implement canonicalize on gfx9+. This
is only really beneficial for f64. For f32/f16 it's a neutral choice
(and worse in terms of code size in 1 case), but possibly worse for
the compiler since it does add an extra register use operand. Leave
this change for later.
2020-04-23 15:24:13 -04:00
Alexander Shaposhnikov d987eed91d [llvm-objcopy][MachO] Copy LC_LOAD_WEAK_DYLIB load commands
LC_LOAD_WEAK_DYLIB is analogous to LC_LOAD_DYLIB and doesn't require any special handling.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D78602
2020-04-23 12:21:44 -07:00
Matt Arsenault 5fe3f06596 AMDGPU/GlobalISel: Add new baseline checks for canonicalize 2020-04-23 15:04:32 -04:00
Christopher Tetreault 3ecced163f [SVE] Remove calls to isScalable from IR
Reviewers: efriedma, sdesmalen, dexonsmith, dblaikie

Reviewed By: sdesmalen

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77691
2020-04-23 11:51:22 -07:00
Simon Pilgrim 757c7c244b [X86][SSE] Add SSE2 extract-concat tests
Check pre-SSE41 codegen where we have less PEXTR*/PINSR* instructions
2020-04-23 19:40:34 +01:00
Siva Chandra Reddy 1e2772c0a3 [libc] Link mpfr and gmp wrapper to the libcMPFRWrapper.
This will fix building the wrapper shared library when
BUILD_SHARED_LIBS is ON.

Reviewers: PaulkaToast

Differential Revision: https://reviews.llvm.org/D78737
2020-04-23 11:37:13 -07:00
Louis Dionne d6c95ae6ff [libc++] Update scripts to build libc++/libc++abi for Apple
Also, make sure we test them.
2020-04-23 14:31:04 -04:00
Nicolas Vasilache 37d417bb0a [mlir][EDSC] Hotfix - Provide impl for `negate`
367229e100 retired ValueHandle but
mistakenly removed the implementation for `negate` which was not
tested and would result in linking errors.

This revision adds the implementation back and provides a test.
2020-04-23 14:18:47 -04:00
Feng Liu b578c92a98 [mlir/Quant] Allows to use 32 bits storage type
Differential Revision: https://reviews.llvm.org/D78671
2020-04-23 11:18:05 -07:00
Mircea Trofin 201498c6f3 [llvm][NFC] Factor out cost-model independent inling decision
Summary:
llvm::getInlineCost starts off by determining whether inlining should
happen or not because of user directives or easily determinable
unviability. This CL refactors this functionality as a reusable API.

Reviewers: davidxl, eraman

Reviewed By: davidxl, eraman

Subscribers: hiraditya, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73825
2020-04-23 10:58:43 -07:00
Christopher Tetreault 3d178581ac [SVE] Make VectorType::getNumElements() complain for scalable vectors
Summary:
Piggy-back off of TypeSize's STRICT_FIXED_SIZE_VECTORS flag and:
- if it is defined, assert that the vector is not scalable
- if it is not defined, complain if the vector is scalable

Reviewers: efriedma, sdesmalen, c-rhodes

Reviewed By: sdesmalen

Subscribers: hiraditya, mgorny, tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78576
2020-04-23 10:47:38 -07:00
Mircea Trofin ceb7f308b8 [llvm][NFC][CallSite] Removed CallSite from few implementation details
Reviewers: dblaikie, craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78724
2020-04-23 10:36:36 -07:00
Vedant Kumar cfb4f8c5fb [DirectoryWatcher] Do not use FSEvents on non-macOS platforms
The FSEvents APIs are available on iOS6+: however, the DirectoryWatcher
code isn't wired up to really use FSEvents on embedded platforms.

I've duplicated code from DirectoryWatcher-not-implemented.cpp here and
used TargetConditionals instead of adding cmakery to check try_compile;
I couldn't get that to work properly.
2020-04-23 10:22:28 -07:00
Vedant Kumar 517f0f14bf MachineBasicBlock: Avoid copy in skipDebugInstructions{Forward,Backward}, NFC 2020-04-23 10:22:28 -07:00
Valeriy Savchenko a88025672f [analyzer] Consider array subscripts to be interesting lvalues.
Static analyzer has a mechanism of clearing redundant nodes when
analysis hits a certain threshold with a number of nodes in exploded
graph (default is 1000). It is similar to GC and aims removing nodes
not useful for analysis. Unfortunately nodes corresponding to array
subscript expressions (that actively participate in data propagation)
get removed during the cleanup. This might prevent the analyzer from
generating useful notes about where it thinks the data came from.

This fix is pretty much consistent with the way analysis works
already. Lvalue "interestingness" stands for the analyzer's
possibility of tracking values through them.

Differential Revision: https://reviews.llvm.org/D78638
2020-04-23 19:52:45 +03:00
MaheshRavishankar 9391941bd3 [mlir][StandardToSPIRV] Fix test cases where DCE removes all the code.
Differential Revision: https://reviews.llvm.org/D78727
2020-04-23 09:48:37 -07:00
Simon Pilgrim c741dfe325 X86MCTargetDesc.h - replace FormattedStream.h include with forward declaration. NFC. 2020-04-23 17:42:51 +01:00
Simon Pilgrim 90c956318b X86TargetObjectFile.h - remove unnecessary TargetLoweringObjectFile.h include. NFC.
We already include TargetLoweringObjectFileImpl.h which includes it and we only use its types as part of TargetLoweringObjectFile* overridden methods.
2020-04-23 17:42:50 +01:00
Vedant Kumar 210616bd38 Rename a shadowed variable causing build failure on gcc<5.5
See discussion here: https://reviews.llvm.org/D78265
2020-04-23 09:23:44 -07:00
Tim Keith 4ced7a48e6 [flang] Remove unused variable
Reviewers: sscalpone, jdoerfert, DavidTruby

Reviewed By: sscalpone

Subscribers: llvm-commits

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D78725
2020-04-23 09:22:14 -07:00
Peter Smith 1ca16fc4f5 Revert "[LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order"
This reverts commit f969c2aa65.

There are some msan buildbot failures sanitzer-x86_64-linux-fast that
I need to investigate.

Differential Revision: https://reviews.llvm.org/D78422
2020-04-23 16:58:50 +01:00
Simon Pilgrim 022ba502c1 [RISCV] Remove unused forward declarations. NFC. 2020-04-23 16:30:45 +01:00
Simon Pilgrim 5387899bb4 [WebAssembly] Remove unused forward declarations. NFC. 2020-04-23 16:30:45 +01:00
Simon Pilgrim 770931b242 [XCore] Remove unused forward declarations. NFC. 2020-04-23 16:30:45 +01:00
Simon Pilgrim 155190567c [NVPTX] Remove unused forward declarations. NFC. 2020-04-23 16:30:44 +01:00
Simon Pilgrim 33f52ee1d7 [Sparc] Remove unused forward declarations. NFC. 2020-04-23 16:30:44 +01:00
Tim Keith 9623003e93 [flang][NFC] Refactor derived type instantiation
Summary:
Move InstantiateComponent and InstantiateIntrinsicType from symbol.cpp
to type.cpp as that is where they are called.

Put both in InstantiateHelper class to better isolate them.
Add CreateDerivedTypeSpec in InstantiateHelper.

Add non-const forms for AsIntrinsic and AsDerived to avoid const_cast.

No functional changes.

Reviewers: DavidTruby, klausler, PeteSteinfeld, jdoerfert

Reviewed By: klausler

Subscribers: llvm-commits

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D78678
2020-04-23 08:29:47 -07:00
Krzysztof Parzyszek d8e1dd8b9b [Hexagon] Add missing live-in registers in some codegen tests 2020-04-23 10:28:04 -05:00
Victor Huang e20b07b021 [PowerPC][Future] Add missing changes for PC Realtive addressing
1. Use Subtarget.isUsingPCRelativeCalls() in LowerConstantPool to
check if using PCRelative addressing.

2. Change MO_GOT_FLAG = 32 to MO_GOT_FLAG = 8 in PPC.h to use
consecutive bits.

Differential Revision: https://reviews.llvm.org/D78406
2020-04-23 10:26:43 -05:00
Mircea Trofin cea6f4d5f8 [llvm][NFC][CallSite] Remove CallSite from TypeMetadataUtils & related
Reviewers: craig.topper, dblaikie

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78666
2020-04-23 08:23:16 -07:00
Nicolas Vasilache 367229e100 [mlir][EDSC] Retire ValueHandle
The EDSC discussion [thread](https://llvm.discourse.group/t/evolving-builder-apis-based-on-lessons-learned-from-edsc/879) points out that ValueHandle has become an unnecessary level of abstraction since MLIR switch from `Value *` to `Value` everywhere.

This revision removes this level of indirection.
2020-04-23 11:01:16 -04:00
Raphael Isemann c2fec2fb17 [lldb] Make RNBSocketTest compile again after socket modernization
Commit c9e6b7010c changed the API but didn't update this
macOS-specific test.
2020-04-23 17:00:02 +02:00
Peter Smith f969c2aa65 [LLD][ELF][ARM] Fix ARM Exidx order for non monotonic section order
The contents of the .ARM.exidx section must be ordered by SHF_LINK_ORDER
rules. We don't need to know the precise address for this order, but we
do need to know the relative order of sections. We have been using the
sectionIndex for this purpose, this works when the OutputSection order
has a monotonically increasing virtual address, but it is possible to
write a linker script with non-monotonically increasing virtual address.
For these cases we need to evaluate the base address of the OutputSection
so that we can order the .ARM.exidx sections properly.

This change moves the finalisation of .ARM.exidx till after the first
call to AssignAddresses. This permits us to sort on virtual address which
is linker script safe. It also permits a fix for part of pr44824 where
we generate .ARM.exidx section for the vector table when that table is so
far away it is out of range of the .ARM.exidx section. This fix will come
in a follow up patch.

Differential Revision: https://reviews.llvm.org/D78422
2020-04-23 15:46:44 +01:00
Xing GUO b0a1c0b72c [doc] Fix broken link. NFC. 2020-04-23 22:47:39 +08:00
Pavel Labath 9321255b88 [lldb/Core] Avoid more Communication::Disconnect races
Calling Disconnect while the read thread is running is racy because the
thread can also call Disconnect.  This is a follow-up to b424b0bf, which
reorders other occurences of Disconnect/StopReadThread I can find, and also
adds an assertion to guard against new occurences being introduced.
2020-04-23 16:36:21 +02:00
Kadir Cetinkaya 89cb5d5588
[clangd] Delete remapped buffers in tests
These buffers normally get freed after being used in a CompilerInstance.
but tests don't make use of those, so we need to free them explicitly.
2020-04-23 16:31:35 +02:00
Marcel Koester c79227cabb [mlir] Extended Liveness analysis to support nested regions.
The current Liveness analysis does not support operations with nested regions.
This causes issues when querying liveness information about blocks nested within
operations. Furthermore, the live-in and live-out sets are not computed properly
in these cases.

Differential Revision: https://reviews.llvm.org/D77714
2020-04-23 16:19:54 +02:00