Simon Pilgrim [Thu, 16 Apr 2020 17:10:59 +0000 (18:10 +0100)]
MCSectionXCOFF.h - remove unnecessary Twine.h include. NFC
Georgii Rymar [Wed, 15 Apr 2020 15:28:08 +0000 (18:28 +0300)]
[tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI.
There is no need to use `--check-prefix` multiple times.
It helps to improve readability/test maintainability.
This patch does it for all tools at once.
Differential revision: https://reviews.llvm.org/D78217
LLVM GN Syncbot [Fri, 17 Apr 2020 09:27:53 +0000 (09:27 +0000)]
[gn build] Port
ff9379f4b2d
Tyker [Fri, 17 Apr 2020 08:53:01 +0000 (10:53 +0200)]
[NFC] Remove waymarking because it improves performances
Summary:
This patch remove waymarking and replaces it with storing a pointer to the User in the Use.
here are the results on the measurements for the CTMark tests of the test suite.
```
Metric: instructions_count
Program baseline patched diff
test-suite :: CTMark/ClamAV/clamscan.test
72557942065 71733653521 -1.1%
test-suite :: CTMark/sqlite3/sqlite3.test
76281422939 75484840636 -1.0%
test-suite :: CTMark/consumer-typeset/consumer-typeset.test
51364676366 50862185614 -1.0%
test-suite :: CTMark/SPASS/SPASS.test
60476106505 59908437767 -0.9%
test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test
112578442329 111725050856 -0.8%
test-suite :: CTMark/mafft/pairlocalalign.test
50846133013 50473644539 -0.7%
test-suite :: CTMark/kimwitu++/kc.test
54692641250 54349070299 -0.6%
test-suite :: CTMark/7zip/7zip-benchmark.test
182216614747 181216091230 -0.5%
test-suite :: CTMark/Bullet/bullet.test
123459210616 122905866767 -0.4%
Geomean difference -0.8%
Metric: peak_memory_use
Program baseline patched diff
test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 326864 338524 3.6%
test-suite :: CTMark/sqlite3/sqlite3.test 216412 221240 2.2%
test-suite :: CTMark/7zip/7zip-benchmark.test
11808284 12022604 1.8%
test-suite :: CTMark/Bullet/bullet.test 6831752 6945988 1.7%
test-suite :: CTMark/SPASS/SPASS.test 2682552 2721820 1.5%
test-suite :: CTMark/ClamAV/clamscan.test 5037256 5107936 1.4%
test-suite :: CTMark/consumer-typeset/consumer-typeset.test 2752728 2790768 1.4%
test-suite :: CTMark/mafft/pairlocalalign.test 1517676 1537244 1.3%
test-suite :: CTMark/kimwitu++/kc.test 1090748 1103448 1.2%
Geomean difference 1.8%
Metric: compile_time
Program baseline patched diff
test-suite :: CTMark/consumer-typeset/consumer-typeset.test 14.71 14.38 -2.2%
test-suite :: CTMark/sqlite3/sqlite3.test 23.18 22.73 -2.0%
test-suite :: CTMark/7zip/7zip-benchmark.test 57.96 56.99 -1.7%
test-suite :: CTMark/ClamAV/clamscan.test 20.75 20.49 -1.2%
test-suite :: CTMark/kimwitu++/kc.test 18.35 18.15 -1.1%
test-suite :: CTMark/SPASS/SPASS.test 18.72 18.57 -0.8%
test-suite :: CTMark/mafft/pairlocalalign.test 14.09 14.00 -0.6%
test-suite :: CTMark/Bullet/bullet.test 37.38 37.19 -0.5%
test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 33.81 33.76 -0.2%
Geomean difference -1.1%
```
i believe that it is worth trading +1.8% peak memory use for -1.1% compile time.
also this patch removes waymarking which simplifies the Use and User classes.
Reviewers: nikic, lattner
Reviewed By: lattner
Subscribers: russell.gallop, foad, ggreif, rriddle, ekatz, fhahn, lebedev.ri, mgorny, hiraditya, george.burgess.iv, asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77144
Yi-Hong Lyu [Fri, 17 Apr 2020 06:45:45 +0000 (23:45 -0700)]
[CommandLine] Fix cl::ConsumeAfter support with more than one positional argument
Summary:
Currently, cl::ConsumeAfter only works for the case that has exactly one
positional argument. Without the fix, it skip fulfilling first positional
argument and put that additional positional argument in interpreter arguments.
Reviewers: bkramer, Mordante, rnk, lattner, beanz, craig.topper
Reviewed By: rnk
Subscribers: JosephTremoulet, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77242
Alex Brachet [Fri, 17 Apr 2020 09:10:22 +0000 (05:10 -0400)]
Use proper dependency name for libc.include.stdio
Simon Pilgrim [Thu, 16 Apr 2020 20:44:50 +0000 (21:44 +0100)]
IPO.h - remove unused llvm::Function forward declaration. NFC.
Simon Pilgrim [Thu, 16 Apr 2020 19:50:46 +0000 (20:50 +0100)]
ConstantFolding.h - remove unused llvm::ConstantVector forward declaration. NFC.
Simon Pilgrim [Wed, 15 Apr 2020 21:32:17 +0000 (22:32 +0100)]
ScheduleDFS.h - Replace ArrayRef.h include with forward declaration. NFC.
We have no need to include the entire header.
Simon Pilgrim [Wed, 15 Apr 2020 21:30:21 +0000 (22:30 +0100)]
ScoreboardHazardRecognizer.h - remove unnecessary llvm::InstrItineraryData forward declaration. NFC.
We have to include MCInstrItineraries.h where its defined.
Matthias Gehre [Tue, 14 Apr 2020 18:17:22 +0000 (20:17 +0200)]
[clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword
Summary:
Before this PR, `modernize-use-using` would transform the typedef in
```
template <typename a> class TemplateKeyword {
typedef typename a::template f<> e;
typedef typename a::template f<>::d e2;
};
```
into
```
template <typename a> class TemplateKeyword {
using d = typename a::b<>;
using d2 = typename a::template a::b<>::c;
};
```
The first one is missing the `template` keyword,
the second one has an extra `a::` scope. Both result
in compilation errors.
Reviewers: aaron.ballman, alexfh, hokein, njames93
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78139
Bevin Hansson [Thu, 16 Apr 2020 13:02:41 +0000 (15:02 +0200)]
[Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.
Summary:
We can simplify the LHSTy correction for
fixed-point compassign by moving it below
the point where we know we have a compound
assignment.
Also, we shouldn't look at the LHS and RHS
separately; look at the computation result
type instead.
Looking at the LHS and RHS is also wrong
for compassigns with fixed and floating
point (though this does not work upstream
yet).
Reviewers: leonardchan
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78294
Petr Hosek [Sat, 28 Mar 2020 00:48:28 +0000 (17:48 -0700)]
[profile] Avoid duplicating or leaking VMO
Now that write data continously into the memory mapping, we don't need
to keep the VMO handle around after it has been mapped. This change also
ensures that the VMO is always closed on error.
Differential Revision: https://reviews.llvm.org/D76963
Sam Parker [Wed, 15 Apr 2020 08:57:13 +0000 (09:57 +0100)]
[ARM][MVE] Add VHADD and VHSUB patterns
Add patterns that use a normal, non-wrapping, add and sub nodes along
with an arm vshr imm node.
Differential Revision: https://reviews.llvm.org/D77065
James Nagurne [Fri, 17 Apr 2020 06:01:01 +0000 (08:01 +0200)]
Fix opt-viewer tests failing after move from cgi.escape to html.escape
These two tests utilize pre-generated opt-viewer output to diff against
a run of opt-viewer over a known yaml file.
In commit
4b428e8f (D76126), the escape function used for rendering was changed
from cgi.escape to html.escape. This modification causes a behavioral
difference with regards to quote characters.
cgi will not escape quotes by default, but html will.
Therefore, these tests were failing because they expected the old behavior
of "string", but was instead seeing "string".
This solution modifies the known test outputs to use the escaped quotes
rather than not escaping quotes during rendering for no particular reason.
It is notable that when testing the optimization records generated by
LLVM, there was never quotes in the remarks I could find, specifically in
the Callee field where they exist in the pre-generated yaml for testing.
Differential Revision: https://reviews.llvm.org/D78241
Shengchen Kan [Fri, 17 Apr 2020 06:11:05 +0000 (14:11 +0800)]
Temporaily revert [X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part II)
It causes some encoding fails. Plan to recommit it after fixing that.
This reverts commit
3017580c7961397f96e9481abf82bbf874bb2633.
Shengchen Kan [Fri, 17 Apr 2020 03:17:38 +0000 (11:17 +0800)]
[X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part II)
Summary:
We determine the REX prefix used by instruction in `determineREXPrefix`,
and this value is used in `emitMemModRMByte' and used as the return
value of `emitOpcodePrefix`.
Before this patch, REX was passed as reference to `emitPrefixImpl`, it
is strange and not necessary, e.g, we have to write
```
bool Rex = false;
emitPrefixImpl(CurOp, CurByte, Rex, MI, STI, OS);
```
in `emitPrefix` even if `Rex` will not be used.
So we let HasREX be the return value of `emitPrefixImpl`. The HasREX is passed
from `emitREXPrefix` to `emitOpcodePrefix` and then to
`emitPrefixImpl`. This makes sense since REX is a kind of opcode prefix
and of course is a prefix.
Reviewers: craig.topper, pengfei
Reviewed By: craig.topper
Subscribers: annita.zhang, craig.topper, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78276
QingShan Zhang [Fri, 17 Apr 2020 05:24:00 +0000 (05:24 +0000)]
[PowerPC] Exploit the rldicl + rldicl when and with mask
If we are and the constant like 0xFFFFFFC00000, for now, we are using several
instructions to generate this 48bit constant and final an "and". However, we
could exploit it with two rotate instructions.
MB ME MB+63-ME
+----------------------+ +----------------------+
|
0000001111111111111000| -> |
0000000001111111111111|
+----------------------+ +----------------------+
0 63 0 63
Rotate left ME + 1 bit first, and then, mask it with (MB + 63 - ME, 63),
finally, rotate back. Notice that, we need to round it with 64 bit for the
wrapping case.
Reviewed by: ChenZheng, Nemanjai
Differential Revision: https://reviews.llvm.org/D71831
Craig Topper [Fri, 17 Apr 2020 04:03:39 +0000 (21:03 -0700)]
[SampleProfile] Use CallBase in function arguments and data structures to reduce the number of explicit casts. NFCI
Removing CallSite left us with a bunch of explicit casts from
Instruction to CallBase. This moves the casts earlier so that
function arguments and data structure types are CallBase so
we don't have to cast when we use them.
Differential Revision: https://reviews.llvm.org/D78246
Lang Hames [Fri, 17 Apr 2020 04:48:40 +0000 (21:48 -0700)]
[llvm-objcopy][MachO] Correctly identify object file endianness.
The header magic value is held in the native endianness, so the method used in
cc0ec3fdb9d. Use MachOReader / MachOWriter's existing endianness tests instead.
aartbik [Thu, 16 Apr 2020 23:01:42 +0000 (16:01 -0700)]
[mlir] [VectorOps] Progressive lowering of vector.broadcast
Summary:
Rather than having a full, recursive, lowering of vector.broadcast
to LLVM IR, it is much more elegant to have a progressive lowering
of each vector.broadcast into a lower dimensional vector.broadcast,
until only elementary vector operations remain. This results
in more elegant, step-wise code, that is easier to understand.
Also makes some optimizations in the generated code.
Reviewers: nicolasvasilache, mehdi_amini, andydavis1, grosul1
Reviewed By: nicolasvasilache
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78071
Lang Hames [Fri, 17 Apr 2020 01:21:41 +0000 (18:21 -0700)]
[llvm-objcopy][MachO] Fix MachO::relocation_info use after
386f1c114d5.
Use shift/mask operations to access r_symbolnum rather than relying on
MachO::relocation_info. This should fix the big-endian bot failures that were
caused by
386f1c114d5.
Wouter van Oortmerssen [Fri, 17 Apr 2020 01:19:29 +0000 (18:19 -0700)]
[WebAssembly] Fix faulty logic in verifyRelocTargets
LLVM GN Syncbot [Fri, 17 Apr 2020 00:58:15 +0000 (00:58 +0000)]
[gn build] Port
953a814aae4
Chris Lattner [Thu, 16 Apr 2020 23:27:31 +0000 (16:27 -0700)]
Remove the llvm/Support/StringPool.h file and related support now that it has no clients. A plain old StringSet<> is a better replacement.
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78336
Jonas Devlieghere [Fri, 17 Apr 2020 00:50:56 +0000 (17:50 -0700)]
Revert "[lldb/Utility] Provide a stringify_append overload for function pointers."
Temporarily reverts commit
d10386e1779599d217b5b849a079f29dfbe17024
because it breaks the Windows build. MSVC complains about an ambiguous
call to an overloaded function.
Craig Topper [Fri, 17 Apr 2020 00:03:16 +0000 (17:03 -0700)]
[SelectionDAGBuilder][CGP][X86] Move some of SDB's gather/scatter uniform base handling to CGP.
I've always found the "findValue" a little odd and
inconsistent with other things in SDB.
This simplfifies the code in SDB to just handle a splat constant
address or a 2 operand GEP in the same BB. This removes the
need for "findValue" since the operands to the GEP are
guaranteed to be available. The splat constant handling is
new, but was needed to avoid regressions due to constant
folding combining GEPs created in CGP.
CGP is now responsible for canonicalizing gather/scatters into
this form. The pattern I'm using for scalarizing, a scalar GEP
followed by a GEP with an all zeroes index, seems to be subject
to constant folding that the insertelement+shufflevector was not.
Differential Revision: https://reviews.llvm.org/D76947
Paula Toth [Fri, 17 Apr 2020 00:40:36 +0000 (17:40 -0700)]
[libc] Add cmake target for linting libc.
Summary:
This patch implements running linting on llvm-libc using build rule targets.
1) adds a new target per entrypoint for linting with the naming convention `<qualified_target_name>.__lint__` e.g `libc.src.string.strlen.__lint__`.
2) makes the build target for each entrypoint depend on the linting targets so that they run along with compilation of each entrypoint.
3) adds a lint all target named `lint-libc`. `check-libc` now depends on this new target.
4) linting creates a lot of additional targets from clang and clang-tidy that need to be built so an opt out flag can be passed to cmake: `LLVM_LIBC_ENABLE_LINTING`.
Reviewers: sivachandra, abrachet
Reviewed By: sivachandra
Subscribers: abrachet, mgorny, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D77861
Evgenii Stepanov [Thu, 16 Apr 2020 20:12:54 +0000 (13:12 -0700)]
[ubsan] Link shared runtime library with a version script.
Summary:
Do not reexport libgcc.a symbols and random sanitizer internal symbols
by applying a version script to the shared library build.
This fixes unwinder conflicts on Android that are created by reexporting
the unwinder interface from libgcc_real.a. The same is already done in
asan and hwasan.
Reviewers: vitalybuka, srhines
Subscribers: mgorny, #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78325
Dan Liew [Wed, 15 Apr 2020 04:49:50 +0000 (21:49 -0700)]
[NFC] Introduce a `LateInitialize()` method to `SymbolizerTool` that is called during the LateInitialize stage of the sanitizer runtimes.
Summary:
This is implemented by adding a `Symbolizer::LateInitializeTools()`
method that iterates over the registered tools and calls the
`LateInitialize()` method on them.
`Symbolizer::LateInitializeTools()` is now called from the various
`Symbolizer::LateInitialize()` implementations.
The default implementation of `SymbolizerTool::LateInitialize()`
does nothing so this change should be NFC.
This change allows `SymbolizerTool` implementations to perform
any initialization that they need to perform at the
LateInitialize stage of a sanitizer runtime init.
rdar://problem/
58789439
Reviewers: kubamracek, yln, vitalybuka, cryptoad, phosek, rnk
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78178
Wouter van Oortmerssen [Fri, 17 Apr 2020 00:22:38 +0000 (17:22 -0700)]
[WebAssembly] Fix WasmEmitter link error.
Pratyai Mazumder [Tue, 14 Apr 2020 23:13:25 +0000 (16:13 -0700)]
[NFC, tsan] Update tsan tests expectation
Summary:
These tests pass with clang, but fail if gcc was used.
gcc build creates similar but not the same stacks.
Reviewers: vitalybuka
Reviewed By: vitalybuka
Subscribers: dvyukov, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78114
Wouter van Oortmerssen [Fri, 17 Apr 2020 00:11:14 +0000 (17:11 -0700)]
[WebAssembly] fixed target index strings in DebugInfo test
Wouter van Oortmerssen [Fri, 20 Mar 2020 02:53:51 +0000 (19:53 -0700)]
[WebAssembly] Add int32 DW_OP_WASM_location variant
This to allow us to add reloctable global indices as a symbol.
Also adds R_WASM_GLOBAL_INDEX_I32 relocation type to support it.
See discussion in https://github.com/WebAssembly/debugging/issues/12
Craig Topper [Thu, 16 Apr 2020 23:23:03 +0000 (16:23 -0700)]
[CallSite removal][IPO] Change implementation of AbstractCallSite to store a CallBase* instead of CallSite. NFCI.
CallSite will likely be removed soon, but AbstractCallSite serves a different purpose and won't be going away.
This patch switches it to internally store a CallBase* instead of a
CallSite. The only interface changes are the removal of the getCallSite
method and getCallBackUses now takes a CallBase&. These methods had only
a few callers that were easy enough to update without needing a
compatibility shim.
In the future once the other CallSites are gone, the CallSite.h
header should be renamed to AbstractCallSite.h
Differential Revision: https://reviews.llvm.org/D78322
Lang Hames [Thu, 16 Apr 2020 22:53:00 +0000 (15:53 -0700)]
[Object] Remove conditional layout of bitfields in MachO::relocation_info.
This removes the conditional layout of relocation_info bitfields that was
introduced in
3ccd677bf (svn r358839). The platform relocation_info
struct (defined in usr/include/mach-o/reloc.h) does not define the layout of
this struct differently on big-endian platforms and we want to keep the LLVM
and platform definitions in sync.
To fix the bug that
3ccd677bf addressed this patch modifies JITLink to construct
its relocation_info structs from the raw relocation words using shift and mask
operations.
Richard Smith [Fri, 24 Jan 2020 00:25:30 +0000 (16:25 -0800)]
llvm-addr2line: assume addresses on the command line are hexadecimal rather than attempting to guess the base based on the form of the number.
Summary:
This matches the behavior of GNU addr2line. We previously treated
hexadecimal addresses as binary if they started with 0b, otherwise as
octal if they started with 0, otherwise as decimal.
This only affects llvm-addr2line; the behavior of llvm-symbolize is
unaffected.
Reviewers: ikudrin, rupprecht, jhenderson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73306
Julian Lettner [Tue, 14 Apr 2020 19:48:58 +0000 (12:48 -0700)]
[UBSan] Fix vptr checks on arm64e
Fix UBSan's vptr checks in the presence of arm64e pointer signing.
Radar-Id: rdar://
61786404
Reviewed By: vsk
Differential Revision: https://reviews.llvm.org/D78230
Sam McCall [Thu, 16 Apr 2020 23:08:32 +0000 (01:08 +0200)]
[clangd] Remove unused and underused helpers. NFC
Sam McCall [Thu, 16 Apr 2020 23:00:42 +0000 (01:00 +0200)]
[clangd] Print PID on windows too
Stephen Neuendorffer [Thu, 16 Apr 2020 19:27:16 +0000 (12:27 -0700)]
[MLIR][cmake] Use DEPENDS instead of add_dependencies()
add_llvm_library() sometimes needs access to the dependencies in order to
generate new targets. Using DEPENDS allows this.
Differential Revision: https://reviews.llvm.org/D78321
Eric Fiselier [Thu, 16 Apr 2020 22:35:31 +0000 (18:35 -0400)]
[clang] Fix invalid comparator in tablegen
Summary: The current version of the comparator does not introduce a strict weak ordering.
Reviewers: fowles, bkramer, sdesmalen
Reviewed By: sdesmalen
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78323
Davide Italiano [Thu, 16 Apr 2020 22:36:43 +0000 (15:36 -0700)]
[DWARF] Rename a function and comment it for clarity.
Pointed out by Adrian.
Jonas Devlieghere [Thu, 16 Apr 2020 22:28:42 +0000 (15:28 -0700)]
[lldb/Utility] Provide a stringify_append overload for function pointers.
Converting a function pointer to an object pointer is illegal as nothing
requires it to be in the same address space. Add an overload for
function pointers so we don't convert do this illegal conversion, and
simply print out "function pointer".
Jason Molenda [Thu, 16 Apr 2020 22:22:14 +0000 (15:22 -0700)]
Remove attach-failed-due-to-SIP checks which were not working
The SIP debugserver was calling in attach_failed_due_to_sip
haven't worked for a while; remove them. To check this
properly we'd need debugsever to call out to codesign(1) to
inspect the entitlements, or the equivalant API,
and I'm not interested in adding that at this point. SIP
is has been the default on macOS for a couple of releases
and it's expected behavior now.
<rdar://problem/
59198052>
Nicolas Vasilache [Thu, 16 Apr 2020 21:24:48 +0000 (17:24 -0400)]
[mlir][Linalg] NFC - Split out EDSCs that require a Folder
Summary: This is an NFC cleanup in preparation for end-to-end named Linalg ops.
Differential Revision: https://reviews.llvm.org/D78331
Bob Haarman [Fri, 3 Apr 2020 06:26:04 +0000 (23:26 -0700)]
[WPD] Avoid noalias assumptions in unique return value optimization
Summary:
Changes the type of the @__typeid_.*_unique_member imports we generate
for unique return value optimization from i8 to [0 x i8]. This
prevents assuming that these imports do not alias, such as when
two unique return values occur in the same vtable.
Fixes PR45393.
Reviewers: tejohnson, pcc
Reviewed By: pcc
Subscribers: aganea, hiraditya, rnk, george.burgess.iv, dblaikie, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77421
Stephen Neuendorffer [Thu, 16 Apr 2020 18:52:05 +0000 (11:52 -0700)]
[MLIR][cmake] Remove redundant add_dependencies()
Libraries declared as target_link_libraries() do not also need
to be declared as dependencies using add_dependencies().
Differential Revision: https://reviews.llvm.org/D78320
Florian Hahn [Sat, 11 Apr 2020 20:47:48 +0000 (21:47 +0100)]
[SCCP] Add widening test case.
Benjamin Kramer [Thu, 16 Apr 2020 21:35:38 +0000 (23:35 +0200)]
Expose ATOMIC in the clang python bindings
Following
38ca7b11db2d22e0fdfbff3f19276f9796f747d3
Alex Zinenko [Thu, 16 Apr 2020 21:24:58 +0000 (23:24 +0200)]
[mlir] ODS: support operations with resizable operand lists
MLIR supports operations with resizable operand lists, but this property must
be indicated during the construction of such operations. It can be done
programmatically by calling a function on OperationState. Introduce an
ODS-internal trait `ResizableOperandList` to indicate such operations are use
it when generating the bodies of various `build` functions as well as the
`parse` function when the declarative assembly format is used.
Differential Revision: https://reviews.llvm.org/D78292
Louis Dionne [Thu, 16 Apr 2020 20:17:14 +0000 (16:17 -0400)]
[libc++] Move handling of convenience substitutions outside of config.py
These substitutions are strongly tied to the operation of the test
format, so it makes sense to have them defined by the test format
instead of the Lit configuration. They should be defined regardless
of which configuration is in use.
Sanjay Patel [Thu, 16 Apr 2020 21:16:22 +0000 (17:16 -0400)]
[x86] auto-generate complete test checks; NFC
David Green [Tue, 14 Apr 2020 17:49:15 +0000 (18:49 +0100)]
[ARM] MVE postinc tests. NFC
Jonas Devlieghere [Thu, 16 Apr 2020 21:02:05 +0000 (14:02 -0700)]
[lldb/Utility] Fix a bug in stringify_append for printing addresses.
The recent change in the API macros revealed that we were not printing
the pointer address for a bunch of methods, but rather the address of
the pointer. It's something I had already noticed while looking at some
reproducer traces, but hadn't made it to the top of my list yet. This
fixes the issue by providing a more specific overload.
Daniel S Fava [Thu, 16 Apr 2020 20:53:26 +0000 (22:53 +0200)]
tsan: fixes to ThreadClock::releaseStoreAcquire and tests
Fixes:
1. Setting the number of entries in a thread's clock to max between
the thread and the SyncClock the thread is acquiring from
2. Setting last_acquire_
Unit- and stress-test for releaseStoreAcquire added to
tests/unit/tsan_clock_test.cpp
Stephen Neuendorffer [Thu, 16 Apr 2020 18:11:13 +0000 (11:11 -0700)]
[MLIR] Complete refactoring of Affine dialect into sub-libraries.
There were some unused CMakeFiles for Affine/IR and Affine/EDSC.
This change builds separate MLIRAffineOps and MLIRAffineEDSC libraries
using those CMakeFiles. This combination replaces the old MLIRAffine
library.
Differential Revision: https://reviews.llvm.org/D78317
Davide Italiano [Thu, 16 Apr 2020 20:31:32 +0000 (13:31 -0700)]
[DWARF] Add instructions to regenerate this test, if needed.
Davide Italiano [Thu, 16 Apr 2020 20:22:06 +0000 (13:22 -0700)]
[Shell] Remove incorrectly cargo-culted UNSUPPORTED.
Let's see if this sticks on the bots.
David Green [Thu, 16 Apr 2020 19:53:32 +0000 (20:53 +0100)]
[ARM] Mir test for machine sinking multiple def instructions. NFC
Chris Lattner [Thu, 16 Apr 2020 05:27:19 +0000 (22:27 -0700)]
[clang-tools-extra] reimplement PreprocessorTracker in terms of StringSet.
Summary:
PreprocessorTracker is the last user of the old StringPool class, which
isn't super loved and isn't a great improvement over a plan StringSet.
Once this goes in we can remove StringPool entirely.
This is as discussed on cfe-dev.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78273
Dan Albert [Thu, 12 Mar 2020 18:16:30 +0000 (11:16 -0700)]
Reland: Don't expose unavailable cstdio functions.
Marked unsupported for C++03 and C++11 since this test uses alias
declarations, and at least one C++03 bot was failing with
-Wc++11-extensions.
Change-Id: I8c3a579edd7eb83e0bc74e85d116b68f22400161
Joel E. Denny [Thu, 16 Apr 2020 18:53:56 +0000 (14:53 -0400)]
[FileCheck] Fix --dump-input annotation sort per input line
Without this patch, `--dump-input` annotations on a single input line
are sorted by the associated directive's check-file line. That seemed
fine because that's often identical to the order in which FileCheck
looks for matches for those directives.
The first problem is that an `--implicit-check-not` pattern has no
check-file line. The logical equivalent is sorting in command-line
order, but that's not implemented.
The second problem is that, unlike a directive, an
`--implicit-check-not` pattern applies at many points, between many
different pairs of directives. However, sorting in command-line order
gathers all its associated diagnostics together at one point in an
input line's list of annotations.
In general, it seems to be easier to understand FileCheck's logic when
annotations on a single input line are sorted in the order FileCheck
produced the associated diagnostics, so this patch makes that change.
As documented in the patch, the annotation sort order is also
especially relevant to `CHECK-LABEL`, `CHECK-NOT`, and `CHECK-DAG`, so
this patch updates or extends tests to check the sort makes sense for
them. (However, the sort for `CHECK-DAG` annotations should not
actually be altered by this patch.)
Reviewed By: thopre
Differential Revision: https://reviews.llvm.org/D77607
Joel E. Denny [Thu, 16 Apr 2020 18:53:44 +0000 (14:53 -0400)]
[FileCheck] Fix --dump-input implicit pattern location
Currently, `--dump-input` implies that all `--implicit-check-not`
patterns appear on line 1 by printing annotations like:
```
1: foo bar baz
not:1 !~~ error: no match expected
```
This patch changes that to:
```
1: foo bar baz
not:imp1 !~~ error: no match expected
```
`imp1` indicates the first `--implicit-check-not` pattern.
Reviewed By: thopre
Differential Revision: https://reviews.llvm.org/D77605
bd1976llvm [Thu, 16 Apr 2020 10:45:31 +0000 (10:45 +0000)]
[MC][ELF] Put explicit section name symbols into entry size compatible sections
Ensure that symbols explicitly* assigned a section name are placed into
a section with a compatible entry size.
This is done by creating multiple sections with the same name** if
incompatible symbols are explicitly given the name of an incompatible
section, whilst:
- Avoiding using uniqued sections where possible (for readability and
to maximize compatibly with assemblers).
- Creating as few SHF_MERGE sections as possible (for efficiency).
Given that each symbol is assigned to a section in a single pass, we
must decide which section each symbol is assigned to without seeing the
properties of all symbols. A stable and easy to understand assignment is
desirable. The following rules facilitate this: The "generic" section
for a given section name will be mergeable if the name is a mergeable
"default" section name (such as .debug_str), a mergeable "implicit"
section name (such as .rodata.str2.2), or MC has already created a
mergeable "generic" section for the given section name (e.g. in response
to a section directive in inline assembly). Otherwise, the "generic"
section for a given name is non-mergeable; and, non-mergeable symbols
are assigned to the "generic" section, while mergeable symbols are
assigned to uniqued sections.
Terminology:
"default" sections are those always created by MC initially, e.g. .text
or .debug_str.
"implicit" sections are those created normally by MC in response to the
symbols that it encounters, i.e. in the absence of an explicit section
name assignment on the symbol, e.g. a function foo might be placed into
a .text.foo section.
"generic" sections are those that are referred to when a unique section
ID is not supplied, e.g. if there are multiple unique .bob sections then
".quad .bob" will reference the generic .bob section. Typically, the
generic section is just the first section of a given name to be created.
Default sections are always generic.
* Typically, section names might be explicitly assigned in source code
using a language extension e.g. a section attribute: _attribute_
((section ("section-name"))) -
https://clang.llvm.org/docs/AttributeReference.html
** I refer to such sections as unique/uniqued sections. In assembly the
", unique," assembly syntax is used to express such sections.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43457.
See https://reviews.llvm.org/D68101 for previous discussions leading to
this patch.
Some minor fixes were required to LLVM's tests, for tests had been using
the old behavior - which allowed for explicitly assigning globals with
incompatible entry sizes to a section.
This fix relies on the ",unique ," assembly feature. This feature is not
available until bintuils version 2.35
(https://sourceware.org/bugzilla/show_bug.cgi?id=25380). If the
integrated assembler is not being used then we avoid using this feature
for compatibility and instead try to place mergeable symbols into
non-mergeable sections or issue an error otherwise.
Differential Revision: https://reviews.llvm.org/D72194
Amy Huang [Mon, 13 Apr 2020 18:06:37 +0000 (11:06 -0700)]
Reland "[codeview] Reference types in type parent scopes"
Summary:
Original description (https://reviews.llvm/org/D69924)
Without this change, when a nested tag type of any kind (enum, class,
struct, union) is used as a variable type, it is emitted without
emitting the parent type. In CodeView, parent types point to their inner
types, and inner types do not point back to their parents. We already
walk over all of the parent scopes to build the fully qualified name.
This change simply requests their type indices as we go along to enusre
they are all emitted.
Now, while walking over the parent scopes, add the types to
DeferredCompleteTypes, since they might already be in the process of
being emitted.
Fixes PR43905
Reviewers: rnk, amccarth
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78249
Louis Dionne [Thu, 16 Apr 2020 19:01:09 +0000 (15:01 -0400)]
[libc++] NFC: Reindent impossible to read conditional in __config
Jaydeep Chauhan [Thu, 16 Apr 2020 18:10:47 +0000 (11:10 -0700)]
[LLVM] Remove wrong DBG_VALUE instruction with one operand in AArch64 test case
Summary:
AArch64 test case llvm/test/CodeGen/AArch64/branch-target-enforcement.mir is checking for invalid DBG_VALUE instruction with one operand(`DBG_VALUE $lr`). And this DBG_VALUE instruction is echoed from test case it self only.
Correct format of DBG_VALUE is given in below link:
https://llvm.org/docs/SourceLevelDebugging.html#variable-locations-in-instruction-selection-and-mir
Reviewers: dsanders, eli.friedman, jmorse, vsk
Reviewed By: dsanders
Subscribers: kristof.beyls, danielkiss, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78309
George Burgess IV [Thu, 16 Apr 2020 17:56:19 +0000 (10:56 -0700)]
[CodeGen] fix inline builtin-related breakage from D78162
In cases where we have multiple decls of an inline builtin, we may need
to go hunting for the one with a definition when setting function
attributes.
An additional test-case was provided on
https://github.com/ClangBuiltLinux/linux/issues/979
Cameron McInally [Thu, 16 Apr 2020 18:41:14 +0000 (13:41 -0500)]
[AArch64][SVE] Add DestructiveBinaryImm SQSHLU patterns.
Add DestructiveBinaryImm SQSHLU patterns and tests. These patterns allow the SQSHLU instruction to match with a MOVPRFX.
Differential Revision: https://reviews.llvm.org/D76728
Craig Topper [Thu, 16 Apr 2020 18:05:31 +0000 (11:05 -0700)]
[CallSite removal][CodeGen] Drop some unneeded includes of CallSite.h. NFC
The uses of CallSite were removed in previous patches.
Craig Topper [Thu, 16 Apr 2020 17:54:30 +0000 (10:54 -0700)]
[CallSite removal][CodeGen] Remove CallSite use from BasicTTIImpl.h. NFC
While there convert iterator loops to range-based.
Differential Revision: https://reviews.llvm.org/D78275
LLVM GN Syncbot [Thu, 16 Apr 2020 17:47:41 +0000 (17:47 +0000)]
[gn build] Port
d9085f65db0
Stefan Pintilie [Thu, 16 Apr 2020 17:45:22 +0000 (12:45 -0500)]
[PowerPC][Future] Initial support for PC Relative addressing for global values
This patch adds PC Relative support for global values that are known at link
time. If a global value requires access through the global offset table (GOT)
it is not covered in this patch.
Differential Revision: https://reviews.llvm.org/D75280
Daniel Sanders [Wed, 1 Apr 2020 18:19:58 +0000 (11:19 -0700)]
[globalisel] Add lost debug locations verifier
Summary:
This verifier tries to ensure that DebugLoc's don't just disappear as
we transform the MIR. It observes the instructions created, erased, and
changed and at checkpoints chosen by the client algorithm verifies the
locations affected by those changes.
In particular, it verifies that:
* Every DebugLoc for an erased/changing instruction is still present on
at least one new/changed instruction
* Failing that, that there is a line-0 location in the new/changed
instructions. It's not possible to confirm which locations were merged so
it conservatively assumes all unaccounted for locations are accounted
for by any line-0 location to avoid false positives.
If that fails, it prints the lost locations in the debug output along with
the instructions that should have accounted for them.
In theory, this is usable by the legalizer, combiner, selector and any other
pass that performs incremental changes to the MIR. However, it has so far
only really been tested on the legalizer (not including the artifact
combiner) where it has caught lots of lost locations, particularly in Custom
legalizations. There's only one example here as my initial testing was on an
out-of-tree target and I haven't done a pass over the in-tree targets yet.
Depends on D77575, D77446
Reviewers: bogner, aprantl, vsk
Subscribers: jvesely, nhaehnle, mgorny, rovka, hiraditya, volkan, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77576
Daniel Sanders [Thu, 16 Apr 2020 00:24:17 +0000 (17:24 -0700)]
[globalisel] Allow backends to report an issue without triggering fallback. NFC
Summary:
This will allow us to fix the issue where the lost locations
verifier causes CodeGen changes on lost locations because it
falls back on DAGISel
Reviewers: qcolombet, bogner, aprantl, vsk, paquette
Subscribers: rovka, hiraditya, volkan, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78261
Fangrui Song [Fri, 13 Mar 2020 18:20:13 +0000 (11:20 -0700)]
[MC][X86] Allow SHT_PROGBITS for .eh_frame on x86-64
GNU as emits SHT_PROGBITS .eh_frame by default for .cfi_* directives.
We follow x86-64 psABI and use SHT_X86_64_UNWIND for .eh_frame
Don't error for SHT_PROGBITS .eh_frame on x86-64.
This keeps compatibility with `.section .eh_frame,"a",@progbits` in existing assembly files.
See https://groups.google.com/d/msg/x86-64-abi/7sr4E6THl3g/zUU2UPHOAQAJ
for more discussions.
Reviewed By: joerg
Differential Revision: https://reviews.llvm.org/D76151
Stanislav Mekhanoshin [Fri, 10 Apr 2020 22:54:54 +0000 (15:54 -0700)]
[AMDGPU] Define 16 bit SGPR subregs
These are needed as a counterpart for VGPR subregs even though
there are no scalar instructions which can operate 16 bit values.
When we are materializing a constant that is done into an SGPR
and that SGPR may/will be copied into a 16 bit VGPR subreg. Such
copy is illegal. There are also similar problems if a source
operand of a 16 bit VALU instruction is an SGPR. In addition
we need to get a register with a lo16 subregister of an SGPR
RC during selection and this fails as well.
All of that makes me believe we need these subregisters as a
syntactic glue.
Differential Revision: https://reviews.llvm.org/D78250
Jonas Devlieghere [Thu, 16 Apr 2020 17:02:26 +0000 (10:02 -0700)]
[lldb/Docs] Add some more info about the test suite structure
Expand on the structure of the LLDB test suite. So far this information
has been mostly "tribal knowledge". By writing it down I hope to make it
easier to understand our test suite for anyone that's new to the
project.
Anna Welker [Thu, 16 Apr 2020 17:09:24 +0000 (18:09 +0100)]
[ARM][MVE] Fix location of optimized gather addresses
Fix for the address optimization for gathers and scatters which would in
some complex cases push out instructions not to the vector loop preheader,
but to other locations as well which lead to a scrambled order and the
compilation failing.
This patch ensures that said instructions are always pushed to the end
of the vector loop preheader.
Differential Revision: https://reviews.llvm.org/D78293
Jonas Devlieghere [Tue, 14 Apr 2020 20:28:27 +0000 (13:28 -0700)]
[lldb/Reproducers] Simplify LLDB_RECORD macros
Redefine the LLDB_RECORD macros in terms of a common uber-macro to
reduce code duplication across them.
Differential revision: https://reviews.llvm.org/D78141
Roman Lebedev [Thu, 16 Apr 2020 16:53:17 +0000 (19:53 +0300)]
[OpenMPOpt] deduplicateRuntimeCalls(): avoid traditional map lookup pitfall
Summary:
This roughly halves time spent in that pass,
while unsurprisingly significantly reducing total memory usage.
This makes sense because most functions won't use any openmp functions..
old
```
0.2329 ( 0.5%) 0.0409 ( 0.9%) 0.2738 ( 0.5%) 0.2736 ( 0.5%) OpenMP specific optimizations
```
```
total runtime: 63.32s.
bytes allocated in total (ignoring deallocations): 8.34GB (131.70MB/s)
calls to allocation functions:
14526259 (229410/s)
temporary memory allocations: 3335760 (52680/s)
peak heap memory consumption: 324.36MB
peak RSS (including heaptrack overhead): 5.39GB
total memory leaked: 289.93MB
```
new
```
0.1457 ( 0.3%) 0.0276 ( 0.6%) 0.1732 ( 0.3%) 0.1731 ( 0.3%) OpenMP specific optimizations
```
```
total runtime: 55.01s.
bytes allocated in total (ignoring deallocations): 6.70GB (121.89MB/s)
calls to allocation functions:
14268205 (259398/s)
temporary memory allocations: 3225355 (58637/s)
peak heap memory consumption: 324.09MB
peak RSS (including heaptrack overhead): 5.39GB
total memory leaked: 289.87MB
```
diff
```
total runtime: -8.31s.
bytes allocated in total (ignoring deallocations): -1.63GB (196.58MB/s)
calls to allocation functions: -258054 (31034/s)
temporary memory allocations: -110405 (13277/s)
peak heap memory consumption: -262.36KB
peak RSS (including heaptrack overhead): 0B
total memory leaked: -61.45KB
```
Reviewers: jdoerfert, hfinkel
Reviewed By: jdoerfert
Subscribers: yaxunl, hiraditya, guansong, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78299
Louis Dionne [Thu, 16 Apr 2020 16:44:32 +0000 (12:44 -0400)]
[libc++] Simplify conditional in __config for _LIBCPP_NO_RTTI
We don't support GCC's older than 5.x anymore.
Kang Zhang [Thu, 16 Apr 2020 16:22:43 +0000 (16:22 +0000)]
[PowerPC] Ignore implicit register operands for MCInst
Summary:
When doing the conversion: MachineInst -> MCInst, we should ignore the
implicit operands, it will expose more opportunity for InstiAlias.
Reviewed By: steven.zhang
Differential Revision: https://reviews.llvm.org/D77118
Simon Pilgrim [Thu, 16 Apr 2020 16:09:30 +0000 (17:09 +0100)]
MCSchedule.h - replace ArrayRef.h include with forward declaration. NFC.
Simon Pilgrim [Thu, 16 Apr 2020 16:08:57 +0000 (17:08 +0100)]
MCInstrDesc.h - move MCSubtargetInfo forward declaration down to MCInstrInfo.h. NFC.
Remove unused FeatureBitset forward declaration
Simon Pilgrim [Thu, 16 Apr 2020 15:09:43 +0000 (16:09 +0100)]
Wasm.h - remove unnecessary StringMap.h include. NFC
Simon Pilgrim [Thu, 16 Apr 2020 15:08:22 +0000 (16:08 +0100)]
MCAsmBackend.h - cleanup includes and forward declarations. NFC.
Replace StringRef.h include to forward declaration
Remove MCFragment/MCRelaxableFragment forward declarations - these are included in MCFragment.h
Dmitry Polukhin [Thu, 16 Apr 2020 16:05:40 +0000 (09:05 -0700)]
Revert "[clang][AST] Support AST files larger than 512M"
Bitcode file alignment is only 32-bit so 64-bit offsets need
special handling.
/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:6327:28: runtime error: load of misaligned address 0x7fca2bcfe54c for type 'const uint64_t' (aka 'const unsigned long'), which requires 8 byte alignment
0x7fca2bcfe54c: note: pointer points here
00 00 00 00 5a a6 01 00 00 00 00 00 19 a7 01 00 00 00 00 00 48 a7 01 00 00 00 00 00 7d a7 01 00
^
#0 0x3be2fe4 in clang::ASTReader::TypeCursorForIndex(unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:6327:28
#1 0x3be30a0 in clang::ASTReader::readTypeRecord(unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:6348:24
#2 0x3bd3d4a in clang::ASTReader::GetType(unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:6985:26
#3 0x3c5d9ae in clang::ASTDeclReader::Visit(clang::Decl*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:533:31
#4 0x3c91cac in clang::ASTReader::ReadDeclRecord(unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp:4045:10
#5 0x3bd4fb1 in clang::ASTReader::GetDecl(unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:7352:5
#6 0x3bce2f9 in clang::ASTReader::ReadASTBlock(clang::serialization::ModuleFile&, unsigned int) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:3625:22
#7 0x3bd6d75 in clang::ASTReader::ReadAST(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::ASTReader::ImportedSubmodule>*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:4230:32
#8 0x3a6b415 in clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, llvm::StringRef, bool, bool, clang::Preprocessor&, clang::InMemoryModuleCache&, clang::ASTContext&, clang::PCHContainerReader const&, llvm::ArrayRef<std::shared_ptr<clang::ModuleFileExtension> >, llvm::ArrayRef<std::shared_ptr<clang::DependencyCollector> >, void*, bool, bool, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:539:19
#9 0x3a6b00e in clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool, bool, void*, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:501:18
#10 0x3abac80 in clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:865:12
#11 0x3a6e61c in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:972:13
#12 0x3ba74bf in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:282:25
#13 0xa3f753 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/cc1_main.cpp:240:15
#14 0xa3a68a in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/driver.cpp:330:12
#15 0xa37f31 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/driver.cpp:407:12
#16 0x7fca2a7032e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#17 0xa21029 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/clang-11+0xa21029)
This reverts commit
30d5946db95fa465d7ee6caceb2b1ff191e3727c.
Uday Bondhugula [Thu, 16 Apr 2020 13:27:32 +0000 (18:57 +0530)]
[MLIR] NFC use Operation::getParentWithTrait in alloca verifier
Use recently added accessor Operation::getParentWithTrait in alloca
verifier.
Differential Revision: https://reviews.llvm.org/D78296
Melanie Blower [Thu, 16 Apr 2020 15:45:26 +0000 (08:45 -0700)]
[NFC] Rename Sema.FPFeatures to CurFPFeatures and accessor to getCurFPFeatures
Siva Chandra Reddy [Mon, 23 Mar 2020 19:00:35 +0000 (12:00 -0700)]
[libc] Move implementations of cosf, sinf, sincosf to src/math directory.
NFC intended in the implementaton. Only mechanical changes to fit the LLVM
libc implementation standard have been done.
Math testing infrastructure has been added. This infrastructure compares the
results produced by the libc with the high precision results from MPFR.
Tests making use of this infrastructure have been added for cosf, sinf and
sincosf.
Reviewers: abrachet, phosek
Differential Revision: https://reviews.llvm.org/D76825
David Green [Thu, 16 Apr 2020 14:23:49 +0000 (15:23 +0100)]
[MachineSink] Fix for breaking phi edges with instructions with multiple defs
BreakPHIEdge would be set based on whether the instruction needs to
insert a new critical edge to allow sinking into a block where the uses
are PHI nodes. But for instructions with multiple defs it would be reset
on the second def, allowing the instruciton to sink where it should not.
Fixes PR44981
Differential Revision: https://reviews.llvm.org/D78087
Uday Bondhugula [Thu, 16 Apr 2020 15:10:38 +0000 (20:40 +0530)]
[MLIR] Fix MLIR build - add missing CMake dependency
This will fix a failure when using a linker sensitive to the order in
which libraries are passed.
Differential Revision: https://reviews.llvm.org/D78303
Mehdi Chinoune [Thu, 16 Apr 2020 12:34:17 +0000 (13:34 +0100)]
[flang] Use the Flang cmake-functions to add targets.
Summary: It also removes the cycle-dependency between FortranSemantics and FortranEvaluate.
Reviewers: #flang, jdoerfert, sscalpone
Reviewed By: #flang, sscalpone
Subscribers: DavidTruby, schweitz, tskeith, mgorny, aartbik, llvm-commits
Tags: #flang, #llvm
Differential Revision: https://reviews.llvm.org/D78215
Dmitry Polukhin [Sat, 21 Mar 2020 20:52:51 +0000 (13:52 -0700)]
[clang][AST] Support AST files larger than 512M
Summary:
Clang uses 32-bit integers for storing bit offsets from the beginning of
the file that results in 512M limit on AST file. This diff replaces
absolute offsets with relative offsets from the beginning of
corresponding data structure when it is possible. And uses 64-bit
offsets for DeclOffests and TypeOffssts because these coder AST
section may easily exceeds 512M alone.
This diff breaks AST file format compatibility so VERSION_MAJOR bumped.
Test Plan:
Existing clang AST serialization tests
Tested on clangd with ~700M and ~900M preamble files
Reviewers: rsmith, dexonsmith
Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76594
Simon Pilgrim [Thu, 16 Apr 2020 14:18:10 +0000 (15:18 +0100)]
MCValue.h - cleanup include and forward declaration. NFC.
Remove MCSymbol.h include
Remove unused MCAsmInfo forward declaration
Gabor Marton [Thu, 16 Apr 2020 13:48:13 +0000 (15:48 +0200)]
[ASTImporter] Fix bug introduced in
2ba4e3a4598b
2ba4e3a4598b (Move FPFeatures from BinaryOperator bitfields to Trailing
storage, D76384) introduced an assertion failure during CTU analysis.
The reason is that in ASTNodeImporter::VisitCompoundAssignOperator the
LHSType and the ResultType have been imported twice.
Details:
clang: ../../git/llvm-project/clang/lib/Basic/SourceManager.cpp:918: clang::FileID clang::SourceManager::getFileIDLoaded(unsigned int) const: Assertion `0 && "Invalid SLocOffset or bad function choice"' failed.
clang::SourceManager::getDecomposedExpansionLoc(clang::SourceLocation) const
clang::SourceManager::getPresumedLoc(clang::SourceLocation, bool) const
clang::ASTImporter::Import(clang::SourceLocation)
llvm::Error clang::ASTImporter::importInto<clang::SourceLocation>(clang::SourceLocation&, clang::SourceLocation const&)
clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl*, clang::DeclContext*&, clang::DeclContext*&, clang::DeclarationName&, clang::NamedDecl*&, clang::SourceLocation&)
clang::ASTNodeImporter::VisitRecordDecl(clang::RecordDecl*)
clang::declvisitor::Base<std::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl*> >::Visit(clang::Decl*)
clang::ASTImporter::Import(clang::Decl*)
clang::ASTNodeImporter::VisitRecordType(clang::RecordType const*)
clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
clang::ASTImporter::Import(clang::QualType)
clang::ASTNodeImporter::VisitElaboratedType(clang::ElaboratedType const*)
clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
clang::ASTImporter::Import(clang::QualType)
clang::ASTNodeImporter::VisitPointerType(clang::PointerType const*)
clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*)
clang::ASTImporter::Import(clang::QualType)
clang::QualType clang::ASTNodeImporter::importChecked<clang::QualType>(llvm::Error&, clang::QualType const&)
clang::ASTNodeImporter::VisitCompoundAssignOperator(clang::CompoundAssignOperator*)
Simon Pilgrim [Thu, 16 Apr 2020 13:59:31 +0000 (14:59 +0100)]
AntiDepBreaker.h - remove unused MachineOperand.h include. NFC.
Simon Pilgrim [Thu, 16 Apr 2020 13:55:39 +0000 (14:55 +0100)]
MCObjectWriter.h - remove unnecessary includes. NFC
The EndianStream.h/raw_ostream.h headers should be removed as well but we have a lot of other files that are implicitly relying on them being present.