Michał Górny [Thu, 12 Dec 2019 14:17:16 +0000 (15:17 +0100)]
[clang] [test] Disable the test exhausting stack on NetBSD
Disable the instantiation-depth-default.cpp test on NetBSD since it
requires more stack space than we have by default on NetBSD.
Differential Revision: https://reviews.llvm.org/D71419
Eric Christopher [Thu, 12 Dec 2019 21:09:43 +0000 (13:09 -0800)]
[sanitizers] Redirect stdout and stderr to TASK_LOG
At some point cpplint.py became very noisy during a build spewing
a few hundred lines of "Done processing..." even with SILENT=1 in
cmake. This attempts to redirect the stdout of "Done processing" to
the task log along with any errors.
Tested by this with and without SILENT=1 to check things.
Differential Revision: https://reviews.llvm.org/D71402
Reviewed By: eugenis
Alexey Bataev [Thu, 12 Dec 2019 20:33:18 +0000 (15:33 -0500)]
[OPENMP50]Fix possible conflict when emitting an alias for the functions
in declare variant.
If the types of the fnction are not equal, but match, at the codegen
thei may have different types. This may lead to compiler crash.
Sanjay Patel [Thu, 12 Dec 2019 20:20:42 +0000 (15:20 -0500)]
[DAGCombiner] fold shift-trunc-shift to shift-mask-trunc
This fold is done in IR by instcombine, and we have a special
form of it already here in DAGCombiner, but we want the more
general transform too:
https://rise4fun.com/Alive/3jZm
Name: general
Pre: (C1 + zext(C2) < 64)
%s = lshr i64 %x, C1
%t = trunc i64 %s to i16
%r = lshr i16 %t, C2
=>
%s2 = lshr i64 %x, C1 + zext(C2)
%a = and i64 %s2, zext((1 << (16 - C2)) - 1)
%r = trunc %a to i16
Name: special
Pre: C1 == 48
%s = lshr i64 %x, C1
%t = trunc i64 %s to i16
%r = lshr i16 %t, C2
=>
%s2 = lshr i64 %x, C1 + zext(C2)
%r = trunc %s2 to i16
...because D58017 exposes a regression without this fold.
Eric Fiselier [Thu, 12 Dec 2019 20:36:34 +0000 (15:36 -0500)]
[libc++] Add check to ensure oss-fuzz properly targets libc++.
Teresa Johnson [Thu, 12 Dec 2019 19:59:36 +0000 (11:59 -0800)]
[LTO] Support for embedding bitcode section during LTO
Summary:
This adds support for embedding bitcode in a binary during LTO. The libLTO gains supports the `-lto-embed-bitcode` flag. The option allows users of the LTO library to embed a bitcode section. For example, LLD can pass the option via `ld.lld -mllvm=-lto-embed-bitcode`.
This feature allows doing something comparable to `clang -c -fembed-bitcode`, but on the (LTO) linker level. Having bitcode alongside native code has many use-cases. To give an example, the MacOS linker can create a `-bitcode_bundle` section containing bitcode. Also, having this feature built into LLVM is an alternative to 3rd party tools such as [[ https://github.com/travitch/whole-program-llvm | wllvm ]] or [[ https://github.com/SRI-CSL/gllvm | gllvm ]]. As with these tools, this feature simplifies creating "whole-program" llvm bitcode files, but in contrast to wllvm/gllvm it does not rely on a specific llvm frontend/driver.
Patch by Josef Eisl <josef.eisl@oracle.com>
Reviewers: #llvm, #clang, rsmith, pcc, alexshap, tejohnson
Reviewed By: tejohnson
Subscribers: tejohnson, mehdi_amini, inglorion, hiraditya, aheejin, steven_wu, dexonsmith, dang, cfe-commits, llvm-commits, #llvm, #clang
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68213
Alexey Bataev [Thu, 12 Dec 2019 19:13:02 +0000 (14:13 -0500)]
[OPENMP50]Improve checks for declare variant functions compatibility.
Added check for functions compatibility in C and removed restriction
for functions with no prototypes in declare variant constrcut.
Alex Langford [Thu, 14 Nov 2019 21:41:52 +0000 (13:41 -0800)]
[Target] Remove Target::GetScratchClangASTContext
Target doesn't really need to know about ClangASTContext more than any
other TypeSystem. We can create a method ClangASTContext::GetScratch for
anything who needs a ClangASTContext specifically instead of just a
generic TypeSystem.
Tony [Thu, 12 Dec 2019 05:47:56 +0000 (00:47 -0500)]
[AMDGPU] AMDGPUUsage clarify address space information and other typo and formatting fixes
Summary:
- Clarify AMDGPU address spaces.
- Correct path to AMDGPU backend since now in the mono-repo.
- Fix numerous text style and typo issues.
- Correct reStructure text formatting warnings.
- Made reStructure directive usage more consistent.
- Add references for gfx10 ISA specification.
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71392
Vedant Kumar [Thu, 12 Dec 2019 19:08:56 +0000 (11:08 -0800)]
TypeCategory: Initialize m_enabled to false
The initialization was accidentally lost in https://reviews.llvm.org/D71310, causing a ubsan failure:
/Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35: runtime error: load of value 190, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35 in
http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake-sanitized/621/consoleText
Erich Keane [Thu, 12 Dec 2019 19:27:10 +0000 (11:27 -0800)]
Suppress -Wwarn-unused-variables when we don't know the constructor
This warning is supposed to be suppressed when the
constructor/destructor are non-trivial, since it might be a RAII type.
However, if the type has a trivial destructor and the constructor hasn't
been resolved (since it is called with dependent arguments), we were
still warning.
This patch suppresses the warning if the type could possibly have a
be a non-trivial constructor call. Note that this does not take the
arity of the constructors into consideration, so it might suppress
the warning in cases where it isn't possible to call a non-trivial
constructor.
Kit Barton [Thu, 12 Dec 2019 19:18:39 +0000 (14:18 -0500)]
Rename LoopInfo::isRotated() to LoopInfo::isRotatedForm().
This patch renames the LoopInfo::isRotated() method to LoopInfo::isRotatedForm()
to make it clear that the method checks whether the loop is in rotated form, not
whether the loop has been rotated by the LoopRotation pass.
Max Moroz [Thu, 12 Dec 2019 16:52:07 +0000 (08:52 -0800)]
[compiler-rt] libFuzzer: update -merge_control_file= help message.
Summary:
The motivation for this change is to have a distinguisher in libFuzzer
that would let the runner know whether multistep merge is supported or not by
a particular fuzz target binary. Otherwise, multistep merge fails to execute
with older version of libFuzzer, and there is no way to verify that easily.
Reviewers: kcc
Subscribers: dberris, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D71423
Warren Ristow [Thu, 12 Dec 2019 18:17:30 +0000 (10:17 -0800)]
[PS4] Predefine the __SCE__ macro for the x86_64-scei-ps4 triple
Fangrui Song [Thu, 12 Dec 2019 05:48:59 +0000 (21:48 -0800)]
Default to -fuse-init-array
Very few ELF platforms still use .ctors/.dtors now. Linux (glibc: 1999-07),
DragonFlyBSD, FreeBSD (2012-03) and Solaris have supported .init_array
for many years. Some architectures like AArch64/RISC-V default to
.init_array . GNU ld and gold can even convert .ctors to .init_array .
It makes more sense to flip the CC1 default, and only uses
-fno-use-init-array on platforms that don't support .init_array .
For example, OpenBSD did not support DT_INIT_ARRAY before Aug 2016
(https://github.com/openbsd/src/commit/
86fa57a2792c6374b0849dd7b818a11e676e60ba)
I may miss some ELF platforms that still use .ctors, but their
maintainers can easily diagnose such problems.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D71393
Jonas Paulsson [Wed, 27 Nov 2019 16:22:43 +0000 (17:22 +0100)]
[SystemZ] Implement the packed stack layout
Any llvm function with the "packed-stack" attribute will be compiled to use
the packed stack layout which reuses unused parts of the incoming register
save area. This is needed for building the Linux kernel.
Review: Ulrich Weigand
https://reviews.llvm.org/D70821
Med Ismail Bennani [Tue, 10 Dec 2019 00:46:03 +0000 (16:46 -0800)]
[FormatEntity] Add mangled function name support
Summary:
Add `function.mangled-name` key for FormatEntity to show the mangled
function names in backtraces.
rdar://
54088244
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71237
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Sanjay Patel [Thu, 12 Dec 2019 18:14:02 +0000 (13:14 -0500)]
[DAGCombiner] improve readability
This is not quite NFC because I changed the SDLoc to use the more
standard 'N' (the starting node for the fold).
This transform is a special-case of a more general fold that we
do in IR, but it seems like the general fold is needed here too
to avoid a potential regression seen in D58017.
https://rise4fun.com/Alive/3jZm
Jonas Devlieghere [Thu, 12 Dec 2019 18:05:30 +0000 (10:05 -0800)]
[lldb/Core] Add missing include (2/2)
This got flagged by the debian buildbot.
Jonas Devlieghere [Thu, 12 Dec 2019 17:54:48 +0000 (09:54 -0800)]
[lldb/Core] Add missing include
This got flagged by the modules build.
Sanjay Patel [Thu, 12 Dec 2019 17:36:10 +0000 (12:36 -0500)]
[AArch64][PowerPC] add tests for shift sandwich; NFC
Jonas Devlieghere [Thu, 12 Dec 2019 17:34:11 +0000 (09:34 -0800)]
[lldb/Host] Use cmakedefine01 for LLDB_ENABLE_TERMIOS
This renames LLDB_CONFIG_TERMIOS_SUPPORTED to LLDB_ENABLE_TERMIOS. It
now also uses cmakedefine01 to keep things consistent with out other
optional dependencies. But more importantly it won't silently fail when
you forget to include Config.h.
Jonas Devlieghere [Thu, 12 Dec 2019 17:25:01 +0000 (09:25 -0800)]
[lldb/Host] Use cmakedefine01 for LLDB_ENABLE_LIBXML2
This keeps things consistent with out other optional dependencies. But
more importantly it won't silently fail when you forget to include
Config.h.
Fangrui Song [Thu, 12 Dec 2019 17:23:06 +0000 (09:23 -0800)]
[ELF] Add a comment to handleSectionGroup(). NFC
Apply suggestion in https://reviews.llvm.org/D71157#1780834
Reviewed By: grimar, ruiu
Differential Revision: https://reviews.llvm.org/D71388
Jonas Devlieghere [Thu, 12 Dec 2019 17:22:34 +0000 (09:22 -0800)]
[lldb/CMake] Rename LLDB_DISABLE_LIBEDIT to LLDB_ENABLE_LIBEDIT
This matches the naming scheme used by LLVM.
Differential revision: https://reviews.llvm.org/D71380
Florian Hahn [Thu, 12 Dec 2019 17:10:43 +0000 (17:10 +0000)]
[BasicAA] Use GEP as context for computeKnownBits in aliasGEP.
In order to use assumptions, computeKnownBits needs a context
instruction. We can use the GEP, if it is an instruction. We already
pass the assumption cache, but it cannot be used without a context
instruction.
Reviewers: anemet, asbirlea, hfinkel, spatel
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D71264
Jonas Devlieghere [Thu, 12 Dec 2019 17:13:04 +0000 (09:13 -0800)]
[lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSES
This matches the naming scheme used by LLVM.
Differential revision: https://reviews.llvm.org/D71377
Jonathan Metzman [Thu, 12 Dec 2019 16:48:54 +0000 (08:48 -0800)]
[fuzzer] Add basic support for emscripten.
Summary:
Add basic support for emscripten.
This enables libFuzzer to build (using build.sh) for emscripten and fuzz
a target compiled with
-fsanitize-coverage=inline-8bit-counters.
Basic fuzzing and bug finding work with this commit.
RSS limit and timeouts will not work because they depend on system
functions that are not implemented/widely supported in emscripten.
Reviewers: kcc, vitalybuka, hctim
Reviewed By: hctim
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D71285
Gabor Marton [Thu, 12 Dec 2019 16:13:35 +0000 (17:13 +0100)]
[ASTImporter] Support functions with placeholder return types ...
Summary:
Support functions with placeholder return types even in cases when the type is
declared in the body of the function.
Example: auto f() { struct X{}; return X(); }
Reviewers: balazske, a_sidorin, a.sidorin, shafik
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70819
Michael Liao [Thu, 12 Dec 2019 16:43:02 +0000 (11:43 -0500)]
[amdgpu] Fix `-Wenum-compare` warning. NFC.
Guillaume Chatelet [Mon, 9 Dec 2019 11:22:27 +0000 (12:22 +0100)]
[clang] Turn -fno-builtin flag into an IR Attribute
Summary:
This is a follow up on https://reviews.llvm.org/D61634#1742154 to turn the clang driver -fno-builtin flag into an IR attribute.
I also investigated pushing the attribute earlier on (in Sema) but it looks like this patch is simple and will cover all function calls.
Reviewers: aaron.ballman, courbet
Subscribers: cfe-commits, tejohnson
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71193
Alexander Kornienko [Thu, 12 Dec 2019 15:51:08 +0000 (16:51 +0100)]
[clang-tidy] Use early returns to make the code easier to read and potentially run faster
Alexander Kornienko [Fri, 6 Dec 2019 14:38:39 +0000 (15:38 +0100)]
Fix naming style. NFC.
LLVM GN Syncbot [Thu, 12 Dec 2019 15:45:15 +0000 (15:45 +0000)]
gn build: Merge
526244b187d
Florian Hahn [Thu, 12 Dec 2019 15:27:28 +0000 (15:27 +0000)]
[Matrix] Add first set of matrix intrinsics and initial lowering pass.
This is the first patch adding an initial set of matrix intrinsics and a
corresponding lowering pass. This has been discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2019-October/136240.html
The first patch introduces four new intrinsics (transpose, multiply,
columnwise load and store) and a LowerMatrixIntrinsics pass, that
lowers those intrinsics to vector operations.
Matrixes are embedded in a 'flat' vector (e.g. a 4 x 4 float matrix
embedded in a <16 x float> vector) and the intrinsics take the dimension
information as parameters. Those parameters need to be ConstantInt.
For the memory layout, we initially assume column-major, but in the RFC
we also described how to extend the intrinsics to support row-major as
well.
For the initial lowering, we split the input of the intrinsics into a
set of column vectors, transform those column vectors and concatenate
the result columns to a flat result vector.
This allows us to lower the intrinsics without any shape propagation, as
mentioned in the RFC. In follow-up patches, we plan to submit the
following improvements:
* Shape propagation to eliminate the embedding/splitting for each
intrinsic.
* Fused & tiled lowering of multiply and other operations.
* Optimization remarks highlighting matrix expressions and costs.
* Generate loops for operations on large matrixes.
* More general block processing for operation on large vectors,
exploiting shape information.
We would like to add dedicated transpose, columnwise load and store
intrinsics, even though they are not strictly necessary. For example, we
could instead emit a large shufflevector instruction instead of the
transpose. But we expect that to
(1) become unwieldy for larger matrixes (even for 16x16 matrixes,
the resulting shufflevector masks would be huge),
(2) risk instcombine making small changes, causing us to fail to
detect the transpose, preventing better lowerings
For the load/store, we are additionally planning on exploiting the
intrinsics for better alias analysis.
Reviewers: anemet, Gerolf, reames, hfinkel, andrew.w.kaylor, efriedma, rengolin
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D70456
Sjoerd Meijer [Thu, 12 Dec 2019 10:45:16 +0000 (10:45 +0000)]
[ARM][MVE] findVCMPToFoldIntoVPS. NFC.
This adds ReachingDefAnalysis (RDA) to the VPTBlock pass, so that we can
reimplement findVCMPToFoldIntoVPS with just a few calls to RDA.
Differential Revision: https://reviews.llvm.org/D71330
Guillaume Chatelet [Thu, 12 Dec 2019 14:32:19 +0000 (15:32 +0100)]
[Alignment][NFC] Adding Align compatible methods to IntrinsicInst/IRBuilder
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D71420
LLVM GN Syncbot [Thu, 12 Dec 2019 15:01:28 +0000 (15:01 +0000)]
gn build: Merge
600d123c6ff
Momchil Velikov [Thu, 12 Dec 2019 14:59:04 +0000 (14:59 +0000)]
[ARM][CMSE] Add CMSE header and builtins
This is patch C2 as mentioned in RFC
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html
This adds CMSE builtin functions, and introduces arm_cmse.h header which has
useful macros, functions, and data types for end-users of CMSE.
Patch by Javed Absar.
Diferential Revision: https://reviews.llvm.org/D70817
Tom Stellard [Thu, 12 Dec 2019 13:55:14 +0000 (05:55 -0800)]
AMDGPU/SILoadStoreOptimizer: Simplify function
Reviewers: arsenm, nhaehnle
Reviewed By: arsenm
Subscribers: merge_guards_bot, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71044
Alexey Bader [Thu, 12 Dec 2019 09:52:28 +0000 (12:52 +0300)]
[OpenMP][Test] Add check for aux-triple predefined macros
Summary:
Make sure that auxiliary target specific macros are defined in OpenMP
mode.
Reviewers: ABataev, jdoerfert
Subscribers: guansong, ebevhan, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71413
Sam Parker [Thu, 12 Dec 2019 14:30:09 +0000 (14:30 +0000)]
[ARM][MVE] Sink vector shift operand
Recommit
e0b966643fc2. sub instructions were being generated for the
negated value, and for some reason they were the register only ones.
I think the problem was because I was grabbing the 'zero' from
vmovimm, which is a target constant. Now I'm just generating a new
Constant zero and so rsb instructions are now generated.
Original commit message:
The shift amount operand can be provided in a general purpose
register so sink it. Flip the vdup and negate so the existing
patterns can be used for matching.
Differential Revision: https://reviews.llvm.org/D70841
Pavel Labath [Mon, 25 Nov 2019 13:03:51 +0000 (14:03 +0100)]
[lldb/DWARF] Fix v5 location lists for dwo files
Dwo files don't have a DW_AT_loclists_base -- set one explicitly. Also,
make sure we use the correct location list flavour for v5.
James Henderson [Thu, 12 Dec 2019 09:35:59 +0000 (09:35 +0000)]
[llvm-dwarfdump] Add blank line after printing line table
This helps delineate it in the output from later tables or other output.
Reviewed by: JDevlieghere
Differential Revision: https://reviews.llvm.org/D71344
Michael Forster [Thu, 12 Dec 2019 13:30:02 +0000 (14:30 +0100)]
[clangd] Implement "textDocument/documentLink" protocol support
Summary:
This adds an implementation for the "textDocument/documentLink" LSP request.
It returns links for all `#include` directives to the resolved target files.
Fixes https://github.com/clangd/clangd/issues/217.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70872
Tyker [Tue, 10 Dec 2019 21:09:20 +0000 (22:09 +0100)]
[Diagnsotics] Small Improvement on -Wmisleading-indentation
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xbolva00
Differential Revision: https://reviews.llvm.org/D71083
Sam Parker [Thu, 12 Dec 2019 13:51:02 +0000 (13:51 +0000)]
[NFC][ARM] Add some test triples
Add thumb and thumb2 to a couple of the test files.
Hideto Ueno [Thu, 12 Dec 2019 13:42:40 +0000 (13:42 +0000)]
[Attributor][NFC] Fix comments and unnecessary comma
Hideto Ueno [Thu, 12 Dec 2019 12:26:30 +0000 (12:26 +0000)]
[Attributor] [NFC] Use `checkForAllUses` helpr in `AAHeapToStackImpl::updateImpl`
Summary: Remove `Worklist` iteration and make use `checkForAllUses`. There is no test chage.
Reviewers: sstefan1, jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71352
Hideto Ueno [Thu, 12 Dec 2019 12:26:09 +0000 (12:26 +0000)]
[Attributor][NFC] Refactoring `AANoFreeArgument::updateImpl`
Summary: Refactoring `AANoFreeArgument::updateImpl`. There is no test change.
Reviewers: sstefan1, jdoerfert
Reviewed By: sstefan1
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71349
Gabor Marton [Tue, 29 Oct 2019 14:48:45 +0000 (15:48 +0100)]
[Analyzer][Docs][NFC] Add CodeChecker to the command line tools
We add a new common html file that documents the available command line
tools. Also a new html is added for a brief description of CodeChecker,
this way complementing scan-build.
Differential Revision: https://reviews.llvm.org/D70439
stozer [Tue, 10 Dec 2019 14:33:17 +0000 (14:33 +0000)]
[DebugInfo] Prevent invalid fragments at ISel from dropping debug info
During SelectionDAG, if a value which is associated with a DBG_VALUE
needs to be split across multiple registers, the DBG_VALUE will be split
into a set of fragment expressions to recreate the original value.
If one or more of these fragments cannot be created, they would
previously be silently dropped, causing the old debug value to live past
its expiry date. This patch fixes this issue by keeping invalid
fragments while setting their value as Undef.
Differential revision: https://reviews.llvm.org/D70248
Russell Gallop [Thu, 12 Dec 2019 12:18:12 +0000 (12:18 +0000)]
[Support] Try to fix bot failure after
8ddcd1dc26
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/41755
Kirill Bobyrev [Thu, 12 Dec 2019 12:10:59 +0000 (13:10 +0100)]
[clangd] Rename constructors and destructors in cross-file case
* Use ad-hoc Decl canonicalization from Clang-Rename to allow renaming
constructors and destructors while using cross-file rename.
* Manually handle the destructor selection
* Add unit tests to prevent regressions and ensure the correct behaviour
Reviewed by: sammccall
Differential Revision: https://reviews.llvm.org/D71247
Russell Gallop [Thu, 5 Dec 2019 09:43:49 +0000 (09:43 +0000)]
[Support] Extend TimeProfiler to support multiple threads
This makes TimeTraceProfilerInstance thread local. Added
timeTraceProfilerFinishThread() which moves the thread local instance to
a global vector of instances. timeTraceProfilerWrite() then writes
recorded data from all instances.
Threads are identified based on their thread ids. Totals are reported
with artificial thread ids higher than the real ones.
Replaced raw pointer for TimeTraceProfilerInstance with unique_ptr.
Differential Revision: https://reviews.llvm.org/D71059
Sam McCall [Wed, 11 Dec 2019 14:40:23 +0000 (15:40 +0100)]
[Tooling/Syntax] Helpers to find spelled tokens touching a location.
Summary: Useful when positions are used to target nodes, with before/after ambiguity.
Reviewers: ilya-biryukov, kbobyrev
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71356
Kadir Cetinkaya [Thu, 12 Dec 2019 11:53:58 +0000 (12:53 +0100)]
[clangd] Fix windows tests
Gabor Buella [Thu, 12 Dec 2019 11:46:17 +0000 (12:46 +0100)]
[NFC] - Partially revert
9c48c2f9c477007234c
Georgii Rymar [Wed, 11 Dec 2019 10:38:52 +0000 (13:38 +0300)]
[llvm-readobj][test] - Add a test for testing regular section flags and cleanup flags testing.
This:
1) Adds a test for testing all section flags (`section-flags.test`).
2) Renames `sec-flags.test`->`section-arch-flags.test`
and performs a clean up.
3) Removes `compression.zlib.style.elf-x86-64` binary and a test case
for SHF_COMPRESSED flag, because them are now excessive.
4) Adds missing MIPS flags and a test for SHF_ARM_PURECODE.
Differential revision: https://reviews.llvm.org/D71333
Raphael Isemann [Thu, 12 Dec 2019 10:45:06 +0000 (11:45 +0100)]
[lldb] Remove ClangASTMetrics
Summary: Not once have I looked at these numbers in a log and considered them useful. Also this should not have been implemented via an unguarded list of globals.
Reviewers: martong, shafik
Reviewed By: shafik
Subscribers: rnkovacs, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71336
Pavel Labath [Mon, 9 Dec 2019 17:24:45 +0000 (18:24 +0100)]
[lldb] "See through" atomic types in ClangASTContext
Summary:
This enables us to display the contents of atomic structs. Calling the
removal of _Atomic "desugaring" is not fully correct as it does more
than remove sugar, but it is the right thing to do for most of the
things that we care about. We can change this back once we decide to
support atomic types more comprehensively.
Reviewers: teemperor, shafik
Subscribers: jfb, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71262
Kadir Cetinkaya [Thu, 12 Dec 2019 09:41:27 +0000 (10:41 +0100)]
[clangd] Fix hover crashing on null types
Summary: Fixes https://github.com/clangd/clangd/issues/225
Reviewers: sammccall, ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71403
Mirko Brkusanin [Thu, 12 Dec 2019 10:19:41 +0000 (11:19 +0100)]
[Mips] Add support for min/max/umin/umax atomics
In order to properly implement these atomic we need one register more than other
binary atomics. It is used for storing result from comparing values in addition
to the one that is used for actual result of operation.
https://reviews.llvm.org/D71028
Nicola Zaghen [Thu, 12 Dec 2019 10:25:14 +0000 (10:25 +0000)]
Temporarily Revert "[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same."
This reverts commit
5f6208778ff92567c57d7c1e2e740c284d7e69a5.
This caused failures in Transforms/PhaseOrdering/scev-custom-dl.ll
const: Assertion `getBitWidth() == CR.getBitWidth() && "ConstantRange types don't agree!"' failed.
Gabor Buella [Thu, 12 Dec 2019 10:26:54 +0000 (11:26 +0100)]
[NFC] - Typo fix in test/CodeGenCXX/runtime-dllstorage.cpp
Reviewed By: Jim
Differential Revision: https://reviews.llvm.org/D48921
Raphael Isemann [Thu, 12 Dec 2019 09:53:16 +0000 (10:53 +0100)]
[lldb][NFC] Don't implement ClangASTContext::SetMetadata again as a static method
We always have an ClangASTContext when we call this method so we might as
well always call the non-static version.
Nicola Zaghen [Mon, 2 Dec 2019 11:13:43 +0000 (11:13 +0000)]
[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same.
GEP index size can be specified in the DataLayout, introduced in D42123. However, there were still places
in which getIndexSizeInBits was used interchangeably with getPointerSizeInBits. This notably caused issues
with Instcombine's visitPtrToInt; but the unit tests was incorrect, so this remained undiscovered.
Differential Revision: https://reviews.llvm.org/D68328
Patch by Joseph Faulls!
Ilya Biryukov [Thu, 12 Dec 2019 09:50:32 +0000 (10:50 +0100)]
[Tooling] Move raw string literal out of a macro call. NFC
Should fix buildbots with some older gcc versions.
Cullen Rhodes [Wed, 11 Dec 2019 13:56:40 +0000 (13:56 +0000)]
[AArch64][SVE] Remove nxv1f32 and nxv1f64 as legal types
Summary: Also cleans up ZPR register class definition.
Reviewers: sdesmalen, cameron.mcinally, efriedma
Reviewed By: efriedma
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl,
llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71351
Jon Chesterfield [Thu, 12 Dec 2019 09:35:39 +0000 (09:35 +0000)]
[libomptarget][nfc] Add missing header for amdgcn/target_impl
Georgii Rymar [Tue, 10 Dec 2019 14:06:16 +0000 (17:06 +0300)]
[llvm-readobj][test] - Cleanup and split tests in tools/llvm-readobj folder.
tools/llvm-readobj currently contains tests that are either general for
all file types or that mix file types inside. This patch refactors
these test and leaves only general tests in that folder. All other
tests were moved to ELF/COFF/MachO and wasm accordingly.
I tried to minimize amount of changes, so most of the test parts
remained unchanged. Any further refactorings and improvements for
particular tests should be done independently from this patch.
Differential revision: https://reviews.llvm.org/D71269
Puyan Lotfi [Thu, 12 Dec 2019 08:27:47 +0000 (03:27 -0500)]
[NFC][llvm][MIRVRegNamerUtils] Moving methods around. Making some private.
Making all externally unused methods private in MIRVRegNamerUtils.h.
Moving or deleting a couple other methods around.
Eric Christopher [Thu, 12 Dec 2019 08:31:23 +0000 (00:31 -0800)]
Revert unintentional change to compiler-rt as part of the __bit_reference revert.
Calixte Denizet [Tue, 10 Dec 2019 12:22:33 +0000 (13:22 +0100)]
[compiler-rt] Add a critical section when flushing gcov counters
Summary:
Counters can be flushed in a multi-threaded context for example when the process is forked in different threads (https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp#L632-L663).
In order to avoid pretty bad things, a critical section is needed around the flush.
We had a lot of crashes in this code in Firefox CI when we switched to clang for linux ccov builds and those crashes disappeared with this patch.
Reviewers: marco-c, froydnj, dmajor, davidxl, vsk
Reviewed By: marco-c, dmajor
Subscribers: ahatanak, froydnj, dmajor, dberris, jfb, #sanitizers, llvm-commits, sylvestre.ledru
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D70910
Eric Christopher [Thu, 12 Dec 2019 08:22:07 +0000 (00:22 -0800)]
Temporarily Revert "[libc++] Fix -Wdeprecated-copy warnings in __bit_reference"
as it's causing test failures due to mismatched visibility.
This reverts commit
02bb20223bda5add729402962c70d0ebd0d98af2.
Alexey Lapshin [Tue, 10 Dec 2019 10:00:19 +0000 (13:00 +0300)]
[DWARF5][DWARFVerifier] Check that Skeleton compilation unit does not have children.
That patch adds checking into DWARFVerifier that the Skeleton
compilation unit does not have children.
Differential Revision: https://reviews.llvm.org/D71244
Sam Parker [Thu, 12 Dec 2019 07:52:18 +0000 (07:52 +0000)]
Revert "[ARM][MVE] Sink vector shift operand"
This reverts commit
e0b966643fc2030442ffbae9b677247be697673b.
Instruction selection is failing with expensive checks.
Eric Christopher [Thu, 12 Dec 2019 07:49:07 +0000 (23:49 -0800)]
[libc++] Fix -Wdeprecated-copy warnings in __bit_reference
Add a couple of default copy constructors to fix the warning.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D71395
Sam Parker [Thu, 12 Dec 2019 07:34:49 +0000 (07:34 +0000)]
[ARM][MVE] Sink vector shift operand
The shift amount operand can be provided in a general purpose
register so sink it. Flip the vdup and negate so the existing
patterns can be used for matching.
Differential Revision: https://reviews.llvm.org/D70841
Akira Hatanaka [Thu, 12 Dec 2019 07:17:49 +0000 (23:17 -0800)]
Fix an error in the block ABI documentation sample code
rdar://problem/
38663011
Ilya Biryukov [Thu, 12 Dec 2019 07:04:21 +0000 (08:04 +0100)]
[Syntax] Build nodes for simple cases of top level declarations
Summary:
More complicated nodes (e.g. template declarations) will be implemented
in the follow-up patches.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: merge_guards_bot, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70856
Johannes Doerfert [Thu, 12 Dec 2019 05:59:46 +0000 (23:59 -0600)]
[OpenMP][Docs] Mark 5.0 features worked on and list 5.1 features
Wenlei He [Fri, 22 Nov 2019 07:59:41 +0000 (23:59 -0800)]
[AutoFDO] Statistic for context sensitive profile guided inlining
Summary: AutoFDO compilation has two places that do inlining - the sample profile loader that does inlining with context sensitive profile, and the regular inliner as CGSCC pass. Ideally we want most inlining to come from sample profile loader as that is driven by context sensitive profile and also retains context sensitivity after inlining. However the reality is most of the inlining actually happens during regular inliner. To track the number of inline instances from sample profile loader and help move more inlining to sample profile loader, I'm adding statistics and optimization remarks for sample profile loader's inlining.
Reviewers: wmi, davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70584
Nico Weber [Thu, 12 Dec 2019 03:48:38 +0000 (22:48 -0500)]
Puyan Lotfi [Wed, 11 Dec 2019 06:39:17 +0000 (01:39 -0500)]
[llvm][MIRVRegNamerUtils] Adding hashing on memoperands.
No more hash collisions for memoperands. Now the MIRCanonicalization
pass shouldn't hit hash collisions when dealing with nearly identical
memory accessing instructions when their memoperands are in fact different.
Differential Revision: https://reviews.llvm.org/D71328
Cameron McInally [Wed, 11 Dec 2019 23:07:07 +0000 (17:07 -0600)]
[AArch64][SVE] Add patterns for scalable vselect
This patch matches scalable vector selects to predicated move instructions.
Differential Revision: https://reviews.llvm.org/D71298
Reid Kleckner [Wed, 11 Dec 2019 15:55:26 +0000 (07:55 -0800)]
[IR] Split out target specific intrinsic enums into separate headers
This has two main effects:
- Optimizes debug info size by saving 221.86 MB of obj file size in a
Windows optimized+debug build of 'all'. This is 3.03% of 7,332.7MB of
object file size.
- Incremental step towards decoupling target intrinsics.
The enums are still compact, so adding and removing a single
target-specific intrinsic will trigger a rebuild of all of LLVM.
Assigning distinct target id spaces is potential future work.
Part of PR34259
Reviewers: efriedma, echristo, MaskRay
Reviewed By: echristo, MaskRay
Differential Revision: https://reviews.llvm.org/D71320
Reid Kleckner [Wed, 11 Dec 2019 19:54:58 +0000 (11:54 -0800)]
Rename TTI::getIntImmCost for instructions and intrinsics
Soon Intrinsic::ID will be a plain integer, so this overload will not be
possible.
Rename both overloads to ensure that downstream targets observe this as
a build failure instead of a runtime failure.
Split off from D71320
Reviewers: efriedma
Differential Revision: https://reviews.llvm.org/D71381
Francis Visoiu Mistrih [Tue, 10 Dec 2019 23:10:52 +0000 (15:10 -0800)]
[Remarks][Driver] Ask for line tables when remarks are enabled
Serialized remarks contain debug locations for each remark, by storing a
file path, a line, and a column.
Also, remarks support being embedded in a .dSYM bundle using a separate
section in object files, that is found by `dsymutil` through the debug
map.
In order for tools to map addresses to source and display remarks in the
source, we need line tables, and in order for `dsymutil` to find the
object files containing the remark section, we need to keep the debug
map around.
Differential Revision: https://reviews.llvm.org/D71325
Nico Weber [Thu, 12 Dec 2019 01:41:18 +0000 (20:41 -0500)]
gn build: (manually) merge
d23c61490c
Eric Fiselier [Thu, 12 Dec 2019 01:32:14 +0000 (20:32 -0500)]
[libc++abi] Fix non-constant initialization of default terminate
handlers.
Eric Fiselier [Thu, 12 Dec 2019 01:26:30 +0000 (20:26 -0500)]
[libc++] Require C++14 in all cases.
LLVM has moved to C++14, and the libc++ build should too.
C++14 is needed to provide constant initialization for certain global
objects.
I suspect this change may break some older GCC buildbots, and I'll clean
those up as they fall.
Gabor Horvath [Wed, 11 Dec 2019 19:34:44 +0000 (11:34 -0800)]
[analyzer] Do not cache out on some shared implicit AST nodes
Some AST nodes which stands for implicit initialization is shared. The analyzer
will do the same evaluation on the same nodes resulting in the same state. The
analyzer will "cache out", i.e. it thinks that it visited an already existing
node in the exploded graph. This is not true in this case and we lose coverage.
Since these nodes do not really require any processing from the analyzer
we just omit them from the CFG.
Differential Revision: https://reviews.llvm.org/D71371
Sanjay Patel [Thu, 12 Dec 2019 00:38:37 +0000 (19:38 -0500)]
[AArch64][x86] add tests for possible infinite loops in DAGCombiner; NFC
This is a reduction of a test that failed (infinite looped)
with rGd1f0bdf2d2df (subsequently reverted). I've duplicated
it for 2 targets to increase coverage - everything down here
is wobbly.
Michael Spencer [Thu, 12 Dec 2019 00:34:31 +0000 (16:34 -0800)]
Revert "[clang][clang-scan-deps] Aggregate the full dependency information."
This reverts commit
f978ea498309adaebab8fbf1cd6e520e7e0e11f1.
It broke clang-ppc64be-linux, but not sure why yet.
Vedant Kumar [Wed, 11 Dec 2019 23:55:48 +0000 (15:55 -0800)]
Revert "[DWARF] Allow cross-CU references of subprogram definitions"
This reverts commit
30038da15b18ac4e34b9ea7a648382ae481e4770. It causes
the stage2 thinLTO bot to fail with:
Assertion failed: (CU.getDIE(CalleeSP) && "Expected declaration subprogram DIE for callee")
rdar://
57840415
Johannes Doerfert [Tue, 5 Nov 2019 05:00:36 +0000 (23:00 -0600)]
[OpenMP] Use the OpenMP-IR-Builder
This is a follow up patch to use the OpenMP-IR-Builder, as discussed on
the mailing list ([1] and later) and at the US Dev Meeting'19.
[1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html
Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim
Subscribers: ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69922
Michael Spencer [Mon, 28 Oct 2019 21:26:45 +0000 (14:26 -0700)]
[clang][clang-scan-deps] Aggregate the full dependency information.
Differential Revision: https://reviews.llvm.org/D70268
Julian Lettner [Tue, 26 Feb 2019 06:41:52 +0000 (22:41 -0800)]
[lit] Improve formatting of error messages. NFC
Jonas Devlieghere [Wed, 11 Dec 2019 22:27:58 +0000 (14:27 -0800)]
[lldb/CMake] Simplify linking against curses
Centralize the logic to determine what libraries to link against for
curses in the CMake file where it is actually being used. Use
target_include_directories instead of include_directories.