Commit Graph

303376 Commits

Author SHA1 Message Date
Anton Korobeynikov 49045c6a0d [MSP430] Add MC layer
Reapply r346374 with the fixes for modules build.

Original summary:

This change implements assembler parser, code emitter, ELF object writer
and disassembler for the MSP430 ISA.  Also, more instruction forms are added
to the target description.

Patch by Michael Skvortsov!

llvm-svn: 346948
2018-11-15 12:29:43 +00:00
Haojian Wu 5e7486f518 [clangd] Fix no results returned for global symbols in dexp
Summary:
For symbols in global namespace (without any scope), we need to
add global scope "" to the fuzzy request.

Reviewers: ioeric

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 346947
2018-11-15 12:17:41 +00:00
Xing GUO cc0829f3cb [llvm-objdump] Use `auto` declaration in typecasting
Summary:
According to `MaskRay`, use `auto` for type inference, according to coding standards.
Delete some comments, because these comments can be easily inferred from codes.

Reviewers: jhenderson, MaskRay

Reviewed By: jhenderson

Subscribers: llvm-commits

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

llvm-svn: 346946
2018-11-15 11:51:13 +00:00
Kadir Cetinkaya 5a9b92ca75 Revert "Introduce shard storage to auto-index."
This reverts commit 6dd1f24aead10a8d375d0311001987198d26e900.

llvm-svn: 346945
2018-11-15 10:34:47 +00:00
Kadir Cetinkaya bd2441c887 Revert "clang-format"
This reverts commit 0a37e9c3d88a2e21863657df2f7735fb7e5f746e.

llvm-svn: 346944
2018-11-15 10:34:43 +00:00
Kadir Cetinkaya ed18e788f0 Revert "Address comments"
This reverts commit 19a39b14eab2b5339325e276262b177357d6b412.

llvm-svn: 346943
2018-11-15 10:34:39 +00:00
Kadir Cetinkaya 8b9fed3e8d Revert "Address comments."
This reverts commit b43c4d1c731e07172a382567f3146b3c461c5b69.

llvm-svn: 346942
2018-11-15 10:34:35 +00:00
Kadir Cetinkaya 2bed2cf791 Address comments.
llvm-svn: 346941
2018-11-15 10:31:23 +00:00
Kadir Cetinkaya 89a7691fd9 Address comments
llvm-svn: 346940
2018-11-15 10:31:19 +00:00
Kadir Cetinkaya cb8407ca89 clang-format
llvm-svn: 346939
2018-11-15 10:31:15 +00:00
Kadir Cetinkaya 3e5a47560c Introduce shard storage to auto-index.
Reviewers: sammccall, ioeric

Subscribers: ilya-biryukov, jkorous, arphaman, cfe-commits

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

llvm-svn: 346938
2018-11-15 10:31:10 +00:00
Alex Bradbury 22c091fc3c [RISCV] Introduce the RISCVMatInt::generateInstSeq helper
Logic to load 32-bit and 64-bit immediates is currently present in
RISCVAsmParser::emitLoadImm in order to support the li pseudoinstruction. With
the introduction of RV64 codegen, there is a greater benefit of sharing
immediate materialisation logic between the MC layer and codegen. The
generateInstSeq helper allows this by producing a vector of simple structs
representing the chosen instructions. This can then be consumed in the MC
layer to produce MCInsts or at instruction selection time to produce
appropriate SelectionDAG node. Sharing this logic means that both the li
pseudoinstruction and codegen can benefit from future optimisations, and
that this logic can be used for materialising constants during RV64 codegen.

This patch does contain a behaviour change: addi will now be produced on RV64
when no lui is necessary to materialise the constant. In that case addiw takes
x0 as the source register, so is semantically identical to addi.

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

llvm-svn: 346937
2018-11-15 10:11:31 +00:00
Craig Topper 553ac560aa [X86] Add some custom type legalization rules for truncate with -x86-experimental-vector-widening-legalization.
This avoids some nasty shuffles when we have avx512. It will also prevent using zmm truncate instructions when a ymm instruction that zeroes part of an xmm register will do. Also avoid using avx512 truncate instructions when the input is 128 bits or less. These instructions are 2 uops on skx so we can probably find a better single uop shuffle like pshufb.

llvm-svn: 346936
2018-11-15 08:23:40 +00:00
Craig Topper 926dbdd601 [X86] Add -x86-experimental-vector-widening-legalization versions of shuffle-vs-trunc tests.
llvm-svn: 346935
2018-11-15 08:23:37 +00:00
Martin Storsjo 0db45d954b [ELF] Fix compilation with GCC 5
Remove the default initializer for TrapInstr; all subclasses overwrite
the defaults in their constructors anyway.

This fixes compilation errors like these, with GCC 5.4 on Ubuntu 16.04,
present since SVN r346893:

 In file included from ../tools/lld/ELF/Arch/AArch64.cpp:12:0:
 ../tools/lld/ELF/Target.h:125:49: error: array must be initialized with a brace-enclosed initializer
    std::array<uint8_t, 4> TrapInstr = {0, 0, 0, 0};
                                                  ^
 ../tools/lld/ELF/Target.h:125:49: error: too many initializers for ‘std::array<unsigned char, 4ul>’

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

llvm-svn: 346934
2018-11-15 08:20:18 +00:00
Eric Fiselier 0997403a22 propagate __config_site includes when building benchmarks
llvm-svn: 346933
2018-11-15 07:29:56 +00:00
Zachary Turner 95997f6110 Fix a use-after-free of the ABI plugin.
This was introduced in r346775.  Previously the ABI shared_ptr
was declared as a function local static meaning it would live
forever.  After the change, someone has to create a strong
reference to it or it will go away.  In this code, we were
calling ABI::FindPlugin(...).get(), so it was being immediately
destroyed and we were holding onto a dangling pointer.

llvm-svn: 346932
2018-11-15 05:06:59 +00:00
Thomas Lively 77b33c86f5 [WebAssembly] Renumber SIMD bitwise instructions
Summary: Changed to match https://github.com/WebAssembly/simd/pull/54.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 346931
2018-11-15 03:38:59 +00:00
David Blaikie e0cfc04419 NFC cleanup: Prefer make_unique over reset(new T())
llvm-svn: 346929
2018-11-15 03:04:23 +00:00
David Blaikie 1013fe7451 Fix combining pragma __debug dump & parser_crash with -E
Previously these would be transformed into annotation tokens and the
preprocessor would then assume they were real tokens with source
locations and assert/UB.

Other pragmas that produce annotation tokens aren't a problem because
they aren't handled if the parser isn't hooked up - ParsePragma.cpp
registers those handlers & isn't run for pure preprocessing. So they're
treated as unknown pragmas & printed verbatim by the preprocessor.

Perhaps these pragmas should be treated the same way? But they got mixed
in with other __debug pragmas that do need to be handled during
preprocessing.

The third __debug pragma that produces an annotation token is 'captured'
- which had its own fix for this issue - by not inserting the annotation
token in the first place if it detected that it was in preprocessing
mode. I've removed that fix (from Lex/Pragma.cpp) in favor of the more
general one in Frontend/PrintPreprocessedOutput.cpp.

llvm-svn: 346928
2018-11-15 03:04:21 +00:00
David Blaikie a99b8e4c35 Rewrite-imports on crash: Simplify handling
-frewrite-imports already implies -frewrite-includes (it piggy-backs
on/extends the implementation) so there's no need to conditionally pass
-frewrite-includes when already using -frewrite-imports (& especially I
don't think these would want to be different between crash reporting and
not crash reporting)

llvm-svn: 346927
2018-11-15 03:04:19 +00:00
David Blaikie 19d7bbe52e Stmt bits: Make ExprBits relative to StmtBits
Seems like it makes it a bit easier to read/validate/update in the
future.

llvm-svn: 346926
2018-11-15 03:04:18 +00:00
Konstantin Zhuravlyov 7d1532d333 AMDGPU: Fix check lines in fdot2 test:
GCN900 -> GFX900

llvm-svn: 346925
2018-11-15 02:42:04 +00:00
Xing GUO 2e3364f9c2 [commit-test] Add blank line for test/tools/llvm-objdump/symbol-table-elf.test
Summary: Test commit

Reviewers: Higuoxing

Reviewed By: Higuoxing

Subscribers: llvm-commits, Higuoxing

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

llvm-svn: 346924
2018-11-15 02:36:20 +00:00
Konstantin Zhuravlyov a25e0524c0 AMDGPU: Enable code object v3 for AMDHSA only
Differential Revision: https://reviews.llvm.org/D54186

llvm-svn: 346923
2018-11-15 02:32:43 +00:00
Jonas Devlieghere acaffc5c97 Fix copy/paste mistake for r346919.
llvm-svn: 346921
2018-11-15 01:18:16 +00:00
Jonas Devlieghere e103ae92ef Add setting to require hardware breakpoints.
When debugging read-only memory we cannot use software breakpoint. We
already have support for hardware breakpoints and users can specify them
with `-H`. However, there's no option to force LLDB to use hardware
breakpoints internally, for example while stepping.

This patch adds a setting target.require-hardware-breakpoint that forces
LLDB to always use hardware breakpoints. Because hardware breakpoints
are a limited resource and can fail to resolve, this patch also extends
error handling in thread plans, where breakpoints are used for stepping.

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

llvm-svn: 346920
2018-11-15 01:18:15 +00:00
Jonas Devlieghere df14b94243 [reproducer] Post-commit cleanup
After committing the initial reproducer feature I noticed a few small
issues which warranted addressing here. It fixes incorrect documentation
in the command object and extract some duplicated code into the debugger
object.

llvm-svn: 346919
2018-11-15 01:05:40 +00:00
Sam Clegg bfb75348e2 [WebAssembly] Initial support for shared objects (-shared)
Based on the initial spec proposal:
https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md

The llvm/codegen side of this is still missing but I believe this change is
still worth landing as an incremental step

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

llvm-svn: 346918
2018-11-15 00:37:21 +00:00
Eric Fiselier ae533d31af Work around C++03 decltype limitations
llvm-svn: 346917
2018-11-15 00:27:06 +00:00
Craig Topper ea6ced9d1a [X86] Don't mark SEXTLOADS with narrow types as Custom with -x86-experimental-vector-widening-legalization.
The narrow types end up requesting widening, but generic legalization will end up scalaring and using a build_vector to do the widening.

llvm-svn: 346916
2018-11-15 00:21:41 +00:00
JF Bastien 3a881e6bbc CGDecl::emitStoresForConstant fix synthesized constant's name
Summary: The name of the synthesized constants for constant initialization was using mangling for statics, which isn't generally correct and (in a yet-uncommitted patch) causes the mangler to assert out because the static ends up trying to mangle function parameters and this makes no sense. Instead, mangle to `"__const." + FunctionName + "." + DeclName`.

Reviewers: rjmccall

Subscribers: dexonsmith, cfe-commits

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

llvm-svn: 346915
2018-11-15 00:19:18 +00:00
Eric Fiselier 22bdb33108 Get tests compiling with -Wunused-local-typedef
llvm-svn: 346914
2018-11-15 00:11:02 +00:00
Jessica Paquette ddb039a199 [MachineOutliner][NFC] Check if CandidatesForRepeatedSeq < 2
There's no reason to call getOutliningCandidateInfo with a single candidate.

llvm-svn: 346913
2018-11-15 00:02:24 +00:00
Stephan T. Lavavej 1b19549b13 [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.
C++11's [hash.requirements] never required these typedefs from users.

llvm-svn: 346912
2018-11-14 23:23:55 +00:00
Stephan T. Lavavej 174072c1d2 [libcxx] [test] Include <cassert> for assert().
This fixes compiler errors with MSVC's STL.

llvm-svn: 346911
2018-11-14 23:23:51 +00:00
Stephan T. Lavavej 21981194eb [libcxx] [test] Fix MSVC warning C4800.
This was implicitly converting [1, 3] to bool, which triggers
an MSVC warning. The test should just pass `true`, which is
simpler, has the same behavior, and avoids the warning. (This
is a library test, not a compiler test, and the conversion happens
before calling `push_back`, so passing [1, 3] isn't interesting
in any way. This resembles a previous change to stop passing
`1 == 1` in the `vector<bool>` tests.)

llvm-svn: 346910
2018-11-14 23:23:46 +00:00
Benjamin Kramer 6b7d6fe079 [X86] Remove unused variable
llvm-svn: 346909
2018-11-14 23:13:27 +00:00
Craig Topper 0b2089da4b [X86] Support v2i32/v4i16/v8i8 load/store using f64 on 32-bit targets under -x86-experimental-vector-widening-legalization.
On 64-bit targets the type legalizer will use i64 to legalize these. But when i64 isn't legal, the type legalizer won't try an FP type. So do it manually instead.

There are a few regressions in here due to some v2i32 operations like mul and div now being reassembled into a full vector just to store instead of storing the pieces. But this was already occuring in 64-bit mode so its not a new issue.

llvm-svn: 346908
2018-11-14 23:02:09 +00:00
Reid Kleckner 7b7b1140e3 [codeview] Make "clang -g" emit codeview by default when targetting MSVC
Summary:
If you're using the Microsoft ABI, chances are that you want PDBs and
codeview debug info. Currently, everyone has to remember to specific
-gcodeview by default, when it would be nice if the standard -g option
did the right thing by default.

Also, do some related cleanup of -cc1 options. When targetting the MS
C++ ABI, we probably shouldn't pass -debugger-tuning=gdb. We were also
passing -gcodeview twice, which is silly.

Reviewers: smeenai, zturner

Subscribers: aprantl, JDevlieghere, llvm-commits

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

llvm-svn: 346907
2018-11-14 22:59:27 +00:00
Adrian Prantl dced6ee923 Remove the expectedFlakeyDsym decorator. It's not useful anymore.
llvm-svn: 346906
2018-11-14 22:54:43 +00:00
Eric Fiselier 5828115e58 Attempt to show progress bar in benchmark tests
llvm-svn: 346905
2018-11-14 22:49:42 +00:00
Eric Fiselier 1dbe7ec946 Exclude check-cxx-benchmarks from the global test target.
llvm-svn: 346904
2018-11-14 22:48:43 +00:00
Simon Pilgrim e8cc5e4e03 [X86] Update masked expandload/compressstore test names
llvm-svn: 346903
2018-11-14 22:44:08 +00:00
Sanjay Patel 4832ffee39 [InstSimplify] add more tests for funnel shift with select; NFC
The cases are just different enough that we should have 
complete tests to avoid bugs from typos in the code.

llvm-svn: 346902
2018-11-14 22:34:25 +00:00
Jessica Paquette 27e1754fc9 [MachineOutliner][NFC] Don't compute liveness if X16/X17/NZCV are unused
Using the MBB flags, we can tell if X16/X17/NZCV are unused in a block,
and also not live out.

If this holds for all MBBs, then we can avoid checking for liveness on
that candidate. Furthermore, if it holds for an individual candidate's
MBB, then we can avoid checking for liveness on that candidate.

llvm-svn: 346901
2018-11-14 22:23:38 +00:00
Jason Molenda 2a8a665e1f update xcode project file for reproducers.
llvm-svn: 346900
2018-11-14 22:14:07 +00:00
Teresa Johnson f3d2453d4d Remove unused getMDNodeFwdRefOrNull interfaces (NFC)
Summary:
Followup from D53596/r346891. Remove the getMDNodeFwdRefOrNull interface
to the MDLoader since it is no longer used. Also improve error messages
when the internal implementation is used within the MDLoader.

Reviewers: steven_wu

Subscribers: llvm-commits

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

llvm-svn: 346899
2018-11-14 21:57:51 +00:00
Simon Pilgrim 9d9353aef5 [X86][SSE] Add SSE2/SSE42 masked load/store tests
Now that the load/store tests are split the impact of running the tests on multiple (illegal) targets is a lot less impactful

llvm-svn: 346896
2018-11-14 21:31:50 +00:00
Nirav Dave 1241dcb3cf Bias physical register immediate assignments
The machine scheduler currently biases register copies to/from
physical registers to be closer to their point of use / def to
minimize their live ranges. This change extends this to also physical
register assignments from immediate values.

This causes a reduction in reduction in overall register pressure and
minor reduction in spills and indirectly fixes an out-of-registers
assertion (PR39391).

Most test changes are from minor instruction reorderings and register
name selection changes and direct consequences of that.

Reviewers: MatzeB, qcolombet, myatsina, pcc

Subscribers: nemanjai, jvesely, nhaehnle, eraman, hiraditya,
  javed.absar, arphaman, jfb, jsji, llvm-commits

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

llvm-svn: 346894
2018-11-14 21:11:53 +00:00