1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
Commit Graph

202158 Commits

Author SHA1 Message Date
Gui Andrade
1649380df8 [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB
This allows us to add addtional instrumentation before the function start,
without splitting the first BB.

Differential Revision: https://reviews.llvm.org/D85985
2020-08-14 21:43:56 +00:00
Gui Andrade
0ffeee4172 [MSAN] Reintroduce libatomic load/store instrumentation
Have the front-end use the `nounwind` attribute on atomic libcalls.
This prevents us from seeing `invoke __atomic_load` in MSAN, which
is problematic as it has no successor for instrumentation to be added.
2020-08-14 20:31:10 +00:00
Xiangling Liao
fb1619e11a [AIX] Generate unique module id based on Pid and timestamp
A unique module id, which is a part of sinit and sterm function names, is
necessary to be unique. However, `getUniqueModuleId` will fail if there is
no strong external symbol within a module. We turn to use Pid and timestamp
when this happens.

Differential Revision: https://reviews.llvm.org/D85527
2020-08-14 16:22:50 -04:00
Sanjay Patel
ff3baf33c0 [x86] add tests for store merging (PR46662); NFC 2020-08-14 16:19:44 -04:00
Vitaly Buka
320ac778a0 [StackSafety] Use ValueInfo in ParamAccess::Call
This avoid GUID lookup in Index.findSummaryInModule.
Follow up for D81242.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D85269
2020-08-14 12:42:44 -07:00
Greg McGary
f5a6a11410 [MachO] Add skeletal support for DriverKit platform
Define the platform ID = 10, and simple mappings between platform ID & name.

Reviewed By: MaskRay, cishida

Differential Revision: https://reviews.llvm.org/D85594
2020-08-14 12:36:43 -07:00
Sameer Arora
50c525de69 [llvm-libtool-darwin] Add support for -l and -L
Add support for passing in libraries via `-l` and `-L` options to
`llvm-libtool-darwin`.

Reviewed by jhenderson, smeenai

Differential Revision: https://reviews.llvm.org/D85540
2020-08-14 11:44:17 -07:00
Stephen Neuendorffer
1e6f44130d [examples][cmake] build fix for examples with BUILD_SHARED_LIBS=on
Differential Revision: https://reviews.llvm.org/D85987
2020-08-14 11:39:04 -07:00
Sameer Arora
6bd4cdd3c7 [llvm-libtool-darwin] Support universal outputs
Add support for producing universal binaries containing archives when
`llvm-libtool-darwin` is given inputs of multiple architectures.

Reviewed by jhenderson, smeenai

Differential Revision: https://reviews.llvm.org/D85334
2020-08-14 11:32:07 -07:00
Haowei Wu
b3b202c31b Remove unnecessary HEADER_DIRS in lib/InterfaceStub/CMakeLists.txt
This change removes unnecessary HEADER_DIRS from //llvm/lib/
InterfaceStub/CMakeLists.txt file.

Differential Revision: https://reviews.llvm.org/D85936
2020-08-14 11:22:50 -07:00
Matt Arsenault
2348cd927a TableGen/GlobalISel: Partially handle immAllOnesV/immAllZerosV
These should really match either G_BUILD_VECTOR or
G_BUILD_VECTOR_TRUNC, but there doesn't seem to be an existing
mechanism for matching alternative opcodes. There is GIM_SwitchOpcode,
but it seems to assume it's oly only used for matcher optimization.

I could also omit any opcode check and rely on the matcher directly
checking the opcode, but the table optimizer currently assumes there
has to be an opcode check.

Also doesn't try to handle undef elements like the DAG version.
2020-08-14 13:55:30 -04:00
Simon Pilgrim
8fce8173a0 [X86][SSE] Fold HOP(SHUFFLE(X),SHUFFLE(Y)) --> SHUFFLE(HOP(X,Y))
This is beginning to look like a canonicalization stage that could be performed as part of shuffle combining

Another step towards PR41813

Recommit of rG9bd97d036398 with fixed offset adjustments
2020-08-14 18:43:19 +01:00
Matt Arsenault
895bb86d57 AMDGPU/GlobalISel: Match andn2/orn2 for more types
Unfortunately this ends up not working as expected on targets with
16-bit operations due to AMDGPUCodeGenPrepare's promotion of uniform
16-bit ops to i32.

The vector case annoyingly requires switching the checked opcode,
since constants for vectors aren't directly handled.

I also need to think more carefully about whether this is valid for i1.
2020-08-14 13:18:03 -04:00
Stefan Gränitz
4cb29fd0d3 [ORC] Build LLJITWithChildProcess example only on UNIX host systems
Differential Revision: https://reviews.llvm.org/D85919
2020-08-14 18:09:08 +02:00
Jordan Rupprecht
7e19615ec1 [NFC] Silence variables unused in release builds 2020-08-14 08:35:58 -07:00
Denis Antrushin
49b86de62c [Statepoints] FixupStatepoint: properly set isKill on spilled register.
When spilling statepoint meta arg register it is incorrect to blindly
mark it as killed - it may be used in non-meta args (e.g., as call
parameter).
2020-08-14 22:19:20 +07:00
Matt Morehouse
9fdad1bbaa Revert "[NFC][StackSafety] Move out sort from the loop"
This reverts commit 0426e28419799c35cf52fe3d773c5bab9928c699 due to ASan
buildbot failure.
2020-08-14 08:17:35 -07:00
Ben Shi
87d6f3ba98 [ARM][test] Add more tests of two-part immediates
The ARM backend breaks some specific immediates to two parts
in binary operations. And this patch adds more tests
for that.

Reviewed By: samparker

Differential Revision: https://reviews.llvm.org/D84100
2020-08-14 23:11:01 +08:00
Simon Pilgrim
f217ed1b90 [DemandedBits] Add addition test case from D72423 2020-08-14 15:59:53 +01:00
Johannes Doerfert
c2b9d77c04 [OpenMP][OMPIRBuilder] Use the source (=directory + filename) for locations
Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D85938
2020-08-14 08:59:25 -05:00
Bjorn Pettersson
2da0c11e30 [Orc] Fix werror for unused variable in noasserts build 2020-08-14 15:58:04 +02:00
Denis Antrushin
3ad7648361 [Statepoints] Spill GC Ptr regs in FixupStatepoints.
Extend FixupStatepointCallerSaved pass with ability to spill
statepoint GC pointer arguments (optionally allowing them on CSRs).
Special handling is required for invoke statepoints, because at MI
level single landing pad may be shared by multiple statepoints, so
we must ensure we spill landing pad's live-ins into the same stack
slots.

Full statepoint refactoring change set is available at D81603.

Reviewed By: skatkov

Differential Revision: https://reviews.llvm.org/D81647
2020-08-14 20:21:19 +07:00
Kazushi (Jam) Marukawa
d533e61824 [VE] Remove obsolete I8/I16 register classes
Remove I8/I16 register classes which are prepared to implement previously
to implement VE ABI.  However, it is possible to implement VE ABI correctly
without them.  Therefore, removing them now.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D85905
2020-08-14 21:52:22 +09:00
Shinji Okumura
68975068ea [Attributor] Implement AAPotentialValues
This patch provides an implementation of `AAPotentialValues`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85632
2020-08-14 20:51:14 +09:00
Vitaly Buka
9ad15cd174 [NFC][StackSafety] Change map key comparison 2020-08-14 04:23:15 -07:00
Vitaly Buka
aecc9e0fb0 [NFC][StackSafety] Move out sort from the loop 2020-08-14 04:19:10 -07:00
Stefan Gränitz
dbb4ff9754 [ORC] Fix missing include in OrcRemoteTargetClient.h 2020-08-14 12:00:18 +02:00
Stefan Gränitz
0de7dcb92e [ORC][NFC] Fix a header comment 2020-08-14 11:46:03 +02:00
Stefan Gränitz
cc0c266c03 [ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit
This loop caused me a little headache once, because I didn't see the assigned variable is a member. The refactored version appears more readable to me.

Differential Revision: https://reviews.llvm.org/D85922
2020-08-14 11:34:44 +02:00
Stefan Gränitz
e03618a9ec [ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer
This is analog to how LLJIT provides public access to all its layers.

Differential Revision: https://reviews.llvm.org/D85921
2020-08-14 11:34:44 +02:00
Stefan Gränitz
92757f17c9 [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example
This adds RemoteJITLinkMemoryManager is a new subclass of OrcRemoteTargetClient. It implements jitlink::JITLinkMemoryManager and targets the OrcRemoteTargetRPCAPI.

Behavior should be very similar to RemoteRTDyldMemoryManager. The essential differnce with JITLink is that allocations work in isolation from its memory manager. Thus, the RemoteJITLinkMemoryManager might be seen as "JITLink allocation factory".

RPCMMAlloc is another subclass of OrcRemoteTargetClient and implements the actual functionality. It allocates working memory on the host and target memory on the remote target. Upon finalization working memory is copied over to the tagrte address space. Finalization can be asynchronous for JITLink allocations, but I don't see that it makes a difference here.

Differential Revision: https://reviews.llvm.org/D85919
2020-08-14 11:34:44 +02:00
Sam Parker
4a9fe86f11 [NFC][ARM] Port MaybeCall into ARMTTImpl method
Renamed to maybeLoweredToCall.
2020-08-14 10:23:20 +01:00
Kirill Bobyrev
02ab382706 [clangd] Clarify comments regarding gRPC linking 2020-08-14 11:02:03 +02:00
Aleksandr Platonov
8560a21c97 [clangd] Fix find_program() result check when searching for gRPC
`find_program(<VAR> ...)` sets <VAR> to <VAR>-NOTFOUND if nothing was found.
So we need to compare <VAR> with "<VAR>-NOTFOUND" or just use `if([NOT] <VAR>)`, because `if(<VAR>)` is false if `<VAR>` ends in the suffix -NOTFOUND.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D85958
2020-08-14 11:33:41 +03:00
Kirill Bobyrev
59c2b05fdc [clangd] Warn developers when trying to link system-installed gRPC statically
Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D85815
2020-08-14 10:22:10 +02:00
Vitaly Buka
f936ac90a2 [NFC][StackSafety] Dedup callees 2020-08-14 01:14:52 -07:00
LLVM GN Syncbot
54b9b270ec [gn build] Port 2e4a20fd706 2020-08-14 07:42:49 +00:00
Sebastian Neubauer
48229dd1c2 [AMDGPU] Enable .rodata for amdpal os
PAL recently got support for multiple ELF sections and relocations,
therefore we can now use .rodata sections instead of forcing constants
into .text.

Differential Revision: https://reviews.llvm.org/D85895
2020-08-14 09:05:48 +02:00
David Sherwood
6c42bb3937 [SVE] Fix bug in SVEIntrinsicOpts::optimizePTest
The code wasn't taking into account that the two operands
passed to ptest could be identical and was trying to erase
them twice.

Differential Revision: https://reviews.llvm.org/D85892
2020-08-14 07:57:21 +01:00
Sam Parker
4451edd54d [NFCI][SimpleLoopUnswitch] Adjust CostKind query
When getUserCost was transitioned to use an explicit CostKind,
TCK_CodeSize was used even though the original kind was implicitly
SizeAndLatency so restore this behaviour. We now only query for
CodeSize when optimising for minsize.

I expect this to not change anything as, I think all, targets will
currently return the same value for CodeSize and SizeLatency. Indeed
I see no changes in the test suite for Arm, AArch64 and X86.

Differential Revision: https://reviews.llvm.org/D85829
2020-08-14 07:54:20 +01:00
Igor Kudrin
85a0582465 [DebugInfo] Avoid an infinite loop with a truncated pre-v5 .debug_str_offsets.dwo.
dumpStringOffsetsSection() expects the size of a contribution to be
correctly aligned. The patch adds the corresponding verifications for
pre-v5 cases.

Differential Revision: https://reviews.llvm.org/D85739
2020-08-14 13:11:37 +07:00
Arthur Eubanks
78fc92b4f6 Revert "[SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)"
This reverts commit ab9fc8bae805c785066779e76e7846aabad5609e.

Incorrect transformation if the result is used.
Causes breakages, e.g.
http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-x86_64-O3/8193/
2020-08-13 21:05:03 -07:00
Thomas Lively
b9bb96a9cb [WebAssembly] Add missing lit.local.cfg 2020-08-13 16:33:52 -07:00
Peter Collingbourne
f94f2b195d hwasan: Emit the globals note even when globals are uninstrumented.
This lets us support the scenario where a binary is linked from a mix
of object files with both instrumented and non-instrumented globals.
This is likely to occur on Android where the decision of whether to use
instrumented globals is based on the API level, which is user-facing.

Previously, in this scenario, it was possible for the comdat from
one of the object files with non-instrumented globals to be selected,
and since this comdat did not contain the note it would mean that the
note would be missing in the linked binary and the globals' shadow
memory would be left uninitialized, leading to a tag mismatch failure
at runtime when accessing one of the instrumented globals.

It is harmless to include the note when targeting a runtime that does
not support instrumenting globals because it will just be ignored.

Differential Revision: https://reviews.llvm.org/D85871
2020-08-13 16:33:22 -07:00
Yuanfang Chen
105eeb4e46 [NewPM][CodeGen] Add machine code verification callback
D83608 need this.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D85916
2020-08-13 16:13:01 -07:00
Ben Dunbobbin
f7bff6ec55 [X86][ELF] Prefer lowering MC_GlobalAddress operands to .Lfoo$local for STV_DEFAULT only
This patch restricts the behaviour of referencing via .Lfoo$local
local aliases, introduced in https://reviews.llvm.org/D73230, to
STV_DEFAULT globals only.

Hidden symbols via --fvisiblity=hidden (https://gcc.gnu.org/wiki/Visibility)
is an important scenario.

Benefits:

- Improves the size of object files by using fewer STT_SECTION symbols.

- The code reads a bit better (it was not obvious to me without going
  back to the code reviews why the canBenefitFromLocalAlias function
  currently doesn't consider visibility).

- There is also a side benefit in restoring the effectiveness of the
  --wrap linker option and making the behavior of --wrap consistent
  between LTO and normal builds for references within a translation-unit.
  Note: this --wrap behavior (which is specific to LLD) should not be
  considered reliable. See comments on https://reviews.llvm.org/D73230
  for more.

Differential Revision: https://reviews.llvm.org/D85782
2020-08-14 00:09:15 +01:00
Arthur Eubanks
36bc68f568 [ConstProp] Handle insertelement constants
Previously ConstantFoldExtractElementInstruction() would only work with
insertelement instructions, not contants. This properly handles
insertelement constants as well.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85865
2020-08-13 15:59:17 -07:00
Dávid Bolvanský
61b7d170a5 [SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)
Solves 46489
2020-08-14 00:05:55 +02:00
David Green
d490f7b9d4 Revert "[ARM] Fix IT block generation after Thumb2SizeReduce with -Oz"
This reverts commit 18279a54b5d3382874924d6a3c7775b7e22598dc as it is
causing some chromium android test problems.
2020-08-13 22:40:36 +01:00
Austin Kerbow
fce2dc7bf9 [AMDGPU] Fix FP/BP spills when MUBUF constant offset exceeded
If we need a scratch register for the spill don't use the same scratch
register that is being used for the MBUF offset.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D85772
2020-08-13 14:12:00 -07:00