Commit Graph

7979 Commits

Author SHA1 Message Date
GN Sync Bot 8156f2497a gn build: Merge r372168
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372173 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 19:41:36 +00:00
GN Sync Bot f60ceb9328 gn build: Merge r372162
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372163 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 19:00:41 +00:00
GN Sync Bot d343c49792 gn build: Merge r372149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372150 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 17:51:27 +00:00
Simon Pilgrim 8880d6274d [TableGen] CodeGenMapTable - Don't dereference a dyn_cast result. NFCI.
The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372146 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 17:32:15 +00:00
Nico Weber 7166e93a27 gn build: (manually) merge r372076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372123 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 14:06:05 +00:00
Graham Hunter 464b4d0dfb [SVE][MVT] Fixed-length vector MVT ranges
* Reordered MVT simple types to group scalable vector types
    together.
  * New range functions in MachineValueType.h to only iterate over
    the fixed-length int/fp vector types.
  * Stopped backends which don't support scalable vector types from
    iterating over scalable types.

Reviewers: sdesmalen, greened

Reviewed By: greened

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372099 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:19:23 +00:00
David Zarzycki 117bbfcff2 [git-llvm] Do not reinvent @{upstream} (take 2)
This makes git-llvm more of a thin wrapper around git while temporarily
maintaining backwards compatibility with past git-llvm behavior.

Using @{upstream} makes git-llvm more robust when used with a nontrivial
local repository.

https://reviews.llvm.org/D67389

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372070 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 04:44:13 +00:00
Joel E. Denny 39a942df78 Revert r372035: "[lit] Make internal diff work in pipelines"
This breaks a Windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372051 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 23:47:46 +00:00
David L. Jones 110f2c43a1 Add libc to path mappings in git-llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372048 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 23:36:35 +00:00
Joel E. Denny 9b35a1b569 [lit] Make internal diff work in pipelines
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:

```
 # RUN: program | diff file -
 # RUN: not diff file1 file2 | FileCheck %s
```

Such cases exist now, in `clang/test/Analysis` for example.  We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` cannot
currently be used in pipelines and doesn't recognize `-` as a
command-line option.

To enable pipelines, this patch moves lit's `diff` implementation into
an out-of-process script, similar to lit's `cat` implementation.  A
follow-up patch will implement `-` to mean stdin.

Reviewed By: probinson, stella.stamenova

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372035 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 21:22:29 +00:00
Nico Weber bd50d31a90 gn build: Merge r371976
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371977 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 11:33:54 +00:00
Nico Weber 911a837b3d gn build: Merge r371965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371966 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 09:43:26 +00:00
Nico Weber 7020cdb536 gn build: Merge r371959
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371961 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-16 07:34:23 +00:00
James Molloy 41e3905aa8 [CodeEmitter] Support instruction widths > 64 bits
Some VLIW instruction sets are Very Long Indeed. Using uint64_t constricts the Inst encoding to 64 bits (naturally).

This change switches CodeEmitter to a mode that uses APInts when Inst's bitwidth is > 64 bits (NFC for existing targets).

When Inst.BitWidth > 64 the prototype changes to:

  void TargetMCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,
                                                  SmallVectorImpl<MCFixup> &Fixups,
                                                  APInt &Inst,
                                                  APInt &Scratch,
                                                  const MCSubtargetInfo &STI);

The Inst parameter returns the encoded instruction, the Scratch parameter is used internally for manipulating operands and is exposed so that the underlying storage can be reused between calls to getBinaryCodeForInstr. The goal is to elide any APInt constructions that we can.

Similarly the operand encoding prototype changes to:

  getMachineOpValue(const MCInst &MI, const MCOperand &MO, APInt &op, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI);

That is, the operand is passed by reference as APInt rather than returned as uint64_t.

To reiterate, this APInt mode is enabled only when Inst.BitWidth > 64, so this change is NFC for existing targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371928 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-15 08:35:08 +00:00
Nico Weber d48ba38f9f gn build: pacify "gn format" after 371102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371858 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 14:35:20 +00:00
Nico Weber d8b09e1ff4 gn build: (manually) merge r371834, take 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371851 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 13:07:54 +00:00
Nico Weber d27f282ac5 Revert "gn build: (manually) merge r371834"
This reverts commit abc7e2b6004cd693cf3b6dedbc7908e099c7ac6a.
The commit was incomplete. I'll revert and reland the full commit,
so that the correct change is a single commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371850 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 13:04:59 +00:00
Nico Weber d66721d34e gn build: (manually) merge r371834
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371849 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 12:59:06 +00:00
Nico Weber c52ed6192e gn build: Merge r371822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371848 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 12:58:58 +00:00
Nico Weber f1b0ea6424 gn build: (manually) merge r371787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371847 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 12:58:52 +00:00
Nandor Licker 70adb95bf9 [Clang Interpreter] Initial patch for the constexpr interpreter
Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371834 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 09:46:16 +00:00
Rainer Orth 6dfd00e174 test-release.sh: Don't use chrpath on Solaris
When trying to run test-release.sh on Solaris 11.4 for 9.0.0 rc4, I failed initially
because Solaris lacks chrpath.  This patch accounts for that and allowed the run to
continue.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371741 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-12 14:50:32 +00:00
Tim Northover a8e37d1bbb AArch64: support arm64_32, an ILP32 slice for watchOS.
This is the main CodeGen patch to support the arm64_32 watchOS ABI in LLVM.
FastISel is mostly disabled for now since it would generate incorrect code for
ILP32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371722 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-12 10:22:23 +00:00
Nico Weber a841034e82 gn build: Merge r371700
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371701 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-12 01:25:34 +00:00
Nico Weber 7d1d9eb601 gn build: Merge r371661
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371670 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 21:24:15 +00:00
Nico Weber 4e43ec35ce gn build: Merge r371657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371669 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 21:24:11 +00:00
Nico Weber 770217fc9d gn build: Merge r371635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 16:26:59 +00:00
Nico Weber 8d6aa10b56 gn build: Merge r371562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371626 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 14:40:16 +00:00
Nico Weber 46fc59dc5a gn build: add include_dir that's necessary after r371564
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371611 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-11 12:21:09 +00:00
Eric Christopher 2151a462e9 Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own file
so that you don't have to link Error.o and all of its dependencies.

In more detail: global initializers in Error.o can't be elided with
-ffunction-sections/-gc-sections since they always need to be run
causing a fairly significant binary bloat if all you want is the
ABI breaking checks code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371561 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 22:05:01 +00:00
Matt Arsenault b7c0307ccf GlobalISel/TableGen: Handle REG_SEQUENCE patterns
The scalar f64 patterns don't work yet because they fail on multiple
results from the unused implicit def of scc in the result bit
operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371542 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 17:57:33 +00:00
Djordje Todorovic dcad4a5a55 Revert "[utils] Implement the llvm-locstats tool"
This reverts commit rL371520.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371527 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:48:52 +00:00
Djordje Todorovic 4964f4e3b1 [utils] Implement the llvm-locstats tool
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

The tool will be very useful for tracking improvements regarding the
"debugging optimized code" support with LLVM ecosystem.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371520 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:47:03 +00:00
Dmitri Gribenko be9f44f943 Revert "Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.""
This reverts commit r371502, it broke tests
(clang/test/CodeGenCXX/auto-var-init.cpp).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371507 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 10:39:09 +00:00
Clement Courbet 9f23a59130 Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."
With a fix for sanitizer breakage (see explanation in D60318).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371502 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 09:18:00 +00:00
Nico Weber c1ff64f88c gn build: Merge r371488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371489 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 06:31:59 +00:00
Nico Weber 924108a621 gn build: Merge r371484
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371485 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 03:18:25 +00:00
Mehdi Amini b85b7a2300 Revert [git-llvm] Do not reinvent @{upstream}
This reverts r371290 (git commit 7faffd544b16f851a632d6b8f93e3c8485ff34bb)

The change wasnt NFC and broke some users' workflow. Reverting while figuring
out the best alternative to move forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371480 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 01:26:36 +00:00
Nico Weber 9d6e65d915 gn build: Merge r371466
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371479 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 01:11:30 +00:00
Nico Weber e0237f3141 gn build: (manually) merge r371429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371477 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 00:48:20 +00:00
Matt Arsenault 5cc24bdc92 AMDGPU/GlobalISel: Select atomic loads
A new check for an explicitly atomic MMO is needed to avoid
incorrectly matching pattern for non-atomic loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371418 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-09 16:18:07 +00:00
Matt Arsenault 81c69f6240 AMDGPU: Remove code address space predicates
Fixes 8-byte, 8-byte aligned LDS loads. 16-byte case still broken due
to not be reported as legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371413 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-09 16:02:07 +00:00
James Molloy 4c2266ddea [DFAPacketizer] Reapply: Track resources for packetized instructions
Reapply with fix to reduce resources required by the compiler - use
unsigned[2] instead of std::pair. This causes clang and gcc to compile
the generated file multiple times faster, and hopefully will reduce
the resource requirements on Visual Studio also. This fix is a little
ugly but it's clearly the same issue the previous author of
DFAPacketizer faced (the previous tables use unsigned[2] rather uglily
too).

This patch allows the DFAPacketizer to be queried after a packet is formed to work out which
resources were allocated to the packetized instructions.

This is particularly important for targets that do their own bundle packing - it's not
sufficient to know simply that instructions can share a packet; which slots are used is
also required for encoding.

This extends the emitter to emit a side-table containing resource usage diffs for each
state transition. The packetizer maintains a set of all possible resource states in its
current state. After packetization is complete, all remaining resource states are
possible packetization strategies.

The sidetable is only ~500K for Hexagon, but the extra tracking is disabled by default
(most uses of the packetizer like MachinePipeliner don't care and don't need the extra
maintained state).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371399 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-09 13:17:55 +00:00
Simon Pilgrim 98409ec54e Revert rL371198 from llvm/trunk: [DFAPacketizer] Track resources for packetized instructions
This patch allows the DFAPacketizer to be queried after a packet is formed to work out which
resources were allocated to the packetized instructions.

This is particularly important for targets that do their own bundle packing - it's not
sufficient to know simply that instructions can share a packet; which slots are used is
also required for encoding.

This extends the emitter to emit a side-table containing resource usage diffs for each
state transition. The packetizer maintains a set of all possible resource states in its
current state. After packetization is complete, all remaining resource states are
possible packetization strategies.

The sidetable is only ~500K for Hexagon, but the extra tracking is disabled by default
(most uses of the packetizer like MachinePipeliner don't care and don't need the extra
maintained state).

Differential Revision: https://reviews.llvm.org/D66936
........
Reverted as this is causing "compiler out of heap space" errors on MSVC 2017/19 NDEBUG builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371393 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-09 12:33:22 +00:00
David Zarzycki 03e62e9930 [git-llvm] Do not reinvent @{upstream}
Make `git-llvm` more robust when used with a nontrivial repository.

https://reviews.llvm.org/D67262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371290 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-07 06:44:52 +00:00
Matt Arsenault 17f24f565d GlobalISel: Support physical register inputs in patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371253 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 20:32:37 +00:00
James Molloy 333900f768 [DFAPacketizer] Track resources for packetized instructions
This patch allows the DFAPacketizer to be queried after a packet is formed to work out which
resources were allocated to the packetized instructions.

This is particularly important for targets that do their own bundle packing - it's not
sufficient to know simply that instructions can share a packet; which slots are used is
also required for encoding.

This extends the emitter to emit a side-table containing resource usage diffs for each
state transition. The packetizer maintains a set of all possible resource states in its
current state. After packetization is complete, all remaining resource states are
possible packetization strategies.

The sidetable is only ~500K for Hexagon, but the extra tracking is disabled by default
(most uses of the packetizer like MachinePipeliner don't care and don't need the extra
maintained state).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371198 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 12:20:08 +00:00
Nico Weber f9fdba09e6 gn build: Merge r371182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371191 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 09:44:13 +00:00
Nico Weber 9fa8d383fc gn build: Merge r371179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371190 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 09:44:10 +00:00
Nico Weber 5d73bfb07a gn build: Merge r371159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371161 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 01:22:13 +00:00