Thomas Raoux [Sat, 20 Jun 2020 00:33:15 +0000 (17:33 -0700)]
[mlir][spirv] Legalize subviewop when used with vector transfer
Subview operations are not natively supported downstream in the spirv path.
This change allows removing subview when used by vector transfer the same way
we already do it when they are used by LoadOp/StoreOp
Differential Revision: https://reviews.llvm.org/D82106
Thomas Raoux [Sat, 20 Jun 2020 00:08:57 +0000 (17:08 -0700)]
[mlir] Allow vector.contract to have mixed types operands
Allow lhs and rhs to have different type than accumulator/destination. Some
hardware like GPUs support natively operations like uint8xuint8xuint32.
Differential Revision: https://reviews.llvm.org/D82069
Benson Chu [Sat, 20 Jun 2020 00:01:03 +0000 (17:01 -0700)]
[Sema] Comparison of pointers to complete and incomplete types
Clang is missing one of the conditions for C99 6.5.9p2, where comparison
between pointers must either both point to incomplete types or both
point to complete types. This patch adds an extra check to the clause
where two pointers are of compatible types.
This only applies to C89/C99; the relevant part of the standard was
rewritten for C11.
Differential Revision: https://reviews.llvm.org/D79945
Ryan Prichard [Fri, 19 Jun 2020 06:57:08 +0000 (23:57 -0700)]
[builtins][Android] Fix 386->686 adjustment
At this point in this code:
- COMPILER_RT_DEFAULT_TARGET_TRIPLE is "i686-linux-android"
- arch is "i386"
The get_compiler_rt_target function currently turns that into:
i686-android-linux-android
The ${COMPILER_RT_OS_SUFFIX} is "-android" and redundant, so stop
adding it.
The get_compiler_rt_target() function is used for the
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR mode that isn't normally used with
Android.
Differential Revision: https://reviews.llvm.org/D82150
Ryan Prichard [Fri, 19 Jun 2020 06:35:40 +0000 (23:35 -0700)]
[builtins] Fix typos in comments
Differential Revision: https://reviews.llvm.org/D82146
romanova-ekaterina [Fri, 19 Jun 2020 22:58:51 +0000 (15:58 -0700)]
Error related to ThinLTO caching needs to be downgraded to a remark
This is a fix for PR #46392 (Diagnostic message (error) related to
ThinLTO caching needs to be downgraded to a remark).
There are diagnostic messages related to ThinLTO caching that contain
the word "error", but they are really just notices/remarks for users,
and they don't cause a build failure. The word "error" appearing can be
confusing to users, and may even cause deeper problems.
User's build system might be designed to interpret any error messages
(even a benign error message as the one above) reported by the compiler
as a build failure, thus causing the build to fail "needlessly". In
short, the term "error" in this diagnostic is misleading at best, and
may be causing build systems to fail at worst.
Differential Revision: https://reviews.llvm.org/D82138
Eric Christopher [Fri, 19 Jun 2020 22:43:51 +0000 (15:43 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Eric Christopher [Fri, 19 Jun 2020 22:41:06 +0000 (15:41 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Eric Christopher [Fri, 19 Jun 2020 22:05:26 +0000 (15:05 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Eric Christopher [Fri, 19 Jun 2020 21:54:50 +0000 (14:54 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Heejin Ahn [Mon, 15 Jun 2020 16:31:19 +0000 (09:31 -0700)]
[WebAssembly] Remove TEEs when dests are unstackified
When created in RegStackify pass, `TEE` has two destinations, where
op0 is stackified and op1 is not. But it is possible that
op0 becomes unstackified in `fixUnwindMismatches` function in
CFGStackify pass when a nested try-catch-end is introduced, violating
the invariant of `TEE`s destinations.
In this case we convert the `TEE` into two `COPY`s, which will
eventually be resolved in ExplicitLocals.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D81851
Eric Christopher [Fri, 19 Jun 2020 21:52:01 +0000 (14:52 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Eric Christopher [Fri, 19 Jun 2020 21:51:04 +0000 (14:51 -0700)]
As part of using inclusive language within the llvm project,
migrate away from the use of blacklist and whitelist.
Eric Christopher [Fri, 19 Jun 2020 21:33:36 +0000 (14:33 -0700)]
As part of using inclusive language with the llvm project,
migrate away from the use of blacklist and whitelist.
Martin Storsjö [Fri, 19 Jun 2020 21:39:22 +0000 (00:39 +0300)]
[Support] Fix building for mingw on a case sensitive file system
This fixes cross building on a case sensitive file system after
2e613d2ded2c465bd06bd3cac30ffb4576bf72cc. (The official Windows
SDKs don't have self-consistent casing and can't be used as such on
case sentisive file systems without case fixups, while mingw headers
consistently use lower case.)
Rahul Joshi [Fri, 19 Jun 2020 19:33:21 +0000 (12:33 -0700)]
[MLIR][NFC] Eliminate .getBlocks() when not needed
Differential Revision: https://reviews.llvm.org/D82229
Arthur Eubanks [Fri, 19 Jun 2020 19:42:00 +0000 (12:42 -0700)]
[NFC] Remove unused pass name parser classes
Summary: Looks like these were for the most part touched over a decade ago.
Subscribers: mgorny, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82231
Raphael Isemann [Fri, 19 Jun 2020 20:05:46 +0000 (22:05 +0200)]
[lldb][NFC] Add test for builtin formats
peter klausler [Fri, 19 Jun 2020 16:16:21 +0000 (09:16 -0700)]
[flang] DATA stmt processing (part 4/4): Check & convert DATA
Implement rest of DATA statement semantics and conversion of
DATA statement initializations into static initializers of
objects in their symbol table entries.
Reviewed By: tskeith, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D82207
Amara Emerson [Wed, 17 Jun 2020 05:11:41 +0000 (22:11 -0700)]
[AArch64][GlobalISel] Make G_SEXT_INREG legal and add selection support.
We were defaulting to the lower action for this, resulting in SHL+ASHR
sequences. On AArch64 we can do this in one instruction for an arbitrary
extension using SBFM as we do for G_SEXT.
Differential Revision: https://reviews.llvm.org/D81992
cgyurgyik [Fri, 19 Jun 2020 20:05:26 +0000 (16:05 -0400)]
[libc] This adds the strcmp (string compare) implementation.
Reviewed-by: sivachandra
Differential Revision: https://reviews.llvm.org/D82134
Daniel [Fri, 19 Jun 2020 19:40:03 +0000 (20:40 +0100)]
[clang-tidy] remove duplicate fixes of alias checkers
when both a check and its alias are enabled, we should only take the fixes of one of them and not both.
This patch fixes bug 45577
https://bugs.llvm.org/show_bug.cgi?id=45577
Reviewed By: aaron.ballman, njames93
Differential Revision: https://reviews.llvm.org/D80753
Sanjay Patel [Fri, 19 Jun 2020 18:51:50 +0000 (14:51 -0400)]
[VectorCombine] refactor extract-extract logic; NFCI
Yitzhak Mandelbaum [Thu, 18 Jun 2020 20:53:03 +0000 (20:53 +0000)]
[libTooling] Change Transformer's `cat` to handle some cases of text in macros.
Summary:
Currently, `cat` validates range selections before extracting the corresponding
source text. However, this means that any range inside a macro is rejected as an
error. This patch changes the implementation to first try to map the range to
something reasonable. This makes the behavior consistent with handling of ranges
used for selecting portions of the source to edit.
Also updates a clang-tidy lit-test for one of the checks which was affected by
this change.
Reviewers: gribozavr2, tdl-g
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82126
Eric Schweitz [Fri, 19 Jun 2020 03:02:28 +0000 (20:02 -0700)]
[flang] Add SymbolMap
The symbol map is a data structure for tracking variables in a subprogram during the lowering of that subprogram to FIR/MLIR. These data structures will be used by the bridge, which has not been upstreamed yet.
Differential revision: https://reviews.llvm.org/D82140
Jonas Devlieghere [Fri, 19 Jun 2020 18:17:00 +0000 (11:17 -0700)]
[lldb] Replace calls to new with std::make_shared<> (NFC)
Thomas Preud'homme [Thu, 18 Jun 2020 18:48:55 +0000 (19:48 +0100)]
Reland [FileCheck, unittest] Improve readability of ExpressionFormat
This was originally
cd2553de77f and reverted in
a3adfb400ef.
The ADT itostr bug this triggered was fixed in
f3e8f961736.
aartbik [Fri, 19 Jun 2020 17:40:03 +0000 (10:40 -0700)]
[mlir] [VectorOps] Improve vector.constant_mask lowering
Use direct vector constants for the 1-D case. This approach
scales much better than generating elaborate insertion operations
that are eventually folded into a constant. We could of course
generalize the 1-D case to higher ranks, but this simplification
already helps in scaling some microbenchmarks that would formerly
crash on the intermediate IR length.
Reviewed By: reidtatge
Differential Revision: https://reviews.llvm.org/D82144
Thomas Preud'homme [Fri, 19 Jun 2020 15:08:34 +0000 (16:08 +0100)]
[ADT] Fix itostr handling of min int64_t value
Summary:
UBSan buildbot caught an undefined behavior in itostr with INT64_MIN.
The negation cannot be represented in the promoted operand (long long).
Negation is well defined on unsigned value though so this commit does
the negation after the static cast.
Reviewers: jhenderson, chandlerc, lattner
Reviewed By: lattner
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82200
Raphael Isemann [Fri, 19 Jun 2020 17:17:24 +0000 (19:17 +0200)]
[lldb] Replace std::isprint/isspace with llvm's locale-independent version
Summary:
LLVM is using its own isPrint/isSpace implementation that doesn't change depending on the current locale. LLDB should do the same
to prevent that internal logic changes depending on the set locale.
Reviewers: JDevlieghere, labath, mib, totally_not_teemperor
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D82175
Raphael Isemann [Fri, 19 Jun 2020 17:16:27 +0000 (19:16 +0200)]
[lldb] Reactivate Objective-C++ plugin
Summary:
Since commit
7b3ef05a37fef2f805d31f498d30198ddeeb1a0c the Objective-C++ plugin is dead code.
That commit added Objective-C++ to the list of languages for which `Language::LanguageIsCPlusPlus`
returns true. As the C++ language plugin also uses that method to figure out if it is responsible for a
given language, the C++ plugin since then also became the plugin that we found when looking for
a language plugin for Objective-C++. The only real fallout from that is that the source highlighting
for Objective-C++ files never worked as we always found the C++ plugin which refuses to highlight
files with Objective-C++ extensions.
This patch just adds a special exception for Objective-C++ to the list of languages that are governed
by the C++ plugin. Also adds a test that makes sure that we find the right plugin for all C language
types and that the highlighting for `.mm` (Objective-C++) and `.m` (Objective-C) files works.
I didn't revert
7b3ef05a37fef2f805d31f498d30198ddeeb1a0c as it does make sense to return
true for Objective-C++ from `Language::LanguageIsCPlusPlus` (e.g., we currently check if we care about
ODR violations by doing `if (Language::LanguageIsCPlusPlus(...))` and this should also work for
Objective-C++).
Fixes rdar://
64420183
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: mgorny, abidh, JDevlieghere
Differential Revision: https://reviews.llvm.org/D82109
Raphael Isemann [Fri, 19 Jun 2020 17:13:43 +0000 (19:13 +0200)]
[lldb] Fix that SIGWINCH crashes IOHandlerEditline when we are not using the editline backend
Summary:
TerminalSizeChanged is called from our SIGWINCH signal handler but the
IOHandlerEditline currently doesn't check if we are actually using the real
editline backend. If we're not using the real editline backend, `m_editline_up`
won't be set and `IOHandlerEditline::TerminalSizeChanged` will access
the empty unique_ptr. In a real use case we don't use the editline backend
when we for example read input from a file. We also create some temporary
IOHandlerEditline's during LLDB startup it seems that are also treated
as non-interactive (apparently to read startup commands).
This patch just adds a nullptr check for`m_editline_up` as we do in the rest of
IOHandlerEditline.
Fixes rdar://problem/
63921950
Reviewers: labath, friss
Reviewed By: friss
Subscribers: abidh, JDevlieghere
Differential Revision: https://reviews.llvm.org/D81729
Lang Hames [Fri, 19 Jun 2020 17:01:12 +0000 (10:01 -0700)]
[JITLink] Allow zero-length symbols at the end of blocks.
This relaxes an assertion that required symbols to start before the end
of a block. Instead, symbols are now required to end on or before the
end of a block. This fixes two important corner cases: Symbols at the
start of empty blocks/sections, and block/section end symbols.
Lang Hames [Fri, 19 Jun 2020 16:59:23 +0000 (09:59 -0700)]
[JITLink] Display host -> target address mapping in debugging output.
This can be helpful for sanity checking JITLink memory manager behavior.
Adrian Prantl [Tue, 16 Jun 2020 23:25:09 +0000 (16:25 -0700)]
Repair support for launching ios/tv/watch simulator binaries through platform
and delete a bunch (but not all) redundant code. If you compare the remaining implementations of Platform*Simulator.cpp, there is still an obvious leftover cleanup task.
Specifically, this patch
- removes SDK initialization from dotest (there is equivalent but more
complete code in Makefile.rules)
- make Platform*Simulator inherit the generic implementation of
PlatformAppleSimulator (more can be done here)
- simplify the platform logic in Makefile.rules
- replace the custom SDK finding logic in Platform*Simulator with XcodeSDK
- adds a test for each supported simulator
Differential Revision: https://reviews.llvm.org/D81980
Raphael Isemann [Fri, 19 Jun 2020 16:40:06 +0000 (18:40 +0200)]
[lldb] Disable complex tests on Windows
The tests fail to compile there:
```
complex/main.c:4:16: error: expected ';' at end of declaration
float complex complex_float = -1.5f + -2.5f * I;
^
;
```
Sanjay Patel [Fri, 19 Jun 2020 16:28:04 +0000 (12:28 -0400)]
[VectorCombine] fix crash while transforming constants
This is a variation of the proposal in D82049 with an extra test.
Fangrui Song [Fri, 19 Jun 2020 16:07:48 +0000 (09:07 -0700)]
[ELF] Refine LMA offset propagation rule in D76995
If neither AT(lma) nor AT>lma_region is specified,
D76995 keeps `lmaOffset` (LMA - VMA) if the previous section is in the
default LMA region.
This patch additionally checks that the two sections are in the same
memory region.
Add a test case derived from https://bugs.llvm.org/show_bug.cgi?id=45313
.mdata : AT(0xfb01000) { *(.data); } > TCM
// It is odd to make .bss inherit lmaOffset, because the two sections
// are in different memory regions.
.bss : { *(.bss) } > DDR
With this patch, section VMA/LMA match GNU ld. Note, GNU ld supports
out-of-order (w.r.t sh_offset) sections and places .text and .bss in the
same PT_LOAD. We don't have that behavior.
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D81986
peter klausler [Fri, 19 Jun 2020 00:17:04 +0000 (17:17 -0700)]
[flang] DATA stmt processing (part 3/4): Remaining prep work
Rolls up small changes across the frontend to prepare for the large
forthcoming patch (part 4/4) that completes DATA statement processing
via conversion to initializers.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D82137
Fangrui Song [Fri, 19 Jun 2020 16:05:28 +0000 (09:05 -0700)]
[ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry
Fixes PR46348.
ObjFile<ELFT>::initializeSymbols contains two symbol iteration loops:
```
for each symbol
if non-inheriting && non-local
fill in this->symbols[i]
for each symbol
if local
fill in this->symbols[i]
else
symbol resolution
```
Symbol resolution can trigger a duplicate symbol error which will call
InputSectionBase::getObjMsg to iterate over InputFile::symbols. If a
non-local symbol appears after the non-local symbol being resolved
(violating ELF spec), its `this->symbols[i]` entry has not been filled
in, InputSectionBase::getObjMsg will crash due to
`dyn_cast<Defined>(nullptr)`.
To fix the bug, reorganize the two loops to ensure this->symbols is
complete before symbol resolution. This enforces the invariant:
InputFile::symbols has none null entry when InputFile::getSymbols() is called.
```
for each symbol
if non-inheriting
fill in this->symbols[i]
for each symbol starting from firstGlobal
if non-local
symbol resolution
```
Additionally, move the (non-local symbol in local part of .symtab)
diagnostic from Writer<ELFT>::copyLocalSymbols() to initializeSymbols().
Reviewed By: grimar, jhenderson
Differential Revision: https://reviews.llvm.org/D81988
Stanislav Mekhanoshin [Fri, 19 Jun 2020 16:02:59 +0000 (09:02 -0700)]
[AMDGPU] Some formatting fixes. NFC.
Raphael Isemann [Fri, 19 Jun 2020 15:46:21 +0000 (17:46 +0200)]
[lldb] Fix TestComplexInt on ARM
On the buildbot long and int have the same size but long and long long don't,
so the bug where we find the first type by size will produce a different error.
Make the test dynamic based on int/long/long long size to fix the bot.
Frederik Gossen [Fri, 19 Jun 2020 15:09:36 +0000 (15:09 +0000)]
[MLIR][Shape] Lower `shape.shape_of` to standard dialect
Lower `shape.shape_of` to standard dialect.
This lowering supports statically and dynamically shaped tensors.
Support for unranked tensors will be added as part of the lowering to `scf`.
Differential Revision: https://reviews.llvm.org/D82098
Thomas Preud'homme [Fri, 19 Jun 2020 14:52:07 +0000 (15:52 +0100)]
Revert "[FileCheck, unittest] Improve readability of ExpressionFormat"
This reverts commit
cd2553de77f2c3206deaa261a15cc7520ff2ff56.
Raul Tambre [Fri, 19 Jun 2020 14:36:44 +0000 (10:36 -0400)]
[libc++] Require concepts support for <numbers>
Similar to <concepts>, we need to protect the header and test against
inclusion and being run if concepts aren't supported by the compiler.
Differential Revision: https://reviews.llvm.org/D82171
Piotr Sobczak [Fri, 19 Jun 2020 14:39:55 +0000 (16:39 +0200)]
Revert "[AMDGPU] Select s_cselect"
This caused some failures detected by the buildbot with
expensive checks enabled.
This reverts commit
4067de569f119a81419fbf2e79d5f3307dfdda5b.
Stephan Herhut [Fri, 19 Jun 2020 08:59:07 +0000 (10:59 +0200)]
[mlir] Add support for alignment annotations to the LLVM dialect to LLVM translation.
Summary:
With this change, a function argument attribute of the form
"llvm.align" = <int> will be translated to the corresponding align
attribute in LLVM by the ModuleConversion.
Differential Revision: https://reviews.llvm.org/D82161
Raphael Isemann [Fri, 19 Jun 2020 14:25:49 +0000 (16:25 +0200)]
[lldb][NFC] Remove unused DEPTH_INCREMENT in CompilerType.cpp
Jay Foad [Fri, 19 Jun 2020 14:33:48 +0000 (15:33 +0100)]
[AMDGPU] Add some missing -LABEL checks
dfukalov [Thu, 18 Jun 2020 00:46:18 +0000 (03:46 +0300)]
[AMDGPU][CostModel] Add fneg cost estimation
Summary: The estimation uses AMDGPUTargetLowering::isFNegFree()
Reviewers: rampitec
Reviewed By: rampitec
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82065
Simon Pilgrim [Fri, 19 Jun 2020 13:56:06 +0000 (14:56 +0100)]
[X86][SSE] movmsk-cmp.ll - cleanup check prefixes and add SSE41 target tests
Raphael Isemann [Fri, 19 Jun 2020 12:47:15 +0000 (14:47 +0200)]
[lldb][NFC] Add test for C99 and GCC complex types
LLDB has a lot of code for supporting complex types but we don't have a single
test for it. This adds some basic tests and documents the found bugs.
Piotr Sobczak [Wed, 4 Mar 2020 14:13:08 +0000 (15:13 +0100)]
[AMDGPU] Select s_cselect
Summary:
Add patterns to select s_cselect in the isel.
Handle more cases of implicit SCC accesses in si-fix-sgpr-copies
to allow new patterns to work.
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, asbirlea, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81925
Sjoerd Meijer [Fri, 19 Jun 2020 14:06:13 +0000 (15:06 +0100)]
[ARM][MVE] tail-predication: renamed internal option.
Renamed -force-tail-predication to -force-mve-tail-predication because
that's more descriptive and consistent.
Mikhail Maltsev [Fri, 19 Jun 2020 14:02:35 +0000 (14:02 +0000)]
[ARM][BFloat] Implement lowering of bf16 load/store intrinsics
Reviewers: labrinea, dmgreen, pratlucas, LukeGeeson
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81486
Thomas Preud'homme [Thu, 18 Jun 2020 18:48:55 +0000 (19:48 +0100)]
[FileCheck, unittest] Improve readability of ExpressionFormat
Summary:
Factor out repetetitive code into helper function and split massive
ExpressionFormat method test into separate test for each method,
removing dead code in passing. Also add a MinInt64 and MaxInt64 checks
when testing getMatchingString.
Reviewers: jhenderson, jdenny, probinson, grimar, arichardson
Reviewed By: jhenderson, grimar
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82132
Dmitry Preobrazhensky [Fri, 19 Jun 2020 13:27:40 +0000 (16:27 +0300)]
[AMDGPU][MC][NFC] Updated and enabled MC lit tests
Updated tests disabled by change 5f5f566.
https://github.com/llvm/llvm-project/commit/
5f5f566b265db00f577ead268400d99f34ba9cdd
Simon Pilgrim [Fri, 19 Jun 2020 13:11:28 +0000 (14:11 +0100)]
[X86][SSE] Add tests for (missing) MOVMSK(PCMPEQ(X,0)) != -1 -> PTESTZ(X,X) allof folds
Mikhail Maltsev [Fri, 19 Jun 2020 12:49:17 +0000 (12:49 +0000)]
[ARM][BFloat] Lowering of create/get/set/dup intrinsics
This patch adds codegen for the following BFloat
operations to the ARM backend:
* concatenation of bf16 vectors
* bf16 vector element extraction
* bf16 vector element insertion
* duplication of a bf16 value into each lane of a vector
* duplication of a bf16 vector lane into each lane
Differential Revision: https://reviews.llvm.org/D81411
Bruno Ricci [Fri, 19 Jun 2020 12:35:50 +0000 (13:35 +0100)]
[clang][test][NFC] Also test for serialization in AST dump tests, part 1/n.
The outputs between the direct ast-dump test and the ast-dump test after
deserialization should match modulo a few differences.
For hand-written tests, strip the "<undeserialized declarations>"s and
the "imported"s with sed.
For tests generated with "make-ast-dump-check.sh", regenerate the
output.
Part 1/n.
Bruno Ricci [Fri, 19 Jun 2020 12:31:38 +0000 (13:31 +0100)]
[clang][utils] Also match "col:" when looking for the end of builtins
Some AST dump tests have no "line:" at all. See "ast-dump-wchar.cpp" for
an example.
Xiangling Liao [Thu, 18 Jun 2020 23:52:34 +0000 (19:52 -0400)]
[AIX] Default AIX to using -fno-use-cxa-atexit
On AIX, we use __atexit to register dtor functions rather than __cxa_atexit.
So a driver change is needed to default AIX to using -fno-use-cxa-atexit.
Windows platform does not uses __cxa_atexit either. Following its precedent,
we remove the assertion for when -fuse-cxa-atexit is specified by the user,
do not produce a message and silently default to -fno-use-cxa-atexit behavior.
Differential Revision: https://reviews.llvm.org/D82136
Xiangling Liao [Wed, 27 May 2020 21:04:43 +0000 (17:04 -0400)]
[AIX][Frontend] Static init implementation for AIX considering no priority
1. Provides no piroirity supoort && disables three priority related
attributes: init_priority, ctor attr, dtor attr;
2. '-qunique' in XL compiler equivalent behavior of emitting sinit
and sterm functions name using getUniqueModuleId() util function
in LLVM (currently no support for InternalLinkage and WeakODRLinkage
symbols);
3. Add testcases to emit IR sample with __sinit80000000, __dtor, and
__sterm80000000;
4. Temporarily side-steps the need to implement the functionality of
llvm.global_ctors and llvm.global_dtors arrays. The uses of that
functionality in this patch (with respect to the name of the functions
involved) are not representative of how the functionality will be used
once implemented.
Differential Revision: https://reviews.llvm.org/D74166
Nathan James [Fri, 19 Jun 2020 12:22:39 +0000 (13:22 +0100)]
[NFC] Simplify IncludeInsertions appending to diagnostics
Kadir Cetinkaya [Fri, 19 Jun 2020 12:13:01 +0000 (14:13 +0200)]
[clangd] Use drop_front instead of consume_front to get rid of a redundant check
Alexander Belyaev [Fri, 19 Jun 2020 11:51:48 +0000 (13:51 +0200)]
[mlir][linalg] Add callback-based builders for `linalg.(indexed_)generic`.
Differential Revision: https://reviews.llvm.org/D82045
Sam McCall [Wed, 17 Jun 2020 13:56:01 +0000 (15:56 +0200)]
[clangd] Don't mangle workdir-relevant driver path in compile commands
Summary:
We can't resolve this (if it's a symlink) without further refactoring, but the
current behaviour is just incorrect.
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82011
Georgii Rymar [Wed, 17 Jun 2020 10:47:37 +0000 (13:47 +0300)]
[llvm-readobj] - Add a validation of the GNU hash table to printGnuHashHistogram().
Similar to D81937, we might crash when printing a histogram for a GNU hash table
with a 'symndx' index that is larger than the number of dynamic symbols.
This patch adopts and reuses the `getGnuHashTableChains()` helper which performs
a validation of the table. As a side effect the warning reported for
the --gnu-hash-table was improved.
Also with this change we start to report a warning when the histogram is requested for
the GNU hash table, but the dynamic symbols table is empty (size == 0).
Differential revision: https://reviews.llvm.org/D82010
Florian Hahn [Fri, 19 Jun 2020 11:08:40 +0000 (12:08 +0100)]
[DSE,MSSA] Enable XFAIL'd merge-stores.ll test (NFC).
All cases in the test are supported now, it only still failed because an
over-eager regex match not accounting for `, align ` being added to each
load/store now.
Nathan James [Fri, 19 Jun 2020 11:02:08 +0000 (12:02 +0100)]
[clang-tidy] Extend InheritParentConfig to CommandLineConfig
Extend the `InheritParentConfig` support introduced in D75184 for the command line option `--config`.
The current behaviour of `--config` is to when set, disable looking for `.clang-tidy` configuration files.
This new behaviour lets you set `InheritParentConfig` to true in the command line to then look for `.clang-tidy` configuration files to be merged with what's been specified on the command line.
Reviewed By: DmitryPolukhin
Differential Revision: https://reviews.llvm.org/D81949
Joachim Protze [Fri, 19 Jun 2020 08:59:18 +0000 (10:59 +0200)]
[OpenMP][OMPT] Pass mutexinoutset to the tool
Adds OMPT support for the mutexinoutset dependency
Reviewed by: hbae
Differential Revision: https://reviews.llvm.org/D81890
Simon Pilgrim [Thu, 18 Jun 2020 16:41:15 +0000 (17:41 +0100)]
[X86][SSE] combineHorizontalPredicateResult - improve all_of(X == 0) for vXi64 on pre-SSE41 targets
Without SSE41 we don't have the PCMPEQQ instruction, making cmp-with-zero reductions more complicated than necessary. We can compare as vXi32 (PCMPEQD) and tweak the MOVMSK comparison to test upper/lower DWORD comparisons.
This pre-fixes something that occurs with null tests for vectors of (64-bit) pointers such as in PR35129.
Kadir Cetinkaya [Wed, 17 Jun 2020 16:09:54 +0000 (18:09 +0200)]
[clangd] Drop usage of PreambleStatCache in scanPreamble
Summary: It was used inside buildCompilerInvocation to speed up stats. But
preambleStatCache doesn't contain stat information performed while
building compiler invocation. So it was an unnecessary optimization.
Furthermore, buildCompilerInvocation in scanPreamble doesn't need to
find gcc installation, include paths and such, as it is only trying to
lex directives. Hence we are passing an empty FS to get rid of any
redundant IO.
Reviewers: sammccall
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81719
LLVM GN Syncbot [Fri, 19 Jun 2020 10:15:53 +0000 (10:15 +0000)]
[gn build] Port
0628705efaf
Kadir Cetinkaya [Wed, 17 Jun 2020 16:09:54 +0000 (18:09 +0200)]
[clangd] Rename FSProvider to TFS in case of ThreadsafeFS
Summary: Depends on D81998
Reviewers: sammccall
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82024
Kadir Cetinkaya [Wed, 17 Jun 2020 09:53:32 +0000 (11:53 +0200)]
[clangd][NFC] Rename FSProvider and getFileSystem
Summary:
Clangd uses FSProvider to get threadsafe views into file systems. This
patch changes naming to make that more explicit.
Depends on D81920
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81998
Kadir Cetinkaya [Tue, 16 Jun 2020 10:16:24 +0000 (12:16 +0200)]
[clangd] Change FSProvider::getFileSystem to take CurrentWorkingDirectory
Summary:
We've faced a couple of problems when the returned FS didn't have the
proper working directory. New signature makes the API safer against such
problems.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81920
Vitaly Buka [Fri, 19 Jun 2020 10:10:01 +0000 (03:10 -0700)]
[StackSafety,NFC] Fix comment
Tyker [Fri, 19 Jun 2020 10:01:59 +0000 (12:01 +0200)]
Simon Pilgrim [Fri, 19 Jun 2020 09:27:09 +0000 (10:27 +0100)]
[X86][SSE] combineSetCCMOVMSK - fold MOVMSK(SHUFFLE(X,u)) -> MOVMSK(X)
If we're permuting ALL the elements of a single vector, then for allof/anyof MOVMSK tests we can avoid the shuffle entirely.
David Sherwood [Tue, 9 Jun 2020 13:51:38 +0000 (14:51 +0100)]
[SVE] Fall back on DAG ISel at -O0 when encountering scalable types
At the moment we use Global ISel by default at -O0, however it is
currently not capable of dealing with scalable vectors for two
reasons:
1. The register banks know nothing about SVE registers.
2. The LLT (Low Level Type) class knows nothing about scalable
vectors.
For now, the easiest way to avoid users hitting issues when using
the SVE ACLE is to fall back on normal DAG ISel when encountering
instructions that operate on scalable vector types.
I've added a couple of RUN lines to existing SVE tests to ensure
we can compile at -O0. I've also added some new tests to
CodeGen/AArch64/GlobalISel/arm64-fallback.ll
that demonstrate we correctly fallback to DAG ISel at -O0 when
lowering formal arguments or translating instructions that involve
scalable vector types.
Differential Revision: https://reviews.llvm.org/D81557
Sander de Smalen [Fri, 19 Jun 2020 09:06:39 +0000 (10:06 +0100)]
[SveEmitter] Add builtins for struct loads/stores (ld2/ld3/etc)
The struct store intrinsics in LLVM IR take the individual parts
as arguments, so this patch uses the intrinsics used for `svget`
to break the tuples into individual parts.
Reviewers: c-rhodes, efriedma, ctetreau, david-arm
Reviewed By: efriedma
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81466
David Sherwood [Wed, 10 Jun 2020 13:37:25 +0000 (14:37 +0100)]
[CodeGen,AArch64] Fix up warnings in performExtendCombine
Try to avoid calling getVectorNumElements() or relying upon the
TypeSize conversion to uin64_t.
Differential Revision: https://reviews.llvm.org/D81573
Vitaly Buka [Fri, 12 Jun 2020 21:10:47 +0000 (14:10 -0700)]
[StackSafety] Add StackLifetime::isAliveAfter
This function is going to be added into StackSafety checks.
This patch uses function in ::print implementation to make sure
that it works as expected.
Vitaly Buka [Fri, 19 Jun 2020 07:49:23 +0000 (00:49 -0700)]
[SafeStack,NFC] Print liveness for all instrunctions
Vitaly Buka [Fri, 19 Jun 2020 01:17:59 +0000 (18:17 -0700)]
[StackSafety,NFC] Replace map with vector
We don't need to lookup InstructionNumbering by number, so
we can use vector with index as assigned number.
Vitaly Buka [Fri, 19 Jun 2020 01:08:37 +0000 (18:08 -0700)]
[StackSafety,NFC] Don't test terminators
Code does not track terminators and do not expose them through interface.
State there is just a state of the last instruction or entry.
So this information is just redundant and doesn't need to be tested.
Florian Hahn [Fri, 19 Jun 2020 08:27:52 +0000 (09:27 +0100)]
[SCCP] Turn sext into zext for non-negative ranges.
This patch updates SCCP/IPSCCP to use the computed range info to turn
sexts into zexts, if the value is known to be non-negative. We already
to a similar transform in CorrelatedValuePropagation, but it seems like
we can catch a lot of additional cases by doing it in SCCP/IPSCCP as
well.
The transform is limited to ranges that are known to not include undef.
Currently constant ranges from conditions are treated as potentially
containing undef, due to PR46144. Once we flip this, the transform will
be more effective in practice.
Reviewers: efriedma, davide
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D81756
Jay Foad [Thu, 18 Jun 2020 17:20:58 +0000 (18:20 +0100)]
[LiveIntervals] Fix early-clobber handling in handleMoveUp
Without this fix, handleMoveUp can create an invalid live range like
this:
[98904e,98908r:0)[98908e,227504r:1)
where the two segments overlap, but only because we have lost the "e"
(early-clobber) on the end point of the first segment.
Differential Revision: https://reviews.llvm.org/D82110
Raul Tambre [Fri, 19 Jun 2020 07:13:33 +0000 (12:43 +0530)]
[libc++] Implement <numbers>
Summary: Constants have 33 significant decimal digits for IEEE 754 128-bit floating-point numbers.
Reviewers: ldionne, #libc, EricWF, zoecarver, curdeius
Reviewed By: ldionne, #libc, curdeius
Differential Revision: https://reviews.llvm.org/D77505
Daniel Grumberg [Fri, 19 Jun 2020 08:07:42 +0000 (09:07 +0100)]
[NFC] Make AST_BLOCK_HASH test more robust with downstream changes
Tyker [Fri, 19 Jun 2020 08:32:09 +0000 (10:32 +0200)]
[AssumeBundles] add cannonicalisation to the assume builder
Summary:
this reduces significantly the number of assumes generated without aftecting too much
the information that is preserved. this improves the compile-time cost
of enable-knowledge-retention significantly.
Reviewers: jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79650
Alex Zinenko [Thu, 18 Jun 2020 20:55:53 +0000 (22:55 +0200)]
[mlir] Remove EDSC NestedBuilder
All class derived from `edsc::NestedBuilder` in core MLIR have been replaced
with alternatives based on OpBuilder+callbacks. The *Builder EDSC
infrastructure has been deprecated. Remove edsc::NestedBuilder.
This completes the "structured builders" refactoring.
Differential Revision: https://reviews.llvm.org/D82128
Alex Zinenko [Thu, 18 Jun 2020 20:55:46 +0000 (22:55 +0200)]
[mlir] Remove EDSC BlockBuilder, BlockHandle and related functionality
Callback-based constructions of blocks where the body is populated in the same
function as the block creation is a natural extension of callback-based loop
construction. They provide more concise and simple APIs than EDSC BlockBuilder
at less than 20% infrastructural code cost, and are compatible with
ScopedContext. BlockBuilder, Blockhandle and related functionality has been
deprecated, remove them.
Differential Revision: https://reviews.llvm.org/D82015
Alex Zinenko [Thu, 18 Jun 2020 20:55:40 +0000 (22:55 +0200)]
[mlir] Remove EDSC LoopBuilder, derived classes and related functionality
Callback-based loop construction, with loop bodies being constructed during the
construction of the parent op using a function, is now fully supported by the
core infrastructure. This provides almost the same level of brevity as EDSC
LoopBuilder at less than 30% infrastructural code cost. Functional equivalents
compatible with EDSC ScopedContext are implemented on top of the main builders.
LoopBuilder and related functionality has been deprecated, remove it.
Differential Revision: https://reviews.llvm.org/D81874
David Sherwood [Tue, 26 May 2020 06:46:01 +0000 (07:46 +0100)]
[CodeGen] Fix SimplifyDemandedBits for scalable vectors
For now I have changed SimplifyDemandedBits and it's various callers
to assume we know nothing for scalable vectors and to ignore the
demanded bits completely. I have also done something similar for
SimplifyDemandedVectorElts. These changes fix up lots of warnings
due to calls to EVT::getVectorNumElements() for types with scalable
vectors. These functions are all used for optimisations, rather than
functional requirements. In future we can revisit this code if
there is a need to improve code quality for SVE.
Differential Revision: https://reviews.llvm.org/D80537
David Sherwood [Wed, 3 Jun 2020 14:02:44 +0000 (15:02 +0100)]
[CodeGen] Fix ComputeNumSignBits for scalable vectors
When trying to calculate the number of sign bits for scalable vectors
we should just bail out for now and pretend we know nothing.
Differential Revision: https://reviews.llvm.org/D81093
Haojian Wu [Tue, 16 Jun 2020 07:08:02 +0000 (09:08 +0200)]
[AST] Dump containsErrors bit for the Type.
Reviewers: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81912
Mehdi Amini [Fri, 19 Jun 2020 03:21:36 +0000 (03:21 +0000)]
Fix `check-mlir` target when the host target isn't configured
This patch adds the `default_triple` feature to MLIR test suite.
This feature was added to LLVM in
d178f4fc8 in order to be able to
run the LLVM tests without having the host targets configured in.
With this change, `ninja check-mlir` passes without the host
target, i.e. this config:
cmake ../llvm -DLLVM_TARGETS_TO_BUILD="" -DLLVM_DEFAULT_TARGET_TRIPLE="" -DLLVM_ENABLE_PROJECTS=mlir -GNinja
Differential Revision: https://reviews.llvm.org/D82142
Mehdi Amini [Fri, 19 Jun 2020 04:41:24 +0000 (04:41 +0000)]
Mark some LLVM tests which require a default_triple (NFC)
These tests involve a JIT, and like other tests should have the
REQUIRE: default_triple present.
This allow to run `ninja check` without the host target configured
in.