Commit Graph

323908 Commits

Author SHA1 Message Date
Simon Pilgrim e2e366797e [TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for ISD::EXTRACT_VECTOR_ELT
This patch attempts to peek through vectors based on the demanded bits/elt of a particular ISD::EXTRACT_VECTOR_ELT node, allowing us to avoid dependencies on ops that have no impact on the extract.

In particular this helps remove some unnecessary scalar->vector->scalar patterns.

The wasm shift patterns are annoying - @tlively has indicated that the wasm vector shift codegen are to be refactored in the near-term and isn't considered a major issue.

Differential Revision: https://reviews.llvm.org/D65887

llvm-svn: 368276
2019-08-08 10:37:03 +00:00
Andrea Di Biagio 987331671f [MCA] Remove dependency from InstrBuilder in mca::Context. NFC
InstrBuilder is not required to construct the default pipeline.

llvm-svn: 368275
2019-08-08 10:30:58 +00:00
Petar Avramovic caef930699 [MIPS GlobalISel] Select jump_table and brjt
G_JUMP_TABLE and G_BRJT appear from translation of switch statement.
Select these two instructions for MIPS32, both pic and non-pic.

Differential Revision: https://reviews.llvm.org/D65861

llvm-svn: 368274
2019-08-08 10:21:12 +00:00
George Rimar 7f4dba0d42 [llcm-readobj] - Fix BB after t368272.
Seems I forgot to update this test case.

llvm-svn: 368273
2019-08-08 10:05:00 +00:00
George Rimar d3963051c4 [yaml2obj/obj2yaml] - Add a basic support for extended section indexes.
In some cases a symbol might have section index == SHN_XINDEX.
This is an escape value indicating that the actual section header index
is too large to fit in the containing field.
Then the SHT_SYMTAB_SHNDX section is used. It contains the 32bit values
that stores section indexes.

ELF gABI says that there can be multiple SHT_SYMTAB_SHNDX sections,
i.e. for example one for .symtab and one for .dynsym
(1) https://groups.google.com/forum/#!topic/generic-abi/-XJAV5d8PRg
(2) DT_SYMTAB_SHNDX: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html

In this patch I am only supporting a single SHT_SYMTAB_SHNDX associated
with a .symtab. This is a more or less common case which is used a few tests I saw in LLVM.

I decided not to create the SHT_SYMTAB_SHNDX section as "implicit",
but implement is like a kind of regular section for now.
i.e. tools do not recreate this section or its content, like they do for
symbol table sections, for example. That should allow to write all kind of
possible broken test cases for our needs and keep the output closer to requested.

Differential revision: https://reviews.llvm.org/D65446

llvm-svn: 368272
2019-08-08 09:49:05 +00:00
Pavel Labath 6db975b7b8 Add a missing include to SymbolFilePDBTests.cpp
This should _really_ fix the pdb unit tests.

llvm-svn: 368271
2019-08-08 09:43:20 +00:00
Shaurya Gupta 7137736e49 [Extract] Fixed SemicolonExtractionPolicy for SwitchStmt and SwitchCase
Reviewers: arphaman, sammccall

Subscribers: dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65883

llvm-svn: 368267
2019-08-08 08:37:49 +00:00
Pavel Labath bac7862c00 Remove xcode-specific Config.h
Summary:
Now that the xcode project is removed, we no longer need/use the
hand-maintained Config.h file, as everything is configured through
cmake.

This patch deletes that file and reverts some of the changes from
r300372, which were made to support this use case.

Reviewers: sgraenitz, beanz

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D65862

llvm-svn: 368266
2019-08-08 08:27:25 +00:00
Pavel Labath 959e603456 Fix PDB unit tests for the GetSymbolVendor deletion
llvm-svn: 368265
2019-08-08 08:22:26 +00:00
Sam Tebbs 7ca980edcd [ARM] Select VFMA
llvm-svn: 368264
2019-08-08 08:21:01 +00:00
Pavel Labath 579d6d1aa5 Remove Module::GetSymbolVendor
Summary:
This patch removes the GetSymbolVendor function, and the various
mentions of the SymbolVendor in the Module class. The implementation of
GetSymbolVendor is "inlined" into the GetSymbolFile class which I
created earlier.

After this patch, the SymbolVendor class still exists inside the Module
object, but only as an implementation detail -- a fancy holder for the
SymbolFile. That will be removed in the next patch.

Reviewers: clayborg, JDevlieghere, jingham, jdoerfert

Subscribers: jfb, lldb-commits

Differential Revision: https://reviews.llvm.org/D65864

llvm-svn: 368263
2019-08-08 07:34:07 +00:00
George Rimar 53c5ea44ce [ELF] - An attemp to fix builld bit after r368260
BB: http://lab.llvm.org:8011/builders/lld-perf-testsuite/builds/17577/steps/build-bin%2Flld/logs/stdio

The error is:
/home/buildslave/slave_as-bldslv8/lld-perf-testsuite/llvm/include/llvm/Object/ELF.h:67:14:
error: 'static' function 'defaultWarningHandler' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration]
static Error defaultWarningHandler(const Twine &Msg) { return createError(Msg); }
             ^

llvm-svn: 368262
2019-08-08 07:29:07 +00:00
Johan Vikstrom 720d19b175 [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
2019-08-08 07:21:06 +00:00
George Rimar 67ea32a007 [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
2019-08-08 07:17:35 +00:00
Rui Ueyama 6fd13f0849 [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
2019-08-08 07:04:01 +00:00
Craig Topper 724c6053ac [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
2019-08-08 06:48:22 +00:00
David Green 1becefd3f7 [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
2019-08-08 06:22:03 +00:00
David Green 2908c5d6ca [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
2019-08-08 05:58:48 +00:00
JF Bastien 0c0457ebcb 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
2019-08-08 05:47:59 +00:00
JF Bastien 82ac3acade 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
2019-08-08 05:12:20 +00:00
Fangrui Song 2a0ae1c2e4 [Driver] Delete XFAIL: windows-msvc after D65880/r368245
`-target %itanium_abi_triple` fixed the problem.

llvm-svn: 368251
2019-08-08 04:56:21 +00:00
Craig Topper 0aacc7da8b [X86] Add CMOV_FR32X and CMOV_FR64X to the isCMOVPseudo function.
llvm-svn: 368250
2019-08-08 04:40:59 +00:00
Davide Italiano e04c62bb23 [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
2019-08-08 03:15:48 +00:00
Aditya Nandakumar 277583ec0a [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
2019-08-08 02:24:57 +00:00
Kamil Rytarowski 42ae6fecd4 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
2019-08-08 02:21:44 +00:00
Kamil Rytarowski 9d161896a1 Update generate_netbsd_ioctls.awk for NetBSD 9.99.3
Register new ioctl argument types passed in ioctl(2) calls.

llvm-svn: 368246
2019-08-08 02:08:23 +00:00
Fangrui Song 7dbdc8de18 [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
2019-08-08 01:55:27 +00:00
Richard Trieu 07e6798baf Inline diagnostic text into .td file. NFC.
llvm-svn: 368244
2019-08-08 01:45:31 +00:00
Jonas Devlieghere b78c8a0a35 [Utility] Remove unused function 'GetMatchSpanningIndices'
llvm-svn: 368243
2019-08-08 01:44:03 +00:00
Douglas Yung 11538f0afa Add LLD as a requirement for hwasan tests because of change in r368111.
llvm-svn: 368242
2019-08-08 01:08:22 +00:00
Wolfgang Pieb ab751a7c8b [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
2019-08-08 00:35:16 +00:00
Louis Dionne 80ef2f05d8 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
2019-08-08 00:28:06 +00:00
Richard Trieu 155b8d02c3 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
2019-08-08 00:12:51 +00:00
Anusha Basana a87f856f2d [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
2019-08-07 23:25:12 +00:00
Craig Topper 2921abc357 [ScalarizeMaskedMemIntrin] Add test case for expanding scatter.
This pass expands 6 intrinsics, but we only had test for 5 of
them.

llvm-svn: 368234
2019-08-07 23:16:29 +00:00
Jonas Devlieghere 30703de3a7 [Docs] Fix (incorrect) code highlighting
llvm-svn: 368233
2019-08-07 23:12:40 +00:00
Amy Huang 0b870b969f 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
2019-08-07 22:49:40 +00:00
David Blaikie 8a480d2cbf 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
2019-08-07 22:49:14 +00:00
Johannes Doerfert ac136fc51f [Attributor][NFC] remove leftover and format code
llvm-svn: 368228
2019-08-07 22:49:06 +00:00
Johannes Doerfert d1b79e0774 [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
2019-08-07 22:46:11 +00:00
Adrian Prantl f81d6fe75c 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
2019-08-07 22:40:05 +00:00
Johannes Doerfert beb5150f47 [Attributor][NFC] Code simplification and style normalization
llvm-svn: 368225
2019-08-07 22:36:15 +00:00
Johannes Doerfert 344d038960 [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
2019-08-07 22:34:26 +00:00
Johannes Doerfert d620781872 [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
2019-08-07 22:32:38 +00:00
Johannes Doerfert 14a0493a88 [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
2019-08-07 22:27:24 +00:00
Jordan Rupprecht 80a8ae2dfe [llvm-readobj][test] Add baseline tests for FreeBSD/AMD/AMDGPU note printing
llvm-svn: 368221
2019-08-07 22:21:49 +00:00
David Blaikie 77ddf6af2b 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
2019-08-07 22:05:33 +00:00
Kamil Rytarowski 72c940417a 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
2019-08-07 21:56:43 +00:00
Mitch Phillips c96387fce3 [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
2019-08-07 21:56:21 +00:00
Diego Trevino Ferrer d4d00ae6a2 Revert Added Delta IR Reduction Tool
This reverts r368071 (git commit a2584978f5bb41973d65a145b0d9459b81e3ac6d)

llvm-svn: 368217
2019-08-07 21:51:54 +00:00