Eric Astor [Tue, 29 Sep 2020 20:57:25 +0000 (16:57 -0400)]
[ms] [llvm-ml] Add MASM hex float support
Implement MASM's syntax for specifying floats in raw hexadecimal bytes.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D87401
Eric Astor [Tue, 29 Sep 2020 20:17:47 +0000 (16:17 -0400)]
[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers
Add support for .radix directive, and radix specifiers [yY] (binary), [oOqQ] (octal), and [tT] (decimal).
Also, when lexing MASM integers, require radix specifier; MASM requires that all literals without a radix specifier be treated as in the default radix. (e.g., 0100 = 100)
Relanding D87400, now with fewer ms-inline-asm tests broken!
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D88337
Tim Shen [Wed, 23 Sep 2020 06:36:08 +0000 (23:36 -0700)]
[MLIR] Avoid adding debuginfo for a function if it contains calls that has no debug info.
Also add a verifier pass to ExecutionEngine.
It's hard to come up with a test case, since mlir-opt always add location info after parsing it (?)
Differential Revision: https://reviews.llvm.org/D88135
Nathan James [Tue, 29 Sep 2020 20:51:14 +0000 (21:51 +0100)]
[clangd] Trivial setter support when moving items to fields
Extend the Trivial setter documentation to support cases where the value is moved into a field using `std::move`.
Reviewed By: sammccall, kadircet
Differential Revision: https://reviews.llvm.org/D88297
Chris Hamilton [Tue, 29 Sep 2020 20:34:46 +0000 (22:34 +0200)]
Revert "[Sema] Address-space sensitive check for unbounded arrays (v2)"
This reverts commit
d9ee935679e7164d1c47e351bbbcf5c25742b59c.
Aaron Ballman [Tue, 29 Sep 2020 20:27:51 +0000 (16:27 -0400)]
Better diagnostics for anonymous bit-fields with attributes or an initializer.
The current C++ grammar allows an anonymous bit-field with an attribute,
but this is ambiguous (the attribute in that case could appertain to the
type instead of the bit-field). The current thinking in the Core Working
Group is that it's better to disallow attributes in that position at the
grammar level so that the ambiguity resolves in favor of applying to the
type.
During discussions about the behavior of the attribute, the Core Working
Group also felt it was better to disallow anonymous bit-fields from
specifying a default member initializer.
This implements both sets of related grammar changes.
Louis Dionne [Tue, 29 Sep 2020 20:28:41 +0000 (16:28 -0400)]
[libc++] Rename the -fno-rtti Lit feature to just no-rtti
This is consistent to the way we name other Lit features, and it removes
the possibility for confusing the Lit feature with the actual compiler
flag.
Jonas Devlieghere [Tue, 29 Sep 2020 20:26:09 +0000 (13:26 -0700)]
[lldb] Hoist --server argument out of LLDB_TEST_COMMON_ARGS (NFC)
Give the server argument its own variable (LLDB_TEST_SERVER) so that we
can configure it in lit.site.cfg.py if we so desire.
Louis Dionne [Tue, 29 Sep 2020 20:21:20 +0000 (16:21 -0400)]
[libc++] Fix some test failures in unusual configurations
Mehdi Amini [Tue, 29 Sep 2020 20:19:23 +0000 (20:19 +0000)]
Fix TODO in the mlir-cpu-runner/bare_ptr_call_conv.mlir test: call ops in bare-ptr calling convention is supported now (NFC)
This was fixed in
a89fc12653c.
Walter Erquinigo [Tue, 29 Sep 2020 20:08:22 +0000 (13:08 -0700)]
[trace] Fix destructor declaration
The destructor must be defined in the implementation class so that it
can be called, as Vedant Kumar pointed out in:
'''
What were your thoughts, re:
+class Trace : public PluginInterface {
+public:
+ ~Trace() override = default;
Does this need to be `virtual ~Trace() = ...`?
Otherwise, when a std::shared_ptr<Trace> is destroyed, the
destructor for the derived TraceIntelPT instance won't run.
'''
Louis Dionne [Thu, 24 Sep 2020 15:45:55 +0000 (11:45 -0400)]
[libc++][ci] Turn on Phabricator reporting by default
Dave Lee [Tue, 29 Sep 2020 19:50:38 +0000 (12:50 -0700)]
[lldb/docs] Remove manual codesigning documentation
The `macos-setup-codesign.sh` script has been in place for over two years. If there are no known issues, it's a good time to drop the manual steps from the docs.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D88257
Louis Dionne [Tue, 29 Sep 2020 19:29:11 +0000 (15:29 -0400)]
[libc++][ci] Improve the phabricator-report script
- Detect whether a build has passed more accurately
- Retry pushing the status to Phabricator
- Allow running on a non-review branch
Louis Dionne [Tue, 29 Sep 2020 19:30:42 +0000 (15:30 -0400)]
[libc++][ci] Add a script to describe when to trigger libc++ CI builds
Sanjay Patel [Tue, 29 Sep 2020 19:25:04 +0000 (15:25 -0400)]
[InstCombine] ease alignment restriction for converting masked load to normal load
I think we initially made this fold conservative to be safer, but we do not
need the alignment attribute/metadata limitation because the masked load
intrinsic itself specifies the alignment. A normal vector load is better for
IR transforms and should be no worse in codegen than the masked alternative.
If it is worse for some target, the backend can reverse this transform.
Differential Revision: https://reviews.llvm.org/D88505
Diego Caballero [Tue, 29 Sep 2020 18:11:27 +0000 (11:11 -0700)]
[mlir] Support return and call ops in bare-ptr calling convention
This patch adds support for the 'return' and 'call' ops to the bare-ptr
calling convention. These changes also align the bare-ptr calling
convention code with the latest changes in the default calling convention
and reduce the amount of customization code needed.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D87724
Nikita Popov [Tue, 29 Sep 2020 18:48:32 +0000 (20:48 +0200)]
[ValueTracking] Early exit known non zero for phis
After D88276 we no longer expect computeKnownBits() to prove
non-zeroness for cases where isKnownNonZero() can't, so don't
fall through to it.
Aaron Ballman [Tue, 29 Sep 2020 19:03:29 +0000 (15:03 -0400)]
Use "default member initializer" instead of "in-class initializer" for diagnostics.
This changes some diagnostics to use terminology from the standard
rather than invented terminology, which improves consistency with other
diagnostics as well. There are no functional changes intended other
than wording and naming.
Zequan Wu [Tue, 29 Sep 2020 18:58:37 +0000 (11:58 -0700)]
[CodeGen] emit CG profile for COFF object file
Differential Revision: https://reviews.llvm.org/D87811
Jim Ingham [Mon, 28 Sep 2020 17:28:29 +0000 (10:28 -0700)]
Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""
This reverts commit
f775fe59640a2e837ad059a8f40e26989d4f9831.
I fixed a return type error in the original patch that was causing a test failure.
Also added a REQUIRES: python to the shell test so we'll skip this for
people who build lldb w/o Python.
Also added another test for the error printing.
Kadir Cetinkaya [Tue, 29 Sep 2020 18:06:47 +0000 (20:06 +0200)]
[clangd] Fix assertion in remote-index marshalling
convert_to_slash is a no-op on posix style.
Eugene Zhulenev [Tue, 29 Sep 2020 05:47:00 +0000 (22:47 -0700)]
[MLIR] Add Async dialect with trivial async.region operation
Start Async dialect for modeling asynchronous execution.
Reviewed By: mehdi_amini, herhut
Differential Revision: https://reviews.llvm.org/D88459
LLVM GN Syncbot [Tue, 29 Sep 2020 17:50:16 +0000 (17:50 +0000)]
[gn build] Port
6d193ba3337
Stella Laurenzo [Mon, 28 Sep 2020 16:08:09 +0000 (09:08 -0700)]
Adds MLIR C-API for marshaling Python capsules.
* Providing stable, C-accessible definitions for bridging MLIR Python<->C APIs, we eliminate inter-extension dependencies (i.e. they can all share a diamond dependency on the MLIR C-API).
* Just provides accessors for context and module right now.
* Needed in NPComp in ~a week or so for high level Torch APIs.
Differential Revision: https://reviews.llvm.org/D88426
Mircea Trofin [Mon, 28 Sep 2020 23:41:28 +0000 (16:41 -0700)]
[NFC][regalloc] Unit test for AllocationOrder iteration.
Added unittests. In the process, separated core construction - which just
needs the hits, order, and 'HardHints' values - from construction from
current register allocation state, to simplify testing.
Differential Revision: https://reviews.llvm.org/D88455
Fangrui Song [Tue, 29 Sep 2020 17:38:51 +0000 (10:38 -0700)]
Add -fprofile-update={atomic,prefer-atomic,single}
GCC 7 introduced -fprofile-update={atomic,prefer-atomic} (prefer-atomic is for
best efforts (some targets do not support atomics)) to increment counters
atomically, which is exactly what we have done with -fprofile-instr-generate
(D50867) and -fprofile-arcs (
b5ef137c11b1cc6ae839ee75b49233825772bdd0).
This patch adds the option to clang to surface the internal options at driver level.
GCC 7 also turned on -fprofile-update=prefer-atomic when -pthread is specified,
but it has performance regression
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89307). So we don't follow suit.
Differential Revision: https://reviews.llvm.org/D87737
Sanjay Patel [Tue, 29 Sep 2020 17:29:34 +0000 (13:29 -0400)]
[InstCombine] adjust duplicate test for masked load; NFC
The test after the changed test was checking exactly the same dereferenceable bytes.
Simon Pilgrim [Tue, 29 Sep 2020 17:27:28 +0000 (18:27 +0100)]
[InstCombine] visitTrunc - trunc (*shr (trunc A), C) --> trunc(*shr A, C)
Attempt to fold trunc (*shr (trunc A), C) --> trunc(*shr A, C) iff the shift amount if small enough that all zero/sign bits created by the shift are removed by the last trunc.
Helps fix the regressions encountered in D88316.
I've tweaked a couple of shift values as suggested by @lebedev.ri to ensure we have coverage of shift values close (above/below) to the max limit.
Differential Revision: https://reviews.llvm.org/D88429
Fangrui Song [Tue, 29 Sep 2020 17:25:16 +0000 (10:25 -0700)]
[ELF] Fix multiple -mllvm after D70378
Fixes https://reviews.llvm.org/D70378#2299569 Multiple -mllvm is intended to be supported.
We don't have a proper test for `-plugin-opt=-`. This patch adds the test as well.
Differential Revision: https://reviews.llvm.org/D88461
Sanjay Patel [Tue, 29 Sep 2020 17:20:28 +0000 (13:20 -0400)]
[InstCombine] fix weird formatting in test file; NFC
It apparently didn't cause trouble for the parser or FileCheck,
but it was confusing to see a function def split by asserts.
Simon Pilgrim [Tue, 29 Sep 2020 17:14:43 +0000 (18:14 +0100)]
LanaiTargetMachine.h - remove unnecessary includes. NFCI.
Simon Pilgrim [Tue, 29 Sep 2020 17:14:18 +0000 (18:14 +0100)]
LanaiSubtarget.h - remove unnecessary includes. NFCI.
TargetFrameLowering.h is guaranteed to be covered by LanaiFrameLowering.h
Juneyoung Lee [Sun, 20 Sep 2020 09:08:27 +0000 (18:08 +0900)]
[BuildLibCalls] Add noundef to the returned pointers of allocators and argument of free
This patch adds noundef to the returned pointers of allocators (malloc, calloc, ...)
and the pointer argument of free.
The returned pointer of allocators cannot be poison or (partially) undef.
Since the pointer that is given to free should precisely have zero offset,
it cannot be poison or (partially) undef too.
For the size arguments of allocators, noundef wasn't attached simply because
I wasn't sure whether attaching it is okay or not.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D87984
Valentin Clement [Tue, 29 Sep 2020 17:12:54 +0000 (13:12 -0400)]
[mlir][openacc] Add shutdown operation
This patch introduces the acc.shutdown operation that represents an OpenACC shutdown directive.
Clauses are derived from the spec 2.14.2
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D88272
Jonas Devlieghere [Tue, 29 Sep 2020 17:04:15 +0000 (10:04 -0700)]
[lldb] Remove redundant ctor call (NFC)
As pointed out by Pavel in D88249.
Aleksandr Platonov [Tue, 29 Sep 2020 16:54:33 +0000 (19:54 +0300)]
[clangd] findNearbyIdentifier(): guaranteed to give up after 2^N lines
As @kadircet mentions in D84912#2184144, `findNearbyIdentifier()` traverses the whole file if there is no identifier for the word.
This patch ensures give up after 2^N lines in any case.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D87891
Louis Dionne [Tue, 29 Sep 2020 16:48:44 +0000 (12:48 -0400)]
[libc++][ci] Update how we build the Docker image
This fixes a couple of issues, such as failing filesystem tests (due to
running the tests as root), and not running with the GCC we downloaded.
Zequan Wu [Tue, 29 Sep 2020 00:17:23 +0000 (17:17 -0700)]
[COFF][CG Profile] set undefined symbol to external
Differential Revision: https://reviews.llvm.org/D88456
Michael Kruse [Tue, 29 Sep 2020 16:37:35 +0000 (11:37 -0500)]
[flang][msvc] Avoid templated initializer list initialization of vector. NFC.
The Microsoft compiler emits an error when populating the vector with a single element of a templated argument using the brace syntax. The error is:
```
constant.h(102,1): error C2664: 'std::vector<Fortran::evaluate::value::Complex<...>, ...>::vector(std::initializer_list<_Ty>,const _Alloc &)': cannot convert argument 1 from 'initializer list' to 'std::initializer_list<_Ty>'
```
To work around this error, we replace the templated constructor with one for the expected type. Conversion to the element type has to be done by the caller.
This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D88163
Arthur O'Dwyer [Tue, 29 Sep 2020 16:17:26 +0000 (12:17 -0400)]
[libc++] Add a regression test for erasing from a vector
After rebasing my trivially-relocatable branch, this behavior was broken...
but no libc++ unit test caught it! Add a regression test specifically for
erasing out of a vector.
Differential Revision: https://reviews.llvm.org/D88421
Simon Pilgrim [Tue, 29 Sep 2020 16:15:00 +0000 (17:15 +0100)]
[InstCombine] Fix the outofrange tests and add exact shift tests for D88429
Simon Pilgrim [Tue, 29 Sep 2020 15:54:13 +0000 (16:54 +0100)]
[InstCombine] visitTrunc - remove dead trunc(lshr (zext A), C) combine. NFCI.
I added additional test coverage at rG7a55989dc4305 - but all are handled independently of this combine and http://lab.llvm.org:8080/coverage/coverage-reports/ indicates the code is never used.
Differential revision: https://reviews.llvm.org/D88492
Jonas Devlieghere [Tue, 29 Sep 2020 16:12:29 +0000 (09:12 -0700)]
[lldb] Also configure lldb_framework_dir in the lit.site.cfg.py
Configuring the variable in CMake isn't enought, because the build mode
can't be resolved until execution time, which requires the build mode to
be substituted by lit.
Louis Dionne [Tue, 29 Sep 2020 14:49:52 +0000 (10:49 -0400)]
[libc++] Fix tests on GCC 10
Also, remove workarounds for ancient Clangs from is_constructible tests.
Jonas Devlieghere [Tue, 29 Sep 2020 15:56:27 +0000 (08:56 -0700)]
[lldb] Configure LLDB_FRAMEWORK_DIR in multi-generator builds
Alex Lorenz [Tue, 29 Sep 2020 15:48:07 +0000 (08:48 -0700)]
NFC, add a missing stdlib include for the use of abort
The FatalErrorHandler.cpp file uses 'abort', but doesn't include
'stdlib.h'. This causes a build error when modules are used in clang.
Utkarsh Saxena [Tue, 29 Sep 2020 15:06:13 +0000 (17:06 +0200)]
[clangd] Disable msan instrumentation for generated Evaluate().
MSAN build times out for generated DecisionForest inference runtime.
A solution worth trying is splitting the function into 300 smaller
functions and then re-enable msan.
For now we are disabling instrumentation for the generated function.
Differential Revision: https://reviews.llvm.org/D88495
Simon Pilgrim [Tue, 29 Sep 2020 15:36:58 +0000 (16:36 +0100)]
MSP430TargetMachine.h - remove unused includes. NFCI.
Simon Pilgrim [Tue, 29 Sep 2020 15:29:51 +0000 (16:29 +0100)]
NVPTXTargetMachine.h - remove unused includes. NFCI.
Simon Pilgrim [Tue, 29 Sep 2020 15:15:35 +0000 (16:15 +0100)]
SparcSubtarget.h - cleanup include dependencies. NFCI.
TargetFrameLowering.h is guaranteed to be covered by SparcFrameLowering.h
Fix missing implicit Triple.h dependency.
Manoel Roemmer [Tue, 29 Sep 2020 14:21:09 +0000 (16:21 +0200)]
[OpenMP][VE plugin] Fixing failure to build VE plugin with consolidated error handling in libomptarget
The libomptarget VE plugin [[
http://lab.llvm.org:8014/builders/clang-ve-ninja/builds/8937/steps/build-unified-tree/logs/stdio
| fails zu build ]] after
ae95ceeb8f98d81f615c69da02f73b5ee6b1519a .
Differential Revision: https://reviews.llvm.org/D88476
Kostya Kortchinsky [Tue, 29 Sep 2020 00:21:00 +0000 (17:21 -0700)]
[scudo][standalone] Fix Primary's ReleaseToOS test
Said test was flaking on Fuchsia for non-obvious reasons, and only
for ASan variants (the release was returning 0).
It turned out that the templating was off, `true` being promoted to
a `s32` and used as the minimum interval argument. This meant that in
some circumstances, the normal release would occur, and the forced
release would have nothing to release, hence the 0 byte released.
The symbols are giving it away (note the 1):
```
scudo::SizeClassAllocator64<scudo::FixedSizeClassMap<scudo::DefaultSizeClassConfig>,24ul,1,
2147483647,false>::releaseToOS(void)
```
This also probably means that there was no MTE version of that test!
Differential Revision: https://reviews.llvm.org/D88457
Cameron McInally [Tue, 29 Sep 2020 15:12:58 +0000 (10:12 -0500)]
[SVE] Fix typo in CHECK lines for sve-fixed-length-int-reduce.ll
Sanjay Patel [Tue, 29 Sep 2020 15:02:03 +0000 (11:02 -0400)]
[InstCombine] use redirect of input file in regression tests; NFC
This is a repeat of
1880092722 from 2009. We should have less risk
of hitting bugs at this point because we auto-generate positive CHECK
lines only, but this makes things consistent.
Copying the original commit msg:
"Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename."
Valentin Clement [Tue, 29 Sep 2020 14:58:46 +0000 (10:58 -0400)]
[mlir][openacc] Add init operation
This patch introduces the init operation that represents the init executable directive
from the OpenACC 3.0 specifications.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D88254
Simon Pilgrim [Tue, 29 Sep 2020 14:49:43 +0000 (15:49 +0100)]
[InstCombine] Add some basic trunc(lshr(zext(x),c)) tests
Copied from the sext equivalents
Valentin Clement [Tue, 29 Sep 2020 14:39:13 +0000 (10:39 -0400)]
[mlir][openacc] Add wait operation
This patch introduce the wait operation that represent the OpenACC wait directive.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D88125
Tadeo Kondrak [Tue, 29 Sep 2020 14:29:22 +0000 (16:29 +0200)]
[clangd] Improve PopulateSwitch tweak to work on non-empty switches
Improve the recently-added PopulateSwitch tweak to work on non-empty switches.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D88434
Simon Pilgrim [Tue, 29 Sep 2020 14:30:46 +0000 (15:30 +0100)]
[InstCombine] Inherit exact flags on extended shifts in trunc (lshr (sext A), C) --> (ashr A, C)
This was missed in D88475
Alex Zinenko [Tue, 29 Sep 2020 14:23:02 +0000 (16:23 +0200)]
[mlir] Expose Dialect class and registration/loading to C API
- Add a minimalist C API for mlir::Dialect.
- Allow one to query the context about registered and loaded dialects.
- Add API for loading dialects.
- Provide functions to register the Standard dialect.
When used naively, this will require to separately register each dialect. When
we have more than one exposed, we can add variadic macros that expand to
individual calls.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D88162
Simon Pilgrim [Tue, 29 Sep 2020 14:05:30 +0000 (15:05 +0100)]
[InstCombine] Add exact shift tests missed in D88475
I missed the post-LGTM comment from @lebedev.ri
Chris Hamilton [Tue, 29 Sep 2020 14:11:41 +0000 (16:11 +0200)]
[Sema] Address-space sensitive check for unbounded arrays (v2)
Check applied to unbounded (incomplete) arrays and pointers to spot
cases where the computed address is beyond the largest possible
addressable extent of the array, based on the address space in which the
array is delcared, or which the pointer refers to.
Check helps to avoid cases of nonsense pointer math and array indexing
which could lead to linker failures or runtime exceptions. Of
particular interest when building for embedded systems with small
address spaces.
This is version 2 of this patch -- version 1 had some testing issues
due to a sign error in existing code. That error is corrected and
lit test for this chagne is extended to verify the fix.
Originally reviewed/accepted by: aaron.ballman
Original revision: https://reviews.llvm.org/D86796
Reviewed By: ebevhan
Differential Revision: https://reviews.llvm.org/D88174
Krzysztof Parzyszek [Thu, 24 Sep 2020 23:59:02 +0000 (18:59 -0500)]
[SDAG] Do not convert undef to 0 when folding CONCAT/BUILD_VECTOR
Differential Revision: https://reviews.llvm.org/D88273
Simon Pilgrim [Tue, 29 Sep 2020 13:45:30 +0000 (14:45 +0100)]
[InstCombine] visitTrunc - trunc (lshr (sext A), C) --> (ashr A, C) non-uniform support
This came from @lebedev.ri's suggestion to use m_SpecificInt_ICMP for D88429 - since I was going to change the m_APInt to m_Constant for that patch I thought I would do it for the only other user of the APInt first.
I've added a ConstantExpr::getUMin helper - its trivial to add UMAX/SMIN/SMAX but thought I'd wait until we have use cases.
Differential Revision: https://reviews.llvm.org/D88475
Valentin Clement [Tue, 29 Sep 2020 13:56:54 +0000 (09:56 -0400)]
[mlir][openacc] Add update operation
This patch introduce the update operation that represent the OpenACC update directive.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D88102
Nicolas Vasilache [Tue, 29 Sep 2020 12:23:37 +0000 (08:23 -0400)]
[mlir][Linalg] Refactor Linalg op initTensors support - NFC
Manually-defined named ops do not currently support `init_tensors` or return values and may never support them. Add extra interface to the StructuredOpInterface so that we can still write op-agnostic transformations based on StructuredOpInterface.
This is an NFC extension in preparation for tiling on tensors.
Differential Revision: https://reviews.llvm.org/D88481
Dominik Montada [Mon, 28 Sep 2020 14:38:35 +0000 (16:38 +0200)]
[GlobalISel] fix widenScalarUnmerge if widen type is not a multiple of destination type
Fix creation of illegal unmerge when widen was requested to a type which
is not a multiple of the destination type. E.g. when trying to widen
an s48 unmerge to s64 the existing code would create an illegal unmerge
from s64 to s48.
Instead, create further unmerges to a GCD type, then use this to remerge
these intermediate results to the actual destinations.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D88422
Nicolas Vasilache [Tue, 29 Sep 2020 12:07:08 +0000 (08:07 -0400)]
[mlir][Linalg] Refactor Linalg creation of loops to allow passing iterArgs - NFC
This revision changes the signatures of helper function that Linalg uses to create loops so that they can also take iterArgs.
iterArgs are asserted empty to ensure no functional change.
This is a mechanical change in preparation of tiling on linalg on tensors to avoid polluting the implementation with an NFC change.
Differential Revision: https://reviews.llvm.org/D88480
Daniel Kiss [Tue, 29 Sep 2020 13:50:19 +0000 (15:50 +0200)]
[AArch64] Add v8.5 Branch Target Identification support.
The .note.gnu.property must be in the assembly file to indicate the
support for BTI otherwise BTI will be disabled for the whole library.
__unw_getcontext and libunwind::Registers_arm64::jumpto() may be called
indirectly therefore they should start with a landing pad.
Reviewed By: tamas.petz, #libunwind, compnerd
Differential Revision: https://reviews.llvm.org/D77786
Mirko Brkusanin [Tue, 29 Sep 2020 13:29:26 +0000 (15:29 +0200)]
Revert "[AMDGPU] Reorganize GCN subtarget features for unaligned access"
This reverts commit
f5cd7ec9f3fc969ff5e1feed961996844333de3b.
Certain rocPRIM/rocThrust/hipCUB tests were failing because of this change.
Andrzej Warzynski [Tue, 29 Sep 2020 13:20:35 +0000 (14:20 +0100)]
[mlir] Fix shared libs build
The following change causes the shared libraries build
(BUILD_SHARED_LIBS=On) to fail:
* https://reviews.llvm.org/D88351
This patch will fix that.
Differential Revision: https://reviews.llvm.org/D88484
Jay Foad [Mon, 28 Sep 2020 12:37:49 +0000 (13:37 +0100)]
[SDag] Verify DAG divergence after dumping. NFC.
When debugging, it's useful to be able to see the DAG that has just
failed divergence verification.
Jay Foad [Mon, 28 Sep 2020 11:44:43 +0000 (12:44 +0100)]
[SDag] Refactor and simplify divergence calculation and checking. NFC.
Jonas Paulsson [Thu, 10 Sep 2020 13:59:36 +0000 (15:59 +0200)]
[SystemZ] Don't emit PC-relative memory accesses to unaligned symbols.
In the presence of packed structures (#pragma pack(1)) where elements are
referenced through pointers, there will be stores/loads with alignment values
matching the default alignments for the element types while the elements are
in fact unaligned. Strictly speaking this is incorrect source code, but is
unfortunately part of existing code and therefore now addressed.
This patch improves the pattern predicate for PC-relative loads and stores by
not only checking the alignment value of the instruction, but also making
sure that the symbol (and element) itself is aligned.
Fixes https://bugs.llvm.org/show_bug.cgi?id=44405
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D87510
Stephan Herhut [Tue, 29 Sep 2020 11:20:37 +0000 (13:20 +0200)]
[mlir][GPU] Improve constant sinking in kernel outlining
The previous implementation did not support sinking simple expressions. In particular,
it is often beneficial to sink dim operations.
Differential Revision: https://reviews.llvm.org/D88439
Florian Hahn [Tue, 29 Sep 2020 12:37:24 +0000 (13:37 +0100)]
[LoopUtils] Only verify SE in builds with assertions.
Follow up to
60b852092c98.
Hans Wennborg [Tue, 29 Sep 2020 12:29:58 +0000 (14:29 +0200)]
[sanitizer] Don't build gmock for tests (follow-up to
82827244).
A use of gmock was briefly added in
a90229d6, but was soon removed in
82827244. This also removes it from the cmake files.
Alexey Bader [Tue, 25 Aug 2020 14:05:19 +0000 (17:05 +0300)]
[SYCL] Assume SYCL device functions are convergent
SYCL device compiler (similar to other SPMD compilers) assumes that
functions are convergent by default to avoid invalid transformations.
This attribute can be removed if compiler can prove that function does
not have convergent operations.
Reviewed By: Naghasan
Differential Revision: https://reviews.llvm.org/D87282
Daniel Kiss [Tue, 29 Sep 2020 11:35:25 +0000 (13:35 +0200)]
[AArch64] Add BTI to CFI jumptables.
With branch protection the jump to the jump table entries requires a landing pad.
Reviewed By: eugenis, tamas.petz
Differential Revision: https://reviews.llvm.org/D81251
David Stenberg [Tue, 29 Sep 2020 09:04:13 +0000 (11:04 +0200)]
[IndVarSimplify] Fix Modified status for removal of overflow intrinsics
When removing an overflow intrinsic the Changed status in SimplifyIndvar
was not set, leading to the IndVarSimplify pass returning an incorrect
status.
This was caught using the check introduced by D80916.
As pointed out in the code review, a similar bug may exist for
eliminateTrunc().
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D85971
Vitaly Buka [Tue, 29 Sep 2020 10:15:37 +0000 (03:15 -0700)]
[msan] Fix llvm.abs.v intrinsic
The last argument of the intrinsic is a boolean
flag to control INT_MIN handling and does
not affect msan metadata.
Vitaly Buka [Tue, 29 Sep 2020 10:08:24 +0000 (03:08 -0700)]
[msan] Add test for vector abs intrinsic
sstefan1 [Tue, 29 Sep 2020 09:51:36 +0000 (11:51 +0200)]
[OpenMPOpt][Fix] Only initialize ICV initial values once.
Reviewers: jdoerfert, ggeorgakoudis
Differential Revision: https://reviews.llvm.org/D88441
Simon Pilgrim [Tue, 29 Sep 2020 09:56:00 +0000 (10:56 +0100)]
[InstCombine] Add trunc(lshr(sext(x),c)) non-uniform vector tests
Florian Hahn [Tue, 29 Sep 2020 09:38:44 +0000 (10:38 +0100)]
[LoopDeletion] Forget loop before setting values to undef
After D71539, we need to forget the loop before setting the incoming
values of phi nodes in exit blocks, because we are looking through those
phi nodes now and the SCEV expression could depend on the loop phi. If
we update the phi nodes before forgetting the loop, we miss those users
during invalidation.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D88167
Max Kazantsev [Tue, 29 Sep 2020 08:32:53 +0000 (15:32 +0700)]
[SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond
Currently, we have `isLoopEntryGuardedByCond` method in SCEV, which
checks that some fact is true if we enter the loop. In fact, this is just a
particular case of more general concept `isBasicBlockEntryGuardedByCond`
applied to given loop's header. In fact, the logic if this code is largely
independent on the given loop and only cares code above it.
This patch makes this generalization. Now we can query it for any block,
and `isBasicBlockEntryGuardedByCond` is just a particular case.
Differential Revision: https://reviews.llvm.org/D87828
Reviewed By: fhahn
Tres Popp [Tue, 29 Sep 2020 08:24:54 +0000 (10:24 +0200)]
Revert "OpaquePtr: Add type to sret attribute"
This reverts commit
55c4ff91bd820d72014f63dcf7f3d5a0d3397986.
Issues were introduced as discussed in https://reviews.llvm.org/D88241
where this change made previous bugs in the linker and BitCodeWriter
visible.
Serguei Katkov [Thu, 24 Sep 2020 17:45:15 +0000 (00:45 +0700)]
[IsKnownNonZero] Handle the case with non-constant phi nodes
Handle the case when all inputs of phi are proven to be non zero.
Constants are checked in beginning of this method before check for depth of recursion,
so it is a partial case of non-constant phi.
Recursion depth is already handled by the function.
Reviewers: aqjune, nikic, efriedma
Reviewed By: nikic
Subscribers: dantrushin, hiraditya, jdoerfert, llvm-commits
Differential Revision: https://reviews.llvm.org/D88276
Florian Hahn [Tue, 29 Sep 2020 08:18:19 +0000 (09:18 +0100)]
Revert "Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one.""
Looks like there is still another remaining issue:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/22273/steps/build%20libcxx%2Fmsan/logs/stdio
This reverts commit
86a20d9e34f5a9989da72097f23f3b0a44157e73.
Florian Hahn [Mon, 28 Sep 2020 15:08:30 +0000 (16:08 +0100)]
Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one."
This version includes an small fix allowing function pointers to be
unconditionally replaced for now.
This reverts commit
4c5e4aa89b11ec3253258b8df5125833773d1b1e.
Sam Parker [Tue, 29 Sep 2020 07:41:53 +0000 (08:41 +0100)]
[NFC][ARM] Comments and lambdas
Add some comments in LowOverheadLoops and make some lambda variables
explicit arguments instead of capturing.
Ellis Hoag [Tue, 29 Sep 2020 06:25:24 +0000 (02:25 -0400)]
This reduces code duplication between CGObjCMac.cpp and Mangle.cpp
for generating the mangled name of an Objective-C method.
This has no intended functionality change.
https://reviews.llvm.org/D88329
Dmitry Antipov [Tue, 29 Sep 2020 03:32:51 +0000 (06:32 +0300)]
[Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do not exists
Differential Revision: https://reviews.llvm.org/D87901
Craig Topper [Tue, 29 Sep 2020 05:52:31 +0000 (22:52 -0700)]
[X86] Add computeKnownBits support for PEXT.
The number of zeros in the mask provides a lower bound on the number
of leading zeros in the result.
Craig Topper [Tue, 29 Sep 2020 05:46:27 +0000 (22:46 -0700)]
[X86] Add known bits test for PEXT. NFC
Johannes Doerfert [Tue, 29 Sep 2020 05:36:45 +0000 (00:36 -0500)]
Revert "[OpenMP][FIX] Verify compatible types for declare variant calls"
This reverts commit
c942095790decf525a445f3bd68fb9bcc9aa43c6.
One of the tests broke, revert to investigate.
Arthur Eubanks [Fri, 25 Sep 2020 22:21:54 +0000 (15:21 -0700)]
[Docs][NewPM] Add note about required passes
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D88342
Max Kazantsev [Tue, 29 Sep 2020 04:37:17 +0000 (11:37 +0700)]
[NFC] Use assert instead of checking the guaranteed condition
From preconditions it is known that either A dominates B or
B dominates A. If A does not dominate B, we do not really need
to check it. Assert should be enough. Should save some compile
time.
Max Kazantsev [Tue, 29 Sep 2020 04:34:15 +0000 (11:34 +0700)]
[IndVars] Remove exiting conditions that are trivially true/false
When removing exiting loop conditions, we only consider checks for
which we know the exact exit count. We could also eliminate checks for
which the condition is always true/false.
Differential Revision: https://reviews.llvm.org/D87344
Reviewed By: lebedev.ri, reames