1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

206737 Commits

Author SHA1 Message Date
serge-sans-paille
82b6e6053d llvmbuildectomy - replace llvm-build by plain cmake
No longer rely on an external tool to build the llvm component layout.

Instead, leverage the existing `add_llvm_componentlibrary` cmake function and
introduce `add_llvm_component_group` to accurately describe component behavior.

These function store extra properties in the created targets. These properties
are processed once all components are defined to resolve library dependencies
and produce the header expected by llvm-config.

Differential Revision: https://reviews.llvm.org/D90848
2020-11-13 10:35:24 +01:00
serge-sans-paille
65ee119111 [nfc] Fix missing include 2020-11-13 10:35:23 +01:00
Lang Hames
09080e305f [ORC][examples] Fix missing includes/dependencies in more examples. 2020-11-13 20:22:01 +11:00
Lang Hames
cc7c32ac3a [ORC] Make a narrowing conversion explicit. 2020-11-13 20:11:19 +11:00
Max Kazantsev
aa03b5d94b [Test] One more IndVars test with inverted exit condition 2020-11-13 16:02:31 +07:00
Max Kazantsev
f7d73f2bcb [IndVars] Fix branches exiting by true with invariant conditions
Forgot to invert the condition for them.
2020-11-13 15:52:00 +07:00
Max Kazantsev
62642393c5 [Test] Add test with inverted branch 2020-11-13 15:51:59 +07:00
Lang Hames
5491158fed [examples] Fix Kaleidoscope examples after OrcJIT break-up / remote TPC commit.
Fix the Kaleidoscope examples after 1d0676b54c4 by explicitly creating the
SymbolStringPool.
2020-11-13 19:13:00 +11:00
Kai Luo
782c68b542 [PowerPC] Add test case for negated abs. NFC. 2020-11-13 08:06:31 +00:00
Max Kazantsev
e52022b096 [NFC] Refactor loop-invariant getters to return Optional 2020-11-13 15:03:10 +07:00
Lang Hames
61a5db908b [examples] Fix Kaleidoscope examples after OrcJIT break-up / remote TPC commit.
Fix the Kaleidoscope examples after 1d0676b54c4 by explicitly creating the
SymbolStringPool.
2020-11-13 18:43:13 +11:00
Lang Hames
0830411749 [ORC][examples] Fix include and library dependence for SpeculativeJIT example. 2020-11-13 18:24:34 +11:00
Lang Hames
5f751300a8 [ORC] Add dependence of OrcJIT on OrcTargetProcess.
The SelfTargetProcessControl class depends on OrcTargetProcess.
2020-11-13 18:09:41 +11:00
Arthur Eubanks
80be457407 [NFC] Removed unused variable
Obsolete as of https://reviews.llvm.org/D91046.
2020-11-12 22:24:57 -08:00
Akira Hatanaka
66709a337d [ObjC][ARC] Clear the lists of basic blocks and instructions before
continuing the loop

This fixes a bug introduced in c6f1713c46e61bbb8ece9ac5ac329d02e7f93228.
2020-11-12 22:20:02 -08:00
Lang Hames
bf08525938 [ORC] Make WrapperFunctionResult::zeroInit static 2020-11-13 17:15:13 +11:00
Lang Hames
67dd2f03a9 [ORC] Remove designated initializer. 2020-11-13 17:12:33 +11:00
Lang Hames
7103f74446 [ORC] Break up OrcJIT library, add Orc-RPC based remote TargetProcessControl
implementation.

This patch aims to improve support for out-of-process JITing using OrcV2. It
introduces two new class templates, OrcRPCTargetProcessControlBase and
OrcRPCTPCServer, which together implement the TargetProcessControl API by
forwarding operations to an execution process via an Orc-RPC Endpoint. These
utilities are used to implement out-of-process JITing from llvm-jitlink to
a new llvm-jitlink-executor tool.

This patch also breaks the OrcJIT library into three parts:
  -- OrcTargetProcess: Contains code needed by the JIT execution process.
  -- OrcShared: Contains code needed by the JIT execution and compiler
     processes
  -- OrcJIT: Everything else.

This break-up allows JIT executor processes to link against OrcTargetProcess
and OrcShared only, without having to link in all of OrcJIT. Clients executing
JIT'd code in-process should start linking against OrcTargetProcess as well as
OrcJIT.

In the near future these changes will enable:
  -- Removal of the OrcRemoteTargetClient/OrcRemoteTargetServer class templates
     which provided similar functionality in OrcV1.
  -- Restoration of Chapter 5 of the Building-A-JIT tutorial series, which will
     serve as a simple usage example for these APIs.
  -- Implementation of lazy, cross-target compilation in lli's -jit-kind=orc-lazy
     mode.
2020-11-13 17:05:13 +11:00
Jameson Nash
be6333792e [AsmPrinter] fix -disable-debug-info option
This option was in a rather convoluted place, causing global parameters
to be set in awkward and undesirable ways to try to account for it
indirectly. Add tests for the -disable-debug-info option and ensure we
don't print unintended markers from unintended places.

Reviewed By: dstenb

Differential Revision: https://reviews.llvm.org/D91083
2020-11-13 00:58:09 -05:00
Craig Topper
c2ee7a175e [X86] Use EVT::getIntegerVT instead of MVT::getIntegerVT where the type can be i2 or i4.
This was a mistake introduced in D91294. I'm not sure how to
exercise this with the existing code, but I hit it while trying
some follow up experiments.
2020-11-12 21:48:45 -08:00
Craig Topper
da8115ff1d [X86] When storing v1i1/v2i1/v4i1 to memory, make sure we store zeros in the rest of the byte
We can't store garbage in the unused bits. It possible that something like zextload from i1/i2/i4 is created to read the memory. Those zextloads would be legalized assuming the extra bits are 0.

I'm not sure that the code in lowerStore is executed for the v1i1/v2i1/v4i1 case. It looks like the DAG combine in combineStore may have converted them to v8i1 first. And I think we're missing some cases to avoid going to the stack in the first place. But I don't have time to investigate those things at the moment so I wanted to focus on the correctness issue.

Should fix PR48147.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D91294
2020-11-12 21:28:18 -08:00
Max Kazantsev
e31ac8ae3f [IndVars] Replace checks with invariants if we cannot remove them
If we cannot prove that the check is trivially true, but can prove that it either
fails on the 1st iteration or never fails, we can replace it with first iteration check.

Differential Revision: https://reviews.llvm.org/D88527
Reviewed By: skatkov
2020-11-13 12:23:12 +07:00
Philip Reames
39ff0675e5 [Tests][LoopVect] Exercise basic uniform memory operand logic 2020-11-12 20:34:31 -08:00
Sanjay Patel
b6044b4d1a [InstCombine] fold sub of low-bit masked value from offset of same value
There might be some demanded/known bits way to generalize this,
but I'm not seeing it right now.

This came up as a regression when I was looking at a different
demanded bits improvement.

https://rise4fun.com/Alive/5fl

  Name: general
  Pre: ((-1 << countTrailingZeros(C1)) & C2) == 0
  %a1 = add i8 %x, C1
  %a2 = and i8 %x, C2
  %r = sub i8 %a1, %a2
  =>
  %r = and i8 %a1, ~C2

  Name: test 1
  %a1 = add i8 %x, 192
  %a2 = and i8 %x, 10
  %r = sub i8 %a1, %a2
  =>
  %r = and i8 %a1, -11

  Name: test 2
  %a1 = add i8 %x, -108
  %a2 = and i8 %x, 3
  %r = sub i8 %a1, %a2
  =>
  %r = and i8 %a1, -4
2020-11-12 20:10:28 -05:00
Sanjay Patel
4247cea23b [InstCombine] add tests for sub with masked bits; NFC 2020-11-12 20:10:28 -05:00
Stanislav Mekhanoshin
4dbdbbe753 [AMDGPU] Remove scratch rsrc from spill pseudos
Differential Revision: https://reviews.llvm.org/D91110
2020-11-12 15:23:37 -08:00
Nico Weber
0407c54a3f [gn build] (manually) port 410626c9b56 2020-11-12 18:21:22 -05:00
Jessica Paquette
2e5d95bf74 [AArch64][GlobalISel] Select CSINC and CSINV for G_SELECT with constants
Select the following:

- G_SELECT cc, 0, 1 -> CSINC zreg, zreg, cc
- G_SELECT cc 0, -1 -> CSINV zreg, zreg cc
- G_SELECT cc, 1, f -> CSINC f, zreg, inv_cc
- G_SELECT cc, -1, f -> CSINV f, zreg, inv_cc
- G_SELECT cc, t, 1 -> CSINC t, zreg, cc
- G_SELECT cc, t, -1 -> CSINC t, zreg, cc

(IR example: https://godbolt.org/z/YfPna9)

These correspond to a bunch of the AArch64csel patterns in AArch64InstrInfo.td.

Unfortunately, it doesn't seem like we can import patterns that use NZCV like
those ones do. E.g.

```
def : Pat<(AArch64csel GPR32:$tval, (i32 1), (i32 imm:$cc), NZCV),
          (CSINCWr GPR32:$tval, WZR, (i32 imm:$cc))>;
```

So we have to manually select these for now.

This replaces `selectSelectOpc` with an `emitSelect` function, which performs
these optimizations.

Differential Revision: https://reviews.llvm.org/D90701
2020-11-12 14:44:01 -08:00
Kazushi (Jam) Marukawa
aa1acddbb3 [VE] Support vld intrinsics
Add intrinsics for vector load instructions.  Add a regression test also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91332
2020-11-13 07:34:42 +09:00
Sanjay Patel
042bdf9de4 [LoopVectorize] regenerate test checks; NFC 2020-11-12 17:15:46 -05:00
Sanjay Patel
ad2592a1e1 [PhaseOrdering] regenerate test checks; NFC 2020-11-12 17:02:14 -05:00
Sanjay Patel
f7ba7a948a [InstCombine] add tests for low-mask-of-add; NFC 2020-11-12 17:02:14 -05:00
Stanislav Mekhanoshin
f12ec97f64 [AMDGPU] Enable multi-dword flat scratch load/stores
Differential Revision: https://reviews.llvm.org/D91384
2020-11-12 13:38:56 -08:00
Florian Hahn
f7e32458e4 [PatternMatch] Add single index InsertValue matcher.
This patch adds a new matcher for single index InsertValue instructions,
similar to the existing matcher for ExtractValue.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D91352
2020-11-12 21:27:18 +00:00
Jay Foad
7dc590a5ce [AMDGPU] Fix scheduling of exp pos4
Also fix a similar issue in SIInsertWaitcnts, but I don't think that fix
has any effect in practice.

Differential Revision: https://reviews.llvm.org/D91290
2020-11-12 19:57:14 +00:00
Jay Foad
d376fdebe3 [AMDGPU] Define and use names for export targets. NFC.
Differential Revision: https://reviews.llvm.org/D91289
2020-11-12 19:57:14 +00:00
Jianzhou Zhao
afc82f473d [msan] Break the getShadow loop after matching an argument
Reviewed-by: eugenis

Differential Revision: https://reviews.llvm.org/D91320
2020-11-12 19:48:59 +00:00
Nikita Popov
86a2a999fb [BasicAA] Remove checks for GEP decomposition limit reached
The GEP aliasing code currently checks for the GEP decomposition
limit being reached (i.e., we did not reach the "final" underlying
object). As far as I can see, these checks are not necessary. It is
perfectly fine to work with a GEP whose base can still be further
decomposed.

Looking back through the commit history, these checks were originally
introduced in 1a444489e9d90915cfdda0720489893896ef1503. However, I
believe that the problem this was intended to address was later
properly fixed with 1726fc698ccb85fe4bb23c200a50f28b57fc53cb, and
the checks are no longer necessary since then (and were not the
right fix in the first place).

Differential Revision: https://reviews.llvm.org/D91010
2020-11-12 20:43:38 +01:00
Nico Weber
d3ab6c543e Revert "[gn build] (semi-manually) port 173b51169b8"
This reverts commit 37a1336de722c6920a24e8cd4278e396402f1b2a.
173b51169b8 was reverted in 777ca48.
2020-11-12 13:54:24 -05:00
Craig Topper
fbc8fa8586 [MSP430] Remove unused MVT::Glue output from MSP430ISD::SELECT_CC nodes.
Follow up from a similar patch on RISCV 637f19c36b323cc3ab597f6ef138db53be395949

Nothing reads this Glue value that I could see. The SDNode def in
the td file does not have the SDNPOutGlue flag so I don't think
this glue would get properly propagated to MachineSDNodes if it
was used.
2020-11-12 10:34:01 -08:00
Sanjay Patel
376553e355 [InstCombine] add tests for mask of sext-in-reg; NFC 2020-11-12 12:42:54 -05:00
Jamie Schmeiser
b7526c6b0c Reland: Introduce -dot-cfg-mssa option which creates dot-cfg style file with mssa comments included in source
Summary:
Expand the print-memoryssa and print<memoryssa> passes with a new hidden
option -cfg-dot-mssa that names a file. When set, a dot-cfg style file
will be generated into the named file with the memoryssa comments retained
and those blocks containing them shown in light pink. The option does
nothing in isolation.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>

Reviewed By: asbirlea (Alina Sbirlea), dblaikie (David Blaikie)

Differential Revision: https://reviews.llvm.org/D90638
2020-11-12 17:39:14 +00:00
Nico Weber
8157d3d3d3 [gn build] (semi-manually) port 173b51169b8 2020-11-12 12:18:27 -05:00
Alexander Kornienko
b5fddb4860 Fix unused variable warning in release builds 2020-11-12 18:14:06 +01:00
Simon Pilgrim
e904d12cba [ValueTracking] Update computeKnownBitsFromShiftOperator callbacks to take KnownBits shift amount. NFCI.
We were creating this internally, but will need to support general KnownBits amounts as part of D90479.
2020-11-12 16:56:55 +00:00
Simon Pilgrim
b22745774c [KnownBits] Add KnownBits::makeConstant helper. NFCI.
Helper for cases where we need to create a KnownBits from a (fully known) constant value.
2020-11-12 16:16:04 +00:00
Anh Tuyen Tran
27b1315bd4 Revert "Introduce -dot-cfg-mssa option which creates dot-cfg style file with mssa comments included in source"
This reverts commit 45d459e7522ddc512ac70c4c822d58d335099672 due to
build issue in Poly.
2020-11-12 15:48:14 +00:00
Craig Topper
03edfee10d [RISCV] Don't include CodeGen layer files in MC layer
-Use MCRegister instead of Register in MC layer.
-Move some enums from RISCVInstrInfo.h to RISCVBaseInfo.h to be with other TSFlags bits.

Differential Revision: https://reviews.llvm.org/D91114
2020-11-12 07:45:38 -08:00
Jamie Schmeiser
73817f396c Introduce -dot-cfg-mssa option which creates dot-cfg style file with mssa comments included in source
Summary:
Expand the print-memoryssa and print<memoryssa> passes with a new hidden
option -cfg-dot-mssa that names a file. When set, a dot-cfg style file
will be generated into the named file with the memoryssa comments retained
and those blocks containing them shown in light pink. The option does
nothing in isolation.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>

Reviewed By: asbirlea (Alina Sbirlea), dblaikie (David Blaikie)

Differential Revision: https://reviews.llvm.org/D90638
2020-11-12 15:41:16 +00:00
Craig Topper
5ab383a3c0 [RISCV] Add an ANDI to shift amount of FSL/FSR instructions
The fshl and fshr intrinsics are defined to modulo their shift amount by the bitwidth of one of their inputs. The FSR/FSL instructions read one extra bit from the shift amount. If that bit is set the inputs are swapped. In order to preserve the semantics of the llvm intrinsics we need to make sure that the extra bit isn't set. DAG combine or instcombine may have removed any mask that was originally present.

We could be smarter here and try to use computeKnownBits to check if the bit is known zero, but wanted to start with correctness.

Differential Revision: https://reviews.llvm.org/D90905
2020-11-12 07:33:40 -08:00