Johan Vikstrom [Thu, 8 Aug 2019 07:21:06 +0000 (07:21 +0000)]
[clangd] Fix implicit template instatiations appearing as topLevelDecls.
Summary: The parser gives implicit template instantiations to the action's HandleTopLevelDecls callback. This makes semantic highlighting highlight these templated functions multiple times. Fixed by filtering on if a Decl is an implicit function/variable/class instantiation. Also added a testcase to semantic highlighting on this.
Reviewers: hokein, ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65510
llvm-svn: 368261
George Rimar [Thu, 8 Aug 2019 07:17:35 +0000 (07:17 +0000)]
[llvm-readobj/libObject] - Introduce a custom warning handler for `ELFFile<ELFT>` methods.
Currently, we have a code duplication in llvm-readobj which was introduced in D63266.
The duplication was introduced to allow llvm-readobj to dump the partially
broken object. Methods in ELFFile<ELFT> perform a strict validation of the inputs,
what is itself good, but not for dumper tools, that might want to dump the information,
even if some pieces are broken/unexpected.
This patch introduces a warning handler which can be passed to ELFFile<ELFT> methods
and can allow skipping the non-critical errors when needed/possible.
For demonstration, I removed the duplication from llvm-readobj and implemented a warning using
the new custom warning handler. It also deduplicates the strings printed, making the output less verbose.
Differential revision: https://reviews.llvm.org/D65515
llvm-svn: 368260
Rui Ueyama [Thu, 8 Aug 2019 07:04:01 +0000 (07:04 +0000)]
[diagtool] Use `operator<<(Colors)` to print out colored output.
r368131 introduced this new API to print out messages in colors.
If the colored output is disabled, `operator<<(Colors)` becomes nop.
No functionality change intended.
Differential Revision: https://reviews.llvm.org/D65854
llvm-svn: 368259
Craig Topper [Thu, 8 Aug 2019 06:48:22 +0000 (06:48 +0000)]
[X86] Remove -x86-experimental-vector-widening-legalization command line option and all its uses.
This option is now defaulted to true and we don't want to support
turning it off so remove the option.
llvm-svn: 368258
David Green [Thu, 8 Aug 2019 06:22:03 +0000 (06:22 +0000)]
[ARM] Tighten up VLDRH.32 with low alignments
VLDRH needs to have an alignment of at least 2, including the
widening/narrowing versions. This tightens up the ISel patterns for it and
alters allowsMisalignedMemoryAccesses so that unaligned accesses are expanded
through the stack. It also fixed some incorrect shift amounts, which seemed to
be passing a multiple not a shift.
Differential Revision: https://reviews.llvm.org/D65580
llvm-svn: 368256
David Green [Thu, 8 Aug 2019 05:58:48 +0000 (05:58 +0000)]
[ARM] Rejig MVE load store tests. NFC
This adjusts the load/store tests for better testing of alignments. It also
adds some extra alignment 1 tests, useful for future commits.
llvm-svn: 368255
JF Bastien [Thu, 8 Aug 2019 05:47:59 +0000 (05:47 +0000)]
Revert "Temporarily bump minimum compiler version"
It's been in for more than 30 min and no bots have complained. Let's see if some
slow ones catch up. I'll do another manual pass on bots later (in case some that
were down are back up), and then turn this on permanently through a regular
review.
llvm-svn: 368253
JF Bastien [Thu, 8 Aug 2019 05:12:20 +0000 (05:12 +0000)]
Temporarily bump minimum compiler version
It's pretty hard to find a reliable list of which bots use which compiler version... so I'm going to commit this change which allows us to mandate the compilers required for C++14. This bump is what we've already agreed to do, so I'll use the list of failures to figure out which bots need to bump their compiler version. I'll revert the change in a few minutes.
The last discussion of this is here: http://lists.llvm.org/pipermail/llvm-dev/2019-August/134360.html
llvm-svn: 368252
Fangrui Song [Thu, 8 Aug 2019 04:56:21 +0000 (04:56 +0000)]
[Driver] Delete XFAIL: windows-msvc after D65880/r368245
`-target %itanium_abi_triple` fixed the problem.
llvm-svn: 368251
Craig Topper [Thu, 8 Aug 2019 04:40:59 +0000 (04:40 +0000)]
[X86] Add CMOV_FR32X and CMOV_FR64X to the isCMOVPseudo function.
llvm-svn: 368250
Davide Italiano [Thu, 8 Aug 2019 03:15:48 +0000 (03:15 +0000)]
[Materializer] Remove wrong SetSizeAndAlignmentFromType().
This function is unused. It's also wrong, because it computes
the size and the alignment of the type without asking the runtime,
so it doesn't work for any language that has one (e.g. swift).
One could consider re-implementing this passing an execution scope
context, and modifying GetTypeBitAlign() to do the right thing,
but given there are no uses, it's not really useful.
llvm-svn: 368249
Aditya Nandakumar [Thu, 8 Aug 2019 02:24:57 +0000 (02:24 +0000)]
[GISel][NFC]: Make members of CombinerHelper accessible in derived classes
https://reviews.llvm.org/D65842
Make some members protected to enable access in derived classes.
llvm-svn: 368248
Kamil Rytarowski [Thu, 8 Aug 2019 02:21:44 +0000 (02:21 +0000)]
Sync ioctl(2) list with NetBSD 9.99.3
Register 36 new ioctl(2) calls.
Enable NVMM for amd64 as the API has been stabilized.
llvm-svn: 368247
Kamil Rytarowski [Thu, 8 Aug 2019 02:08:23 +0000 (02:08 +0000)]
Update generate_netbsd_ioctls.awk for NetBSD 9.99.3
Register new ioctl argument types passed in ioctl(2) calls.
llvm-svn: 368246
Fangrui Song [Thu, 8 Aug 2019 01:55:27 +0000 (01:55 +0000)]
[Driver] Move LIBRARY_PATH before user inputs
Fixes PR16786
Currently, library paths specified by LIBRARY_PATH are placed after inputs: `inputs LIBRARY_PATH stdlib`
In gcc, the order is: `LIBRARY_PATH inputs stdlib` if not cross compiling.
(On Darwin targets, isCrossCompiling() always returns false.)
This patch changes the behavior to match gcc.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D65880
llvm-svn: 368245
Richard Trieu [Thu, 8 Aug 2019 01:45:31 +0000 (01:45 +0000)]
Inline diagnostic text into .td file. NFC.
llvm-svn: 368244
Jonas Devlieghere [Thu, 8 Aug 2019 01:44:03 +0000 (01:44 +0000)]
[Utility] Remove unused function 'GetMatchSpanningIndices'
llvm-svn: 368243
Douglas Yung [Thu, 8 Aug 2019 01:08:22 +0000 (01:08 +0000)]
Add LLD as a requirement for hwasan tests because of change in r368111.
llvm-svn: 368242
Wolfgang Pieb [Thu, 8 Aug 2019 00:35:16 +0000 (00:35 +0000)]
[llvm-strip] Support --strip-sections
llvm-objcopy already supports --strip-sections. It is a good fit for its alias llvm-strip
to support it as well.
Reviewers: rupprecht, jhenderson
Differential Revision: https://reviews.llvm.org/D65787
llvm-svn: 368241
Louis Dionne [Thu, 8 Aug 2019 00:28:06 +0000 (00:28 +0000)]
Revert "[libc++] Take 3: Do not cleverly link against libc++abi just because it happens to be there"
This also reverts "[libc++] Remove temporary hack for D63883".
Clearly, I don't understand how the Linux build bots are configured.
Differential Revision: https://reviews.llvm.org/D63883
llvm-svn: 368238
Richard Trieu [Thu, 8 Aug 2019 00:12:51 +0000 (00:12 +0000)]
Update fix-it hints for std::move warnings.
Fix -Wpessimizing-move and -Wredundant-move when warning on initializer lists.
The new fix-it hints for removing the std::move call will now also suggest
removing the braces for the initializer list so that the resulting code will
still be compilable.
This fixes PR42832
llvm-svn: 368237
Anusha Basana [Wed, 7 Aug 2019 23:25:12 +0000 (23:25 +0000)]
[llvm-lipo] Update llvm-lipo docs for -info -thin -create -replace -segalign flags
Summary:
The information for -info -thin -create -replace and -segalign flags are added to llvm-lipo.rst
Test Plan:
Reviewers: smeenai, alexshap, compnerd, mtrent
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65676
llvm-svn: 368235
Craig Topper [Wed, 7 Aug 2019 23:16:29 +0000 (23:16 +0000)]
[ScalarizeMaskedMemIntrin] Add test case for expanding scatter.
This pass expands 6 intrinsics, but we only had test for 5 of
them.
llvm-svn: 368234
Jonas Devlieghere [Wed, 7 Aug 2019 23:12:40 +0000 (23:12 +0000)]
[Docs] Fix (incorrect) code highlighting
llvm-svn: 368233
Amy Huang [Wed, 7 Aug 2019 22:49:40 +0000 (22:49 +0000)]
Recommit "[MS] Emit S_HEAPALLOCSITE debug info in Selection DAG"
with a fix to clear the SDNode map when SelectionDAG is cleared.
llvm-svn: 368230
David Blaikie [Wed, 7 Aug 2019 22:49:14 +0000 (22:49 +0000)]
gdb-index: Wire up str_offsets section to avoid incorrect error message about offsets_base
There's still a need for a deeper fix to the way libDebugInfoDWARF error
messages are propagated up to lld - if lld had exited non-zero on this
error message we would've found the issue sooner.
llvm-svn: 368229
Johannes Doerfert [Wed, 7 Aug 2019 22:49:06 +0000 (22:49 +0000)]
[Attributor][NFC] remove leftover and format code
llvm-svn: 368228
Johannes Doerfert [Wed, 7 Aug 2019 22:46:11 +0000 (22:46 +0000)]
[Attributor][Stats] Locate statistics tracking with the attributes
Summary:
The ever growing switch required Attribute::AttrKind values but they
might not be available for all abstract attributes we deduce. With the
new method we track statistics at the abstract attribute level. The
provided macros simplify the usage and make the messages uniform.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65732
llvm-svn: 368227
Adrian Prantl [Wed, 7 Aug 2019 22:40:05 +0000 (22:40 +0000)]
Adjust a ValueObjectChild's offset when the child is a bitfield
If a bitfield doesn't fit into the child_byte_size'd window at
child_byte_offset, move the window forward until it fits. The problem
here is that Value has no notion of bitfields and thus the Value's
DataExtractor is sized like the bitfields CompilerType; a sequence of
bitfields, however, can be larger than their underlying type.
This was not in the big-endian-derived DWARF 2 bitfield attributes
because their offsets were counted from the end of the window, so they
always fit.
rdar://problem/
53132189
Differential Revision: https://reviews.llvm.org/D65492
llvm-svn: 368226
Johannes Doerfert [Wed, 7 Aug 2019 22:36:15 +0000 (22:36 +0000)]
[Attributor][NFC] Code simplification and style normalization
llvm-svn: 368225
Johannes Doerfert [Wed, 7 Aug 2019 22:34:26 +0000 (22:34 +0000)]
[Attributor] Introduce a state wrapper class
Summary:
The wrapper reduces boilerplate code and also provide a nice way to
determine the state type used by an abstract attributes statically via
AAType::StateType.
This was already discussed as part of the review of D65711.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65786
llvm-svn: 368224
Johannes Doerfert [Wed, 7 Aug 2019 22:32:38 +0000 (22:32 +0000)]
[Attributor][NFC] Avoid unnecessary liveness queries
If we know everything is live there is no need to query for liveness.
Indicating a pessimistic fixpoint will cause the state to be "invalid"
which will cause the Attributor to not return the AAIsDead on request,
which will prevent us from querying isAssumedDead().
llvm-svn: 368223
Johannes Doerfert [Wed, 7 Aug 2019 22:27:24 +0000 (22:27 +0000)]
[Attributor] Provide easier checkForallReturnedValues functionality
Summary:
So far, whenever one wants to look at returned values, one had to deal
with the AAReturnedValues and potentially with the AAIsDead attribute.
In the same spirit as other checkForAllXXX methods, we add this
functionality now to the Attributor. By adopting the use sites we got
better results when return instructions were dead.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65733
llvm-svn: 368222
Jordan Rupprecht [Wed, 7 Aug 2019 22:21:49 +0000 (22:21 +0000)]
[llvm-readobj][test] Add baseline tests for FreeBSD/AMD/AMDGPU note printing
llvm-svn: 368221
David Blaikie [Wed, 7 Aug 2019 22:05:33 +0000 (22:05 +0000)]
Add a test demonstrating DWARF parse failures are not causing lld to exit non-zero
This bug was/is masking other issues - committing this to demonstrate
the problem/track fixing it.
llvm-svn: 368220
Kamil Rytarowski [Wed, 7 Aug 2019 21:56:43 +0000 (21:56 +0000)]
Restrict the NetBSD ASan TSD fallback to !ASAN_DYNAMIC
The fallback to the alternative implementation of TSD with TLS
is only needed for the static version of ASan for NetBSD.
The same code cannot be reused for the dynamic version of ASan as
TLS breaks and TSD code works.
llvm-svn: 368219
Mitch Phillips [Wed, 7 Aug 2019 21:56:21 +0000 (21:56 +0000)]
[HWASan] Use LLD for check-hwasan.
HWASan+globals build fix in rL368111 unfortunately didn't fix the
problem when clang_cflags specified -fuse-ld=ld.gold. Change the order
to force lld in an attempt to fix the Android sanitizer bot.
llvm-svn: 368218
Diego Trevino Ferrer [Wed, 7 Aug 2019 21:51:54 +0000 (21:51 +0000)]
Revert Added Delta IR Reduction Tool
This reverts r368071 (git commit
a2584978f5bb41973d65a145b0d9459b81e3ac6d)
llvm-svn: 368217
Louis Dionne [Wed, 7 Aug 2019 21:51:01 +0000 (21:51 +0000)]
[libc++] Remove temporary hack for D63883
This should fix the build bots, who now specify explicitly that they're
building against libc++abi.
llvm-svn: 368216
Craig Topper [Wed, 7 Aug 2019 21:44:14 +0000 (21:44 +0000)]
[LoopVectorize][X86] Clamp interleave factor if we have a known constant trip count that is less than VF*interleave
If we know the trip count, we should make sure the interleave factor won't cause the vectorized loop to exceed it.
Improves one of the cases from PR42674
Differential Revision: https://reviews.llvm.org/D65896
llvm-svn: 368215
Diego Trevino Ferrer [Wed, 7 Aug 2019 21:37:11 +0000 (21:37 +0000)]
Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.
Reviewers: alexshap, chandlerc
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63672
> llvm-svn: 368071
llvm-svn: 368214
Louis Dionne [Wed, 7 Aug 2019 21:36:03 +0000 (21:36 +0000)]
[libc++] Take 3: Do not cleverly link against libc++abi just because it happens to be there
Summary:
Otherwise, when libcxxabi is not an enabled project in the monorepo, we
get a link error because we try to link against non-existent cxxabi_shared.
More generally, we shouldn't change the behavior of the build based on
implicit things like whether a file happens to be at a specific path or
not.
This is a re-application of r365222 that had been reverted in r365233
and then r365359 because it broke the build bots. The build bots
should now specify explicitly what ABI library they want to use
(libc++abi), so this commit should now be OK to merge. It takes a while
for build bots to pick up configuration changes, which is why this failed
the last time around.
Differential Revision: https://reviews.llvm.org/D63883
llvm-svn: 368213
David Blaikie [Wed, 7 Aug 2019 21:31:33 +0000 (21:31 +0000)]
DebugInfo/DWARF: Remove unused return type from DWARFUnit::extractDIEsIfNeeded
llvm-svn: 368212
Cameron McInally [Wed, 7 Aug 2019 21:30:00 +0000 (21:30 +0000)]
[NFC][LICM] Pre-commit test for unary FNeg support in LICM.
llvm-svn: 368211
Craig Topper [Wed, 7 Aug 2019 21:16:10 +0000 (21:16 +0000)]
[X86] Allow pack instructions to be used for 512->256 truncates when -mprefer-vector-width=256 is causing 512-bit vectors to be split
If we're splitting the 512-bit vector anyway and we have zero/sign bits, then we might as well use pack instructions to concat and truncate at once.
Differential Revision: https://reviews.llvm.org/D65904
llvm-svn: 368210
Diego Astiazaran [Wed, 7 Aug 2019 21:04:52 +0000 (21:04 +0000)]
[clang-doc] Add second index for sections within info's content
This new index contains links to the main section of infos: Namespaces, Records, Functions, Enums, Members.
Also to each child function or enum.
Index is currently rendered on top of the info content, this will be fixed later with CSS.
Depends on D65690.
Differential Revision: https://reviews.llvm.org/D65030
llvm-svn: 368209
Jonas Devlieghere [Wed, 7 Aug 2019 20:56:17 +0000 (20:56 +0000)]
[CommandObject] Remove unused function
llvm-svn: 368208
Craig Topper [Wed, 7 Aug 2019 20:54:46 +0000 (20:54 +0000)]
[X86] Add test cases for missed opportunities to use pack instructions for 512->256 truncates with prefer-vector-width=256
If the 512-bit vectors are going to be split anyway, then we are
better off using pack to implicitly concatenate the 256 bit pieces.
llvm-svn: 368207
Diego Astiazaran [Wed, 7 Aug 2019 20:54:26 +0000 (20:54 +0000)]
[clang-doc] Parallelize reducing phase
Reduce phase has been parallelized and a execution time was reduced by
60% with this.
The reading of bitcode (bitcode -> Info) was moved to this segment of
code parallelized so it now happens just before reducing.
Differential Revision: https://reviews.llvm.org/D65628
llvm-svn: 368206
Alex Langford [Wed, 7 Aug 2019 20:51:21 +0000 (20:51 +0000)]
[Symbol] Remove commented out code from CompileUnit
llvm-svn: 368205
Bob Haarman [Wed, 7 Aug 2019 20:45:23 +0000 (20:45 +0000)]
Revert r367501 "Create unique, but identically-named ELF sections..."
This reverts commit
fbc563e2cb6c5f1d0200b390513506b6aca4d2e9 "Create
unique, but identically-named ELF sections for explicitly-sectioned
functions and globals when using -function-sections and
-data-sections."
Reason for revert: sections are created with potentially wrong
attributes.
llvm-svn: 368204
Louis Dionne [Wed, 7 Aug 2019 20:29:04 +0000 (20:29 +0000)]
[pstl] Make sure we install all of PSTL's include/ directory
We want to install files directly in include/, not only in include/pstl.
llvm-svn: 368203
Bill Wendling [Wed, 7 Aug 2019 19:36:48 +0000 (19:36 +0000)]
Add target requirements for those bots which don't handle x86.
llvm-svn: 368202
David Bolvansky [Wed, 7 Aug 2019 19:36:46 +0000 (19:36 +0000)]
[NFC] Fixed newly added tests
llvm-svn: 368201
David Bolvansky [Wed, 7 Aug 2019 19:35:25 +0000 (19:35 +0000)]
[NFC] Added tests for x/fabs(X) fold
llvm-svn: 368200
Nico Weber [Wed, 7 Aug 2019 19:29:04 +0000 (19:29 +0000)]
Add support for deterministically linked binaries on macOS to lldb.
When ld64 links a binary deterministically using the flag ZERO_AR_DATE,
it sets a timestamp of 0 for N_OSO members in the symtab section, rather
than the usual last modified date of the object file. Prior to this
patch, lldb would compare the timestamp from the N_OSO member against
the last modified date of the object file, and skip loading the object
file if there was a mismatch. This patch updates the logic to ignore the
timestamp check if the N_OSO member has timestamp 0.
The original logic was added in https://reviews.llvm.org/rL181631 as a
safety check to avoid problems when debugging if the object file was out
of date. This was prior to the introduction of deterministic build in
ld64. lld still doesn't support deterministic build.
Other code in llvm already relies on and uses the assumption that a
timestamp of 0 means deterministic build. For example, commit
9ccfddc39d4d27f9b16fcc72ab30d483151d6d08 adds similar timestamp checking
logic to dsymutil, but special cases timestamp 0. Likewise, commit
0d1bb79a0413f221432a7b1d0d2d10c84c4bbb99 adds a long comment describing
deterministic archive, which mostly uses timestamp 0 for determinism.
Patch from Erik Chen <erikchen@chromium.org>!
Differential Revision: https://reviews.llvm.org/D65826
llvm-svn: 368199
David Blaikie [Wed, 7 Aug 2019 19:09:31 +0000 (19:09 +0000)]
Fix indentation
llvm-svn: 368198
Craig Topper [Wed, 7 Aug 2019 19:07:10 +0000 (19:07 +0000)]
[LoopVectorize][X86] Add test case for missed vectorization from PR42674.
We do end vectorizing the code, but use an interleave factor that
is too high and causes the vector code to be dead.
llvm-svn: 368197
Diego Astiazaran [Wed, 7 Aug 2019 18:35:28 +0000 (18:35 +0000)]
[Tooling] Expose ExecutorConcurrency option.
D65628 requires a flag to specify the number of threads for a clang-doc step. It would be good to use ExecutorConcurrency after exposing it instead of creating a new one that has the same purpose.
Differential Revision: https://reviews.llvm.org/D65833
llvm-svn: 368196
Craig Topper [Wed, 7 Aug 2019 18:28:16 +0000 (18:28 +0000)]
[ValueTracking] When calculating known bits for integer abs, make sure we're looking at a negate and not just any instruction with the nsw flag set.
The matchSelectPattern code can match patterns like (x >= 0) ? x : -x
for absolute value. But it can also match ((x-y) >= 0) ? (x-y) : (y-x).
If the latter form was matched we can only use the nsw flag if its
set on both subtracts.
This match makes sure we're looking at the former case only.
Differential Revision: https://reviews.llvm.org/D65692
llvm-svn: 368195
Stefan Stipanovic [Wed, 7 Aug 2019 18:26:02 +0000 (18:26 +0000)]
[Attributor] Introduce checkForAllReadWriteInstructions(...).
Summary: Similarly to D65731 `Attributor::checkForAllReadWriteInstructions` is introduced.
Reviewers: jdoerfert, uenoku
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65825
llvm-svn: 368194
Nikolai Bozhenov [Wed, 7 Aug 2019 17:38:38 +0000 (17:38 +0000)]
[SCEV] Return zero from computeConstantDifference(X, X)
Without this patch computeConstantDifference returns None for cases like
these:
computeConstantDifference(%x, %x)
computeConstantDifference({%x,+,16}, {%x,+,16})
Differential Revision: https://reviews.llvm.org/D65474
llvm-svn: 368193
Gheorghe-Teodor Bercea [Wed, 7 Aug 2019 17:29:45 +0000 (17:29 +0000)]
[OpenMP][libomptarget] Add support for unified memory for regular maps
Summary:
This patch adds support for using unified memory in the case of regular maps that happen when a target region is offloaded to the device.
For cases where only a single version of the data is required then the host address can be used. When variables need to be privatized in any way or globalized, then the copy to the device is still required for correctness.
Reviewers: ABataev, jdoerfert, Hahnfeld, AlexEichenberger, caomhin, grokos
Reviewed By: Hahnfeld
Subscribers: mgorny, guansong, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D65001
llvm-svn: 368192
Florian Hahn [Wed, 7 Aug 2019 17:20:55 +0000 (17:20 +0000)]
[DataLayout] Check StackNatural and FunctionPtr alignments.
MaybeAlignment asserts that the passed in value is == 0 or a power of 2.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16272
Reviewers: michaelplatings, gchatelet, jakehehrlich, jfb
Reviewed By: gchatelet
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65858
llvm-svn: 368191
David Blaikie [Wed, 7 Aug 2019 17:18:18 +0000 (17:18 +0000)]
API update for change to LLVM's lib/DebugInfo/DWARF
llvm-svn: 368190
David Blaikie [Wed, 7 Aug 2019 17:18:11 +0000 (17:18 +0000)]
DebugInfo/DWARF: Normalize DWARFObject members on the DWARF spec section names
Some of these names were abbreviated, some were not, some pluralised,
some not. Made the API difficult to use - since it's an exact 1:1
mapping to the DWARF sections - use those names (changing underscore
separation for camel casing).
llvm-svn: 368189
Yitzhak Mandelbaum [Wed, 7 Aug 2019 17:01:31 +0000 (17:01 +0000)]
[clang][NFC] Fix typo in matcher comment
Also updates corresponding html doc.
llvm-svn: 368188
Nico Weber [Wed, 7 Aug 2019 17:00:19 +0000 (17:00 +0000)]
Support: Remove needless allocation when getMainExecutable() calls readlink()
We built a StringRef from a string literal which we then converted to a
std::string to call c_str(). Just use a pointer to the string literal
instead of a StringRef.
No behavior change.
Differential Revision: https://reviews.llvm.org/D65890
llvm-svn: 368187
Sam McCall [Wed, 7 Aug 2019 16:52:21 +0000 (16:52 +0000)]
Code completion should not ignore default parameters in functions.
Summary:
Inorder to display the default arguments we must process the
CK_Optional chunks of CodeCompletionString while creating the Signature.
We do not create placeholders for default arguments.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65866
llvm-svn: 368186
Craig Topper [Wed, 7 Aug 2019 16:42:47 +0000 (16:42 +0000)]
Recommit r368081 "[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors."
llvm-svn: 368185
Craig Topper [Wed, 7 Aug 2019 16:33:37 +0000 (16:33 +0000)]
Recommit r368079 "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/"
llvm-svn: 368184
Craig Topper [Wed, 7 Aug 2019 16:24:26 +0000 (16:24 +0000)]
Recommit r367901 "[X86] Enable -x86-experimental-vector-widening-legalization by default."
The assert that caused this to be reverted should be fixed now.
Original commit message:
This patch changes our defualt legalization behavior for 16, 32, and
64 bit vectors with i8/i16/i32/i64 scalar types from promotion to
widening. For example, v8i8 will now be widened to v16i8 instead of
promoted to v8i16. This keeps the elements widths the same and pads
with undef elements. We believe this is a better legalization strategy.
But it carries some issues due to the fragmented vector ISA. For
example, i8 shifts and multiplies get widened and then later have
to be promoted/split into vXi16 vectors.
This has the potential to cause regressions so we wanted to get
it in early in the 10.0 cycle so we have plenty of time to
address them.
Next steps will be to merge tests that explicitly test the command
line option. And then we can remove the option and its associated
code.
llvm-svn: 368183
Jonas Devlieghere [Wed, 7 Aug 2019 16:21:40 +0000 (16:21 +0000)]
[Driver] Expand the executable path in the target create output
Resolve the path in the target create output. This is nice when passing
relative paths to the lldb command line driver.
$ lldb ./binary
(lldb) target create "./binary"
Current executable set to '/absolute/path/to/binary' (x86_64).
This change only affects the target create output and does not change
the debugger's behavior. It doesn't resolve symbolic links so it won't
cause confusing when debugging something like clang++ that's symlinked
to clang.
Differential revision: https://reviews.llvm.org/D65611
llvm-svn: 368182
Jonas Devlieghere [Wed, 7 Aug 2019 16:09:35 +0000 (16:09 +0000)]
[ExecutionContext] Return the target/process byte order.
Currently ExecutionContext::GetByteOrder() always returns the host byte
order. This seems like a simple mistake: the return keyword appears to
have been omitted by accident. This patch fixes that and adds a unit
test.
Bugreport: https://llvm.org/PR37950
Differential revision: https://reviews.llvm.org/D48704
llvm-svn: 368181
Oliver Cruickshank [Wed, 7 Aug 2019 15:47:45 +0000 (15:47 +0000)]
[ARM] Expand CTPOP intrinsic for MVE
llvm-svn: 368180
Nico Weber [Wed, 7 Aug 2019 15:30:44 +0000 (15:30 +0000)]
gn build: Merge r368158
llvm-svn: 368179
Nico Weber [Wed, 7 Aug 2019 15:29:01 +0000 (15:29 +0000)]
gn build: Merge r368119
llvm-svn: 368178
Jon Chesterfield [Wed, 7 Aug 2019 15:24:12 +0000 (15:24 +0000)]
Use forceinline. Necessary for nvcc to inline small functions within the bitcode library
Summary:
[libomptarget] Use forceinline. Necessary for nvcc to inline small functions within the bitcode library
Suggested in D65836
Reviewers: ABataev, jdoerfert, grokos, gregrodgers
Subscribers: openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D65876
llvm-svn: 368177
Jay Foad [Wed, 7 Aug 2019 15:18:34 +0000 (15:18 +0000)]
[InstCombine] Add a TODO comment
llvm-svn: 368176
Jay Foad [Wed, 7 Aug 2019 15:16:28 +0000 (15:16 +0000)]
[InstCombine] Propagate fast math flags through selects
Summary:
In SimplifySelectsFeedingBinaryOp, propagate fast math flags from the
outer op into both arms of the new select, to take advantage of
simplifications that require fast math flags.
Reviewers: mcberg2017, majnemer, spatel, arsenm, xbolva00
Subscribers: wdng, javed.absar, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65658
llvm-svn: 368175
David Bolvansky [Wed, 7 Aug 2019 14:44:50 +0000 (14:44 +0000)]
[UpdateTestChecks] Update tests option
Summary:
Port of new feature introduced https://reviews.llvm.org/D65610 to other update scripts.
- update_*_checks.py: add an alias -u for --update-only
- port --update-only to other update_*_test_checks.py scripts
- update script aborts if the test file was generated by another update_*_test_checks.py utility
Reviewers: lebedev.ri, RKSimon, MaskRay, reames, gbedwell
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65793
llvm-svn: 368174
Benjamin Kramer [Wed, 7 Aug 2019 14:44:40 +0000 (14:44 +0000)]
Remove LLVM mutexes from clang in favor of std::mutex
None of those need to be recursive mutexes. No functionality change
intended.
llvm-svn: 368173
Alexey Bataev [Wed, 7 Aug 2019 14:39:17 +0000 (14:39 +0000)]
[OPENMP]Set default version to OpenMP 4.5.
Since clang fully supports OpenMP 4.5, set the default version to 4.5
instead of 3.1.
llvm-svn: 368172
Cameron McInally [Wed, 7 Aug 2019 14:34:41 +0000 (14:34 +0000)]
[EarlyCSE] Add support for unary FNeg to EarlyCSE
Differential Revision: https://reviews.llvm.org/D65815
llvm-svn: 368171
Alexey Bataev [Wed, 7 Aug 2019 14:02:11 +0000 (14:02 +0000)]
[OPENMP]Add standard macro value _OPENMP for OpenMP 5.0.
According to the OpenMP standard, compiler must define _OPENMP macro,
which has value in format yyyymm, where yyyy is the year of the standard
and mm is the month of the standard. For OpenMP 5.0 this value must be
set to 201811.
llvm-svn: 368170
Igor Kudrin [Wed, 7 Aug 2019 13:22:29 +0000 (13:22 +0000)]
Try to fix windows build bots after r368153.
llvm-svn: 368169
Pavel Labath [Wed, 7 Aug 2019 13:12:59 +0000 (13:12 +0000)]
ProcessElfCore: Remove linux and freebsd NT_*** constants
These are already defined in llvm/BinaryFormat/ELF.h. Leaving the NetBSD
and OpenBSD constants as-is, as they have no llvm counterparts.
llvm-svn: 368168
Sam Elliott [Wed, 7 Aug 2019 13:08:07 +0000 (13:08 +0000)]
[RISCV][NFC] Document RISC-V-specific assembly constraints
llvm-svn: 368167
Tim Northover [Wed, 7 Aug 2019 12:43:53 +0000 (12:43 +0000)]
GlobalISel: factor common code from translateCall and translateInvoke. NFC.
llvm-svn: 368166
Simon Pilgrim [Wed, 7 Aug 2019 12:41:59 +0000 (12:41 +0000)]
[X86] EltsFromConsecutiveLoads - early out for non-byte sized memory (PR42909)
Don't attempt to merge loads for types that aren't modulo 8-bits.
llvm-svn: 368165
Sander de Smalen [Wed, 7 Aug 2019 12:41:38 +0000 (12:41 +0000)]
[AArch64][WinCFI] Do not pair callee-save instructions in LoadStoreOptimizer
Prevent the LoadStoreOptimizer from pairing any load/store instructions with
instructions from the prologue/epilogue if the CFI information has encoded the
operations as separate instructions. This would otherwise lead to a mismatch
of the actual prologue size from the size as recorded in the Windows CFI.
Reviewers: efriedma, mstorsjo, ssijaric
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D65817
llvm-svn: 368164
Balazs Keri [Wed, 7 Aug 2019 12:40:17 +0000 (12:40 +0000)]
[ASTImporter] Do not import FunctionTemplateDecl in record twice.
Summary:
For functions there is a check to not duplicate the declaration if it is in a
record (class). For function templates there was no similar check, if a
template (in the same class) was imported multiple times the
FunctionTemplateDecl was created multiple times with the same templated
FunctionDecl. This can result in problems with the declaration chain.
Reviewers: martong, a.sidorin, shafik, a_sidorin
Reviewed By: a_sidorin
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65203
llvm-svn: 368163
Simon Atanasyan [Wed, 7 Aug 2019 12:21:41 +0000 (12:21 +0000)]
[mips] Make a couple of class methods plain static functions. NFC
llvm-svn: 368162
Simon Atanasyan [Wed, 7 Aug 2019 12:21:32 +0000 (12:21 +0000)]
[mips] Use isMicroMips() function to check enabled feature flag. NFC
llvm-svn: 368161
Simon Atanasyan [Wed, 7 Aug 2019 12:21:26 +0000 (12:21 +0000)]
[Mips] Instruction `sc` now accepts symbol as an argument
Function MipsAsmParser::expandMemInst() did not properly handle
instruction `sc` with a symbol as an argument because first argument
would be counted twice. We add additional checks and handle this case
separately.
Patch by Mirko Brkusanin.
Differential Revision: https://reviews.llvm.org/D64252
llvm-svn: 368160
Pavel Labath [Wed, 7 Aug 2019 12:13:48 +0000 (12:13 +0000)]
ObjectFileELF: Remove NT_*** constants
llvm now has definitions of those in BinaryFormat/ELF.h. Use those
instead.
llvm-svn: 368159
Benjamin Kramer [Wed, 7 Aug 2019 11:59:57 +0000 (11:59 +0000)]
[Support] Base SmartMutex on std::recursive_mutex
- Remove support for non-recursive mutexes. This was unused.
- The std::recursive_mutex is now created/destroyed unconditionally.
Locking is still only done if threading is enabled.
- Alias SmartScopedLock to std::lock_guard.
This should make no semantic difference on the existing APIs.
llvm-svn: 368158
Benjamin Kramer [Wed, 7 Aug 2019 11:59:44 +0000 (11:59 +0000)]
Replace non-recursive sys::Mutex users with std::mutex
Also remove a use of sys::MutexImpl, that's just evil. No functionality
change intended.
llvm-svn: 368157
Igor Kudrin [Wed, 7 Aug 2019 11:44:47 +0000 (11:44 +0000)]
Remove support for 32-bit offsets in utility classes (5/5)
Differential Revision: https://reviews.llvm.org/D65641
llvm-svn: 368156
Simon Pilgrim [Wed, 7 Aug 2019 11:43:13 +0000 (11:43 +0000)]
[TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for ISD::VECTOR_SHUFFLE
In particular this helps the SSE vector shift cvttps2dq+add+shl pattern by avoiding the need for zeros in shuffle style extensions to vXi32 types as we'll be shifting out those bits anyway
llvm-svn: 368155