Commit Graph

338945 Commits

Author SHA1 Message Date
Sylvestre Ledru dbfc516d1f phab doc: also document 'arc land' 2020-01-09 22:17:06 +01:00
Sylvestre Ledru 004ae200a5 phab doc: remove the svn section 2020-01-09 22:17:06 +01:00
Nathan Ridge 6a69d3c6b3 [clangd] Handle DeducedTemplateSpecializationType in TargetFinder
Summary:
This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=42914.
Once that is fixed, the handling in VisitDeducedTyped() should be sufficient.

Fixes https://github.com/clangd/clangd/issues/242

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72119
2020-01-09 16:14:11 -05:00
Sylvestre Ledru c348a2674b [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix
Reviewers: alexfh

Reviewed By: alexfh

Subscribers: njames93, xazax.hun, mgorny, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D72421
2020-01-09 22:11:18 +01:00
Eric Fiselier 61bd19206f [libc++] Explicitly enumerate std::string external instantiations.
The external instantiation of std::string is a problem for libc++.
    Additions and removals of inline functions in string can cause ABI
    breakages, including introducing new symbols.

    This patch aims to:
      (1) Make clear which functions are explicitly instatiated.
      (2) Prevent new functions from being accidentally instantiated.
      (3) Allow a migration path for adding or removing functions from the
      explicit instantiation over time.

    Although this new formulation is uglier, it is preferable from a
    maintainability and readability standpoint because it explicitly
    enumerates the functions we've chosen to expose in our ABI. Changing
    this list is non-trivial and requires thought and planning.

    (3) is achieved by making it possible to control the extern template declaration
    separately from it's definition. Meaning we could add a new definition to
    the dylib, wait for it to roll out, then add the extern template
    declaration to the header. Similarly, we could remove existing extern
    template declarations while still keeping the definition to prevent ABI
    breakages.
2020-01-09 15:51:02 -05:00
River Riddle fc3367dd5e [mlir] NFC: Move the state for managing SSA value names out of OperationPrinter and into a new class SSANameState.
Summary:
This reduces the complexity of OperationPrinter and simplifies the code by quite a bit. The SSANameState is now held by ModuleState. This is in preparation for a future revision that molds ModuleState into something that can be used by users for caching the printer state, as well as for implementing printAsOperand style methods.

Depends On D72292

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D72293
2020-01-09 12:48:35 -08:00
Alex Richardson 646ca7d7e7 MipsDelaySlotFiller: Update registers def-uses for BUNDLE instructions
Summary:
In commit b91f239485 I updated the
MipsDelaySlotFiller to skip BUNDLE instructions.
However, in addition to not considering BUNDLE instructions for the delay
slot, we also need to ensure that the register def-use information is
updated. Not updating this information caused run-time crashes (when using
the out-of-tree CHERI backend) since later definitions could be overwritten
with earlier register values.

Reviewers: atanasyan
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D72254
2020-01-09 20:46:02 +00:00
Alex Richardson 1444e6e2e6 Re-apply "[ELF] Allow getErrPlace() to work before Out::bufferStart is set"
This time with a fix for the UBSAN failure.

Differential Revision: https://reviews.llvm.org/D70659
2020-01-09 20:26:31 +00:00
Craig Topper 4e003aad42 [X86] Add ueq/one fp128 quiet compare tests. NFC
The ONE expansion calls OGT/OLT libcalls which will signal for QNAN.
The UEQ expansion uses unord and eq libcalls which won't signal.
We should probably use those libcalls for ONE with appropriate
logic.

Quiet OGT/OLT/OLE/OGE have similar issue, but not sure how to fix
those yet.
2020-01-09 12:22:39 -08:00
Jessica Paquette 9949b1a175 [GlobalISel][AArch64] Import + select LDR*roW and STR*roW patterns
This adds support for selecting a large chunk of the load/store *roW patterns.

This is pretty much a straight port of AArch64DAGToDAGISel::SelectAddrModeWRO
into GISel. The code is very similar to the XRO code. The main difference is
that in the *roW patterns, we want to try and fold in an extend, and *possibly*
a shift along with it. A good portion of this patch is refactoring the existing
XRO code.

- Add selectAddrModeWRO

- Factor out the code from selectAddrModeShiftedExtendXReg which is used by both
  selectAddrModeXRO and selectAddrModeWRO into selectExtendedSHL.
  This is similar to the function of the same name in AArch64DAGToDAGISel.

- Add support for extends to the factored out code in selectExtendedSHL.

- Teach getExtendTypeForInst how to handle AND masks that are intended to be
  used in loads/stores (necessary for this addressing mode.)

- Make getExtendTypeForInst not static because moving it made an annoying diff
  and I wanted to have the WRO/XRO functions close to each other while I was
  writing the code.

Differential Revision: https://reviews.llvm.org/D72426
2020-01-09 12:15:56 -08:00
serge-sans-paille b35f5d4914 [clang] Enforce triple in mempcpy test
Fixes http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/2597
2020-01-09 21:09:15 +01:00
Eric Astor 1c545f6dbc [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.
Summary:
Extend D71677 to apply to all branch-target operands, rather than special-casing call instructions.

Also add a regression test for llvm.org/PR44272, since this finishes fixing it.

Reviewers: thakis, rnk

Reviewed By: thakis

Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D72417
2020-01-09 14:55:03 -05:00
Ganesh Gopalasubramanian 3408940f73 [X86] AMD Znver2 (Rome) Scheduler enablement
The patch gives out the details of the znver2 scheduler model.
There are few improvements with respect to execution units, latencies and
throughput when compared with znver1.
The tests that were present for znver1 for llvm-mca tool were replicated.
The latencies, execution units, timeline and throughput information are updated for znver2.

Reviewers: craig.topper, Simon Pilgrim

Differential Revision: https://reviews.llvm.org/D66088
2020-01-10 00:44:59 +05:30
Sean Fertile 1a1dbea24d [PowerPC] The VK_PLT symbolref modifier is only used on 32-bit ELF. [NFC]
Fix a conditional that guarded code for execution only on 32-bit ELF by
checking that the Subtarget was not 64-bit and not-Darwin. By adding a new
target ABI (AIX), the condition is no longer correct. This code is dead for
AIX, due to a 'report_fatal_error' for thread local storage usage earlier in the
pipeline, but needs to be modifed as part of Darwins removal from the
PowerPC backend.
2020-01-09 14:07:07 -05:00
Erik Pilkington 183b5d38d7 [demangle] Copy back some NFC commits from LLVM 2020-01-09 10:27:24 -08:00
Craig Topper b705fe5686 [TargetLowering][X86] TeachSimplifyDemandedBits to handle cases where only the sign bit is demanded from a SETCC and can be passed through
If we're doing a compare that only tests the sign bit and only the sign bit is demanded, we can just bypass the node. This removes one of the blend dependencies in our v2i64->v2f32 uint_to_fp codegen on pre-sse4.2 targets.

Differential Revision: https://reviews.llvm.org/D72356
2020-01-09 10:21:25 -08:00
Bruno Ricci 002be6cfa2
[Support][NFC] Add an explicit unit test for Process::getPageSize()
It turns out that it was only tested indirectly. For now test only on Linux
X86-64 and aarch64.
2020-01-09 18:14:05 +00:00
Sanjay Patel 460cbabe17 [x86] add tests for 2-way splat copy; NFC
Based on code in PR42024:
https://bugs.llvm.org/show_bug.cgi?id=42024
2020-01-09 13:08:16 -05:00
Ulrich Weigand b51fa8670f [SystemZ] Fix matching another pattern for nxgrk (PR44496)
SystemZDAGToDAGISel::Select will attempt to split logical instruction
with a large immediate constant.  This must not happen if the result
matches one of the z15 combined operations, so the code checks for
those.  However, one of them was missed, causing invalid code to
be generated in the test case for PR44496.
2020-01-09 19:06:22 +01:00
Jonas Devlieghere 7bbd4076c1 [lldb/SWIG] Undo incorrect substitution
The Python directory for the script interpreter is still capitalized.
2020-01-09 09:55:39 -08:00
Bruno Ricci 2fe45e029d
[Support][NFC] Make some helper functions "static" in Memory.inc 2020-01-09 17:46:21 +00:00
Simon Moll 356b33516c [NFC,format] Sort switch cases alphabetically
This patch brings the switch cases of `llvm/lib/Support/Triple.cpp` back into alphabetical order.
This was noted during the the review of  https://reviews.llvm.org/D69103

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D72452
2020-01-09 18:37:24 +01:00
Bruno Ricci ed6daa2e1d
[Support][NFC] Add a comment about the semantics of MF_HUGE_HINT flag 2020-01-09 17:34:18 +00:00
Simon Tatham 06d07ec4a3 [Clang] Handle target-specific builtins returning aggregates.
Summary:
A few of the ARM MVE builtins directly return a structure type. This
causes an assertion failure at code-gen time if you try to assign the
result of the builtin to a variable, because the `RValue` created in
`EmitBuiltinExpr` from the `llvm::Value` produced by codegen is always
made by `RValue::get()`, which creates a non-aggregate `RValue` that
will fail an assertion when `AggExprEmitter::withReturnValueSlot` calls
`Src.getAggregatePointer()`. A similar failure occurs if you try to use
the struct return value directly to extract one field, e.g.
`vld2q(address).val[0]`.

The existing code-gen tests for those MVE builtins pass the returned
structure type directly to the C `return` statement, which apparently
managed to avoid that particular code path, so we didn't notice the
crash.

Now `EmitBuiltinExpr` checks the evaluation kind of the builtin's return
value, and does the necessary handling for aggregate returns. I've added
two extra test cases, both of which crashed before this change.

Reviewers: dmgreen, rjmccall

Reviewed By: rjmccall

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72271
2020-01-09 17:28:37 +00:00
Jonas Devlieghere 5e0bf6772e [lldb/SWIG] Fix capitalization for case sensitive file systems.
When moving the Python directory I renamed it to python (lowercase) but
didn't update the python.swig file.
2020-01-09 09:23:01 -08:00
Kadir Cetinkaya 189aa5b7a4
[clangd] Adjust diagnostic range to be inside main file
Summary:
LSP requires diagnostics to lay inside main file. In clangd we keep
diagnostics in three different cases:
- already in main file
- adjusted to a header included in main file
- has a note covering some range in main file

In the last case, we were not adjusting the diagnostics range to be in main
file, therefore these diagnostics ended up pointing some arbitrary locations.

This patch fixes that issue by adjusting the range of diagnostics to be the
first note inside main file when converting to LSP.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72458
2020-01-09 18:02:33 +01:00
Jonas Devlieghere 6498aff249 [lldb/Bindings] Move bindings into their own subdirectory
All the code required to generate the language bindings for Python and
Lua lives under scripts, even though the majority of this code aren't
scripts at all, and surrounded by scripts that are totally unrelated.

I've reorganized these files and moved everything related to the
language bindings into a new top-level directory named bindings. This
makes the corresponding files self contained and much more discoverable.

Differential revision: https://reviews.llvm.org/D72437
2020-01-09 08:44:34 -08:00
Sven van Haastregt 241f335b26 [OpenCL][Docs] Rename C++ for OpenCL label
To avoid potential confusion with OpenCL C++.
2020-01-09 16:31:45 +00:00
serge-sans-paille cee4a1c957 Improve support of GNU mempcpy
- Lower to the memcpy intrinsic
- Raise warnings when size/bounds are known

Differential Revision: https://reviews.llvm.org/D71374
2020-01-09 17:31:00 +01:00
Whitney Tsang d27a15fed7 [NFCI][LoopUnrollAndJam] Changing LoopUnrollAndJamPass to a function
pass.

Summary: This patch changes LoopUnrollAndJamPass to a function pass, and
keeps the loops traversal order same as defined in
FunctionToLoopPassAdaptor LoopPassManager.h.

The next patch will change the loop traversal to outer to inner order,
so more loops can be transform.

Discussion in llvm-dev mailing list:
https://groups.google.com/forum/#!topic/llvm-dev/LF4rUjkVI2g
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto
Reviewed By: dmgreen
Subscribers: hiraditya, zzheng, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D72230
2020-01-09 16:18:36 +00:00
Jonas Devlieghere 45c971f7ee [lldb/Lua] Make lldb.debugger et al available to Lua
The Python script interpreter makes the current debugger, target,
process, thread and frame available to interactive scripting sessions
through convenience variables. This patch does the same for Lua.

Differential revision: https://reviews.llvm.org/D71801
2020-01-09 08:15:41 -08:00
Jonas Devlieghere 93a1e9c90c [lldb/SWIG] Add missing '\' in macros again
Making the string conversion operator a macro unintentionally dropped
the backslash before '\n' and '\r' and was therefore incorrectly
stripping 'n' and 'r' from the object description.
2020-01-09 08:15:41 -08:00
David Goldman ea9888b8f6 [clangd] Respect `--sysroot` argument if it is set
Summary:
- Since `--sysroot` is a superset of the `-isysroot` argument, we
  shouldn't add the `-isysroot` if we detect a `--sysroot` flag.

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72415
2020-01-09 11:02:58 -05:00
Sergej Jaskiewicz fb76c7934d [libcxxabi] Allow tests to link with static libc++abi/libc++ even if the shared version is present
Summary:
Right now the only way to force libc++abi tests to link with the static version of libc++abi is to set `LIBCXXABI_ENABLE_SHARED` to `OFF`. However, this doesn't work when libc++abi is built as standalone project because of [this](54c5224203/libcxxabi/CMakeLists.txt (L503-L519)).

This change allows specifying the version of the library for tests to link with.

This is useful for remote testing, for example, with `SSHExecutor`, where we _have_ to link with libc++abi statically.

Two new CMake options are introduced here: `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI` and `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX`. They can be set to `OFF` to tell the test utility to link tests with the static libraries.

It shouldn't break anything, because the default values of these options are set such that the test utility will behave the same way.

Reviewers: EricWF, mclow.lists, phosek, mehdi_amini, ldionne, jroelofs, bcraig

Subscribers: mgorny, christof, ldionne, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D71894
2020-01-09 19:01:57 +03:00
@raghesh (Raghesh Aloor) 6c04ef472a [InstCombine] Z / (1.0 / Y) => (Y * Z)
This is a special case of Z / (X / Y) => (Y * Z) / X, with X = 1.0.
The m_OneUse check is avoided because even in the case of the
multiple uses for 1.0/Y, the number of instructions remain the same
and a division is replaced by a multiplication.

Differential Revision: https://reviews.llvm.org/D72319
2020-01-09 10:52:39 -05:00
Sid Manning 0fa8f701cc [ELF][Hexagon] Add support for IE relocations
Differential Revision: https://reviews.llvm.org/D71143
2020-01-09 09:45:24 -06:00
Matt Arsenault de08244d3d TableGen: Remove unused code 2020-01-09 10:32:57 -05:00
Matt Arsenault 9ffd0ed838 AMDGPU/GlobalISel: Fix import of integer med3
This isn't too useful now, since nothing is currently trying to form
min/max from cmp+select.
2020-01-09 10:29:32 -05:00
Matt Arsenault c66b2e1c87 AMDGPU: Eliminate more legacy codepred address space PatFrags
These should now be limited to R600 code.
2020-01-09 10:29:32 -05:00
Matt Arsenault 3766f4bacc AMDGPU: Use new PatFrag system for d16 stores 2020-01-09 10:29:32 -05:00
Matt Arsenault c1d4963b44 AMDGPU: Use new PatFrag system for d16 load nodes 2020-01-09 10:29:32 -05:00
Matt Arsenault 7d67742160 AMDGPU/GlobalISel: Fix import of zext of s16 op patterns 2020-01-09 10:29:32 -05:00
Matt Arsenault e71af77568 AMDGPU/GlobalISel: Add IMMPopCount xform
Partially fixes BFE pattern import.
2020-01-09 10:29:32 -05:00
Matt Arsenault 79450a4ea2 AMDGPU/GlobalISel: Add selectVOP3Mods_nnan
This doesn't enable any new imports yet, but moves the fmed patterns
from failing on this to hitting the "complex suboperand referenced
more than once" limitation in tablegen.
2020-01-09 10:29:32 -05:00
Matt Arsenault d964086c62 AMDGPU/GlobalISel: Add equiv xform for bitcast_fpimm_to_i32
Only partially fixes one pattern import.
2020-01-09 10:29:31 -05:00
Matt Arsenault 3952748ffd AMDGPU/GlobalISel: Fix add of neg inline constant pattern 2020-01-09 10:29:31 -05:00
Matt Arsenault 0274ed9dc7 TableGen/GlobalISel: Fix slightly wrong generated comment 2020-01-09 10:29:31 -05:00
Matt Arsenault db7c920779 AMDGPU: Add register class to DS_SWIZZLE_B32 pattern
Reduces diff for a future patch.
2020-01-09 10:29:31 -05:00
Simon Tatham 9704ba652a [ARM,MVE] Add missing IntrNoMem flag on IR intrinsics.
A lot of the IR-level intrinsics we've been defining for MVE recently
accidentally had `props = []` instead of `props = [IntrNoMem]`, so
that optimization would have been overcautious about reordering them.

All the affected cases were due to instantiating the multiclasses
`MVEPredicated` and `MVEMXPredicated` without filling in the `props`
parameter, because I //thought// I remembered having set the defaults
in those multiclasses to `[IntrNoMem]`. In fact I hadn't done that.
Now I have.

(The IR intrinsics that //do// read and write memory are all
explicitly marked as `[IntrReadMem]` or `[IntrWriteMem]` already, so
they will override these defaults.)
2020-01-09 15:04:47 +00:00
Simon Tatham d857e114b5 [ARM,MVE] Fix valid immediate range for vsliq_n.
In common with most MVE immediate shift instructions, the left shift
takes an immediate in the range [0,n-1], while the right shift takes
one in the range [1,n]. I had absent-mindedly made them both the
latter.

While I'm here, I've added a set of regression tests checking both
ends of the immediate range for a representative sample of the
immediate shifts.
2020-01-09 15:04:47 +00:00