Simon Pilgrim [Thu, 21 May 2020 16:12:15 +0000 (17:12 +0100)]
MILexer.h/cpp - remove unused includes. NFC.
Remove duplicates in MILexer.cpp that are already included in MILexer.h.
Raphael Isemann [Fri, 22 May 2020 09:42:32 +0000 (11:42 +0200)]
[lldb] Enable C++14 when evaluating expressions in a C++14 frame
Summary:
Currently we never enable C++14 in the expression evaluator. This enables it when the language of the program is C++14.
It seems C++17 and so on isn't yet in any of the language enums (and the DWARF standard it seems), so C++17 support will be a follow up patch.
Reviewers: labath, JDevlieghere
Reviewed By: labath, JDevlieghere
Subscribers: aprantl
Differential Revision: https://reviews.llvm.org/D80308
Raphael Isemann [Fri, 22 May 2020 07:36:37 +0000 (09:36 +0200)]
[lldb][NFC] Overload raw_ostream operator << for ConstString
Summary: We are not doing this very often, but sometimes it's convenient when I can just << ConstStrings into llvm::errs() during testing.
Reviewers: labath, JDevlieghere
Reviewed By: labath, JDevlieghere
Subscribers: JDevlieghere
Differential Revision: https://reviews.llvm.org/D80310
Roman Lebedev [Thu, 21 May 2020 15:11:03 +0000 (18:11 +0300)]
[NFC] InstCombineNegator: use auto where type is obvious from the cast
Max Kazantsev [Fri, 22 May 2020 07:32:21 +0000 (14:32 +0700)]
[InstCombine] Sink pure instructions down to return and unreachable blocks
If the only user of `Instr` is in a return or unreachable block, we can
sink `Instr` to the`User` safely (unless it reads/writes memory).
Return or unreachable blocks are guaranteed to execute zero
or one time, and `Instr` always dominates `User`, so they either will
be executed together (execution of `User` always implies execution
of `Instr`) or not executed at all.
Differential Revision: https://reviews.llvm.org/D80120
Reviewed By: asbirlea, jdoerfert
Jonas Devlieghere [Fri, 22 May 2020 06:22:16 +0000 (23:22 -0700)]
[lldb/REPL] Fix unhandled switch case
Fix warning: enumeration value 'eExpressionThreadVanished' not handled
in switch [-Wswitch]
LLVM GN Syncbot [Fri, 22 May 2020 04:58:19 +0000 (04:58 +0000)]
[gn build] Port
2e40cf06df0
Craig Topper [Fri, 22 May 2020 01:16:02 +0000 (18:16 -0700)]
[X86] Allow avx512vp2intersect to be used with __builtin_cpu_supports.
compiler-rt and trunk libgcc support this now.
Craig Topper [Fri, 22 May 2020 01:12:21 +0000 (18:12 -0700)]
[X86] Add avx512vp2intersect feature to compiler-rt's feature detection to match libgcc.
Lang Hames [Fri, 22 May 2020 04:44:00 +0000 (21:44 -0700)]
[JITLink] Initial implementation of ELF / x86-64 support for JITLink.
This initial implementation supports section and symbol parsing, but no
relocation support. It enables JITLink to link and execute ELF relocatable
objects that do not require relocations.
Patch by Jared Wyles. Thanks Jared!
Differential Revision: https://reviews.llvm.org/D79832
ISHIGURO, Hiroshi [Fri, 22 May 2020 02:34:49 +0000 (11:34 +0900)]
[OPENMP] Fix mixture of omp and clang pragmas
Fixes PR45753
When a program that contains a loop to which both `omp parallel for`
pragma and `clang loop` pragma are associated is compiled with the
-fopenmp option, `clang loop` pragma did not take effect. The example
below should not be vectorized by the `clang loop` pragma but it was
actually vectorized. The cause is that `llvm.loop.vectorize.width`
was not output to the IR when -fopenmp is specified.
The fix attaches attributes if they exist for the loop.
[example.c]
```
int a[100], b[100];
void foo() {
#pragma omp parallel for
#pragma clang loop vectorize(disable)
for (int i = 0; i < 100; i++)
a[i] += b[i] * i;
}
```
[compile]
```
$ clang -O2 -fopenmp example.c -c -Rpass=vect
example.c:3:11: remark: vectorized loop (vectorization width: 4, interleaved count: 2) [-Rpass=loop-vectorize]
#pragma omp parallel for
^
```
[IR with -fopenmp]
```
$ clang -O2 exmaple.c -S -emit-llvm -mllvm -disable-llvm-optzns -o - -fopenmp | grep 'vectorize\.width'
```
[IR with -fno-openmp]
```
$ clang -O2 example.c -S -emit-llvm -mllvm -disable-llvm-optzns -o - -fno-openmp | grep 'vectorize\.width'
!7 = !{!"llvm.loop.vectorize.width", i32 1}
```
Differential Revision: https://reviews.llvm.org/D79921
Jinsong Ji [Fri, 22 May 2020 03:10:34 +0000 (03:10 +0000)]
[docs][llvm-extract] Add missing alias/bb options
llvm-extract get serveral new options, but we forgot to update doc.
This patch update the doc.
Reviewed By: volkan
Differential Revision: https://reviews.llvm.org/D80413
Jonas Devlieghere [Fri, 22 May 2020 03:36:39 +0000 (20:36 -0700)]
[lldb/Reproducers] Skip test that changes the source file while debugging
The VFS is a snapshot and cannot capture changes to the file system.
Jonas Devlieghere [Fri, 22 May 2020 03:34:39 +0000 (20:34 -0700)]
[lldb/Test] Fix replay with TestSetWatchpoint.py
The reproducers only track the creation of objects and not their
destruction. Therefore it keeps all objects alive indefinitely.
Nico Weber [Fri, 22 May 2020 03:04:41 +0000 (23:04 -0400)]
[gn build] (manually) port
49a4f3f7d88
Jessica Paquette [Fri, 22 May 2020 01:05:37 +0000 (18:05 -0700)]
[AArch64][GlobalISel] Add a post-legalizer combiner with a very simple combine.
(This patch is by Jessica, I'm just committing it on her behalf because I need
a post-legalizer combiner for something else).
This supersedes D77250, which did equivalent work in the selector. This can be
done pre-legalization or post-legalization. Post-legalization is more likely to
hit, since G_IMPLICIT_DEFs tend to appear during legalization. There's no reason
to not do it pre-legalization though-- if it can be caught earlier, great.
(I also think that it might be worth reimplementing D78769 using a
target-specific post-legalization combine too after thinking about it for a
while.)
Differential Revision: https://reviews.llvm.org/D78852
Paula Toth [Fri, 22 May 2020 00:39:03 +0000 (17:39 -0700)]
[libc] Make clang-tidy use host compiler's resource dir.
Summary: When building llvm-libc with linting enabled, clang-tidy would use the resource dir of the monorepo rather then the host compiler's resource dir. This presented issues when including headers from the host compiler e.g. for sanitizers. Therefore this patch explicitly tells clang-tidy to use the host compiler's resource dir.
Reviewers: sivachandra
Reviewed By: sivachandra
Subscribers: mgorny, tschuett, ecnelises, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D80265
Jim Ingham [Fri, 22 May 2020 01:38:49 +0000 (18:38 -0700)]
Maybe I need ENABLE_THREADS in the Makefile.
Jim Ingham [Fri, 22 May 2020 01:26:01 +0000 (18:26 -0700)]
This very simple .c file is failing on the Debian bot wit the error
undefined reference to pthread_create
I skipped the test till I can figure out why this didn't build.
Dominic Chen [Thu, 21 May 2020 00:05:40 +0000 (20:05 -0400)]
[llvm-extract] Fix basic block extraction by delaying search until the function is materialized
Summary: When I try to extract a basic block using llvm-extract, it erroneously reports that the named basic block doesn't exist. After digging into the code, it appears to be iterating over an unmaterialized function, which will fail to match any basic blocks.
Reviewers: volkan, qcolombet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80346
Jim Ingham [Thu, 21 May 2020 01:00:56 +0000 (18:00 -0700)]
Handle the case where a thread exits while we are running a function on it.
Tony [Thu, 21 May 2020 21:20:06 +0000 (17:20 -0400)]
[AMDGPU] Correct formatting typos in documentation
Summary:
- Correct missing space in some "note" and "TODO" directives in
AMDGPUUsage.rst
- Correct warning for heading underline being too short in
BitCodeFormat.rst
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80407
Jonas Devlieghere [Fri, 22 May 2020 00:31:51 +0000 (17:31 -0700)]
[lldb/Test] Cleanup TestSymbolContext.py
Remove commented out code, fix the indentation and always use the full
path to the executable. The latter is necessary for the test to pass
from reproducer replay.
Heejin Ahn [Thu, 21 May 2020 06:02:41 +0000 (23:02 -0700)]
[WebAssembly] Warn on exception spec only when Wasm EH is used
Summary:
In D80061 we added warning for exception specifications with types (such
as `throw(int)`), but it was enabled every time the target was wasm,
which means it warned (and ignored) exception specifications even if
wasm EH was not used. This fixes it and we only have the warning when we
enable `-fwasm-exceptions`.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80362
Zequan Wu [Thu, 21 May 2020 23:44:30 +0000 (16:44 -0700)]
[clang] Add nomerge function attribute to clang
Differential Revision: https://reviews.llvm.org/D79121
Jonas Devlieghere [Thu, 21 May 2020 21:52:12 +0000 (14:52 -0700)]
[lldb/Reproducers] Skip lldb-vscode category when lldb-run-with-repro is set.
This skips all the lldb-vscode tests when running the test suite with
reproducers.
LLVM GN Syncbot [Thu, 21 May 2020 23:43:28 +0000 (23:43 +0000)]
[gn build] Port
54e91a3c701
Jan Korous [Thu, 21 May 2020 21:37:41 +0000 (14:37 -0700)]
Reland "[Analyzer][WebKit] RefCntblBaseVirtualDtorChecker"
This reverts commit
1108f5c737dbdab0277874a7e5b237491839c43a.
Adrian Prantl [Thu, 21 May 2020 23:22:01 +0000 (16:22 -0700)]
Rename FunctionOptimizationWarning to the more generic FrameSelectedCallback (NFC)
Zequan Wu [Thu, 21 May 2020 23:12:03 +0000 (16:12 -0700)]
Revert "Add nomerge function attribute to clang"
This reverts commit
307e85395485e1eff9533b2d7952b16f33ceae38.
Vedant Kumar [Wed, 20 May 2020 01:03:22 +0000 (18:03 -0700)]
[Instruction] Set metadata uses to undef on deletion
Summary:
Replace any extant metadata uses of a dying instruction with undef to
preserve debug info accuracy. Some alternatives include:
- Treat Instruction like any other Value, and point its extant metadata
uses to an empty ValueAsMetadata node. This makes extant dbg.value uses
trivially dead (i.e. fair game for deletion in many passes), leading to
stale dbg.values being in effect for too long.
- Call salvageDebugInfoOrMarkUndef. Not needed to make instruction removal
correct. OTOH results in wasted work in some common cases (e.g. when all
instructions in a BasicBlock are deleted).
This came up while discussing some basic cases in
https://reviews.llvm.org/D80052.
Reviewers: jmorse, TWeaver, aprantl, dexonsmith, jdoerfert
Subscribers: jholewinski, qcolombet, hiraditya, jfb, sstefan1, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80264
Alexey Lapshin [Wed, 20 May 2020 18:45:39 +0000 (21:45 +0300)]
[AARCH64][NEON] Allow to sink operands of aarch64_neon_pmull64.
Summary:
This patch fixes a problem when pmull2 instruction is not
generated for vmull_high_p64 intrinsic.
ISel has a pattern for int_aarch64_neon_pmull64 intrinsic to generate
PMULL2 instruction. That pattern assumes that extraction operations
are located in the same basic block. We need to sink them
if they are not. Handle operands of int_aarch64_neon_pmull64
into AArch64TargetLowering::shouldSinkOperands.
Reviewed by: efriedma
Differential Revision: https://reviews.llvm.org/D80320
Zequan Wu [Fri, 8 May 2020 18:36:34 +0000 (11:36 -0700)]
Add nomerge function attribute to clang
Craig Topper [Thu, 21 May 2020 22:23:00 +0000 (15:23 -0700)]
[Target] Use Align in TargetLoweringObjectFile::getSectionForConstant.
Differential Revision: https://reviews.llvm.org/D80363
Arthur Eubanks [Wed, 13 May 2020 23:33:09 +0000 (16:33 -0700)]
Don't jump to landing pads in Control Flow Optimizer
Summary: Likely fixes https://bugs.llvm.org/show_bug.cgi?id=45858.
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80047
Jinsong Ji [Thu, 21 May 2020 22:06:10 +0000 (22:06 +0000)]
[docs] Fix buildbot failures
Buildbot has been failing since
http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/44711
This patch fix the minor issues that cause warnings.
Ben Dunbobbin [Wed, 20 May 2020 10:36:10 +0000 (11:36 +0100)]
[PS4] Enable relaxed relocations by default
PS4 supports these relocations types; so, we want to enable them by default.
Differential Revision: https://reviews.llvm.org/D79980
Dominic Chen [Thu, 21 May 2020 01:11:23 +0000 (21:11 -0400)]
llvm-diff: Avoid crash with complex expressions
Summary: With complex IR, the difference engine can enter an inconsistent state where the instruction and block difference engines return different results. Prevent a crash by refusing to pop beyond the end of the vector.
Reviewers: rjmccall
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80351
Stephen Kelly [Fri, 10 Jan 2020 19:19:23 +0000 (19:19 +0000)]
Make the ExprMutationAnalyzer explicit about how it traverses the AST
Reviewers: aaron.ballman
Subscribers: baloghadamsoftware, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72532
Stephen Kelly [Tue, 12 Nov 2019 13:29:40 +0000 (13:29 +0000)]
Set traversal explicitly where needed in tests
Reviewers: aaron.ballman, shafik
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72531
Stephen Kelly [Tue, 12 Nov 2019 15:15:56 +0000 (15:15 +0000)]
Set traversal explicitly where needed in clang-tidy
Reviewers: aaron.ballman
Subscribers: nemanjai, kbarton, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72530
Tim Renouf [Sat, 25 Apr 2020 11:14:58 +0000 (12:14 +0100)]
[AMDGPU] Fixed incorrect PAL metadata register naming
This only affects assembly and -filetype=asm codegen of PAL metadata.
Differential Revision: https://reviews.llvm.org/D78860
Change-Id: I7b822e1917bf7b403486820d31afc483be207652
Tim Renouf [Mon, 18 May 2020 13:13:57 +0000 (14:13 +0100)]
[MsgPack] Added convenience assignment to MsgPackDocument
This commit increases the convenience of using the MsgPackDocument API,
especially when creating a document for writing out.
It adds direct assignment of bool, integer and string types to a
DocNode, as long as that DocNode is already inside a document, e.g. the
result of a map lookup. It also adds map lookup given an integer type
(it already had that for string).
So, to assign a string to a map element whose key is an int, you can
now write
MyMap[42] = "towel";
instead of
MyMap[MyMap.getDocument()->getNode(42)] =
MyMap.getDocument()->getNode("towel");
Also added MapDocNode::erase methods.
Differential Revision: https://reviews.llvm.org/D80121
Change-Id: I17301fa15bb9802231c52542798af5b54beb583e
Jean-Michel Gorius [Thu, 21 May 2020 14:30:48 +0000 (16:30 +0200)]
[CodeGen] Add support for multiple memory operands in MachineInstr::mayAlias
Summary:
To support all targets, the mayAlias member function needs to support instructions with multiple operands.
This revision also changes the order of the emitted instructions in some test cases.
Reviewers: efriedma, hfinkel, craig.topper, dmgreen
Reviewed By: efriedma
Subscribers: MatzeB, dmgreen, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80161
Stanislav Mekhanoshin [Wed, 20 May 2020 23:24:06 +0000 (16:24 -0700)]
[AMDGPU] Promote alloca to vector in opt
Promote alloca to vector before SROA and loop unroll. If we manage
to eliminate allocas before unroll we may choose to unroll less.
Differential Revision: https://reviews.llvm.org/D80386
Sean Silva [Thu, 21 May 2020 20:10:38 +0000 (13:10 -0700)]
[NFC] Make assertion more informative.
This assert just caught me, and this improved message would have saved
me some time.
Eli Friedman [Thu, 21 May 2020 00:52:36 +0000 (17:52 -0700)]
[AArch64][SVE] Fill out missing unpredicated load/store patterns.
The set of patterns for unpredicated load/store was incomplete: it only
included non-extending stores. Fill out the remaining patterns for
extending stores, and add the corresponding support to frame offset
lowering.
Differential Revision: https://reviews.llvm.org/D80349
Tim Renouf [Thu, 21 May 2020 19:31:24 +0000 (20:31 +0100)]
[MsgPack] MsgPackDocument::readFromBlob now merges
The readFromBlob method can now be used to read MsgPack into a Document
that already contains something, merging the two. There is a new Merger
argument to readFromBlob, a callback function to resolve conflicts.
Differential Revision: https://reviews.llvm.org/D79671
Change-Id: Icf3e959217fe33cd907a41516c0386aef2847c0c
Hendrik Greving [Thu, 21 May 2020 20:17:18 +0000 (13:17 -0700)]
[ModuloSchedule] Add missing comma.
This is a test commit as per Chris to verify commit access.
Thanks!
Yitzhak Mandelbaum [Thu, 21 May 2020 19:49:23 +0000 (15:49 -0400)]
[libTooling][NFC]Fix typo in comment in RangeSelectors
Fixes transposed names in comment.
Marcello Maggioni [Wed, 29 Apr 2020 01:25:58 +0000 (01:25 +0000)]
[SelectionDAG] Add the option of disabling generic combines.
Summary:
For some targets generic combines don't really do much and they
consume a disproportionate amount of time.
There's not really a mechanism in SDISel to tactically disable
combines, but we can have a switch to disable all of them and
let the targets just implement what they specifically need.
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79112
Marek Kurdej [Thu, 21 May 2020 19:48:51 +0000 (21:48 +0200)]
Reland [libc++] [LWG3321] Mark "year_month_day_last::day() specification does not cover !ok() values" issue as "Nothing to do", but add assertion.
Summary:
This LWG issue states that the result of `year_month_day_last::day()` is implementation defined if `ok()` is `false`.
However, from user perspective, calling `day()` in this situation will lead to a (possibly difficult to find) crash.
Hence, I have added an assertion to warn user at least when assertions are enabled.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D70346
Nico Weber [Thu, 21 May 2020 19:49:46 +0000 (15:49 -0400)]
Revert "[Analyzer][WebKit] RefCntblBaseVirtualDtorChecker"
This reverts commit
f7c7e8a523f56b0ed1b14c0756ba4e5d1ccb48d2.
Breaks build everywhere.
Jonas Devlieghere [Thu, 21 May 2020 19:27:39 +0000 (12:27 -0700)]
[dsymutil] Add llvm_unreachable to silence warning
Fixes warning: control reaches end of non-void function [-Wreturn-type]
Thomas Raoux [Thu, 21 May 2020 18:59:31 +0000 (11:59 -0700)]
[mlir][spirv] Enable composite instructions for cooperative matrix type.
Enable inset/extract/construct composite ops as well as access chain for
cooperative matrix. ConstantComposite requires more change and will be done in
a separate patch. Also fix the getNumElements function for coopMatrix per
feedback from Jeff Bolz. The number of element is implementation dependent so
it cannot be known at compile time.
Differential Revision: https://reviews.llvm.org/D80321
Stanislav Mekhanoshin [Thu, 21 May 2020 18:58:35 +0000 (11:58 -0700)]
[AMDGPU] Added opt pipeline test. NFC.
Thomas Raoux [Thu, 21 May 2020 18:35:32 +0000 (11:35 -0700)]
[mlir][spirv] Add remaining cooperative matrix instructions
Adds support for cooperative matrix support for arithmetic and cast
instructions. It also adds cooperative matrix store, muladd and matrixlength
instructions which are part of the extension.
Differential Revision: https://reviews.llvm.org/D80181
Jan Korous [Thu, 21 May 2020 18:52:12 +0000 (11:52 -0700)]
[Analyzer][WebKit] RefCntblBaseVirtualDtorChecker
Differential Revision: https://reviews.llvm.org/D77177
Louis Dionne [Thu, 21 May 2020 18:33:32 +0000 (14:33 -0400)]
[libc++] Link back-deployment tests against the latest libc++ and libc++abi
Instead of linking the tests against a library in some version of the
SDK, always link against the latest library, but still run against the
specified back-deployment target dylib.
This makes more sense since what we're really trying to test is that
the current library can be used to produce binaries that run on some
deployment target -- not that linking against the library in some
previous SDK makes that possible.
This solves an additional issue that when linking against a system dylib,
the -rpath argument given to the tests is ignored because the install_name
of the system library we link against is absolute.
rdar://
63241847
Jonas Devlieghere [Thu, 21 May 2020 18:41:20 +0000 (11:41 -0700)]
[dsymutil] Fix conversion between unique_ptr and Expected
Reproducer.cpp:70:12: error: could not convert ‘Repro’ from
‘std::unique_ptr<llvm::dsymutil::ReproducerGenerate,
std::default_delete<llvm::dsymutil::ReproducerGenerate> >’ to
‘llvm::Expected<std::unique_ptr<llvm::dsymutil::Reproducer> >’
Hiroshi Yamauchi [Wed, 13 May 2020 19:14:33 +0000 (12:14 -0700)]
[IR] Make Module::setProfileSummary to replace an existing ProfileSummary flag.
Summary:
Module::setProfileSummary currently calls addModuelFlag. This prevents from
updating the ProfileSummary metadata in the module and results in a second
ProfileSummary added instead of replacing an existing one. I don't think this is
the expected behavior. It prevents updating the ProfileSummary and it does not
make sense to have more than one. To address this, add Module::setModuleFlag and
use it from setProfileSummary.
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79902
Thomas Lively [Thu, 21 May 2020 18:33:25 +0000 (11:33 -0700)]
[lld][WebAssembly] Do not emit initialization for .bss segments
Summary:
This patch fixes a bug where initialization code for .bss segments was
emitted in the memory initialization function even though the .bss
segments were discounted in the datacount section and omitted in the
data section. This was producing invalid binaries due to out-of-bounds
segment indices on the memory.init and data.drop instructions that
were trying to operate on the nonexistent .bss segments.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80354
LLVM GN Syncbot [Thu, 21 May 2020 18:20:26 +0000 (18:20 +0000)]
[gn build] Port
92fd3971e0d
Jonas Devlieghere [Thu, 21 May 2020 18:19:57 +0000 (11:19 -0700)]
[dsymutil] Fix include-style
Jonas Devlieghere [Thu, 21 May 2020 17:57:53 +0000 (10:57 -0700)]
[dsymutil] Add reproducers to dsymutil
Add support for generating a dsymutil reproducer. The result is a folder
containing all the object files for linking.
When --gen-reproducer is passed, dsymutil uses a FileCollectorFileSystem
which keeps track of all the files used by dsymutil. These files are
copied into a temporary directory when dsymutil exists.
When this path is passed to --use-reproducer, dsymutil uses a
RedirectingFileSystem that will use the files from the reproducer
directory instead of the actual paths. This means you don't need to mess
with the OSO path prefix.
Differential revision: https://reviews.llvm.org/D79398
Simon Atanasyan [Thu, 21 May 2020 13:14:24 +0000 (16:14 +0300)]
[mips] Reorganize check directives in the test. NFC
Adrian Prantl [Thu, 21 May 2020 17:42:26 +0000 (10:42 -0700)]
Move decorator to the correct function.
Adrian Prantl [Thu, 21 May 2020 17:41:27 +0000 (10:41 -0700)]
Disable malloc stepping test under ASAN. The output is different and I'm not sure how stable it is.
Adrian Prantl [Thu, 21 May 2020 17:38:04 +0000 (10:38 -0700)]
Disable ptr_ref tests under ASAN
Jonas Devlieghere [Thu, 21 May 2020 17:32:23 +0000 (10:32 -0700)]
Revert "Revert "[YAMLTraits] Add trait for char""
Reverting this to unblock all the LLDB bots while we try to figure out a
solution for Solaris in https://reviews.llvm.org/D79745.
Benjamin Kramer [Thu, 21 May 2020 17:10:22 +0000 (19:10 +0200)]
[ImmutableSet] Use IntrusiveRefCntPtr to eliminate some manual refcounting
Still not ideal as the refcounting leaks to users, but better than
before. NFCI.
Jean-Michel Gorius [Thu, 21 May 2020 16:53:08 +0000 (18:53 +0200)]
[ADT][Analysis] NFC: Fix some more typos
Hiroshi Yamauchi [Thu, 14 May 2020 17:21:53 +0000 (10:21 -0700)]
[ProfileSummary] Add the PartialProfileRatio field in ProfileSummary metadata.
Summary:
PartialProfileRatio approximately represents the ratio of the number of profile
counters of the program being built to the number of profile counters in the
partial sample profile. It is used to scale the working set size under the
partial sample profile to reflect the size of the program being built and to
improve the working set size heuristics.
This is a split from D79831.
Reviewers: davidxl
Subscribers: eraman, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79951
Matt Morehouse [Thu, 21 May 2020 16:01:39 +0000 (09:01 -0700)]
[libFuzzer] Fix leak in unit test.
Stanislav Mekhanoshin [Wed, 20 May 2020 18:51:07 +0000 (11:51 -0700)]
[AMDGPU] Tune threshold for cmp/select vector lowering
It was set in total vector size while the idea was to limit
a number of instructions. Now it started to work with doubles
and thresholds needs to be updated.
Differential Revision: https://reviews.llvm.org/D80322
Jean-Michel Gorius [Thu, 21 May 2020 15:42:31 +0000 (17:42 +0200)]
[ADT] NFC: Fix typos in header comments
Rainer Orth [Thu, 21 May 2020 15:33:42 +0000 (17:33 +0200)]
Revert "[YAMLTraits] Add trait for char"
This reverts commit
fab08bf4899e40d02d8bf394a63499ac679ac61c. It has left
the Solaris buildbots broken for a week and a half as reported
in https://reviews.llvm.org/D79745.
Jon Roelofs [Wed, 20 May 2020 19:45:35 +0000 (13:45 -0600)]
[llvm][test] Add missing FileCheck colons. NFC
Jon Roelofs [Fri, 15 May 2020 15:02:39 +0000 (09:02 -0600)]
[llvm][test] Add COM: directives before colon-less non-CHECKs in comments. NFC
Differential Revision: https://reviews.llvm.org/D79963
Dinar Temirbulatov [Thu, 21 May 2020 15:00:20 +0000 (17:00 +0200)]
[SLP][NFC] PR45269 getVectorElementSize() is slow
The algorithm inside getVectorElementSize() is almost O(x^2) complexity and
when, for example, we compile MultiSource/Applications/ClamAV/shared_sha256.c
with 1k instructions inside sha256_transform() function that resulted in almost
~800k iterations. The following change improves the algorithm with the map to
a liner complexity.
Differential Revision: https://reviews.llvm.org/D80241
Thomas Raoux [Thu, 21 May 2020 15:14:42 +0000 (08:14 -0700)]
[ModuloSchedule] Trivial fix for instruction with more than one destination in modulo peeler.
When moving an instruction into a block where it was referenced by a phi when peeling,
refer to the phi's register number and assert that the instruction has it in its destinations.
This way, it also covers instructions with more than one destination.
Patch by Hendrik Greving!
Differential Revision: https://reviews.llvm.org/D80027
Yaxun (Sam) Liu [Thu, 21 May 2020 14:35:14 +0000 (10:35 -0400)]
Fix DeferredDiagnosticsEmitter for bug#45987
InOMPDeviceContext may be greater than 1. It needs to be clamp to 0 and 1
to be used as index for DoneMap.
Jean-Michel Gorius [Thu, 21 May 2020 14:51:32 +0000 (16:51 +0200)]
[x86] NFC: Fix typo in command line option description
Simon Pilgrim [Thu, 21 May 2020 14:48:36 +0000 (15:48 +0100)]
GenericDomTree.h - remove unused PointerIntPair.h include. NFC.
jerryyin [Tue, 19 May 2020 19:59:58 +0000 (19:59 +0000)]
[mlir][rocdl] Exposing buffer load/store intrinsic
Summary:
* Updated ROCDLOps tablegen
* Added parsing and printing function for new intrinsic
* Added unit tests
Reviewers: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80233
Benjamin Kramer [Thu, 21 May 2020 13:23:12 +0000 (15:23 +0200)]
[BitcodeReader] Simplify code. NFCI.
Benjamin Kramer [Thu, 21 May 2020 13:22:33 +0000 (15:22 +0200)]
[StringRef] Use some trickery to avoid initializing the std::string returned by upper()/lower()
Wen-Heng (Jack) Chung [Mon, 18 May 2020 18:01:54 +0000 (13:01 -0500)]
[mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.
Due to similar APIs between CUDA and ROCm (HIP),
ConvertGpuLaunchFuncToCudaCalls pass could be used on both platforms with some
refactoring.
In this commit:
- Migrate ConvertLaunchFuncToCudaCalls from GPUToCUDA to GPUCommon, and rename.
- Rename runtime wrapper APIs be platform-neutral.
- Let GPU binary annotation attribute be specifiable as a PassOption.
- Naming changes within the implementation and tests.
Subsequent patches would introduce ROCm-specific tests and runtime wrapper
APIs.
Differential Revision: https://reviews.llvm.org/D80167
Kirstóf Umann [Sun, 5 Apr 2020 17:53:22 +0000 (19:53 +0200)]
[analyzer][CallAndMessage] Add checker options for each bug type
iAs listed in the summary D77846, we have 5 different categories of bugs we're
checking for in CallAndMessage. I think the documentation placed in the code
explains my thought process behind my decisions quite well.
A non-obvious change I had here is removing the entry for
CallAndMessageUnInitRefArg. In fact, I removed the CheckerNameRef typed field
back in D77845 (it was dead code), so that checker didn't really exist in any
meaningful way anyways.
Differential Revision: https://reviews.llvm.org/D77866
Yaxun (Sam) Liu [Fri, 15 May 2020 03:09:30 +0000 (23:09 -0400)]
Fix debug info for NoDebug attr
NoDebug attr does not totally eliminate debug info about a function when
inlining is enabled. This is inconsistent with when inlining is disabled.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D79967
David Nicuesa [Thu, 21 May 2020 12:46:42 +0000 (13:46 +0100)]
Fix compile for -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY
Summary: Compilation with -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY was failing due to missing declarations of functions used in libcxx/include/atomic. The lines this commit affects are the places where those functions are defined, now moved to be always defined.
Reviewers: #libc, ldionne
Reviewed By: #libc, ldionne
Subscribers: miyuki, dexonsmith, ldionne, jfb, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80372
James Henderson [Wed, 13 May 2020 09:29:02 +0000 (10:29 +0100)]
On Windows, handle interrupt signals without crash message
For LLVM on *nix systems, the signal handlers are not run on signals
such as SIGINT due to CTRL-C. See sys::CleanupOnSignal. This makes
sense, as such signals are not really crashes. Prior to this change,
this wasn't the case on Windows, however. This patch changes the Windows
behaviour to be consistent with Linux, and adds testing that verifies
this.
The test uses llvm-symbolizer, but any tool with an interactive mode
would do the job.
Fixes https://bugs.llvm.org/show_bug.cgi?id=45754.
Reviewed by: MaskRay, rnk, aganea
Differential Revision: https://reviews.llvm.org/D79847
Sam Parker [Thu, 21 May 2020 12:13:25 +0000 (13:13 +0100)]
[CostModel] Sink intrinsic costs to base TTI.
Recommitting part of "[CostModel] Unify Intrinsic Costs."
de71def3f59dc9f12f67141b5040d8e15c84d08a
Move the switch statement from TTImpl::getIntrinsicCost to
TTI::getIntrinsicInstrCost. This enables BasicTTI to understand
more 'free' intrinsics instead of defaulting to a cost of 1.
Differential Revision: https://reviews.llvm.org/D80012
Sam Parker [Thu, 21 May 2020 11:50:24 +0000 (12:50 +0100)]
Revert "[CostModel] Unify Intrinsic Costs."
This reverts commit
de71def3f59dc9f12f67141b5040d8e15c84d08a.
This is causing some very large changes, so I'm first going to break
this patch down and re-commit in parts.
Ehud Katz [Thu, 21 May 2020 11:06:44 +0000 (14:06 +0300)]
[FlattenCFG] Fix `MergeIfRegion` in case then-path is empty
In case the then-path of an if-region is empty, then merging with the
else-path should be handled with the inverse of the condition (leading
to that path).
Fix PR37662
Differential Revision: https://reviews.llvm.org/D78881
Kirstóf Umann [Sun, 5 Apr 2020 17:53:22 +0000 (19:53 +0200)]
[analyzer][CallAndMessage][NFC] Split up checkPreCall
The patch aims to use CallEvents interface in a more principled manner, and also
to highlight what this checker really does. It in fact checks for 5 different
kinds of errors (from checkPreCall, that is):
* Invalid function pointer related errors
* Call of methods from an invalid C++ this object
* Function calls with incorrect amount of parameters
* Invalid arguments for operator delete
* Pass of uninitialized values to pass-by-value parameters
In a previous patch I complained that this checker is responsible for emitting
a lot of different diagnostics all under core.CallAndMessage's name, and this
patch shows where we could start to assign different diagnostics to different
entities.
Differential Revision: https://reviews.llvm.org/D77846
Simon Pilgrim [Thu, 21 May 2020 10:38:09 +0000 (11:38 +0100)]
MachineMemOperand.h - reduce GlobalValue.h include to just DerivedTypes.h. NFC.
We don't need anything specifically from GlobalValue.h
Roman Lebedev [Thu, 21 May 2020 09:54:58 +0000 (12:54 +0300)]
[IndVarSimplify][LoopUtils] Avoid TOCTOU/ordering issues (PR45835)
Summary:
Currently, `rewriteLoopExitValues()`'s logic is roughly as following:
> Loop over each incoming value in each PHI node.
> Query whether the SCEV for that incoming value is high-cost.
> Expand the SCEV.
> Perform sanity check (`isValidRewrite()`, D51582)
> Record the info
> Afterwards, see if we can drop the loop given replacements.
> Maybe perform replacements.
The problem is that we interleave SCEV cost checking and expansion.
This is A Problem, because `isHighCostExpansion()` takes special care
to not bill for the expansions that were already expanded, and we can reuse.
While it makes sense in general - if we know that we will expand some SCEV,
all the other SCEV's costs should account for that, which might cause
some of them to become non-high-cost too, and cause chain reaction.
But that isn't what we are doing here. We expand *all* SCEV's, unconditionally.
So every next SCEV's cost will be affected by the already-performed expansions
for previous SCEV's. Even if we are not planning on keeping
some of the expansions we performed.
Worse yet, this current "bonus" depends on the exact PHI node
incoming value processing order. This is completely wrong.
As an example of an issue, see @dmajor's `pr45835.ll` - if we happen to have
a PHI node with two(!) identical high-cost incoming values for the same basic blocks,
we would decide first time around that it is high-cost, expand it,
and immediately decide that it is not high-cost because we have an expansion
that we could reuse (because we expanded it right before, temporarily),
and replace the second incoming value but not the first one;
thus resulting in a broken PHI.
What we instead should do for now, is not perform any expansions
until after we've queried all the costs.
Later, in particular after `isValidRewrite()` is an assertion (D51582)
we could improve upon that, but in a more coherent fashion.
See [[ https://bugs.llvm.org/show_bug.cgi?id=45835 | PR45835 ]]
Reviewers: dmajor, reames, mkazantsev, fhahn, efriedma
Reviewed By: dmajor, mkazantsev
Subscribers: smeenai, nikic, hiraditya, javed.absar, llvm-commits, dmajor
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79787
Sjoerd Meijer [Thu, 21 May 2020 09:40:26 +0000 (10:40 +0100)]
[HardwareLoops] llvm.loop.decrement.reg definition
This is split off from D80316, slightly tightening the definition of overloaded
hardwareloop intrinsic llvm.loop.decrement.reg specifying that both operands
its result have the same type.
Nicolas Vasilache [Thu, 21 May 2020 09:12:31 +0000 (05:12 -0400)]
[mlir] NFC - Add a builder to vector.transpose
Summary: Also expose some more vector ops to EDSCs.
Differential Revision: https://reviews.llvm.org/D80333