Commit Graph

320699 Commits

Author SHA1 Message Date
Shoaib Meenai 995798d2d5 [MachO] Add valid architecture function
Added array of valid architectures and function returning array.
Modified llvm-lipo to include list of valid architectures in error message for invalid arch.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 365099
2019-07-04 00:17:02 +00:00
Lang Hames f5a885fddd [JITLink][ORC] Add EHFrameRegistrar interface, use in EHFrameRegistrationPlugin.
Replaces direct calls to eh-frame registration with calls to methods on an
EHFrameRegistrar instance. This allows clients to substitute a registrar that
registers frames in a remote process via IPC/RPC.

llvm-svn: 365098
2019-07-04 00:05:12 +00:00
Reid Kleckner f7e52fbdb5 Revert [ThinLTO] Optimize writeonly globals out
This reverts r365040 (git commit 5cacb91475)

Speculatively reverting, since this appears to have broken check-lld on
Linux. Partial analysis in https://crbug.com/981168.

llvm-svn: 365097
2019-07-04 00:03:30 +00:00
Derek Schuff ec4be57655 [WebAssembly] Enable IndirectBrExpandPass
Wasm doesn't have a direct way to lower indirectbr, so hook up the
IndirectBrExpandPass to lower indirectbr into a switch.

Fixes PR42498

Reviewers: aheejin

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

llvm-svn: 365096
2019-07-03 23:54:06 +00:00
Matt Arsenault 5b0922fe1f AMDGPU: Add pass to lower SGPR spills
This is split out from my patches to split register allocation into a
separate SGPR and VGPR phase, and has some parts that aren't yet used
(like maintaining LiveIntervals).

This simplifies making the frame pointer register callee saved. As it
is now, the code to determine callee saves needs to predict all the
possible SGPR spills and how many callee saved VGPRs are needed. By
handling this before PrologEpilogInserter, it's possible to just check
the spill objects that already exist.

Change-Id: I29e6df4034afcf949e06f8ef44206acb94696f04
llvm-svn: 365095
2019-07-03 23:32:29 +00:00
Eli Friedman 41ee3977c4 [JumpThreading] Fix threading with unusual PHI nodes.
If the block being cloned contains a PHI node, in general, we need to
clone that PHI node, even though it's trivial. If the operand of the PHI
is an instruction in the block being cloned, the correct value for the
operand doesn't exist until SSAUpdater constructs it.

We usually don't hit this issue because we try to avoid threading across
loop headers, but it's possible to hit this in some cases involving
irreducible CFGs.  I added a flag to allow threading across loop headers
to make the testcase easier to understand.

Thanks to Brian Rzycki for reducing the testcase.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42085.

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

llvm-svn: 365094
2019-07-03 23:12:39 +00:00
Matt Arsenault 43cbca50e4 GlobalISel: Fix widenScalar for pointer typed G_MERGE_VALUES
llvm-svn: 365093
2019-07-03 23:08:06 +00:00
Tom Stellard 2e97d2aa1b cmake: Add CLANG_LINK_CLANG_DYLIB option
Summary:
Setting CLANG_LINK_CLANG_DYLIB=ON causes clang tools to link against
libclang_shared.so instead of the individual component libraries.

Reviewers: mgorny, beanz, smeenai, phosek, sylvestre.ledru

Subscribers: arphaman, cfe-commits, llvm-commits

Tags: #clang

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

llvm-svn: 365092
2019-07-03 22:45:55 +00:00
Francis Visoiu Mistrih e0308279cb [Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.

This is needed to avoid a circular dependency when using the bitstream
code for parsing optimization remarks.

Since Bitcode uses Core for the IR part:

libLLVMRemarks -> Bitcode -> Core

and Core uses libLLVMRemarks to generate remarks (see
IR/RemarkStreamer.cpp):

Core -> libLLVMRemarks

we need to separate the Bitstream and Bitcode part.

For clang-doc, it seems that it doesn't need the whole bitcode layer, so
I updated the CMake to only use the bitstream part.

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

llvm-svn: 365091
2019-07-03 22:40:07 +00:00
Raphael Isemann e0afcd8d26 Refactor ObjectFile::GetSDKVersion
Summary: This patch modernizes the GetSDKVersion API and hopefully prevents problems such as the ones discovered in D61218.

Reviewers: aprantl, jasonmolenda, clayborg

Reviewed By: aprantl, clayborg

Subscribers: clayborg, labath, lldb-commits

Tags: #lldb

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

llvm-svn: 365090
2019-07-03 22:21:10 +00:00
Guanzhong Chen 8bb1e1527c [WebAssembly][NFC] simplify SjLj inline assembly test
Summary:
Per feedback in D64115, simplify the test.

`hidden` is left in though, because every test in the file has it.

Reviewers: aheejin, tlively

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 365089
2019-07-03 22:11:14 +00:00
Thomas Lively 6004d9a13d [WebAssembly] Add option to emit passive segments
Summary:
Adds `--passive-segments` and `--active-segments` flags to control
what kind of segments are emitted. For now the default is always
to emit active segments so this is not a breaking change, but in
the future the default will be changed to passive segments when
shared memory is requested and active segments otherwise. When
passive segments are emitted, corresponding memory.init and
data.drop instructions are emitted in a `__wasm_init_memory`
function that is automatically called at the beginning of
`__wasm_call_ctors`.

Reviewers: sbc100, aheejin, dschuff

Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 365088
2019-07-03 22:04:54 +00:00
Matt Arsenault c96c174557 Revert "[AMDGPU] Kernel arg metadata: added support for "__hip_texture" type."
This reverts commit r365073.

This is crashing, and is improperly relying on IR type names.

llvm-svn: 365087
2019-07-03 21:34:34 +00:00
Jonas Devlieghere 667ca68bde [Docs] Remove stale builder
llvm-svn: 365086
2019-07-03 20:53:57 +00:00
Artem Dergachev 78c0aefb22 [analyzer] exploded-graph-rewriter: Implement a black-and-white color scheme.
For accessibility!

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

llvm-svn: 365085
2019-07-03 20:48:23 +00:00
JF Bastien 223ad85c69 Revert "[llvm-ar][test] Add to MRI test coverage"
This reverts commit 250015bacf.
r365039 was re-commit of D63197 and failed on Mac. Reid XFAIL'd it, but I'd rather jsut revert and have it fixed properly.

llvm-svn: 365084
2019-07-03 20:47:53 +00:00
Jonas Devlieghere d2f8b92820 [Docs] Update documentation build instructions.
Given that we use Ninja as the build system in the instructions below,
we might as well use it to build the documentation as well.

llvm-svn: 365083
2019-07-03 20:47:49 +00:00
Jonas Devlieghere a4210f7b10 Remove code-signing.txt now that it's part of the docs
The file's content is part of the website:
https://lldb.llvm.org/resources/build.html

llvm-svn: 365082
2019-07-03 20:47:46 +00:00
Jonas Devlieghere a767b05cf7 [Docs] Unify build instructions
The current build instructions are structured according the host
platform. Instead of having instructions on how to build with CMake
repeated for every platform, I unified them, using subsections if things
are different for between platforms. I also added the code signing
instructions, which were hidden in a text file in the repository.

llvm-svn: 365081
2019-07-03 20:45:06 +00:00
Marshall Clow 7afe9ea96f Add tests for regex_match ambiguity (aka LWG2273). NFC. Reviewed as https://reviews.llvm.org/D63051
llvm-svn: 365080
2019-07-03 20:32:35 +00:00
Evgeniy Stepanov 50dc28b556 Teach ValueTracking that aarch64.irg result aliases its input.
Reviewers: javed.absar, olista01

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365079
2019-07-03 20:19:14 +00:00
Dmitri Gribenko ede514049a Fixed a link in ReleaseNotes.rst (follow-up to r365007)
llvm-svn: 365078
2019-07-03 20:18:34 +00:00
Florian Hahn 78a60c762a [LoopBase] Strengthen isLoopExiting by requiring that BB must be inside the loop.
Currently isLoopExiting returns true for BBs that are not part of the
loop. To avoid hiding subtle bugs, this patch adds an assertion to make
sure the passed BB is inside the loop

Reviewers: reames, efriedma, hfinkel, arsenm, nhaehnle

Reviewed By: reames

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

llvm-svn: 365077
2019-07-03 20:15:14 +00:00
Reid Kleckner f12b75b6a7 Try to XFAIL mri-utf8.test on Mac
llvm-svn: 365076
2019-07-03 20:14:54 +00:00
Philip Reames ea06d63c35 [LFTR] Use SCEVExpander for the pointer limit case instead of manual IR gen
As noted in the test change, this is not trivially NFC, but all of the changes in output are cases where the SCEVExpander form is more canonical/optimal than the hand generation.  

llvm-svn: 365075
2019-07-03 20:03:46 +00:00
Eric Fiselier f1807a7df6 Fix tuple's conditionally explicit constructors for very weird user
types.

It seems some people like to write types that can explicitly convert
to anything, but cannot be used to explicitly construct anything.

This patch makes tuple tolerate such types, as is required
by the standard.

llvm-svn: 365074
2019-07-03 19:21:40 +00:00
Konstantin Pyzhov 6f419a3370 [AMDGPU] Kernel arg metadata: added support for "__hip_texture" type.
Summary:
Hip texture type is equivalent to OpenCL image. So, we need to set the Image type for kernel arguments with __hip_texture type.

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

llvm-svn: 365073
2019-07-03 19:11:35 +00:00
Philip Reames 14f1543425 [LFTR] Remove a stray variable shadow *of the same value* [NFC]
llvm-svn: 365072
2019-07-03 19:08:43 +00:00
Philip Reames e7a258c6d9 [LFTR] Style and comment changes to clarify the narrow vs wide bitwidth evaluation behavior [NFC]
llvm-svn: 365071
2019-07-03 19:03:37 +00:00
Philip Reames abc8f344d6 [LFTR] Sink the decision not use truncate scheme for constants into genLoopLimit [NFC]
We might as well just evaluate the constants using SCEV, and having the cases grouped makes the logic slightly easier to read anyway.

llvm-svn: 365070
2019-07-03 18:41:03 +00:00
Jessica Paquette 6584109389 Fix precedence in assert from r364961
Precedence was wrong in an assert added in r364961. Add braces around the
assertion condition to make it right.

See: https://reviews.llvm.org/D64084
llvm-svn: 365069
2019-07-03 18:30:01 +00:00
Louis Dionne 1c478d6e85 [libc++] Update availability markup for Filesystem on Apple platforms
llvm-svn: 365068
2019-07-03 18:29:02 +00:00
Philip Reames 4c80281c96 [LFTR] Remove falsely generalized (dead) code [NFC]
llvm-svn: 365067
2019-07-03 18:24:06 +00:00
Philip Reames 83cca94194 [LFTR] Hoist extend expressions outside of loops w/o waiting for LICM
The motivation for this is two fold:
1) Make the output (and thus tests)  a bit more readable to a human trying to understand the result of the transform
2) Reduce spurious diffs in a potential future change to restructure all of this logic to use SCEVExpander (which hoists by default)

llvm-svn: 365066
2019-07-03 18:18:36 +00:00
Alex Lorenz 2d57e7d657 [clang-scan-deps] use `-Wno-error` when scanning for dependencies
Warnings can be promoted to errors.
But that shouldn't prevent us from getting the dependencies!

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

llvm-svn: 365065
2019-07-03 18:01:32 +00:00
Alex Lorenz b853fa6bff [macCatalyst] Print out macCatalyst in llvm-objdump for the platform
'macCatalyst' is more readable than 'maccatalyst'.

llvm-svn: 365064
2019-07-03 17:46:30 +00:00
Jessica Paquette a99cfeea44 [GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for selectArithImmed
Instead of just stopping to see if we have a G_CONSTANT, instead, look through
G_TRUNCs, G_SEXTs, and G_ZEXTs.

This gives an average ~1.3% code size improvement on CINT2000 at -O3.

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

llvm-svn: 365063
2019-07-03 17:46:23 +00:00
Robert Lougher 11953acb13 [X86] Update test; NFC
This updates pr38743.ll after D62605.

llvm-svn: 365062
2019-07-03 17:45:24 +00:00
Robert Lougher 720baf0416 [X86] Avoid SFB - Skip meta instructions
This patch generalizes the fix in D61680 to ignore all meta instructions,
not just debug info.

Patch by Chris Dawson.

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

llvm-svn: 365061
2019-07-03 17:43:55 +00:00
Joel E. Denny 4e8b99a5c3 [Bitcode] Update CHECK-DAG usage in tests
This patch adjusts tests not to depend on deprecated FileCheck
behavior that permits overlapping matches within a block of
`CHECK-DAG` directives:

1. `thinlto-function-summary-originalnames.ll`: The directive with the
pattern `<COMBINED` is surely intended to match `<COMBINED ` (note the
trailing space), but it instead matches
`<COMBINED_GLOBALVAR_INIT_REFS`, for which there is a separate
directive.  With the deprecated behavior, both directives match the
latter text and neither match the former text.  I've adjusted the
former directive so it matches only the former text.

2. `thinlto-summary-local-5.0.ll`: Two directives have identical
patterns when they were clearly meant to have different patterns.

3. `upgrade-pointer-address-space.ll`: There are three identical
directives but only two occurrences of the matching text.  With the
deprecated behavior, they always match exactly the same text, so the
behavior can't have been useful.  I removed one of the directives and
converted the other two from `CHECK-DAG` to `CHECK`.

Reviewed By: probinson, aprantl

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

llvm-svn: 365060
2019-07-03 17:31:43 +00:00
Antonio Afonso f8251f1ee6 Add plugin.process.gdb-remote.use-libraries-svr4 option
Summary:
This option allow the toggling of the libraries-svr4 usage in ProcessGDBRemote. It's a follow up of https://reviews.llvm.org/D62503#1564296 and it's meant to test / tweak this new packet with, hopefully, minimum impact and in a faster way.

Enable it with `settings set plugin.process.gdb-remote.use-libraries-svr4 true`. For now, by default it's false.

I didn't put tests up for this but I did test it manually.

Reviewers: labath, jankratochvil

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 365059
2019-07-03 17:30:07 +00:00
Francis Visoiu Mistrih 83bbe2f418 [CodeGen] Make branch funnels pass the machine verifier
We previously marked all the tests with branch funnels as
`-verify-machineinstrs=0`.

This is an attempt to fix it.

1) `ICALL_BRANCH_FUNNEL` has no defs. Mark it as `let OutOperandList =
(outs)`

2) After that we hit an assert: ``` Assertion failed: (Op.getValueType()
!= MVT::Other && Op.getValueType() != MVT::Glue && "Chain and glue
operands should occur at end of operand list!"), function AddOperand,
file
/Users/francisvm/llvm/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp,
line 461.  ```

The chain operand was added at the beginning of the operand list. Move
that to the end.

3) After that we hit another verifier issue in the pseudo expansion
where the registers used in the cmps and jmps are not added to the
livein lists. Add the `EFLAGS` to all the new MBBs that we create.

PR39436

Differential Review: https://reviews.llvm.org/D54155

llvm-svn: 365058
2019-07-03 17:16:45 +00:00
Simon Pilgrim 26812c7675 [X86] ComputeNumSignBitsForTargetNode - add target shuffle support.
llvm-svn: 365057
2019-07-03 17:06:59 +00:00
Roman Lebedev 826db453d1 [NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818
llvm-svn: 365056
2019-07-03 16:48:53 +00:00
Sanjay Patel c1c86adb16 [SLP] add tests for bitcasted vector pointer load; NFC
I'm not sure if this falls within the scope of SLP,
but we could create vector loads for some of these
patterns.

llvm-svn: 365055
2019-07-03 16:46:14 +00:00
Amaury Sechet 57dfacb32d Use getAllOnesConstants instead of -1 in DAGCombiner. NFC
llvm-svn: 365054
2019-07-03 16:34:36 +00:00
Philip Reames 39e7a97ad7 [SCEV] Preserve flags on add/muls in getSCEVATScope
We haven't changed the set of users, just specialized an operand for those users.  Given that, the previous wrap flags must still be correct.

Sorry for the lack of test case.  Noticed this while working on something else, and haven't figured out to exercise this standalone.

llvm-svn: 365053
2019-07-03 16:34:08 +00:00
Kostya Kortchinsky f50a953ea7 [scudo][standalone] Link tests against libatomic
Summary:
Some clang versions (< 6.0) do not inline the atomic builtin functions
leaving unresolved references to `__atomic_load_8` and so on (seems to
be mostly 64-bit atomics on 32-bit platforms).
I tried without success to use some cmake magic to detect when that
would be the case, and decided to fall back to unconditionally
linking libatomic.

Reviewers: morehouse, eugenis, vitalybuka, hctim, tejohnson

Reviewed By: tejohnson

Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 365052
2019-07-03 16:32:01 +00:00
Amaury Sechet bddb8c3597 [DAGCombine] More diamong carry pattern optimization.
Summary:
This diff improve the capability of DAGCOmbine to generate linear carries propagation in presence of a diamond pattern. It is now able to match a large variety of different patterns rather than some hardcoded one.

Arguably, the codegen in test cases is not better, but this is to be expected. The goal of this transformation is more about canonicalisation than actual optimisation.

Reviewers: hfinkel, RKSimon, craig.topper

Subscribers: llvm-commits

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

llvm-svn: 365051
2019-07-03 16:15:59 +00:00
Simon Pilgrim 783dbe402f [X86][AVX] combineX86ShufflesRecursively - peek through extract_subvector
If we have more then 2 shuffle ops to combine, try to use combineX86ShuffleChainWithExtract to see if some are from the same super vector.

llvm-svn: 365050
2019-07-03 15:46:08 +00:00