Commit Graph

372909 Commits

Author SHA1 Message Date
Amy Huang 1b63177a56 Revert "[llvm-symbolizer] Switch to using native symbolizer by default on Windows"
Breaks some asan tests on the buildbot.

This reverts commit c74b427cb2.
2020-11-23 16:29:45 -08:00
Evgenii Stepanov 237b024b06 [hwasan] Fix tests when vm.overcommit_memory=1.
Remove an invalid check from sizes.cpp that only passes when overcommit is disabled.

Fixes PR48274.

Differential Revision: https://reviews.llvm.org/D91999
2020-11-23 16:05:56 -08:00
Amy Huang c74b427cb2 [llvm-symbolizer] Switch to using native symbolizer by default on Windows
llvm-symbolizer used to use the DIA SDK for symbolization on
Windows; this patch switches to using native symbolization, which was
implemented recently.

Users can still make the symbolizer use DIA by adding the `-dia` flag
in the LLVM_SYMBOLIZER_OPTS environment variable.

Differential Revision: https://reviews.llvm.org/D91814
2020-11-23 15:57:08 -08:00
Philip Reames d6239b3ea6 [test] pre-comit test for D91451 2020-11-23 15:36:08 -08:00
Philip Reames b06a2ad94f [LoopVectorizer] Lower uniform loads as a single load (instead of relying on CSE)
A uniform load is one which loads from a uniform address across all lanes. As currently implemented, we cost model such loads as if we did a single scalar load + a broadcast, but the actual lowering replicates the load once per lane.

This change tweaks the lowering to use the REPLICATE strategy by marking such loads (and the computation leading to their memory operand) as uniform after vectorization. This is a useful change in itself, but it's real purpose is to pave the way for a following change which will generalize our uniformity logic.

In review discussion, there was an issue raised with coupling cost modeling with the lowering strategy for uniform inputs.  The discussion on that item remains unsettled and is pending larger architectural discussion.  We decided to move forward with this patch as is, and revise as warranted once the bigger picture design questions are settled.

Differential Revision: https://reviews.llvm.org/D91398
2020-11-23 15:32:17 -08:00
Alex Zinenko f7d033f4d8 [mlir] Support WsLoopOp in OpenMP to LLVM dialect conversion
It is a simple conversion that only requires to change the region argument
types, generalize it from ParallelOp.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D91989
2020-11-23 23:28:02 +01:00
zoecarver 0a20660c8f [libcxx] Resolve LWG 2724 protected -> private.
Fixes LWG issue 2724: "The protected virtual member functions of memory_resource should be private."

Differential Revision: https://reviews.llvm.org/D66615
2020-11-23 14:27:22 -08:00
Craig Topper 03dab46d7f [RISCV] Remove unused VM register class
Nothing references this class today so it looks like some leftover.

Differential Revision: https://reviews.llvm.org/D91977
2020-11-23 14:17:06 -08:00
George df9ae59928 Use MlirStringRef throughout the C API
While this makes the unit tests a bit more verbose, this simplifies the creation of bindings because only the bidirectional mapping between the host language's string type and MlirStringRef need to be implemented.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D91905
2020-11-23 14:07:30 -08:00
Sanjay Patel ab29f091eb [InstCombine] propagate 'nsw' on pointer difference of 'inbounds' geps
This is a retry of 324a53205. I cautiously reverted that at 6aa3fc4
because the rules about gep math were not clear. Since then, we
have added this line to LangRef for gep inbounds:
"The successive addition of offsets (without adding the base address)
does not wrap the pointer index type in a signed sense (nsw)."

See D90708 and post-commit comments on the revert patch for more details.
2020-11-23 16:50:09 -05:00
LLVM GN Syncbot a1c342bf11 [gn build] Port f6b02ecd02 2020-11-23 21:33:46 +00:00
Saleem Abdulrasool f6b02ecd02 APINotes: add property models for YAML attributes
This adds internal representation of the attributes in a more usable
form.  This is meant to allow programmatic access to the attributes that
are specified in the YAML data.

This is based upon the work contributed by Apple at
https://github.com/llvm/llvm-project-staging/tree/staging/swift/apinotes.

Differential Revision: https://reviews.llvm.org/D91104
Reviewed By: Gabor Marton
2020-11-23 21:29:17 +00:00
Arthur Eubanks 6a2799cf8e Revert "[CGSCC] Detect devirtualization in more cases"
This reverts commit 14a68b4aa9.

Causes building self hosted clang to crash when using NPM.
2020-11-23 13:21:05 -08:00
Martin Storsjö 6f792041a5 Reapply "[CodeGen] [WinException] Only produce handler data at the end of the function if needed"
This reapplies 36c64af9d7 in updated
form.

Emit the xdata for each function at .seh_endproc. This keeps the
exact same output header order for most code generated by the LLVM
CodeGen layer. (Sections still change order for code built from
assembly where functions lack an explicit .seh_handlerdata
directive, and functions with chained unwind info.)

The practical effect should be that assembly output lacks
superfluous ".seh_handlerdata; .text" pairs at the end of functions
that don't handle exceptions, which allows such functions to use
the AArch64 packed unwind format again.

Differential Revision: https://reviews.llvm.org/D87448
2020-11-23 23:17:03 +02:00
Arthur Eubanks 3c811ce4f3 [NPM] Share pass building options with legacy PM
We should share options when possible.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D91741
2020-11-23 13:04:05 -08:00
Jordan Rupprecht 5b8e4a1102 [lldb/test] Remove flaky `process connect` test.
This test is flaky because it assumes port 4321 is not already open on a machine.
2020-11-23 12:49:50 -08:00
smhc 269ef315d1 [clang-tidy] Use compiled regex for AllowedRegexp in macro usage check
Current check compiles the regex on every attempt at matching. The check also populates and enables a regex value by default so the default behaviour results in regex re-compilation for every macro - if the check is enabled. If people used this check there's a reasonable chance they would have relatively complex regexes in use.

This is a quick and simple fix to store and use the compiled regex.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D91908
2020-11-23 20:46:43 +00:00
Nicolas Vasilache 5073e7edb6 [mlir] Add mising dependency 2020-11-23 20:36:50 +00:00
Reid Kleckner 64802d48d5 Make check-clang depend on the LLVM split-file utility
Fixes a recently added test that has this dependency. IMO this utility
is generally useful, so we should go ahead and take the new dependency.
2020-11-23 12:21:44 -08:00
Haowei Wu cf43308718 [llvm-elfabi] Emit ELF header and string table sections
This change serves to create the initial framework for outputting ELF
files from llvm-elfabi.

Differential Revision: https://reviews.llvm.org/D61767
2020-11-23 12:18:58 -08:00
Nathan James 9f3edc323a
[clang-tidy] Fix RenamerClangTidy checks trying to emit a fix that isnt a valid identifier
Addresses https://bugs.llvm.org/show_bug.cgi?id=48230.
Handle the case when the Fixup suggested isn't a valid c/c++ identifer.

Reviewed By: aaron.ballman, gribozavr2

Differential Revision: https://reviews.llvm.org/D91915
2020-11-23 20:04:51 +00:00
Eric Astor 1e41e22323 [ms] [llvm-ml] Support purging macro definitions
Support MASM's PURGE directive.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89735
2020-11-23 15:03:13 -05:00
Haowei Wu ae736d2957 Revert "[llvm-elfabi] Emit ELF header and string table sections"
This reverts commit 53c5fdd59a.

Reason of revert: Some builders failed to build with ld.
2020-11-23 11:58:51 -08:00
Arthur Eubanks 7167e5203a Port -print-memderefs to NPM
There is lots of code duplication, but hopefully it won't matter soon.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D91683
2020-11-23 11:56:22 -08:00
Arthur Eubanks 8eec3959ef [test] Pin memory-dereferenceable.ll to legacy PM
-print-memderefs is only used for one test and hasn't been touched in a while.
2020-11-23 11:56:17 -08:00
Arthur Eubanks 14a68b4aa9 [CGSCC] Detect devirtualization in more cases
The devirtualization wrapper misses cases where if it wraps a pass
manager, an individual pass may devirtualize an indirect call created by
a previous pass. For example, inlining may create a new indirect call
which is devirtualized by instcombine. Currently the devirtualization
wrapper will not see that because it only checks cgscc edges at the very
beginning and end of the pass (manager) it wraps.

This fixes some tests testing this exact behavior in the legacy PM.

Instead of checking WeakTrackingVHs for CallBases at the very beginning
and end of the pass it wraps, check every time
updateCGAndAnalysisManagerForPass() is called.

check-llvm and check-clang with -abort-on-max-devirt-iterations-reached
on by default doesn't show any failures outside of tests specifically
testing it so it doesn't needlessly rerun passes more than necessary.
(The NPM -O2/3 pipeline run the inliner/function simplification pipeline
under a devirtualization repeater pass up to 4 times by default).

http://llvm-compile-time-tracker.com/?config=O3&stat=instructions&remote=aeubanks
shows that 7zip has ~1% compile time regression. I looked at it and saw
that there indeed was devirtualization happening that was not previously
caught, so now it reruns the CGSCC pipeline on some SCCs, which is WAI.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89587
2020-11-23 11:55:20 -08:00
Xiangling Liao 01b3e6e026 [AIX] Support init priority
Support reserved [0-100] and non-reserved[101-65535] Clang/GNU init
priority values on AIX.
This patch maps Clang/GNU values into priority values used in sinit/sterm
functions. User can play with values and be able to get init to occur
before or after XL init and vice versa.

Differential Revision: https://reviews.llvm.org/D91272
2020-11-23 14:50:05 -05:00
Arthur Eubanks 9e9d9aba14 [test] Pin tests using -dot-callgraph to legacy PM
-dot-callgraph is not ported to the NPM yet. It can be ported at a later
time if necessary.

Differential Revision: https://reviews.llvm.org/D91685
2020-11-23 11:48:59 -08:00
Haowei Wu 53c5fdd59a [llvm-elfabi] Emit ELF header and string table sections
This change serves to create the initial framework for outputting ELF
files from llvm-elfabi.

Differential Revision: https://reviews.llvm.org/D61767
2020-11-23 11:31:57 -08:00
Eric Astor 454f32e4d5 [ms] [llvm-ml] Support macro function invocations in expressions
Accept macro function definitions, and apply them when invoked in operand position.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89734
2020-11-23 14:16:28 -05:00
Craig Topper b3f1b19c9c [AArch64] Update clang CodeGen tests I missed in 4252f7773a.
These tests invoke opt and llc even though they are in the frontend.

We now do a better job of generating commuted patterns for fma so
these tests now form fmls instead of fmla+fneg.
2020-11-23 11:10:27 -08:00
Amy Huang b4902bcd98 [NFC] remove print statement I accidentally added. 2020-11-23 10:51:09 -08:00
Florian Hahn 14c0185bfe
[AArch64] Add scatter cost model tests. 2020-11-23 18:36:56 +00:00
MaheshRavishankar 11ea2e2448 [mlir][Linalg] NFC: Expose some utility functions used for promotion.
Exposing some utility functions from Linalg to allow for promotion of
fused views outside of the core tile+fuse logic.
This is an alternative to patch D91322 which adds the promotion logic
to the tileAndFuse method. Downside with that approach is that it is
not easily customizable based on needs.

Differential Revision: https://reviews.llvm.org/D91503
2020-11-23 10:35:42 -08:00
Nico Weber 47eb5ce19a [mac/arm] fix clang/test/Driver/darwin-ld-dedup.c
The test needs an object file, which it currenty gets with
`-target x86_64-apple-darwin10`.  Rather than adding `REQUIRES: X86`, create
the object file via yaml2obj. This way, the test runs and passes even if the
host arch isn't x86 and only the host arch is built.

Part of PR46644.
2020-11-23 13:32:29 -05:00
MaheshRavishankar e65a5e5b00 [mlir][Linalg] Fuse sequence of Linalg operation (on buffers)
Enhance the tile+fuse logic to allow fusing a sequence of operations.

Make sure the value used to obtain tile shape is a
SubViewOp/SubTensorOp. Current logic used to get the bounds of loop
depends on the use of `getOrCreateRange` method on `SubViewOp` and
`SubTensorOp`. Make sure that the value/dim used to compute the range
is from such ops.  This fix is a reasonable WAR, but a btter fix would
be to make `getOrCreateRange` method be a method of `ViewInterface`.

Differential Revision: https://reviews.llvm.org/D90991
2020-11-23 10:30:51 -08:00
Craig Topper 4252f7773a [SelectionDAG][ARM][AArch64][Hexagon][RISCV][X86] Add SDNPCommutative to fma and fmad nodes in tablegen. Remove explicit commuted patterns from targets.
X86 was already specially marking fma as commutable which allowed
tablegen to autogenerate commuted patterns. This moves it to the target
independent definition and fix up the targets to remove now
unneeded patterns.

Unfortunately, the tests change because the commuted version of
the patterns are generating operands in a different than the
explicit patterns.

Differential Revision: https://reviews.llvm.org/D91842
2020-11-23 10:09:20 -08:00
Nico Weber e0e334a9c1 [mac/arm] make clang/test/Driver/clang_f_opts.c pass consistently
Part of PR46644, see comment 7/8.
2020-11-23 12:56:52 -05:00
George 0c5cff300f Add userData to the diagnostic handler C API
Previously, there was no way to add context to the diagnostic engine via the C API. Adding this ability makes it much easier to reason about memory ownership, particularly in reference-counted languages such as Swift. There are more details in the review comments.

Reviewed By: ftynse, mehdi_amini

Differential Revision: https://reviews.llvm.org/D91738
2020-11-23 09:52:45 -08:00
Florian Hahn 3a1c6cec15
[AArch64] Add tests for masked.gather costs. 2020-11-23 17:33:27 +00:00
Paul C. Anagnostopoulos b23e84ffcf [TableGen] Eliminte source location from CodeInit
Step 1 in eliminating the 'code' type.

Differential Revision: https://reviews.llvm.org/D91932
2020-11-23 11:30:13 -05:00
Simon Moll b955c7e630 [VE] VE Vector Predicated SDNode, vector add isel and tests
VE Vector Predicated (VVP) SDNodes form an intermediate layer between VE
vector instructions and the initial SDNodes.

We introduce 'vvp_add' with isel and tests as the first of these VVP
nodes. VVP nodes have a mask and explicit vector length operand, which
we will make proper use of later.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D91802
2020-11-23 17:17:07 +01:00
Alex Zinenko 619630f997 [mlir] Temporarily disable flaky mlir-cpu-runner async tests
These tests fail sporadically on irrelevant commits, e.g.
http://lab.llvm.org:8011/#/builders/61/builds/1777 as well as in local
builds.
2020-11-23 16:53:15 +01:00
Stephen Kelly 76bd4444e3 Fix tests for clang-query completion 2020-11-23 15:23:13 +00:00
Alexander Belyaev c6b2c17e9c [mlir] Add a print function for memref<*xi64>.
Differential Revision: https://reviews.llvm.org/D91070
2020-11-23 16:17:41 +01:00
Kazushi (Jam) Marukawa 590aaa5077 [VE] Remove magic numbers 176
Remove magic numbers 176 from VE source codes and update comments.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91958
2020-11-24 00:13:24 +09:00
Jay Foad 000400ca0a Fix speling in comments. NFC. 2020-11-23 14:43:24 +00:00
Stephen Kelly 5e1801813d Remove the IgnoreImplicitCastsAndParentheses traversal kind
Differential Revision: https://reviews.llvm.org/D91918
2020-11-23 14:27:48 +00:00
Stephen Kelly f052cf494f Update mode used in traverse() examples
traverse() predates the IgnoreUnlessSpelledInSource mode. Update example
and test code to use the newer mode.

Differential Revision: https://reviews.llvm.org/D91917
2020-11-23 14:27:48 +00:00
Stephen Kelly 72a9f365e9 Remove automatic traversal from forEach matcher
Differential Revision: https://reviews.llvm.org/D91916
2020-11-23 14:27:47 +00:00