Commit Graph

334482 Commits

Author SHA1 Message Date
JonChesterfield
8adae6027c [libomptarget][nfc] Extract function from data_sharing, move to common
Summary:
[libomptarget][nfc] Extract function from data_sharing, move to common

Finding the first active thread in the warp is different on nvptx and amdgcn,
mostly due to warp size and the desire for efficiency.

Reviewers: ABataev, jdoerfert, grokos

Reviewed By: jdoerfert

Subscribers: jvesely, mgorny, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D71643
2019-12-18 19:39:35 +00:00
Adrian McCarthy
9d38fd8d0b [NFC] Update FIXME for one VFS test
The VFS/subframework-symlink.m test is still XFAIL on Windows, but for
a different reason than those fixed in PR43272, so I've updated the
PR number.
2019-12-18 11:38:04 -08:00
Adrian McCarthy
738b5c9639 Fix more VFS tests on Windows
Since VFS paths can be in either Posix or Windows style, we have to use
a more flexible definition of "absolute" path.

The key here is that FileSystem::makeAbsolute is now virtual, and the
RedirectingFileSystem override checks for either concept of absolute
before trying to make the path absolute by combining it with the current
directory.

Differential Revision: https://reviews.llvm.org/D70701
2019-12-18 11:38:04 -08:00
Saar Raz
12038be20e [Concepts] Fix crash in D41910
Differential Revision: https://reviews.llvm.org/D41910
2019-12-18 21:31:33 +02:00
Danilo Carvalho Grael
c7abf88411 Revert "[AArch64][SVE] Replace integer immediate intrinsics with splat vector variant"
This reverts commit 830e08b98b and eb1857ce0d.

This commit leads to an unexpected failure on test/CodeGen/AArch64/sve-gather-scatter-dag-combine.ll.

The review will need more changes before its re-commited.
2019-12-18 14:14:10 -05:00
Jonas Paulsson
ca520592c0 [Clang FE, SystemZ] Don't add "true" value for the "mnop-mcount" attribute.
Let the "mnop-mcount" function attribute simply be present or non-present.
Update SystemZ backend as well to use hasFnAttribute() instead.

Review: Ulrich Weigand
https://reviews.llvm.org/D71669
2019-12-18 11:04:13 -08:00
Saar Raz
fc0731b98a [Concepts] Constrained partial specializations and function overloads.
Added support for constraint satisfaction checking and partial ordering of constraints in constrained partial specialization and function template overloads.

Phabricator: D41910
2019-12-18 21:01:31 +02:00
Jakub Kuderski
406b6019cd [InstCombine] Allow to limit the max number of iterations
Summary:
This patch teaches InstCombine to accept a new parameter: maximum number of iterations over functions.

InstCombine tries to simplify instructions by iterating over the whole function until the function stops changing. As a consequence, the last iteration before reaching a fixpoint visits all instructions in the worklist and never performs any rewrites.

Bounding the number of iterations can have 2 benefits:
* In case the users of the pass can make a good guess about the number of required iterations, we can save the time normally spent on the last iteration that doesn't change anything.
* When the wants to use InstCombine as a cleanup pass, it may be enough to run just a few iterations and stop even before reaching a fixpoint. This can be also useful for implementing a lightweight pass pipeline (think `-O1`).

This patch does not change the behavior of opt or Clang -- limiting the number of iterations is entirely opt-in.

Reviewers: fhahn, davide, spatel, foad, nlopes, grosser, lebedev.ri, nikic, xbolva00

Reviewed By: spatel

Subscribers: craig.topper, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71145
2019-12-18 13:48:54 -05:00
Richard Smith
b6e90a1a10 llvm-cxxmap: fix support for remapping non-mangled names.
Remappings involving extern "C" names were already supported in the
context of <local-name>s, but this support didn't work for remapping the
complete mangling itself. (Eg, we would remap X<foo> but not foo itself,
if foo is an extern "C" function.)
2019-12-18 10:47:02 -08:00
Craig Topper
cfe316007f [SelectionDAGBuilder] Use getConstant instead of getTargetConstant to build the offset for struct types in getUniformBase.
getTargetConstant prevents any optimizations from operating on the
value and basically says its already been iseled. But since we
want the index to be in a register, this isn't true.

Prior to this we were generating a vbroadcast with an immediate
argument which is illegal and was flagged by the expensive checks
bot.
2019-12-18 10:44:28 -08:00
Stefan Pintilie
ec3d6f3ecb [PowerPC][NFC] Refactor splat of constant to vector.
Refactor the splatting of a constant to a vector so that common code is used
both for Power9 and Power8.

Patch by: Anil Mahmud

Differential Revision: https://reviews.llvm.org/D71481
2019-12-18 12:43:19 -06:00
Amy Huang
a85f5efd95 Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr.
Summary:
This adds parsing of the qualifiers __ptr32, __ptr64, __sptr, and __uptr and
lowers them to the corresponding address space pointer for 32-bit and 64-bit pointers.
(32/64-bit pointers added in https://reviews.llvm.org/D69639)

A large part of this patch is making these pointers ignore the address space
when doing things like overloading and casting.

https://bugs.llvm.org/show_bug.cgi?id=42359

Reviewers: rnk, rsmith

Subscribers: jholewinski, jvesely, nhaehnle, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71039
2019-12-18 10:41:12 -08:00
Danilo Carvalho Grael
eb1857ce0d [AArch64][SVE] Fix gather scatter dag combine test. 2019-12-18 13:44:25 -05:00
Danilo Carvalho Grael
830e08b98b [AArch64][SVE] Replace integer immediate intrinsics with splat vector variant
Summary: Replace the integer immediate intrisics with splat vector variants so they can be applied as optimizations for the C/C++ intrinsics.

Reviewers: sdesmalen, huntergr, rengolin, efriedma, c-rhodes, mgudim, kmclaughlin

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits, amehsan

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71614
2019-12-18 13:11:21 -05:00
Michael Trent
6f95d33e2b [ MC ] Match labels to existing fragments even when switching sections.
(This commit restores the original branch (4272372c57) and applies an
additional change dropped from the original in a bad merge. This change
should address the previous bot failures. Both changes reviewed by pete.)

Summary:
This commit builds upon Derek Schuff's 2014 commit for attaching labels to
existing fragments ( Diff Revision: http://reviews.llvm.org/D5915 )

When temporary labels appear ahead of a fragment, MCObjectStreamer will
track the temporary label symbol in a "Pending Labels" list. Labels are
associated with fragments when a real fragment arrives; otherwise, an empty
data fragment will be created if the streamer's section changes or if the
stream finishes.

This commit moves the "Pending Labels" list into each MCStream, so that
this label-fragment matching process is resilient to section changes. If
the streamer emits a label in a new section, switches to another section to
do other work, then switches back to the first section and emits a
fragment, that initial label will be associated with this new fragment.
Labels will only receive empty data fragments in the case where no other
fragment exists for that section.

The downstream effects of this can be seen in Mach-O relocations. The
previous approach could produce local section relocations and external
symbol relocations for the same data in an object file, and this mix of
relocation types resulted in problems in the ld64 Mach-O linker. This
commit ensures relocations triggered by temporary labels are consistent.

Reviewers: pete, ab, dschuff

Reviewed By: pete, dschuff

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71368
2019-12-18 09:55:54 -08:00
Sanjay Patel
b99111b3e4 [AArch64] add tests for bitcasted DUPLANE; NFC
See D63815 for context/motivation.
2019-12-18 12:14:20 -05:00
Mitch Phillips
b19d87b16f Revert "Add an -fno-temp-file flag for compilation"
This reverts commit d129aa1d53.

This broke the MSan buildbots. More information available in the
original PR: https://reviews.llvm.org/D70615
2019-12-18 09:05:09 -08:00
Mitch Phillips
2f4c3c565a [NFC] Fix sanitizer lint problem that's breaking Android bot.
Fixes the lint issue introduced by
e14ff22694
2019-12-18 08:47:31 -08:00
Raphael Isemann
9a8c803771 Fix modules build by adding missing includes to LTO/Config.h 2019-12-18 17:43:19 +01:00
stozer
89d19d60ad Reapply: [DebugInfo] Correctly handle salvaged casts and split fragments at ISel
This reverts commit 1f3dd83cc1, reapplying
commit bb1b0bc4e5.

The original commit failed on some builds seemingly due to the use of a
bracketed constructor with an std::array, i.e. `std::array<> arr({...})`.
2019-12-18 16:26:42 +00:00
Guillaume Chatelet
32d384c020 [llvm-exegesis][NFC] internal changes
Summary:
BitVectors are now cached to lower memory utilization.
Instructions have reference semantics.

Reviewers: courbet

Subscribers: sdardis, tschuett, jrtc27, atanasyan, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71653
2019-12-18 17:24:07 +01:00
Michał Górny
d3d1ca14ce [compiler-rt] [test] Disable ASLR on UBSAN+[AMT]SAN tests on NetBSD 2019-12-18 17:21:15 +01:00
Michał Górny
9102a59084 [compiler-rt] [test] Disable ASLR on LSAN+ASAN tests on NetBSD 2019-12-18 17:21:14 +01:00
Mircea Trofin
5a956c85df [NFC][InlineCost] Run clang-format on InlineCost.cpp
Reviewers: davidxl

Reviewed By: davidxl

Subscribers: Jim, eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71646
2019-12-18 08:10:44 -08:00
Sanjay Patel
e67462a719 [AArch64] update test checks; NFC
The common prefix reduces a bunch of replication; not sure why it
didn't happen before.
2019-12-18 11:05:06 -05:00
LLVM GN Syncbot
4765dc726b gn build: Merge 9883d7edc6 2019-12-18 16:00:24 +00:00
Whitney Tsang
9883d7edc6 [LoopUtils] Updated deleteDeadLoop() to handle loop nest.
Reviewer: kariddi, sanjoy, reames, Meinersbur, bmahjour, etiotto,
kbarton
Reviewed By: Meinersbur
Subscribers: mgorny, hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D70939
2019-12-18 15:59:45 +00:00
Michał Górny
d372576d8a [compiler-rt] [test] Disable ASLR for fuzzer tests on NetBSD 2019-12-18 16:51:31 +01:00
Michał Górny
6207b060ad [clang] [cmake] Fix gen_ast_dump_json_test.py binary dir
Use correct directory to put gen_ast_dump_json_test.py instead of
LLVM_BINARY_DIR.  This fixes attempting to write to /usr when building
clang standalone.

Differential Revision: https://reviews.llvm.org/D71615
2019-12-18 16:45:42 +01:00
evgeny
ad364956ed [ThinLTO] Show preserved symbols in DOT files
Differential revision: https://reviews.llvm.org/D71608
2019-12-18 18:33:15 +03:00
Daniel Sanders
3a779b7dfd [globalisel] Small correction to the fixup in 0a0813962d. The two ID's are not the same size
The rule ID is a uint64_t as it has global scope but the UID is scoped to
the rule and expected to be much smaller so it's only unsigned.
2019-12-18 14:56:23 +00:00
Kamil Rytarowski
e14ff22694 [compiler-rt] Sync NetBSD ioctl definitions with 9.99.26
Document the minimal version supported to 9.0.
2019-12-18 15:44:01 +01:00
Daniel Sanders
c3cb089a87 [gicombiner] Import tryCombineIndexedLoadStore()
Summary:
Now that arbitrary data is supported, import tryCombineIndexedLoadStore()

Depends on D69147

Reviewers: bogner, volkan

Reviewed By: volkan

Subscribers: hiraditya, arphaman, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69151
2019-12-18 14:41:38 +00:00
Roman Lebedev
c6a56c9a50
[NFC][InstCombine] Autogenerate assume.ll test 2019-12-18 17:16:19 +03:00
Daniel Sanders
0a0813962d [globalisel] Attempt to fix ARM bots that emit the correct number in the wrong place 2019-12-18 14:15:11 +00:00
Hans Wennborg
d129aa1d53 Add an -fno-temp-file flag for compilation
Our build system does not handle randomly named files created during
the build well. We'd prefer to write compilation output directly
without creating a temporary file. Function parameters already
existed to control this behavior but were not exposed all the way out
to the command line.

Patch by Zachary Henkel!

Differential revision: https://reviews.llvm.org/D70615
2019-12-18 15:07:43 +01:00
Sanjay Patel
5e5e99c041 [AArch64] match fcvtl2 with bitcasted extract
This should eliminate a regression seen in D63815.

If we are FP extending the high half extract of a vector,
we should be able to peek through a bitcast sitting
between the extract and extend.

This replaces tablegen patterns with a more general
DAG to DAG override, so we can handle any casted type.

Differential Revision: https://reviews.llvm.org/D71515
2019-12-18 08:47:07 -05:00
Sanjay Patel
c7492fbd4e [InstCombine] add tests for copysign; NFC 2019-12-18 07:56:36 -05:00
Raphael Isemann
d8a3194987 [lldb][NFC] Add unit test for persistent variable lookup with ClangExpressionDeclMap
This adds a unit test for looking up persistent declarations in the scratch AST
context. Also adds the `GetPersistentDecl` hook to the ClangExpressionDeclMap
that this unit test can emulate looking up persistent variables without having
a lldb_private::Target.
2019-12-18 13:50:05 +01:00
Daniel Sanders
55c57408b0 [gicombiner] Add support for arbitrary match data being passed from match to apply
Summary:
This is used by the extending_loads combine to tell the apply step which
use is the preferred one to fold and the other uses should be re-written
to consume.

Depends on D69117

Reviewers: volkan, bogner

Reviewed By: volkan

Subscribers: hiraditya, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69147
2019-12-18 12:27:29 +00:00
stozer
1f3dd83cc1 Revert "[DebugInfo] Correctly handle salvaged casts and split fragments at ISel"
Reverted due to build failure on windows bots.

This reverts commit bb1b0bc4e5.
2019-12-18 11:46:10 +00:00
LLVM GN Syncbot
bad6a76041 gn build: Merge 7ea2e5195a 2019-12-18 11:37:45 +00:00
Daniel Sanders
7ea2e5195a Revert "Temporarily Revert "[gicombiner] Add the MatchDag structure and parse instruction DAG's from the input""
This reverts commit e62e760f29.

The issue @uweigand raised should have been fixed by iterating over the
vector that owns the operand list data instead of the FoldingSet.

The MSVC issue raised by @thakis should have been fixed by relaxing the
regexes a little. I don't have a Windows machine available to test that so
I tested it by using `perl -p -e 's/0x([0-9a-f]+)/\U\1\E/g' to convert the
output of %p to the windows style.

I've guessed at the issue @phosek raised as there wasn't enough information
to investigate it. What I think is happening on that bot is the -debug
option isn't available because the second stage build is a release build.
I'm not sure why other release-mode bots didn't report it though.
2019-12-18 11:37:12 +00:00
LLVM GN Syncbot
2f45693030 gn build: Merge 1ad15046dc 2019-12-18 11:25:51 +00:00
Ilya Biryukov
c1bbefef9d [Syntax] Use a hash table to search for tokens by their location
This is both more efficient and avoids corner cases in
`SourceManager::isBeforeInTranslationUnit`.

The change is trivial and clearly a performance improvement on the hot
path of building the syntax tree, so sending without review.
2019-12-18 12:24:00 +01:00
Ilya Biryukov
038f53882e [Syntax] Uppercase the first letter of the test name. NFC
To match naming style of other tests.
2019-12-18 12:20:30 +01:00
Ilya Biryukov
1ad15046dc [Syntax] Allow to mutate syntax trees
Summary:
This patch adds facilities to mutate the syntax trees and produce
corresponding text replacements.

The public interface of the syntax library now includes facilities to:
    1. perform type-safe modifications of syntax trees,
    2. compute textual replacements to apply the modifications,
    3. create syntax trees not backed by the source code.

For each of the three, we only add a few example transformations in this
patch to illustrate the idea, support for more kinds of nodes and
transformations will be done in follow-up patches.

The high-level mutation operations are implemented on top of operations
that allow to arbitrarily change the trees. They are considered to be
implementation details and are not available to the users of the
library.

Reviewers: sammccall, gribozavr2

Reviewed By: gribozavr2

Subscribers: merge_guards_bot, mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64573
2019-12-18 12:19:03 +01:00
stozer
bb1b0bc4e5 [DebugInfo] Correctly handle salvaged casts and split fragments at ISel
Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop
casts impossible. This patch enables the salvaging of casts by using the
DW_OP_LLVM_convert operator for SExt and Trunc instructions.

There is another issue which is exposed by this fix, in which fragment
DIExpressions (which are preserved more readily by this patch) for
values that must be split across registers in ISel trigger an assertion,
as the 'split' fragments extend beyond the bounds of the fragment
DIExpression causing an error. This patch also fixes this issue by
checking the fragment status of DIExpressions which are to be split, and
dropping fragments that are invalid.
2019-12-18 11:09:18 +00:00
Gabor Marton
bc5b7e21e3 recommit: [ASTImporter] Friend class decl should not be visible in its context
Summary:
In the past we had to use DeclContext::makeDeclVisibleInContext to make
friend declarations available for subsequent lookup calls and this way
we could chain (redecl) the structurally equivalent decls.
By doing this we created an AST that improperly made declarations
visible in some contexts, so the AST was malformed.
Since we use the importer specific lookup this is no longer necessary,
because with that we can find every previous nodes.

Reviewers: balazske, a_sidorin, a.sidorin, shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71020
2019-12-18 11:43:46 +01:00
Sven van Haastregt
308b8b76ce [OpenCL] Add builtin function extension handling
Provide a mechanism to attach OpenCL extension information to builtin
functions, so that their use can be restricted according to the
extension(s) the builtin is part of.

Patch by Pierre Gondois and Sven van Haastregt.

Differential Revision: https://reviews.llvm.org/D71476
2019-12-18 10:13:51 +00:00