Raphael Isemann [Wed, 4 Mar 2020 00:31:25 +0000 (16:31 -0800)]
[lldb][NFC] Modernize logging UserExpression
Raphael Isemann [Wed, 4 Mar 2020 17:01:45 +0000 (09:01 -0800)]
Fix modules build after MatrixBuilder patch
The addition of MatrixBuilder.h broke the modules build:
```
While building module 'LLVM_intrinsic_gen' imported from llvm-project/llvm/lib/IR/AbstractCallSite.cpp:19:
While building module 'LLVM_IR' imported from llvm-project/llvm/include/llvm/IR/Argument.h:19:
In file included from <module-includes>:6:
llvm-project/llvm/include/llvm/IR/MatrixBuilder.h:19:10: fatal error: cyclic dependency in module 'LLVM_intrinsic_gen': LLVM_intrinsic_gen -> LLVM_IR -> LLVM_intrinsic_gen
^
While building module 'LLVM_intrinsic_gen' imported from llvm-project/llvm/lib/IR/AbstractCallSite.cpp:19:
In file included from <module-includes>:1:
llvm-project/llvm/include/llvm/IR/Argument.h:19:10: fatal error: could not build module 'LLVM_IR'
~~~~~~~~^~~~~~~~~~~~~~~~~
llvm-project/llvm/lib/IR/AbstractCallSite.cpp:19:10: fatal error: could not build module 'LLVM_intrinsic_gen'
~~~~~~~~^~~~~~~~~~~~~~~~~~~~
```
Louis Dionne [Wed, 4 Mar 2020 16:32:49 +0000 (11:32 -0500)]
[libc++] Fix reverse_iterator test when UBSan is enabled
The goal of the test was only to check that we could access the
`this->current` member of std::reverse_iterator from a derived
class, but in doing so we incremented a null iterator, which is UB.
Sanjay Patel [Wed, 4 Mar 2020 16:08:28 +0000 (11:08 -0500)]
[PassManager] adjust VectorCombine placement
The initial placement of vector-combine in the opt pipeline revealed phase ordering bugs:
https://bugs.llvm.org/show_bug.cgi?id=45015
https://bugs.llvm.org/show_bug.cgi?id=42022
This patch contains a few independent changes:
1. Move the pass up in the pipeline, so it happens just after loop-vectorization.
This is only to keep vectorization passes together in the pipeline at the moment.
I don't have evidence of interaction between these yet.
2. Add an -early-cse pass after -vector-combine to clean up redundant ops. This was
partly proposed as far back as rL219644 (which is why it's effectively being moved
in the old PM code). This is important because the subsequent -instcombine doesn't
work as well without EarlyCSE. With the CSE, -instcombine is able to squash
shuffles together in 1 of the tests (because those are simple "select" shuffles).
3. Remove the -vector-combine pass that was running after SLP. We may want to do that
eventually, but I don't have a test case to support it yet.
Differential Revision: https://reviews.llvm.org/D75145
Balazs Benics [Wed, 4 Mar 2020 16:03:59 +0000 (17:03 +0100)]
[analyzer][NFC] Use CallEvent checker callback in GenericTaintChecker
Summary:
Intended to be a non-functional change but it turned out CallEvent handles
constructor calls unlike CallExpr which doesn't triggered for constructors.
All in all, this change shouldn't be observable since constructors are not
yet propagating taintness like functions.
In the future constructors should propagate taintness as well.
This change includes:
- NFCi change all uses of the CallExpr to CallEvent
- NFC rename some functions, mark static them etc.
- NFC omit explicit TaintPropagationRule type in switches
- NFC apply some clang-tidy fixits
Reviewers: NoQ, Szelethus, boga95
Reviewed By: Szelethus
Subscribers: martong, whisperity, xazax.hun, baloghadamsoftware, szepet,
a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, Charusso, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72035
Sanjay Patel [Wed, 4 Mar 2020 15:22:09 +0000 (10:22 -0500)]
[SDAG] simplify FP binops to undef
As discussed in the commit thread for rGa253a2a and D73978, we can do more undef folding for FP ops.
The nnan and ninf fast-math-flags specify that if an operand is the disallowed value, the result is
poison, so we can produce an undef result.
But this doesn't work as expected (the undef operand cases remain) because of a Flags propagation
problem in SelectionDAGBuilder.
I've added DAGCombiner calls to enable these for the other cases because we've shown in other
patches that (because of the limited way that SDAG iterates), it is possible to miss simplifications
like this if they are done only at node creation time.
Several potential follow-ups to expand on this patch are possible.
Differential Revision: https://reviews.llvm.org/D75576
Alex Zinenko [Wed, 4 Mar 2020 10:44:22 +0000 (11:44 +0100)]
[mlir] support conversion of parallel reduction loops to std
Recently introduced support for converting sequential reduction loops to
CFG of basic blocks in the Standard dialect makes it possible to perform
a staged conversion of parallel reduction loops into a similar CFG by
using sequential loops as an intermediate step. This is already the case
for parallel loops without reduction, so extend the pattern to support
an additional use case.
Differential Revision: https://reviews.llvm.org/D75599
Jeremy Morse [Wed, 4 Mar 2020 15:22:31 +0000 (15:22 +0000)]
Quote a python executable path
On my Windows machine at least, the path to python contains a space.
Alexey Bataev [Wed, 4 Mar 2020 14:29:50 +0000 (09:29 -0500)]
[OPENMP50]'source' and 'sink' kinds are not allowed in depobj.
Do not allow to use 'sink' and 'source' dependency kinds in 'depobj'
directive.
AndreyChurbanov [Wed, 4 Mar 2020 15:15:05 +0000 (18:15 +0300)]
[openmp] OpenMP 5.1 omp_display_env function implementation.
Patch by Michael Klemm.
Differential Revision: https://reviews.llvm.org/D74956
Louis Dionne [Wed, 4 Mar 2020 15:10:02 +0000 (10:10 -0500)]
[libc++] Mark the shared_future.wait_for test as being flaky
It is timing sensitive and it fails from time to time. If marking it as
flaky doesn't help, we can try tweaking the time outs.
John Brawn [Wed, 4 Mar 2020 13:25:06 +0000 (13:25 +0000)]
Handle PluginAttrInstances using ManagedStatic
We need to make sure that PluginAttrInstances is deleted before shared libraries
are unloaded, because otherwise when deleting its contents we'll try to access
a virtual destructor which no longer exists.
As shared libraries are managed using ManagedStatic we can do this by also using
ManagedStatic for PluginAttrInstances as ManagedStatics are deleted in reverse
order of construction and we know that PluginAttrInstances will only be
accessed, and thus constructed, after shared libraries have been loaded.
Mikhail Maltsev [Wed, 4 Mar 2020 14:54:24 +0000 (14:54 +0000)]
Revert "Promote nameless lambda used by dl_iterate_phdr to named function to clean up control flow inside findUnwindSections. Also, expose the data structure"
This reverts commit
d93371238e7f5d5f9c506a88cf4f05f8dea9d008.
The commit broke the build in several configurations (including
Windows and bare-metal). For details see comments in
https://reviews.llvm.org/D75480
Alexander Belyaev [Tue, 3 Mar 2020 23:45:45 +0000 (00:45 +0100)]
[MLIR] Add a comment to `requiredOperandCount` arg in LoopOps.cpp.
Differential Revision: https://reviews.llvm.org/D75578
Tatyana Krasnukha [Wed, 12 Feb 2020 10:50:34 +0000 (13:50 +0300)]
[lldb][NFC] Move local variables near to their usage
Tatyana Krasnukha [Tue, 3 Mar 2020 10:29:12 +0000 (13:29 +0300)]
[lldb] Make BreakpointResolver hold weak_ptr instead of raw pointer to breakpoint
This prevents calling Breakpoint::shared_from_this of an object that is not owned by any shared_ptr.
Differential Revision: https://reviews.llvm.org/D74557
David Green [Wed, 4 Mar 2020 12:56:42 +0000 (12:56 +0000)]
[ARM] Change all tests from "thumbv8.1-m.main" to "thumbv8.1m.main". NFC
Stephan Herhut [Wed, 4 Mar 2020 13:39:58 +0000 (14:39 +0100)]
[lld] Avoid creating files outside of work directory.
Summary:
A test is passing `-o -` to lld in the hope of writing the output to
standard out but that is not the case. Instead it creates a file named
`-.lto.o`. This fixes it by creating a temporary file in the work
directory.
Differential Revision: https://reviews.llvm.org/D75605
Evgeniy Brevnov [Wed, 4 Mar 2020 12:49:53 +0000 (19:49 +0700)]
Lost regression test from commit
5a63813dc7f.
Pavel Labath [Tue, 3 Mar 2020 16:03:55 +0000 (17:03 +0100)]
[lldb] Reduce duplication in CommandObjectDisassemble
This command had nearly identical code for the "then" and "else"
branches of the "if (m_options.num_instructions != 0)" condition.
This patch factors out the common parts of the two blocks to reduce
duplication.
Jonathan Coe [Wed, 4 Mar 2020 12:13:33 +0000 (12:13 +0000)]
[clang-format] parse C# object initialisers
Summary:
Treat C# object initializers as braced lists.
Allow lambdas inside C# braced lists.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D75473
Adrian Kuegel [Fri, 28 Feb 2020 14:57:38 +0000 (15:57 +0100)]
Add rsqrt op to Standard dialect and lower it to LLVM dialect.
Summary:
This adds an rsqrt op to the standard dialect, and lowers
it as 1 / sqrt to the LLVM dialect.
Differential Revision: https://reviews.llvm.org/D75353
Pavel Labath [Tue, 3 Mar 2020 17:27:39 +0000 (18:27 +0100)]
Use new DWARFDataExtractor::getInitialLength in DWARFDebugFrame
Pavel Labath [Tue, 3 Mar 2020 17:51:12 +0000 (18:51 +0100)]
Use new DWARFDataExtractor::getInitialLength in DWARFDebugPubTable
Pavel Labath [Tue, 3 Mar 2020 17:52:56 +0000 (18:52 +0100)]
Use new DWARFDataExtractor::getInitialLength in DWARFUnit
Pavel Labath [Tue, 3 Mar 2020 17:57:18 +0000 (18:57 +0100)]
Use new DWARFDataExtractor::getInitialLength in DWARFVerifier
Pavel Labath [Mon, 2 Mar 2020 11:48:59 +0000 (12:48 +0100)]
Use DWARFDataExtractor::getInitialLength in debug_aranges
Summary:
getInitialLength is a *DWARF*DataExtractor method so I had to "upgrade"
some DataExtractors to be able to make use of it.
Reviewers: ikudrin, jhenderson, probinson
Subscribers: aprantl, hiraditya, llvm-commits, dblaikie
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75535
Pavel Labath [Fri, 28 Feb 2020 09:03:00 +0000 (10:03 +0100)]
Use DWARFDataExtractor::getInitialLength in DWARFDebugAddr
Reviewers: ikudrin, jhenderson, probinson
Subscribers: hiraditya, dblaikie, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75532
Kerry McLaughlin [Wed, 4 Mar 2020 11:30:20 +0000 (11:30 +0000)]
[AArch64][SVE] Add SVE2 intrinsic for xar
Summary: Implements the @llvm.aarch64.sve.xar intrinsic
Reviewers: andwar, c-rhodes, dancgr, efriedma, rengolin
Reviewed By: andwar
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75160
Kadir Cetinkaya [Wed, 4 Mar 2020 11:41:18 +0000 (12:41 +0100)]
[clangd] Fix buildbots
Evgeniy Brevnov [Wed, 4 Mar 2020 08:36:51 +0000 (15:36 +0700)]
[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151).
Summary:
This is second attempt to fix the problem with incorrect dependencies reported in presence of invariant load. Initial fix (https://reviews.llvm.org/D64405) was reverted due to a regression reported in https://reviews.llvm.org/D70516.
The original fix changed caching behavior for invariant loads. Namely such loads are not put into the second level cache (NonLocalDepInfo). The problem with that fix is the first level cache (CachedNonLocalPointerInfo) still works as if invariant loads were in the second level cache. The solution is in addition to not putting dependence results into the second level cache avoid putting info about invariant loads into the first level cache as well.
Reviewers: jdoerfert, reames, hfinkel, efriedma
Reviewed By: jdoerfert
Subscribers: DaniilSuchkov, hiraditya, bmahjour, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73027
Simon Pilgrim [Wed, 4 Mar 2020 11:25:34 +0000 (11:25 +0000)]
Fix some getAs/castAs null dereference static analyzer warnings.
Use castAs if we know the cast should succeed (or we're dereferencing without check), the castAs will assert as well so we can remove local non-null asserts.
Simon Pilgrim [Wed, 4 Mar 2020 10:53:27 +0000 (10:53 +0000)]
[AMDGPU] performCvtF32UByteNCombine - revisit node after src operand simplification.
If SimplifyDemandedBits succeeds in simplifying the byte src, add the CVT_F32_UBYTE node back to the worklist as we might be able to simplify further.
Yet another step towards removing SelectionDAG::GetDemandedBits.
Florian Hahn [Wed, 4 Mar 2020 11:13:48 +0000 (11:13 +0000)]
[Matrix] Add IR MatrixBuilder.
This builder provides a convenient way for targets to lower various matrix
operations to LLVM IR, making use of matrix intrinsics where available.
Reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D72280
Kadir Cetinkaya [Wed, 4 Mar 2020 11:07:13 +0000 (12:07 +0100)]
[clangd] Fix windows buildbots
gbreynoo [Wed, 4 Mar 2020 10:56:48 +0000 (10:56 +0000)]
[llvm-ar][test] Add to llvm-ar test coverage
- Added handling of thin archives to symtab.test.
- Added handling of newlines to response.test.
-
62fa3332c9c1af1e66dfecd40f5b4e78882998b2 exposed behaviour
regarding the use of -- on the command line. Added
double-hyphen.test to cover this.
Differential Revision: https://reviews.llvm.org/D73333
Ilya Biryukov [Mon, 2 Mar 2020 15:07:09 +0000 (16:07 +0100)]
[AST] Refactor propagation of dependency bits. NFC
Summary:
This changes introduces an enum to represent dependencies as a bitmask
and extract common patterns from code that computes dependency bits into
helper functions.
Reviewers: rsmith, martong, shafik, ilya-biryukov, hokein
Subscribers: hokein, sammccall, Mordante, riccibruno, merge_guards_bot, rnkovacs, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71920
evgeny [Wed, 4 Mar 2020 10:05:02 +0000 (13:05 +0300)]
Attempt to fix buildbot after
497c110e
Kadir Cetinkaya [Wed, 19 Feb 2020 16:36:41 +0000 (17:36 +0100)]
[clangd] Make use of syntax tokens in ReplayPreamble
Summary: Replace usage of RawLexer with syntax tokens inside ReplayPreamble.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74842
Kadir Cetinkaya [Tue, 25 Feb 2020 08:33:52 +0000 (09:33 +0100)]
[clangd] Fix early selection for non-vardecl declarators
Summary:
Selection tree was performing an early claim only for VarDecls, but
there are other cases where we can have declarators, e.g. FieldDecls. This patch
extends the early claim logic to all types of declarators.
Fixes https://github.com/clangd/clangd/issues/292
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75106
evgeny [Wed, 4 Mar 2020 09:46:31 +0000 (12:46 +0300)]
[lld][ELF][COFF] Fix archived bitcode files naming
Differential revision: https://reviews.llvm.org/D75422
Georgii Rymar [Wed, 4 Mar 2020 09:33:10 +0000 (12:33 +0300)]
[Object/ELF] - Fix the offset type used in ELFFile<ELFT>::getEntry().
We use size_t for a file offset what is wrong, because size_t is 32-bit
value on 32-bit platforms.
I was reported that after my
0b511c23021
"[llvm-readobj] - Report warnings instead of errors for broken relocations."
The following error is observed on 32-bit Arch Linux:
[100%] Running all regression tests
FAIL: LLVM :: tools/llvm-readobj/ELF/relocation-errors.test (52954 of 54768)
******************** TEST 'LLVM :: tools/llvm-readobj/ELF/relocation-errors.test' FAILED ***
...
llvm-project/llvm/test/tools/llvm-readobj/ELF/relocation-errors.test:9:14:error: LLVM-NEXT: expected string not found in input
# LLVM-NEXT: warning: '[[FILE]]': unable to print relocation 1 in section 3: unable to access section [index 6] data at 0x17e7e7e8b0: offset goes past the end of file
^
<stdin>:9:1: note: scanning from here
/llvm-project/build/bin/llvm-readobj: warning: 'llvm-project/build/test/tools/llvm-readobj/ELF/Output/relocation-errors.test.tmp64': unable to print relocation 1 in section 3: unable to access section [index 6] data at 0xe7e7e8b0: offset goes past the end of file
This patch should fix the issue.
Simon Tatham [Tue, 3 Mar 2020 17:37:14 +0000 (17:37 +0000)]
[ARM,MVE] Add the `vshlcq` intrinsics.
Summary:
The VSHLC instruction performs a left shift of a whole vector register
by an immediate shift count up to 32, shifting in new bits at the low
end from a GPR and delivering the shifted-out bits from the high end
back into the same GPR.
Since the instruction produces two outputs (the shifted vector
register and the output GPR of shifted-out bits), it has to be
instruction-selected in C++ rather than Tablegen.
Reviewers: MarkMurrayARM, dmgreen, miyuki, ostannard
Reviewed By: miyuki
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D75445
Simon Tatham [Tue, 3 Mar 2020 17:37:05 +0000 (17:37 +0000)]
[ARM,MVE] Add the `vsbciq` intrinsics.
Summary:
These are exactly parallel to the existing `vadciq` intrinsics, which
we implemented last year as part of the original MVE intrinsics
framework setup.
Just like VADC/VADCI, the MVE VSBC/VSBCI instructions deliver two
outputs, both of which the intrinsic exposes: a modified vector
register and a carry flag. So they have to be instruction-selected in
C++ rather than Tablegen. However, in this case, that's trivial: the
same C++ isel routine we already have for VADC works unchanged, and
all we have to do is to pass it a different instruction id.
Reviewers: MarkMurrayARM, dmgreen, miyuki, ostannard
Reviewed By: miyuki
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D75444
Craig Topper [Tue, 3 Mar 2020 05:59:44 +0000 (21:59 -0800)]
[X86] Directly form VBROADCAST_LOAD for BUILD_VECTOR of splat loads in lowerBuildVectorAsBroadcast.
Charusso [Wed, 4 Mar 2020 06:06:35 +0000 (07:06 +0100)]
[analyzer] AnalysisDeclContext: Refactor and documentation
Summary:
`ScopeContext` wanted to be a thing, but sadly it is dead code.
If you wish to continue the work in D19979, here was a tiny code which
could be reused, but that tiny and that dead, I felt that it is unneded.
Note: Other changes are truly uninteresting.
Reviewed By: NoQ
Differential Revision: https://reviews.llvm.org/D73519
Charusso [Wed, 4 Mar 2020 05:55:50 +0000 (06:55 +0100)]
[analyzer] AnalyzerOptions: Remove 'fixits-as-remarks'
Summary: The new way of checking fix-its is `%check_analyzer_fixit`.
Reviewed By: NoQ, Szelethus, xazax.hun
Differential Revision: https://reviews.llvm.org/D73729
Charusso [Wed, 4 Mar 2020 05:24:52 +0000 (06:24 +0100)]
[analyzer] FixItHint: Apply and test hints with the Clang-Tidy's script
Summary:
This patch introduces a way to apply the fix-its by the Analyzer:
`-analyzer-config apply-fixits=true`.
The fix-its should be testable, therefore I have copied the well-tested
`check_clang_tidy.py` script. The idea is that the Analyzer's workflow
is different so it would be very difficult to use only one script for
both Tidy and the Analyzer, the script would diverge a lot.
Example test: `// RUN: %check-analyzer-fixit %s %t -analyzer-checker=core`
When the copy-paste happened the original authors were:
@alexfh, @zinovy.nis, @JonasToth, @hokein, @gribozavr, @lebedev.ri
Reviewed By: NoQ, alexfh, zinovy.nis
Differential Revision: https://reviews.llvm.org/D69746
hsmahesha [Wed, 4 Mar 2020 05:23:32 +0000 (10:53 +0530)]
[HIP] Make sure, unused hip-pinned-shadow global var is kept within device code
Summary:
hip-pinned-shadow global var should remain in the final code object irrespective
of whether it is used or not within the code. Add it to used list, so that it
will not get eliminated when it is unused.
Reviewers: yaxunl, tra, hliao
Reviewed By: yaxunl
Subscribers: hliao, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75402
Juneyoung Lee [Sat, 29 Feb 2020 06:45:04 +0000 (15:45 +0900)]
[ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch conditions of dominating blocks' terminators
Summary:
```
br i1 c, BB1, BB2:
BB1:
use1(c)
BB2:
use2(c)
```
In BB1 and BB2, c is never undef or poison because otherwise the branch would have triggered UB.
Checked with Alive2
Reviewers: xbolva00, spatel, lebedev.ri, reames, jdoerfert, nlopes, sanjoy
Reviewed By: reames
Subscribers: jdoerfert, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75401
Amara Emerson [Tue, 3 Mar 2020 19:36:47 +0000 (11:36 -0800)]
[GlobalISel][Localizer] Enable intra-block localization of already-local uses.
This changes the localizer to attempt intra-block localizer of instructions
that have local uses. This is useful because sometimes the entry block itself
has many uses of constant-like instructions, which would benefit from shortening
live ranges. Previously if an inst had no non-local uses, we wouldn't add it to
the list of instructions to attempt further intra-block localization.
This gives a 0.7% geomean code size improvement on CTMark.
Differential Revision: https://reviews.llvm.org/D75555
Fangrui Song [Wed, 4 Mar 2020 01:14:25 +0000 (17:14 -0800)]
[MC][test] Improve some llvm-objdump -t tests
Delete two redundant tests.
Frank Laub [Wed, 4 Mar 2020 00:24:03 +0000 (16:24 -0800)]
[MLIR][NFC] Fix for VS2017 bug.
Apparently there is a bug in VS2017 concerning compile-time constant
expressions.
https://developercommunityapi.westus.cloudapp.azure.com/content/problem/110435/not-compile-time-constant-expression.html
This change works with any C++11 compiler (including VS2017) and is a little bit
easier to read.
Reviewers: stella.stamenova, nicolasvasilache
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75584
Fangrui Song [Wed, 4 Mar 2020 00:37:52 +0000 (16:37 -0800)]
[gn build] Fix llvm-gsymutil after D75291
Fangrui Song [Tue, 3 Mar 2020 21:58:02 +0000 (13:58 -0800)]
[MCDwarf] Change emitListsTableHeaderStart to use a reference and fold Start/End symbols generation into it
Apply @dblaikie's suggestions in a post-commit review for D75375
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D75568
Lang Hames [Wed, 4 Mar 2020 00:02:46 +0000 (16:02 -0800)]
[ORC] Skip ST_File symbols in MaterializationUnit interfaces / resolution.
ST_File symbols aren't relevant for linking purposes, but can end up shadowing
real symbols if they're not filtered.
No test case yet: The ideal testcase for this would be an ELF llvm-jitlink test,
but llvm-jitlink support for ELF is still under development. We should add a
testcase for this once support lands in tree.
Stefanos Baziotis [Wed, 4 Mar 2020 00:12:33 +0000 (02:12 +0200)]
[LoopTerminology][NFC] Fix typo
Richard Smith [Tue, 3 Mar 2020 23:56:08 +0000 (15:56 -0800)]
PR45087: Fix check for emptiness when determining whether a trivial copy
operation needs to read from its operand.
Greg Clayton [Tue, 3 Mar 2020 23:51:58 +0000 (15:51 -0800)]
Fix buildbots by including MC for StringTableBuilder.
Alexander Belyaev [Tue, 3 Mar 2020 23:37:50 +0000 (00:37 +0100)]
[MLIR] Expose makeCanonicalStridedLayoutExpr in StandardTypes.h.
Differential Revision: https://reviews.llvm.org/D75575
Richard Smith [Tue, 3 Mar 2020 23:19:13 +0000 (15:19 -0800)]
PR45083: Mark statement expressions as being dependent if they appear in
dependent contexts.
We previously assumed they were neither value- nor
instantiation-dependent under any circumstances, which would lead to
crashes and other misbehavior.
Martijn Vels [Tue, 3 Mar 2020 22:47:23 +0000 (17:47 -0500)]
Partially inline basic_string copy constructor in UNSTABLE
his change splits the copy constructor up inlining short initialization, and explicitly outlining long initialization into __init_copy_ctor_external() which is the externally instantiated slow path.
For unstable ABI, this has the following changes:
remove basic_string(const basic_string&)
remove basic_string(const basic_string&, const Allocator&)
add __init_copy_ctor_external(const value_type*, size_type)
Quick local benchmark for Copy:
Master
```
---------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------
BM_StringCopy_Empty 3.50 ns 3.51 ns
199326720
BM_StringCopy_Small 3.50 ns 3.51 ns
199510016
BM_StringCopy_Large 15.7 ns 15.7 ns
45230080
BM_StringCopy_Huge 1503 ns 1503 ns 464896
```
```
---------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------
BM_StringCopy_Empty 1.99 ns 2.00 ns
356471808
BM_StringCopy_Small 3.29 ns 3.30 ns
203425792
BM_StringCopy_Large 13.3 ns 13.3 ns
52948992
BM_StringCopy_Huge 1472 ns 1472 ns 475136
```
Author: Martijn Vels <martijn.vels@gmail.com>
Reviewers: EricWF, mclow.list
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73223
Lang Hames [Tue, 3 Mar 2020 22:18:12 +0000 (14:18 -0800)]
[JITLink] Add a -slab-address option to llvm-jitlink.
This option can be used to for JITLink to link as-if the target memory slab were
allocated at a specific start address. This can be used to both verify that
cross-address space linking is working correctly, and to ensure that certain
address-sensitive optimizations (e.g. GOT and stub elimination) either do or do
not fire, depending on the requirements of the test case.
This argument is only valid for testing in conjunction with -noexec -slab-alloc,
and will produce an error if used without those arguments.
Jonathan Coe [Tue, 3 Mar 2020 22:21:33 +0000 (22:21 +0000)]
[clang-format] Do not format C# array subscript operators as attributes
Summary:
Fix misidentification of C# array subscript operators.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D75517
Jonathan Coe [Tue, 3 Mar 2020 22:17:25 +0000 (22:17 +0000)]
[clang-format] Do not merge target-name and : for C# attributes
Summary:
Re-use token type `TT_AttributeColon` for C# attribute target colons.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: MyDeveloperDay, cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D75465
Matt Arsenault [Tue, 3 Mar 2020 21:59:41 +0000 (16:59 -0500)]
LICM: Reorder condition checks
Check the fast math flag before the more expensive loop check.
Matt Arsenault [Mon, 2 Mar 2020 14:43:06 +0000 (09:43 -0500)]
AMDGPU: Fix computation for getOccupancyWithLocalMemSize
The computation here didn't really make sense to me, and reported
wildy different results depending on the flat work group size
attribute.
I think this should really report a range derived from the possible
work group size bounds, and only allow an occupancy that is a multiple
of the group size.
Michael Spencer [Sat, 29 Feb 2020 01:31:52 +0000 (17:31 -0800)]
[clang][Modules] Add -fsystem-module flag
The -fsystem-module flag is used when explicitly building a module. It
forces the module to be treated as a system module. This is used when
converting an implicit build to an explicit build to match the
systemness the implicit build would have had for a given module.
Differential Revision: https://reviews.llvm.org/D75395
Brian Gesiak [Wed, 26 Feb 2020 23:08:00 +0000 (18:08 -0500)]
[Coroutines] Use dbg.declare for frame variables
Summary:
https://gist.github.com/modocache/
ed7c62f6e570766c0f39b35dad675c2f
is an example of a small C++ program that uses C++20 coroutines that
is difficult to debug, due to the loss of debug info for variables that
"spill" across coroutine suspension boundaries. This patch addresses
that issue by inserting 'llvm.dbg.declare' intrinsics that point the
debugger to the variables' location at an offset to the coroutine frame.
With this patch, I confirmed that running the 'frame variable' commands in
https://gist.github.com/modocache/
ed7c62f6e570766c0f39b35dad675c2f at
the specified breakpoints results in the correct values being printed
for coroutine frame variables 'i' and 'j' when using an lldb built from
trunk, as well as with gdb 8.3 (lldb 9.0.1, however, could not print the
values). The added test case also verifies this improved behavior.
The existing coro-debug.ll test case is also modified to reflect the
locations at which Clang actually places calls to 'dbg.declare', and
additional checks are added to ensure this patch works as intended in that
example as well.
Reviewers: vsk, jmorse, GorNishanov, lewissbaker, wenlei
Subscribers: EricWF, aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75338
Greg Clayton [Thu, 27 Feb 2020 20:32:55 +0000 (12:32 -0800)]
Rename "llvm-gsym" to "llvm-gsymutil" and fix dependencies.
Summary: This patch renames the "llvm-gsym" tool directory to "llvm-gsymutil". Dependencies are also reduced to the bare minimum for llvm-gsymutil.
Reviewers: aprantl, thakis
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75291
Amy Huang [Tue, 4 Feb 2020 21:20:13 +0000 (13:20 -0800)]
[DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.
Summary:
This change checks for the return type in the frontend and adds a flag
to the DISubroutineType to indicate that the option should be added in
CodeViewDebug.
Previously function types sometimes appeared twice in the PDB: once with
"returns cxx udt" and once without.
See https://bugs.llvm.org/show_bug.cgi?id=44785.
Reviewers: rnk, asmith
Subscribers: hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D75215
Lang Hames [Tue, 3 Mar 2020 21:51:05 +0000 (13:51 -0800)]
[JITLink] Fix a pointer-to-integer cast in jitlink::InProcessMemoryManager.
reinterpret_cast'ing the block base address directly to a uint64_t leaves the
high bits in an implementation-defined state, but JITLink expects them to be
zero. Switching to pointerToJITTargetAddress for the cast should fix this.
This should fix the jitlink test failures that we have seen on some of the
32-bit testers.
Adrian Prantl [Tue, 3 Mar 2020 21:42:45 +0000 (13:42 -0800)]
Doxygenify CompilerType.h (NFC)
Sanjay Patel [Tue, 3 Mar 2020 21:28:57 +0000 (16:28 -0500)]
[AArch64] add tests for nnan/ninf/undef FP simplifications; NFC
Vedant Kumar [Tue, 3 Mar 2020 21:30:27 +0000 (13:30 -0800)]
test: Adjust no-dbg-value-after-terminator.mir to use `not --crash`
Matthias Kramm [Tue, 3 Mar 2020 21:20:48 +0000 (13:20 -0800)]
[mlir][Tutorial] Make parsing an empty file print a better error.
Summary:
Previously, we would, for an empty file, print the somewhat confusing
Assertion `tok == curTok [...]' failed.
With this change, we now print
Parse error [...]: expected 'def' [...]
This only affects the parser from chapters 1-6, since the more advanced
chapter 7 parser is actually able to generate an empty module from an
empty file. Nonetheless, this commit also adds the additional check to
the chapter 7 parser, for consistency.
Differential Revision: https://reviews.llvm.org/D75534
River Riddle [Tue, 3 Mar 2020 21:02:02 +0000 (13:02 -0800)]
[mlir] Generate CmpFPredicate as an EnumAttr in tablegen
Summary: This allows for attaching the attribute to CmpF as a proper argument, and thus enables the removal of a bunch of c++ code.
Differential Revision: https://reviews.llvm.org/D75539
Reid Kleckner [Tue, 3 Mar 2020 21:17:47 +0000 (13:17 -0800)]
Port ubsan nullability.c test to Windows
Two issues:
- Need to add env prefix to be compatible with the lit internal shell
- Need to quote the colon in Windows paths with '"%t.supp"'
Alex Langford [Tue, 3 Mar 2020 21:14:18 +0000 (13:14 -0800)]
[lldb] Delete some commented out code in ClangASTSource.cpp
Sanjay Patel [Tue, 3 Mar 2020 21:14:10 +0000 (16:14 -0500)]
[PowerPC] adjust test to avoid getting zapped completely; NFC
div-by-0 -> Inf
The math ops are 'fast' so 'ninf' applies and the whole thing is undef.
Vedant Kumar [Tue, 3 Mar 2020 19:27:09 +0000 (11:27 -0800)]
[MachineVerifier] Remove placement rule exception for debug entry values
There should not be an exception allowing debug entry values to be
placed after a terminator.
Differential Revision: https://reviews.llvm.org/D75559
Vedant Kumar [Tue, 3 Mar 2020 19:08:48 +0000 (11:08 -0800)]
[LiveDebugValues] Do not insert DBG_VALUEs after a MBB terminator
This fixes a miscompile that happened because a DBG_VALUE interfered
with the MachineOutliner's liveness analysis.
Inserting a DBG_VALUE after a terminator breaks predicates on MBB such
as isReturnBlock(). And the resulting DBG_VALUE cannot be "live".
I plan to introduce a MachineVerifier check for this situation in a
follow up.
rdar://
59859175
Testing: check-llvm, LNT build with a stage2 compiler & entry values
enabled
Differential Revision: https://reviews.llvm.org/D75548
Nathan Ridge [Mon, 23 Dec 2019 18:38:04 +0000 (13:38 -0500)]
[clangd] Handle go-to-definition in macro invocations where the target appears in the expansion multiple times
Fixes https://github.com/clangd/clangd/issues/234
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72041
George Rokos [Tue, 3 Mar 2020 20:26:40 +0000 (12:26 -0800)]
[clang-offload-wrapper] Lower priority of __tgt_register_lib in favor of __tgt_register_requires
Lower priority of __tgt_register_lib in order to make sure that __tgt_register_requires is called before loading a libomptarget plugin.
We want to know beforehand which requirements the user has asked for so that upon loading the plugin libomptarget can report how many devices there are that can satisfy these requirements.
Differential Revision: https://reviews.llvm.org/D75223
Alex Zinenko [Tue, 3 Mar 2020 20:26:00 +0000 (21:26 +0100)]
[mlir] Format AffineOps.td. NFC
Drop trailing spaces and reflow text to fit 80 columns.
Craig Topper [Tue, 3 Mar 2020 20:16:01 +0000 (12:16 -0800)]
[X86] Match vpmullq latency to uops.info. Correct port usage for 512-bit memory form
uops.info says these should be 15 cycle instructions. Uops.info also shows the 512-bit form uses port 0 and 5 for both register and memory. We had memory using 0 and 1.
Differential Revision: https://reviews.llvm.org/D75549
Jacques Pienaar [Tue, 3 Mar 2020 20:01:54 +0000 (12:01 -0800)]
[mlir][ods] Add query for derived attribute
For ODS generated operations enable querying whether there is a derived
attribute with a given name.
Rollforward of commit 5aa57c2 without using llvm::is_contained.
Stefan Stipanovic [Tue, 3 Mar 2020 19:43:16 +0000 (20:43 +0100)]
Revert "Revert "[lldb/Docs] Mark both Python 3.6 and 3.8 as supported on Windows""
This reverts commit
78a734e2792061921ab7fb8f9059d1fb673e158f.
Stefan Stipanovic [Tue, 3 Mar 2020 19:42:05 +0000 (20:42 +0100)]
Revert "[OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls."
This reverts commit
9989b859efccafacb0cc1f8d393d8b9fc49f4037.
Stefan Stipanovic [Tue, 3 Mar 2020 19:41:18 +0000 (20:41 +0100)]
Revert "[lldb/Docs] Mark both Python 3.6 and 3.8 as supported on Windows"
This reverts commit
3270ea9042eaa2bf9ab12d4a6ceefaae73c5152a.
Stefan Stipanovic [Tue, 3 Mar 2020 19:32:22 +0000 (20:32 +0100)]
[OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.
Summary: Attempt to add more attributes for runtime calls.
Reviewers: jdoerfertA, ggeorgakoudis, lebedev.ri, dreachem
Subscribers:
Jonas Devlieghere [Tue, 3 Mar 2020 19:24:11 +0000 (11:24 -0800)]
[lldb/Docs] Mark both Python 3.6 and 3.8 as supported on Windows
Haibo told me he didn't have any issues with Python 3.8 and I was able
to confirm that. Even though we don't have bot running with 3.8, I think
it safe to mark it as supported in the docs.
Alexey Bataev [Tue, 3 Mar 2020 18:22:35 +0000 (13:22 -0500)]
[OPENMP50]Support 'update' clause for 'depobj' directive.
Added basic support (parsing/sema/serialization) for 'update' clause in
'depobj' directive.
Raphael Isemann [Tue, 3 Mar 2020 18:30:20 +0000 (10:30 -0800)]
[lldb][NFC] Remove some commented out code in TypeSystemClang
Summary: I don't see why we want to keep that code around.
Reviewers: #lldb, JDevlieghere
Reviewed By: #lldb, JDevlieghere
Subscribers: davide
Differential Revision: https://reviews.llvm.org/D75496
Craig Topper [Tue, 3 Mar 2020 18:17:18 +0000 (10:17 -0800)]
[X86] Always emit an integer vbroadcast_load from lowerBuildVectorAsBroadcast regardless of AVX vs AVX2
If we go with D75412, we no longer depend on the scalar type directly. So we don't need to avoid using i64. We already have AVX1 fallback patterns with i32 and i64 scalar types so we don't need to avoid using integer types on AVX1.
Differential Revision: https://reviews.llvm.org/D75413
Craig Topper [Tue, 3 Mar 2020 18:14:47 +0000 (10:14 -0800)]
[X86] Directly emit VBROADCAST_LOAD from constant pool in lowerBuildVectorAsBroadcast
Also add a DAG combine to combine different sized broadcasts from
constant pool to avoid a regression.
Differential Revision: https://reviews.llvm.org/D75412
LLVM GN Syncbot [Tue, 3 Mar 2020 18:25:30 +0000 (18:25 +0000)]
[gn build] Port
c84532a70aa
Whitney Tsang [Tue, 3 Mar 2020 17:38:19 +0000 (17:38 +0000)]
[LoopNest]: Analysis to discover properties of a loop nest.
Summary: This patch adds an analysis pass to collect loop nests and
summarize properties of the nest (e.g the nest depth, whether the nest
is perfect, what's the innermost loop, etc...).
The motivation for this patch was discussed at the latest meeting of the
LLVM loop group (https://ibm.box.com/v/llvm-loop-nest-analysis) where we
discussed
the unimodular loop transformation framework ( “A Loop Transformation
Theory and an Algorithm to Maximize Parallelism”, Michael E. Wolf and
Monica S. Lam, IEEE TPDS, October 1991). The unimodular framework
provides a convenient way to unify legality checking and code generation
for several loop nest transformations (e.g. loop reversal, loop
interchange, loop skewing) and their compositions. Given that the
unimodular framework is applicable to perfect loop nests this is one
property of interest we expose in this analysis. Several other utility
functions are also provided. In the future other properties of interest
can be added in a centralized place.
Authored By: etiotto
Reviewer: Meinersbur, bmahjour, kbarton, Whitney, dmgreen, fhahn,
reames, hfinkel, jdoerfert, ppc-slack
Reviewed By: Meinersbur
Subscribers: bryanpkc, ppc-slack, mgorny, hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D68789
Jon Chesterfield [Tue, 3 Mar 2020 18:24:51 +0000 (18:24 +0000)]
[libomptarget][nfc][amdgcn] Simplify assert_fail implementation
Fangrui Song [Tue, 3 Mar 2020 18:01:51 +0000 (10:01 -0800)]