Guillaume Chatelet [Wed, 24 Jun 2020 21:52:52 +0000 (21:52 +0000)]
Revert "Use concrete natural type alignment for masked load/store operations instead of 0."
This reverts commit
39819ccd36b6dd61c9decd29df64fd4e8a7ee9ad.
Yuanfang Chen [Wed, 24 Jun 2020 02:52:58 +0000 (19:52 -0700)]
Remove Passes dependency on CodeGen
The dependency was introduced in
5134020ea62d1e1e125fdac48d251a26b80e9781. The only functional change
from this removal would be the new PM interface for the two codegen
passes. This is not necessary since we don't have codegen pipeline using
new PM yet. This removal is to break the potential circular dependency between
Passes and CodeGen once the codegen begins to gain new PM support.
Fangrui Song [Wed, 24 Jun 2020 21:39:54 +0000 (14:39 -0700)]
[TextAPI/MachO] Fix style issues. NFC
See https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Guillaume Chatelet [Wed, 24 Jun 2020 21:26:03 +0000 (21:26 +0000)]
Use concrete natural type alignment for masked load/store operations instead of 0.
Mitch Phillips [Wed, 24 Jun 2020 20:55:28 +0000 (13:55 -0700)]
Revert "[BitcodeReader] Fix DelayedShuffle handling for ConstantExpr shuffles."
Patch has a memory leak bug that broke the ASan buildbots. More info
available at: https://reviews.llvm.org/D80330
This reverts commit
b5740105d270a2d76da8812cafb63e4b799ada73.
Stefan Agner [Wed, 24 Jun 2020 19:50:17 +0000 (21:50 +0200)]
[ARM] Make cp10 and cp11 usage a warning
The ARM ARM considers p10/p11 valid arguments for MCR/MRC instructions.
MRC instructions with p10 arguments are also used in kernel code which
is shared for different architectures. Turn usage of p10/p11 to warnings
for ARMv7/ARMv8-M.
Reviewers: rengolin, olista01, t.p.northover, efriedma, psmith, simon_tatham
Reviewed By: simon_tatham
Subscribers: hiraditya, danielkiss, jcai19, tpimh, nickdesaulniers, peter.smith, javed.absar, kristof.beyls, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59733
Kirill Naumov [Thu, 11 Jun 2020 22:24:10 +0000 (22:24 +0000)]
[InlineCost] InlineCostAnnotationWriterPass introduced
This class allows to see the inliner's decisions for better
optimization verifications and tests. To use, use flag
"-passes="print<inline-cost>"".
This is the second attempt to integrate the patch.
The problem from the first try has been discussed and
fixed in D82205.
Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev
Reviewed By: mtrofin
Differential revision: https://reviews.llvm.org/D81743
Mehdi Amini [Wed, 24 Jun 2020 21:12:41 +0000 (21:12 +0000)]
Add a git hook script that can be manually setup to run some checks on every push
Right now it just catches arcanist noisy tags, and include a script to
automatically clean these.
Follow up on http://lists.llvm.org/pipermail/llvm-dev/2019-December/137848.html
Differential Revision: https://reviews.llvm.org/D80978
Amy Kwan [Wed, 24 Jun 2020 20:23:17 +0000 (15:23 -0500)]
[PowerPC][Power10] Implement Count Leading/Trailing Zeroes Builtins under bit Mask in LLVM/Clang
This patch implements builtins for the following prototypes:
unsigned long long __builtin_cntlzdm (unsigned long long, unsigned long long)
unsigned long long __builtin_cnttzdm (unsigned long long, unsigned long long)
vector unsigned long long vec_cntlzm (vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_cnttzm (vector unsigned long long, vector unsigned long long)
Differential Revision: https://reviews.llvm.org/D80941
Martin Storsjö [Wed, 24 Jun 2020 20:48:43 +0000 (23:48 +0300)]
[ProcessGDBRemote] Fix a typo in an ifdef from
58de2a3851391d
Fangrui Song [Wed, 24 Jun 2020 20:45:41 +0000 (13:45 -0700)]
[lld-macho] Remove using namespace llvm::MachO
llvm/include/llvm/TextAPI/MachO/ inappropriately uses the llvm::MachO namespace (this is for BinaryFormat and Object) and causes conflicts in some MSVC builds::
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/65324/steps/stage%201%20build/logs/stdio
Removing `using namespace llvm::MachO` should decrease name collisions.
Jinsong Ji [Wed, 24 Jun 2020 16:02:51 +0000 (16:02 +0000)]
[NFC][PowerPC] Fix some typos in MachineCombiner comments
Christopher Tetreault [Wed, 24 Jun 2020 20:27:38 +0000 (13:27 -0700)]
[SVE] Remove calls to VectorType::getNumElements from IPO
Reviewers: efriedma, jdoerfert, sdesmalen, kmclaughlin
Reviewed By: efriedma, jdoerfert
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82219
Davide Italiano [Wed, 24 Jun 2020 20:23:06 +0000 (13:23 -0700)]
[ProcessGDBRemote] Placate the Windows buildbot.
I'm probably going to rewrite this function anyway, but, in
the meanwhile.
dfukalov [Tue, 23 Jun 2020 13:07:44 +0000 (16:07 +0300)]
[NFCI][CostModel] Add const to Value*.
Summary:
Get back `const` partially lost in one of recent changes.
Additionally specify explicit qualifiers in few places.
Reviewers: samparker
Reviewed By: samparker
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82383
Raphael Isemann [Wed, 24 Jun 2020 18:28:00 +0000 (20:28 +0200)]
[lldb][NFC] Use expect_expr in TestStructTypes.py
Kirill Naumov [Fri, 19 Jun 2020 14:57:34 +0000 (14:57 +0000)]
[InlineCost] Added InlineCostCallAnalyzer::print()
For the upcoming changes, we need to have an ability to dump
InlineCostCallAnalyzer info in non-debug builds as well.
Reviewed-By: mtrofin
Differential Revision: https://reviews.llvm.org/D82205
Sanjay Patel [Wed, 24 Jun 2020 19:54:22 +0000 (15:54 -0400)]
[x86][AArch64] add tests for fmul-fma combine; NFC
As discussed in D80801, there's a possible overstep in
what is allowed by the 'contract' fast-math-flag.
Erich Keane [Wed, 24 Jun 2020 19:49:33 +0000 (12:49 -0700)]
Fix a pair of wtype-limits and 3 wparentheses warnings from
29125ddf1
weihe [Wed, 24 Jun 2020 19:43:27 +0000 (12:43 -0700)]
Add --hot-func-list to llvm-profdata show for sample profiles
Summary:
Add the --hot-func-list feature to llvm-profdata show for sample profiles. This feature prints a list of hot functions whose max sample count are above the 99% threshold, with their numbers of total samples, total samples percentage, max samples, entry samples, and their function names.
Test Plan:
Reviewers: wenlei, hoyFB
Reviewed By: wenlei, hoyFB
Subscribers: hoyFB, wenlei, weihe, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82355
Nigel Perks [Wed, 24 Jun 2020 19:20:29 +0000 (12:20 -0700)]
Fix crash on XCore on unused inline in EmitTargetMetadata
EmitTargetMetadata passed to emitTargetMD a null pointer as returned
from GetGlobalValue, for an unused inline function which has been
removed from the module at that point.
A FIXME in CodeGenModule.cpp commented that the calling code in
EmitTargetMetadata should be moved into the one target that needs it
(XCore). A review comment agreed. So the calling loop has been moved
into the XCore subclass. The check for null is done in that loop.
Differential Revision: https://reviews.llvm.org/D77068
Alexander Shaposhnikov [Wed, 24 Jun 2020 19:24:50 +0000 (12:24 -0700)]
[llvm-objcopy] Update help message tests
This diff merges help message tests for llvm-objcopy, llvm-strip and
llvm-install-name-tool.
Patch by Sameer Arora!
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D82012
Fangrui Song [Wed, 24 Jun 2020 19:22:13 +0000 (12:22 -0700)]
[lld-macho] Use namespace qualifiers (macho::) instead of `namespace lld { namespace macho {`
See https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Similar to D79982.
Reviewed By: #lld-macho, int3
Differential Revision: https://reviews.llvm.org/D82432
Davide Italiano [Wed, 24 Jun 2020 19:25:01 +0000 (12:25 -0700)]
[Apple Silicon] Debugging of process under Rosetta is supported.
Remove this early exit. It's vestigial from the ppc -> Intel transition,
but it doesn't apply anymore.
Davide Italiano [Wed, 24 Jun 2020 19:18:29 +0000 (12:18 -0700)]
[Apple Silicon] Initial support for Rosetta
Translated processes talk with a different debugserver, shipped with
macOS 11. This patch detects whether a process is translated and
attaches to the correct debugserver implementation.
It's the first patch of a series. Tested on the lldb test suite.
Differential Revision: https://reviews.llvm.org/D82491
Florian Hahn [Wed, 24 Jun 2020 16:04:45 +0000 (17:04 +0100)]
[SLP] Limit GEP lists based on width of index computation.
D68667 introduced a tighter limit to the number of GEPs to simplify
together. The limit was based on the vector element size of the pointer,
but the pointers themselves are not actually put in vectors.
IIUC we try to vectorize the index computations here, so we should base
the limit on the vector element size of the computation of the index.
This restores the test regression on AArch64 and also restores the
vectorization for a important pattern in SPEC2006/464.h264ref on
AArch64 (@test_i16_extend). We get a large benefit from doing a single
load up front and then processing the index computations in vectors.
Note that we could probably even further improve the AArch64 codegen, if
we would do zexts to i32 instead of i64 for the sub operands and then do
a single vector sext on the result of the subtractions. AArch64 provides
dedicated vector instructions to do so. Sketch of proof in Alive:
https://alive2.llvm.org/ce/z/A4xYAB
Reviewers: craig.topper, RKSimon, xbolva00, ABataev, spatel
Reviewed By: ABataev, spatel
Differential Revision: https://reviews.llvm.org/D82418
Vedant Kumar [Wed, 24 Jun 2020 18:51:16 +0000 (11:51 -0700)]
[docs] Fix typo
Joel E. Denny [Wed, 24 Jun 2020 18:49:23 +0000 (14:49 -0400)]
[FileCheck][NFC] Fix typo in test comment
Akira Hatanaka [Wed, 24 Jun 2020 18:46:38 +0000 (11:46 -0700)]
[ObjC] Copy a block to the heap if it is passed as a variadic argument
Call maybeExtendBlockObject in DefaultVariadicArgumentPromotion so that
the block is copied to the heap when it is passed as a variadic argument
to any calls, not only to C function calls.
rdar://problem/
64201532
Joel E. Denny [Wed, 24 Jun 2020 18:33:01 +0000 (14:33 -0400)]
[OpenMP][NFC] Remove hard-coded line numbers from test
Otherwise, it's painful to insert new code. There are many existing
examples in the same test file where the line numbers are not
hard-coded.
I intend to do the same for several other OpenMP tests, but I want to
be sure there are no objections before I spend time on it.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D82224
Simon Pilgrim [Wed, 24 Jun 2020 18:27:22 +0000 (19:27 +0100)]
InstCombineInternal.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
Simon Pilgrim [Wed, 24 Jun 2020 18:02:35 +0000 (19:02 +0100)]
Local.h - reduce includes to forward declarations. NFC.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
Joel E. Denny [Wed, 24 Jun 2020 18:18:08 +0000 (14:18 -0400)]
[OpenMP][Docs] Mark TR8 `present` as claimed in docs
Alexander Shaposhnikov [Wed, 24 Jun 2020 18:19:31 +0000 (11:19 -0700)]
[llvm-objcopy] Update help messages
This diff updates the help messages for llvm-objcopy, llvm-strip and
llvm-install-name-tool.
Patch by Sameer Arora!
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D81907
tatz.j@northeastern.edu [Wed, 24 Jun 2020 16:55:09 +0000 (09:55 -0700)]
[NVPTX] Fix for NVPTX module asm regression
Currently module asm ends up emitted twice and at the wrong place in the PTX.
This patch moves module asm generation into emitStartOfAsmFile() which puts at
the correct location in the generated PTX.
Differential Revision: https://reviews.llvm.org/D82280
Craig Topper [Wed, 24 Jun 2020 17:56:20 +0000 (10:56 -0700)]
[X86] Rename O3-pipeline.ll to opt-pipeline.ll and add O1/O2 command lines
Eric Cristopher asked me about possibly disabling some passes at
-O1/Og. Figured a good first step was to test all the pipelines.
They all appear to be the same for now. Hoping we can use FileCheck
prefixes for differences to avoid repeating the contents 3 times.
Walter Erquinigo [Wed, 24 Jun 2020 18:08:29 +0000 (11:08 -0700)]
Disable a flaky lldb-vscode test on aarch64
Summary:
These tests isflaky only on this arch for some reason. It's testing important features and is not flaky on x86_64, so I'll investigate this arm issue separatedly.
A flaky run:
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/5540/steps/test/logs/stdio
Diff that created those tests:
https://reviews.llvm.org/D81978
Teresa Johnson [Fri, 1 May 2020 15:16:38 +0000 (08:16 -0700)]
[WPD] Allow virtual calls to be analyzed with multiple type tests
Summary:
In D52514 I had fixed a bug with WPD after indirect call promotion, by
checking that a type test being analyzed dominates potential virtual
calls. With that fix I included a small effiency enhancement to avoid
processing a devirt candidate multiple times (when there are multiple
type tests). This latter change wasn't in response to any measured
efficiency issues, it was merely theoretical. Unfortuantely, it turns
out to limit optimization opportunities after inlining.
Specifically, consider code that looks like:
class A {
virtual void foo();
};
class B : public A {
void foo();
}
void callee(A *a) {
a->foo(); // Call 1
}
void caller(B *b) {
b->foo(); // Call 2
callee(b);
}
After inlining callee into caller, because of the existing call to
b->foo() in caller there will be 2 type tests in caller for the vtable
pointer of b: the original type test against B from Call 2, and the
inlined type test against A from Call 1. If the code was compiled with
-fstrict-vtable-pointers, then after optimization WPD will see that
both type tests are associated with the inlined virtual Call 1.
With my earlier change to only process a virtual call against one type
test, we may only consider virtual Call 1 against the base class A type
test, which can't be devirtualized. With my change here to remove this
restriction, it also gets considered for the type test against the
derived class B type test, where it can be devirtualized.
Note that if caller didn't include it's own earlier virtual call
b->foo() we will not be able to devirtualize after inlining callee even
after this fix, since there would not be a type test against B in the
IR. As a future enhancement we can consider inserting type tests at call
sites that pass pointers to classes with virtual calls, to enable
context-sensitive devirtualization after inlining.
Reviewers: pcc, vitalybuka, evgeny777
Subscribers: Prazek, hiraditya, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79235
Craig Topper [Wed, 24 Jun 2020 17:36:02 +0000 (10:36 -0700)]
[X86] Replace PROC macros with an enum and a lookup table of processor information.
This patch removes the PROC macro in favor of CPUKind enum and a
table that contains information about CPUs.
The current information in the table is the CPU name, CPUKind enum
value, key feature for target multiversioning, and Is64Bit capable.
For the strings that are aliases, I've duplicated the information
in the table. This means there are more rows in the table than
CPUKind enums.
This replaces multiple StringSwitch's with loops through the table.
They are linear searches due to the table being more logically
ordered than alphabetical. The StringSwitch's would have also been
linear. I've used StringLiteral on the strings in the table so we
can quickly check the length while searching.
I contemplated having a CPUKind for each string so there was a 1:1
mapping, but didn't want to spread more names to the places that
use the enum.
My ultimate goal here is to store the features for each CPU as a
bitset within the table. Hoping to use constexpr to make this
composable so we can group features and inherit them. After the
table lookup we can turn the bitset into a list of strings for the
frontend. The current switch we have for selecting features for
CPUs has become difficult to maintain while trying to express
inheritance relationships.
Differential Revision: https://reviews.llvm.org/D82414
Michael Liao [Wed, 24 Jun 2020 17:12:52 +0000 (13:12 -0400)]
Fix coding style. NFC.
- Remove `else` after `return`.
LLVM GN Syncbot [Wed, 24 Jun 2020 17:05:39 +0000 (17:05 +0000)]
[gn build] Port
29125ddf132
Daniel Grumberg [Mon, 11 May 2020 10:42:38 +0000 (11:42 +0100)]
Start adding support for generating CC1 command lines from CompilerInvocation
This change includes the following:
- Add additional information in the relevant table-gen files to encode
the necessary information to automatically parse the argument into a
CompilerInvocation instance and to generate the appropriate command
line argument from a CompilerInvocation instance.
- Extend OptParserEmitter to emit the necessary macro tables as well as
constant tables to support parsing and generating command line
arguments for options that provide the necessary information.
- Port some options to use this new system for parsing and generating
command line arguments.
Differential Revision: https://reviews.llvm.org/D79796
LLVM GN Syncbot [Wed, 24 Jun 2020 17:00:19 +0000 (17:00 +0000)]
[gn build] Port
4fb2116ee7f
Nico Weber [Wed, 24 Jun 2020 16:59:59 +0000 (12:59 -0400)]
[gn build] (manually) port
bdceefe95ba6a
Simon Pilgrim [Wed, 24 Jun 2020 16:38:56 +0000 (17:38 +0100)]
LoopUtils.h - reduce AliasAnalysis.h include to forward declarations. NFC.
Fix implicit include dependencies in source files and replace legacy AliasAnalysis typedef with AAResults where necessary.
Uday Bondhugula [Tue, 23 Jun 2020 20:52:03 +0000 (02:22 +0530)]
[MLIR] Fix affine loop fusion private memref alloc
Drop stale code that provided the wrong operands to alloc.
Reported-by: rjnw on discourse
Differential Revision: https://reviews.llvm.org/D82409
Yitzhak Mandelbaum [Fri, 19 Jun 2020 16:47:12 +0000 (16:47 +0000)]
[libTooling] Delete deprecated `Stencil` combinators.
Summary: Deletes `text()` and `selection()` combinators, since they have been deprecated for months.
Reviewers: tdl-g
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82225
Jonas Devlieghere [Wed, 24 Jun 2020 16:40:44 +0000 (09:40 -0700)]
[llvm] Remove full stop frome error message
Address post-commit feedback from James Henderson in D80959.
Mircea Trofin [Wed, 24 Jun 2020 16:37:15 +0000 (09:37 -0700)]
Revert "[llvm] Added support for stand-alone cmake object libraries."
This reverts commit
62841415e685fe8857f75edd1fa92b7d1d08b875.
The commit is a misnomer, and it "made its way in" unintentionally,
through a patch that had it as a depdendency. The change itself ended up
to be just a comment update, but the description is completely wrong.
Ye Luo [Wed, 24 Jun 2020 16:18:00 +0000 (12:18 -0400)]
[OpenMP] Adopt std::set in HostDataToTargetMap
Summary:
lookupMapping took significant time due to linear complexity searching.
This is bad for offloading from multiple host threads because lookupMapping is protected by mutex.
Use std::set for logarithmic complexity searching.
Before my change.
libomptarget inclusive time 16.7 sec, exclusive time 8.6 sec.
After the change
libomptarget inclusive time 7.3 sec, exclusive time 0.4 sec.
Most of the overhead of libomptarget (exclusive time) is gone.
Reviewers: jdoerfert, grokos
Reviewed By: grokos
Subscribers: tianshilei1992, yaxunl, guansong, sstefan1
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D82264
Erik Pilkington [Wed, 24 Jun 2020 16:11:39 +0000 (12:11 -0400)]
[SemaObjC] Fix a crash on invalid when 'auto' is used in a @property
rdar://
48506879
Matt Arsenault [Sat, 6 Jun 2020 23:37:43 +0000 (19:37 -0400)]
GlobalISel: Add unit tests for some utils functions
The test constants were originally constexpr, but this apparently
crashes old versions of gcc.
Florian Hahn [Tue, 23 Jun 2020 22:07:16 +0000 (23:07 +0100)]
[SLP] Precommit short load / wide math test for AArch64.
This pattern is key to eliminate a 10% performance regression in
SPEC2006.
Walter Erquinigo [Wed, 24 Jun 2020 15:54:13 +0000 (08:54 -0700)]
Disable flaky lldb-vscode tests on aarch64
Summary:
These two tests are flaky only on this arch for some reason. They are testing important features and are not flaky on x86_64, so I'll investigate this arm issue separatedly.
Some flaky runs:
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/5517/steps/test/logs/stdio
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/5527/steps/test/logs/stdio
Diff that created those tests:
https://reviews.llvm.org/D81978
dstuttar [Tue, 23 Jun 2020 16:47:58 +0000 (17:47 +0100)]
[AMDGPU] Make sure to fix implicit operands on insertBranch
Summary:
Without fixImplicitOperands we may end up creating default implicit operands
that are the wrong wave size
Includes simple test that provokes insertBranch in the correct way to expose the
issue being fixed.
Change-Id: I92bdcdee9fcb7b4d91529b84e76a48ac8218483e
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82459
Matt Arsenault [Wed, 17 Jun 2020 01:38:29 +0000 (21:38 -0400)]
AMDGPU/GlobalISel: Legalize 64-bit G_SDIV/G_SREM
Now all the divisions should be complete, although we should fix
emitting the entire common part for div/rem when you use both.
Matt Arsenault [Wed, 24 Jun 2020 15:12:02 +0000 (11:12 -0400)]
AMDGPU/GlobalISel: Invert parameter for div/rem lowering function
Kadir Cetinkaya [Mon, 22 Jun 2020 19:53:47 +0000 (21:53 +0200)]
[clangd] Disable printing of Value for tag-types on hover
Summary: This is both confusing and crashy.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82326
Ikhlas Ajbar [Mon, 22 Jun 2020 21:03:22 +0000 (16:03 -0500)]
[Hexagon] Reducing minimum alignment requirement
This patch reduces minimum alignment requirement to 1 byte for arguments
passed by value on stack.
Fangrui Song [Wed, 24 Jun 2020 15:22:17 +0000 (08:22 -0700)]
[ELF] -r: don't parse @ (symbol versioning) for .symver inline asm in bitcode
Fixes PR46420
Similar to D43307 for non-LTO.
Module-level inline assembly can use .symver to create a symbol with `@` in the name.
For relocatable output, @ should be retained in the symbol name. `@ver` should
not be parsed and dropped.
Reviewed By: grimar, psmith
Differential Revision: https://reviews.llvm.org/D82433
Matt Arsenault [Wed, 24 Jun 2020 14:27:23 +0000 (10:27 -0400)]
Revert "[AMDGPU] Enable compare operations to be selected by divergence"
This reverts commit
521ac0b5cea02f629d035f807460affbb65ae7ad.
Reported to break thousands of piglit tests.
Arthur Eubanks [Tue, 23 Jun 2020 23:11:59 +0000 (16:11 -0700)]
[NewPM] Add SimpleLoopUnswitchPass to PassRegistry.def
Summary:
Seems to just be missing from PassRegistry.def.
Makes the number of check-llvm failures under new PM go from 2619 to 2581.
Reviewers: hans, ychen, asbirlea, leonardchan
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82422
Arthur Eubanks [Tue, 23 Jun 2020 23:11:59 +0000 (16:11 -0700)]
[NewPM] Handle -simplifycfg in opt
Summary:
-simplifycfg is the legacy pass name for SimplifyCFGPass.
There is already -simplify-cfg in FUNCTION_PASS_WITH_PARAMS which
handles options for SimplifyCFGPass. Maybe that should be renamed to
-simplifycfg as well?
This reduces the number of check-llvm failures under NewPM from 2619 to 2392.
Reviewers: hans, leonardchan, asbirlea, ychen
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82421
Mircea Trofin [Tue, 9 Jun 2020 21:50:50 +0000 (14:50 -0700)]
[llvm] Release-mode ML InlineAdvisor
Summary:
This implementation uses a pre-trained model which is statically
compiled into a native function.
RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html
Reviewers: davidxl, jdoerfert, dblaikie
Subscribers: mgorny, eraman, hiraditya, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81515
Mircea Trofin [Tue, 9 Jun 2020 19:44:07 +0000 (12:44 -0700)]
[llvm] Added support for stand-alone cmake object libraries.
Summary:
Currently, add_llvm_library would create an OBJECT library alongside
of a STATIC / SHARED library, but losing the link interface (its
elements would become dependencies instead). To support scenarios
where linking an object library also brings in its usage
requirements, this patch adds support for 'stand-alone' OBJECT
libraries - i.e. without an accompanying SHARED/STATIC library, and
maintaining the link interface defined by the user.
This is useful for cases where, for example, we want to build a part
of a component separately. Using a STATIC target would incur the risk
that symbols not referenced in the consumer would be dropped (which may
be undesirable).
The current application is the ML part of Analysis. It should be part
of the Analysis component, so it may reference other analyses; and (in
upcoming changes) it has dependencies on optional libraries.
Reviewers: karies, davidxl, beanz, phosek, smeenai
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81447
Sanjay Patel [Wed, 24 Jun 2020 14:11:18 +0000 (10:11 -0400)]
[VectorCombine] give invalid index value a name; NFC
Sanjay Patel [Tue, 23 Jun 2020 16:12:54 +0000 (12:12 -0400)]
[VectorCombine] add tests for extract + cmp + binop; NFC
Matt Arsenault [Thu, 18 Jun 2020 14:32:32 +0000 (10:32 -0400)]
WebAssembly: Don't store MachineFunction in MachineFunctionInfo
Soon it will be disallowed to depend on MachineFunction state in the
constructor. This was only being used to get the MachineRegisterInfo
for an assert, which I'm not sure is necessarily worth it. I would
think any missing defs would be caught by the verifier later instead.
Simon Pilgrim [Wed, 24 Jun 2020 14:12:11 +0000 (15:12 +0100)]
Cloning.h - reduce AliasAnalysis.h include to forward declarations. NFC.
Fix implicit include dependencies in source files.
Haojian Wu [Wed, 24 Jun 2020 14:14:34 +0000 (16:14 +0200)]
[AST][RecoveryExpr] Add error-bit TemplateArgument
Summary: We are missing the error-bit somehow if the error-bit is propagated
through the code path: "error type/expr" -> "template argument" ->
"template specialization type", which will lead to crashes.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82102
Pavel Labath [Wed, 24 Jun 2020 13:26:42 +0000 (15:26 +0200)]
[lldb] Refactor Scalar::TruncOrExtendTo
The "type" argument to the function is mostly useless -- the only
interesting aspect of it is signedness. Pass signedness directly and
compute the value of bits and signedness fields -- that's exactly
what the single caller of this function does.
Tim Corringham [Fri, 19 Jun 2020 17:23:56 +0000 (18:23 +0100)]
[AMDGPU] Avoid redundant mode register writes
Summary:
The SIModeRegister pass attempts to generate the minimal number of
writes to the mode register. However it was failing to correctly
deal with some loops, resulting in some redundant setreg instructions
being inserted.
This change amends the pass to avoid generating these redundant
instructions.
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82215
Florian Hahn [Wed, 24 Jun 2020 13:02:09 +0000 (14:02 +0100)]
[DSE,MSSA] Add missing -enable-dse-memoryssa flag to test.
Georgii Rymar [Wed, 24 Jun 2020 10:23:04 +0000 (13:23 +0300)]
[llvm-readobj] - Don't crash when a broken GNU hash table is dumped with --hash-symbols.
Start using the `checkGNUHashTable` helper which was recently introduced to report
a proper warning when a GNU hash table goes past the end of the file.
Differential revision: https://reviews.llvm.org/D82449
Simon Pilgrim [Wed, 24 Jun 2020 12:17:44 +0000 (13:17 +0100)]
Loads.h - reduce AliasAnalysis.h include to forward declarations. NFC.
Fix implicit include dependencies in source files.
Stefan Pintilie [Wed, 24 Jun 2020 12:40:35 +0000 (07:40 -0500)]
[LLD][PowerPC] Add support for R_PPC64_GOT_PCREL34
Add support for the 34bit relocation R_PPC64_GOT_PCREL34 for
PC Relative in LLD.
Reviewers: sfertile, MaskRay
Differential Revision: https://reviews.llvm.org/D81948
Florian Hahn [Wed, 24 Jun 2020 08:56:35 +0000 (09:56 +0100)]
[DSE] Eliminate stores at the end of the function.
This patch add support for eliminating MemoryDefs that do not have any
aliasing users, which indicates that there are no reads/writes to the
memory location until the end of the function.
To eliminate such defs, we have to ensure that the underlying object is
not visible in the caller and does not escape via returning. We need a
separate check for that, as InvisibleToCaller does not consider returns.
Reviewers: dmgreen, rnk, efriedma, bryant, asbirlea, Tyker, george.burgess.iv
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D72631
sstefan1 [Fri, 19 Jun 2020 14:51:35 +0000 (16:51 +0200)]
[OpenMPOpt] ICV macro definitions
Summary:
This defines some basic information about ICVs in `OMPKinds.def`.
We also emit remarks with initial values for each function (which are default for now)
as a way to test this.
Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6
Subscribers: yaxunl, hiraditya, guansong, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82193
Joachim Protze [Wed, 24 Jun 2020 11:42:00 +0000 (13:42 +0200)]
[OpenMP] NFC: Create OpenMP release notes file
Simon Pilgrim [Wed, 24 Jun 2020 11:22:07 +0000 (12:22 +0100)]
ObjCARC.h - remove unnecessary includes. NFC.
Add implicit InstIterator.h dependency in ObjCARCContract.cpp
Simon Pilgrim [Wed, 24 Jun 2020 10:48:17 +0000 (11:48 +0100)]
StackLifetime.h - remove unused AliasAnalysis.h include. NFC.
Alex Richardson [Tue, 23 Jun 2020 16:31:47 +0000 (17:31 +0100)]
Don't install clang-import-test
I have been trying to reduce the installed size of our CHERI toolchain and
noticed that this tool was being installed even with -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON.
This appears to be a test binary that should not be installed.
Reviewed By: v.g.vassilev
Differential Revision: https://reviews.llvm.org/D82169
Krasimir Georgiev [Wed, 24 Jun 2020 10:55:05 +0000 (12:55 +0200)]
[clang-format] restore indent in conditionals when AlignOperands is DontAlign
Summary:
After D50078, we're experiencing unexpected un-indent using a style combining `AlignOperands: DontAlign` with `BreakBeforeTernaryOperators: false`, such as Google's JavaScript style:
```
% bin/clang-format -style=google ~/test.js
aaaaaaaaaaa =
bbbbbbbb ?
cccccccccccccccccc() :
dddddddddd ?
eeeeeeeeeeeeee :
fffff;
```
The issue lies with the interaction of `AlignOperands: DontAlign` and the edited code section in ContinuationIndenter.cpp, which de-dents the intent by `Style.ContinuationIndentWidth`. From [[ https://github.com/llvm/llvm-project/blob/
ac3e5c4d93fbe7fb2db3c745c721aff41cc1b851/clang/include/clang/Format/Format.h#L170 | the documentation ]] of AlignOperands: DontAlign:
> The wrapped lines are indented `ContinuationIndentWidth` spaces from the start of the line.
So the de-dent effectively erases the necessary `ContinuationIndentWidth` in that case.
This patch restores the `AlignOperands: DontAlign` behavior, producing:
```
% bin/clang-format -style=google ~/test.js
aaaaaaaaaaa =
bbbbbbbb ?
cccccccccccccccccc() :
dddddddddd ?
eeeeeeeeeeeeee :
fffff;
```
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82199
Georgii Rymar [Tue, 23 Jun 2020 12:55:17 +0000 (15:55 +0300)]
[llvm-readelf] - Don't crash when e_shstrndx==SHN_XINDEX, but there is no section header.
Currently we crash when trying to print --sections and the SHN_XINDEX escape value
is used for the e_shstrndx field, but there is no section header at index 0 to
read the value from.
Differential revision: https://reviews.llvm.org/D82374
Christian Kandeler [Wed, 24 Jun 2020 10:56:45 +0000 (11:56 +0100)]
[libclang] Extend clang_Cursor_Evaluate().
Let this function (try to) evaluate expressions, in addition to
declarations and compound statements.
Patch by Christian Kandeler <christian.kandeler@qt.io>
Reviewers: nik, akyrtzi, arphaman, jkorous
Reviewed By: jkorous
Differential Revision: https://reviews.llvm.org/D80279
Cullen Rhodes [Fri, 19 Jun 2020 10:50:38 +0000 (10:50 +0000)]
[AArch64][SVE2] Add bfloat16 support to whilerw/whilewr intrinsics
Reviewed By: fpetrogalli
Differential Revision: https://reviews.llvm.org/D82399
Cullen Rhodes [Fri, 19 Jun 2020 09:37:14 +0000 (09:37 +0000)]
[AArch64][SVE] Add bfloat16 support to svlen intrinsic
Reviewed By: fpetrogalli
Differential Revision: https://reviews.llvm.org/D82186
Cullen Rhodes [Thu, 18 Jun 2020 17:25:18 +0000 (17:25 +0000)]
[AArch64][SVE] Add bfloat16 support to perm and select intrinsics
Summary:
Added for following intrinsics:
* zip1, zip2, zip1q, zip2q
* trn1, trn2, trn1q, trn2q
* uzp1, uzp2, uzp1q, uzp2q
* splice
* rev
* sel
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D82182
Kerry McLaughlin [Wed, 24 Jun 2020 08:47:49 +0000 (09:47 +0100)]
[AArch64][SVE] Add bfloat16 support to load intrinsics
Summary:
Bfloat16 support added for the following intrinsics:
- LD1
- LD1RQ
- LDNT1
- LDNF1
- LDFF1
Reviewers: sdesmalen, c-rhodes, efriedma, stuij, fpetrogalli, david-arm
Reviewed By: fpetrogalli
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82298
Victor Campos [Mon, 15 Jun 2020 14:54:15 +0000 (15:54 +0100)]
[ARM] Improve diagnostics message when Neon is unsupported
Summary:
Whenever Neon is not supported, a generic message is printed:
error: "NEON support not enabled"
Followed by a series of other error messages that are not useful once
the first one is printed.
This patch gives a more precise message in the case where Neon is
unsupported because an invalid float ABI was specified: the soft float
ABI.
error: "NEON intrinsics not available with the soft-float ABI. Please
use -mfloat-abi=softfp or -mfloat-abi=hard"
This message is the same one that GCC gives, so it is also making their
diagnostics more compatible with each other.
Also, by rearranging preprocessor directives, these "unsupported" error
messages are now the only ones printed out, which is also GCC's
behaviour.
Differential Revision: https://reviews.llvm.org/D81847
Konrad Kleine [Wed, 24 Jun 2020 09:17:36 +0000 (05:17 -0400)]
[lldb] fix typo in docs: withing -> within
Florian Hahn [Wed, 24 Jun 2020 09:16:26 +0000 (10:16 +0100)]
[DSE,MSSA] Precommit small test changes for D72631.
alex-t [Fri, 19 Jun 2020 14:51:54 +0000 (17:51 +0300)]
[AMDGPU] Enable compare operations to be selected by divergence
Summary: Details: This patch enables SETCC to be selected to S_CMP_* if uniform and V_CMP_* if divergent.
Reviewers: rampitec, arsenm
Reviewed By: rampitec
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82194
Simon Tatham [Tue, 23 Jun 2020 16:29:40 +0000 (17:29 +0100)]
[ARM][BFloat] Legalize bf16 type even without fullfp16.
Summary:
This change permits scalar bfloats to be loaded, stored, moved and
used as function call arguments and return values, whenever the bf16
feature is supported by the subtarget.
Previously that was only supported in the presence of the fullfp16
feature, because the code generation strategy depended on instructions
from that extension. This change adds alternative code generation
strategies so that those operations can be done even without fullfp16.
The strategy for loads and stores is to replace VLDRH/VSTRH with
integer LDRH/STRH plus a move between register classes. I've written
isel patterns for those, conditional on //not// having the fullfp16
feature (so that in the fullfp16 case, the existing patterns will
still be used).
For function arguments and returns, instead of writing isel patterns
to match `VMOVhr` and `VMOVrh`, I've avoided generating those SDNodes
in the first place, by factoring out the code that constructs them
into helper functions `MoveToHPR` and `MoveFromHPR` which have a
fallback for non-fullfp16 subtargets.
The current output code is not especially pretty: in the new test file
you can see unnecessary store/load pairs implementing no-op bitcasts,
and lots of pointless moves back and forth between FP registers and
GPRs. But it at least works, which is an improvement on the previous
situation.
Reviewers: dmgreen, SjoerdMeijer, stuij, chill, miyuki, labrinea
Reviewed By: dmgreen, labrinea
Subscribers: labrinea, kristof.beyls, hiraditya, danielkiss, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82372
Haojian Wu [Wed, 24 Jun 2020 08:19:36 +0000 (10:19 +0200)]
[AST][RecoveryExpr] Populate error-bit from Type to Expr.
Summary: Looks like this is a fallout when we introduce the error-bit in Type.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82099
LLVM GN Syncbot [Wed, 24 Jun 2020 08:17:48 +0000 (08:17 +0000)]
[gn build] Port
96d4ccf00c8
Haojian Wu [Wed, 24 Jun 2020 08:02:06 +0000 (10:02 +0200)]
[AST][RecoveryExpr] Fix a crash: don't attach error-type base specifiers.
Summary:
otherwise we'll run into code path which expects a good base specifiers,
and lead to crashes.
The crash only occurs in template instantiations (in non-template case,
the bad base specifiers are dropped during parsing.)
crash stacktrace:
```
clang: llvm-project/clang/lib/Sema/SemaInit.cpp:7864: clang::ExprResult clang::InitializationSequence::Perform(clang::Sema &, const clang::InitializedEntity &, const clang::InitializationKind &, clang::MultiExprArg, clang::QualType *): Assertion `Kind.getKind() == InitializationKind::IK_Copy || Kind.isExplicitCast() || Kind.getKind() == InitializationKind::IK_DirectList' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
```
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82086
Kazushi (Jam) Marukawa [Wed, 24 Jun 2020 08:11:59 +0000 (10:11 +0200)]
[VE] Clang toolchain for VE
Summary:
This patch enables compilation of C code for the VE target with Clang.
Differential Revision: https://reviews.llvm.org/D79411
Siva Chandra [Wed, 24 Jun 2020 07:16:23 +0000 (00:16 -0700)]
[libc] Enable copysignl, frexpl, logbl and modfl on aarch64.
Craig Topper [Wed, 24 Jun 2020 07:10:36 +0000 (00:10 -0700)]
[X86] Speculatively fix to X86AvoidStoreForwardingBlocks not deference a machine mem operand if there isn't one present.
Eric Christopher informed me that FastISel memcpy handling creates
load/store instructions without mem operands. We should fix that,
but I doubt that's the only case of missed mem operands so seems
better to be defensive here.
I don't have a test case yet, but I'll try to add one if i get a
test from Eric.