1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Commit Graph

173960 Commits

Author SHA1 Message Date
Craig Topper
83ae9bd056 [X86] Change avx512-gather-scatter-intrin.ll to use x86_64-unknown-unknown instead of x86_64-apple-darwin. NFC
Will help with an upcoming patch.

llvm-svn: 351521
2019-01-18 06:06:01 +00:00
Max Kazantsev
a525eb8670 Re-enable terminator folding in LoopSimplifyCFG: underlying bugs fixed
llvm-svn: 351520
2019-01-18 04:57:32 +00:00
Nico Weber
667cf61859 gn build: unbreak mac (and maybe win) after r351258, r351277
The check-hwasan build files assert that current_os == "linux" || current_os ==
"android", so pull it in only there.

ar is unused on mac, so don't set it in the stage2 toolchain. (It'd be nicer to
use llvm-libtool on mac instead of host libtool, but llvm-libtool doesn't seem
to understand the -no_warning_for_no_symbols flag.)

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

llvm-svn: 351519
2019-01-18 04:09:30 +00:00
Xing GUO
6f2e108ee1 [DOCS] it it => it
Summary: it it => it for LLVM Language Reference Manual

Reviewers: aaron.ballman, Higuoxing, liangdzou

Reviewed By: aaron.ballman, Higuoxing, liangdzou

Subscribers: Higuoxing, llvm-commits

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

llvm-svn: 351517
2019-01-18 03:56:37 +00:00
Nico Weber
0c94c23e35 gn build: Merge r351499
llvm-svn: 351516
2019-01-18 03:38:53 +00:00
Nico Weber
9264894fc9 mac: Correctly disable tools/lto tests when building with LLVM_ENABLE_PIC=OFF
llvm/tools sets LLVM_TOOL_LTO_BUILD to Off if LLVM_ENABLE_PIC=OFF, but that's
not visible in llvm/test.

r289662 added the llvm_tool_lto_build lit parameter, there the intent was to
use it with an explicit -DLLVM_TOOL_LTO_BUILD=OFF, which is visible globally.
On the review for that (D27739), a mild preference was expressed for using a
lit parameter over checking the existence of libLTO.dylib. Since that works
with the LLVM_ENABLE_PIC=OFF case too and since it matches what we do for the
gold plugin, switch to that approach.

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

llvm-svn: 351515
2019-01-18 03:36:04 +00:00
Thomas Lively
fa5fce0016 [WebAssembly] Add languages from debug info to producers section
Reviewers: aheejin, dschuff, sbc100

Subscribers: aprantl, jgravelle-google, hiraditya, sunfish

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

llvm-svn: 351507
2019-01-18 02:47:48 +00:00
Matt Arsenault
b652401abe AMDGPU: Convert tests away from llvm.SI.load.const
llvm-svn: 351494
2019-01-17 22:47:26 +00:00
Erik Pilkington
d472f3251b Address Ried's post-commit review comment on r351477.
llvm-svn: 351493
2019-01-17 22:39:31 +00:00
Vedant Kumar
0bb21ca263 [HotColdSplit] Allow outlining with live outputs
Prior to r348205, extracting code regions with live output values was
disabled because of a miscompilation (PR39433). Lift the restriction as
PR39433 has been addressed.

Tested on LNT+externals, on a run of check-llvm in a stage2 build, and
with a full build of iOS (with hot/cold splitting enabled).

As a drive-by, remove an errant TODO.

llvm-svn: 351492
2019-01-17 22:36:05 +00:00
Vedant Kumar
47f2b63f8c [HotColdSplit] Consider resume instructions to be cold
Resuming exception unwinding is roughly as unlikely as throwing an
exception.

Tested on LNT+externals (in particular, the C++ EH regression tests
provide end-to-end test coverage), as well as with a full build of iOS.

llvm-svn: 351491
2019-01-17 22:35:47 +00:00
Vladimir Stefanovic
e467c341aa [mips] Emit .reloc R_{MICRO}MIPS_JALR along with j(al)r(c) $25
The callee address is added as an optional operand (MCSymbol) in
AdjustInstrPostInstrSelection() and then used by asm printer to insert:
'.reloc tmplabel, R_MIPS_JALR, symbol
tmplabel:'.
Controlled with '-mips-jalr-reloc', default is true.

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

llvm-svn: 351485
2019-01-17 21:50:37 +00:00
Vedant Kumar
da5a9507e7 [HotColdSplit] Relax requirement that the cold sink block be extractable
Relaxing this requirement creates opportunities to split code dominated
by an EH pad.

Tested on LNT+externals.

llvm-svn: 351483
2019-01-17 21:42:36 +00:00
Erik Pilkington
6439489b4b [demangler] Support for block literals.
llvm-svn: 351482
2019-01-17 21:37:51 +00:00
Erik Pilkington
640017f2fc [demangler] Ignore leading underscores if present
On MacOS, symbols start with a leading underscore, so just parse and
ignore it if present.

llvm-svn: 351481
2019-01-17 21:37:36 +00:00
Vedant Kumar
dbf49926e4 [HotColdSplit] Simplify tests by lowering their splitting thresholds
This gets rid of the brittle/mysterious calls to @sink()/@sideeffect()
peppered throughout the test cases. They are no longer needed to force
splitting to occur.

llvm-svn: 351480
2019-01-17 21:29:34 +00:00
Erik Pilkington
35d624dbe5 Fix an MSVC bot failure from r351474.
llvm-svn: 351477
2019-01-17 20:52:10 +00:00
Wei Mi
294d0e5707 [SampleFDO] Skip profile reading when flattened profile used in ThinLTO postlink
If the sample profile has no inlining hierachy information included, we call
the sample profile is flattened. For flattened profile, in ThinLTO postlink
phase, SampleProfileLoader's hot function inlining and profile annotation will
do nothing, so it is better to save the effort to read in the profile and run
the sample profile loader pass. It is helpful for reducing compile time when
the flattened profile is huge.

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

llvm-svn: 351476
2019-01-17 20:48:34 +00:00
Reid Kleckner
b228dab57e [InstCombine] Don't sink dynamic allocas
Summary:
InstCombine's sinking algorithm only thinks about memory. It doesn't
think about non-memory constraints like stack object lifetime. It can
sink dynamic allocas across a stacksave call, which may be used with
stackrestore, which can incorrectly reduce the lifetime of the dynamic
alloca.

Fixes PR40365

Reviewers: hfinkel, efriedma

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 351475
2019-01-17 20:46:53 +00:00
Erik Pilkington
bb4d660781 NFC: Make the copies of the demangler byte-for-byte identical
With this patch, the copies of the files ItaniumDemangle.h,
StringView.h, and Utility.h are kept byte-for-byte in sync between
libcxxabi and llvm. All differences (namespaces, fallthrough, and
unreachable macros) are defined in each copies' DemanglerConfig.h.

This patch also adds a script to copy changes from libcxxabi
(cp-to-llvm.sh), and a README.txt explaining the situation.

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

llvm-svn: 351474
2019-01-17 20:37:51 +00:00
Sanjin Sijaric
19c7db09aa Fix the buildbot failure introduced by r351404
EXPENSIVE_CHECKS buildbots are failing due to r351404.

Add x1 as live in to the funclet basic block for SEH funclets, as well as
-verify-machineinstrs to the test case that triggered the failure.

llvm-svn: 351472
2019-01-17 20:24:14 +00:00
Nico Weber
a32a50a832 llvm build: Merge r351448
llvm-svn: 351469
2019-01-17 20:20:56 +00:00
Wouter van Oortmerssen
ada3982d76 [WebAssembly] Fixing 2 more symbol offset related tests.
llvm-svn: 351465
2019-01-17 19:18:05 +00:00
Jonas Devlieghere
e6b50eff1a [Test] Fix debug-loc-0.mir with EXPENSIVE_CHECKS
The `llc` invocation was missing `-start-before=machine-cp`.

llvm-svn: 351464
2019-01-17 18:35:14 +00:00
Wouter van Oortmerssen
9741215258 [WebAssembly] Fixed objdump not parsing function headers.
Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting target
specific code in objdump, MCDisassembler::onSymbolStart was added to
be implemented by the WebAssembly implemention.

WasmObjectFile now returns a code offset for the "address" of a symbol,
rather than the index. This is also more in-line with what other
targets do.

Also ensured that the AsmParser correctly puts each function
in its own segment to enable this test case.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

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

llvm-svn: 351460
2019-01-17 18:14:09 +00:00
Rui Ueyama
e4b1fe66e6 Add a missing dependency to fix build.
llvm-svn: 351458
2019-01-17 17:55:47 +00:00
Teresa Johnson
e8cb930dbb Revert "[ThinLTO] Add summary entries for index-based WPD"
Mistaken commit of something still under review!

This reverts commit r351453.

llvm-svn: 351455
2019-01-17 16:05:04 +00:00
Teresa Johnson
e47bb6d8cf Add -dump-input=always to cfi-devirt test to debug flake
To help diagnose flaky bot failures in PR40351.

llvm-svn: 351454
2019-01-17 15:49:04 +00:00
Teresa Johnson
5b4ceacd72 [ThinLTO] Add summary entries for index-based WPD
Summary:
If LTOUnit splitting is disabled, the module summary analysis computes
the summary information necessary to perform single implementation
devirtualization during the thin link with the index and no IR. The
information collected from the regular LTO IR in the current hybrid WPD
algorithm is summarized, including:
1) For vtable definitions, record the function pointers and their offset
within the vtable initializer (subsumes the information collected from
IR by tryFindVirtualCallTargets).
2) A record for each type metadata summarizing the vtable definitions
decorated with that metadata (subsumes the TypeIdentiferMap collected
from IR).

Also added are the necessary bitcode records, and the corresponding
assembly support.

The index-based WPD will be sent as a follow-on.

Depends on D53890.

Reviewers: pcc

Subscribers: mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits

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

llvm-svn: 351453
2019-01-17 15:49:03 +00:00
James Henderson
bd0abc721b [llvm-readobj][ELF]Add demangling support
This change adds demangling support to the ELF side of llvm-readobj,
under the switch --demangle/-C.

The following places are demangled: symbol table dumps (static and
dynamic), relocation dumps (static and dynamic), addrsig dumps, call
graph profile dumps, and group section signature symbols.

Although GNU readelf doesn't support demangling, it is still a useful
feature to have, and brings it on a par with llvm-objdump's
capabilities.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40054.

Reviewed by: grimar, rupprecht

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

llvm-svn: 351450
2019-01-17 15:34:12 +00:00
James Henderson
ccbf0e437b Move demangling function from llvm-objdump to Demangle library
This allows it to be used in an upcoming llvm-readobj change.

A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.

Reviewed by: grimar, erik.pilkington

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

llvm-svn: 351448
2019-01-17 15:18:44 +00:00
Hans Wennborg
c466a75471 build_llvm_package.bat: Run more tests
llvm-svn: 351436
2019-01-17 13:11:15 +00:00
Max Kazantsev
790a9e98ac [LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling
During the transforms in LoopSimplifyCFG, when we remove a dead exiting edge, the
parent loop may stop being reachable from the child loop, and therefore they become
siblings. If the former child loop had uses of some values from its former parent loop,
now such uses will require LCSSA Phis, even if they weren't needed before. So we must
form LCSSA for all loops that stopped being ancestors of the current loop in this case.

Differential Revision: https://reviews.llvm.org/D56144
Reviewed By: fedor.sergeev

llvm-svn: 351434
2019-01-17 12:51:10 +00:00
Max Kazantsev
09052af6c2 [LoopSimplifyCFG] Fix order of deletion of complex dead subloops
Function `DeleteDeadBlock` requires that all predecessors of a block
being deleted have already been deleted, with the exception of a
single-block loop. When we use it for removal of dead subloops that
contain more than one block, we may not fulfull this requirement and
fail an assertion.

This patch replaces invocation of `DeleteDeadBlock` with a generalized
version `DeleteDeadBlocks` that is able to deal with multiple dead blocks,
even if they contain some cycles.

Differential Revision: https://reviews.llvm.org/D56121
Reviewed By: fedor.sergeev

llvm-svn: 351433
2019-01-17 12:25:40 +00:00
Simon Pilgrim
f7ba65d569 [X86][SSE] Add PR40340 test case
llvm-svn: 351430
2019-01-17 11:20:23 +00:00
Simon Pilgrim
91155d4067 [X86] Add AVX512 test to insertps
Pre-commit for PR40340

llvm-svn: 351429
2019-01-17 11:11:15 +00:00
Matt Arsenault
416efa3eb6 GlobalISel: Add comment to clarify G_BUILD_VECTOR
llvm-svn: 351428
2019-01-17 10:50:07 +00:00
Matt Arsenault
afd1f8cb4f Allow FP types for atomicrmw xchg
llvm-svn: 351427
2019-01-17 10:49:01 +00:00
Benjamin Kramer
04b4351561 [MC] Remove unused variable
llvm-svn: 351426
2019-01-17 10:25:18 +00:00
Diana Picus
aa9082cd09 Fix capitalization. NFC
llvm-svn: 351425
2019-01-17 10:11:59 +00:00
Diana Picus
b99810417e [ARM GlobalISel] Allow calls to varargs functions
Allow varargs functions to be called, both in arm and thumb mode. This
boils down to choosing the correct calling convention, which we can
easily test by making sure arm_aapcscc is used instead of
arm_aapcs_vfpcc when the callee is variadic.

llvm-svn: 351424
2019-01-17 10:11:55 +00:00
Alex Bradbury
dcf62df83b [RISCV] Add codegen support for RV64A
In order to support codegen RV64A, this patch:
* Introduces masked atomics intrinsics for atomicrmw operations and cmpxchg
  that use the i64 type. These are ultimately lowered to masked operations
  using lr.w/sc.w, but we need to use these alternate intrinsics for RV64
  because i32 is not legal
* Modifies RISCVExpandPseudoInsts.cpp to handle PseudoAtomicLoadNand64 and
  PseudoCmpXchg64
* Modifies the AtomicExpandPass hooks in RISCVTargetLowering to sext/trunc as
  needed for RV64 and to select the i64 intrinsic IDs when necessary
* Adds appropriate patterns to RISCVInstrInfoA.td
* Updates test/CodeGen/RISCV/atomic-*.ll to show RV64A support

This ends up being a fairly mechanical change, as the logic for RV32A is
effectively reused.

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

llvm-svn: 351422
2019-01-17 10:04:39 +00:00
Sanjin Sijaric
fc413edf7f [ARM64][Windows] Share unwind codes between epilogues
There are cases where we have multiple epilogues that have the exact same unwind
code sequence.  In that case, the epilogues can share the same unwind codes in
the .xdata section.  This should get us past the assert "SEH unwind data
splitting not yet implemented" in many cases.

We still need to add support for generating multiple .pdata/.xdata sections for
those functions that need to be split into fragments.

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

llvm-svn: 351421
2019-01-17 09:45:17 +00:00
George Rimar
94ab87488c [llvm-objdump] - Fix comment. NFC.
Forgot to address this one.

llvm-svn: 351418
2019-01-17 09:14:33 +00:00
George Rimar
6b3ecc0c1d [llvm-objdump] - Simplify the getRelocationValueString. NFCI.
This refactors the getRelocationValueString method.
It is a bit overcomplicated and it is possible to reduce it without
losing the functionality it seems.

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

llvm-svn: 351417
2019-01-17 09:13:17 +00:00
Max Kazantsev
51a580322e [NFC] Factor out some local vars
llvm-svn: 351416
2019-01-17 06:20:42 +00:00
Thomas Lively
c66efefd0f [WebAssembly] Parse llvm.ident into producers section
llvm-svn: 351413
2019-01-17 02:29:55 +00:00
Vedant Kumar
f667646768 [MergeFunc] Prevent silent miscompile of vararg functions
The function merging pass miscompiles identical vararg functions. The
forwarding thunk it emits doesn't forward the full variable-length list
of arguments. Disable merging for vararg functions for now.

I've filed llvm.org/PR40345 to track the issue.

rdar://47326238

llvm-svn: 351411
2019-01-17 02:15:05 +00:00
Thomas Lively
27982aa1e1 Revert "[WebAssembly] Parse llvm.ident into producers section"
This reverts commit eccdbba3a02a33e13b5262e92200a33e2ead873d.

llvm-svn: 351410
2019-01-17 00:39:49 +00:00
Craig Topper
053e668d70 [X86] Remove GCCBuiltin from deprecated avx512 scatter intrinsics that use scalar integers for mask.
We will custom emit these builtins in clang using the new intrinsics that take a vXi1 mask.

llvm-svn: 351407
2019-01-17 00:34:04 +00:00