Johan Vikstrom [Thu, 4 Jul 2019 07:53:12 +0000 (07:53 +0000)]
[clangd] Emit publishSemanticHighlighting in LSP if enabled
Summary: Emit publishSemanticHighlighting in LSP if enabled
Reviewers: hokein, kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63919
llvm-svn: 365111
QingShan Zhang [Thu, 4 Jul 2019 07:43:51 +0000 (07:43 +0000)]
[NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the strategy instead of the scheduler.
llvm-svn: 365110
Craig Topper [Thu, 4 Jul 2019 06:21:54 +0000 (06:21 +0000)]
[X86] Use pointer sized indices instead of i32 for EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT in a couple places.
Most places already did this.
llvm-svn: 365109
Dylan McKay [Thu, 4 Jul 2019 06:12:47 +0000 (06:12 +0000)]
[AVR] Fix tests after r363757
r363757 renamed ExpandISelPseudo to FinalizeISel, so the RUN line in
select-must-add-unconditional-jump.mir needed updating to refer to finalize-isel.
llvm-svn: 365108
Serguei Katkov [Thu, 4 Jul 2019 05:10:14 +0000 (05:10 +0000)]
[LoopPeel] Some small comment update. NFC.
Follow-up change of comment after
https://reviews.llvm.org/D63917 is landed.
llvm-svn: 365107
Fangrui Song [Thu, 4 Jul 2019 04:44:42 +0000 (04:44 +0000)]
[PowerPC] Support constraint code "ww"
Summary:
"ww" and "ws" are both constraint codes for VSX vector registers that
hold scalar double data. "ww" is preferred for float while "ws" is
preferred for double.
Reviewed By: jsji
Differential Revision: https://reviews.llvm.org/D64119
llvm-svn: 365106
Alex Brachet [Thu, 4 Jul 2019 04:41:06 +0000 (04:41 +0000)]
[docs] [NFC] Removed excess spacing
Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed.
Reviewers: jhenderson, rupprecht, JDevlieghere
Reviewed By: jhenderson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63971
llvm-svn: 365105
Chen Zheng [Thu, 4 Jul 2019 01:51:47 +0000 (01:51 +0000)]
[PowerPC] Hardware Loop branch instruction's condition may not be icmp.
This fixes pr42492.
Differential Revision: https://reviews.llvm.org/D64124
llvm-svn: 365104
Csaba Dabis [Thu, 4 Jul 2019 00:50:50 +0000 (00:50 +0000)]
[analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls
Summary: It models the known LLVM methods paired with their class.
Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus
Reviewed By: NoQ
Subscribers: dschuff, aheejin, mgorny, szepet, rnkovacs, a.sidorin,
mikhail.ramalho, donat.nagy, dkrupp, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63915
llvm-svn: 365103
Francis Visoiu Mistrih [Thu, 4 Jul 2019 00:31:03 +0000 (00:31 +0000)]
[Remarks] Require an explicit format to the parser
Make the parser require an explicit format.
This allows new formats to be easily added by following YAML as an
example.
llvm-svn: 365102
Francis Visoiu Mistrih [Thu, 4 Jul 2019 00:30:58 +0000 (00:30 +0000)]
[Remarks][NFC] Move the string table parsing out of the parser constructor
Make the parser take an already-parsed string table.
llvm-svn: 365101
Derek Schuff [Thu, 4 Jul 2019 00:24:35 +0000 (00:24 +0000)]
[WebAssembly] Update test failure explanations
llvm-svn: 365100
Shoaib Meenai [Thu, 4 Jul 2019 00:17:02 +0000 (00:17 +0000)]
[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
Lang Hames [Thu, 4 Jul 2019 00:05:12 +0000 (00:05 +0000)]
[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
Reid Kleckner [Thu, 4 Jul 2019 00:03:30 +0000 (00:03 +0000)]
Revert [ThinLTO] Optimize writeonly globals out
This reverts r365040 (git commit
5cacb914758c7f436b47c8362100f10cef14bbc4)
Speculatively reverting, since this appears to have broken check-lld on
Linux. Partial analysis in https://crbug.com/981168.
llvm-svn: 365097
Derek Schuff [Wed, 3 Jul 2019 23:54:06 +0000 (23:54 +0000)]
[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
Matt Arsenault [Wed, 3 Jul 2019 23:32:29 +0000 (23:32 +0000)]
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
Eli Friedman [Wed, 3 Jul 2019 23:12:39 +0000 (23:12 +0000)]
[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
Matt Arsenault [Wed, 3 Jul 2019 23:08:06 +0000 (23:08 +0000)]
GlobalISel: Fix widenScalar for pointer typed G_MERGE_VALUES
llvm-svn: 365093
Tom Stellard [Wed, 3 Jul 2019 22:45:55 +0000 (22:45 +0000)]
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
Francis Visoiu Mistrih [Wed, 3 Jul 2019 22:40:07 +0000 (22:40 +0000)]
[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
Raphael Isemann [Wed, 3 Jul 2019 22:21:10 +0000 (22:21 +0000)]
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
Guanzhong Chen [Wed, 3 Jul 2019 22:11:14 +0000 (22:11 +0000)]
[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
Thomas Lively [Wed, 3 Jul 2019 22:04:54 +0000 (22:04 +0000)]
[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
Matt Arsenault [Wed, 3 Jul 2019 21:34:34 +0000 (21:34 +0000)]
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
Jonas Devlieghere [Wed, 3 Jul 2019 20:53:57 +0000 (20:53 +0000)]
[Docs] Remove stale builder
llvm-svn: 365086
Artem Dergachev [Wed, 3 Jul 2019 20:48:23 +0000 (20:48 +0000)]
[analyzer] exploded-graph-rewriter: Implement a black-and-white color scheme.
For accessibility!
Differential Revision: https://reviews.llvm.org/D64153
llvm-svn: 365085
JF Bastien [Wed, 3 Jul 2019 20:47:53 +0000 (20:47 +0000)]
Revert "[llvm-ar][test] Add to MRI test coverage"
This reverts commit
250015bacf7f255abcfb646fb8b6b56ce8be7e01.
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
Jonas Devlieghere [Wed, 3 Jul 2019 20:47:49 +0000 (20:47 +0000)]
[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
Jonas Devlieghere [Wed, 3 Jul 2019 20:47:46 +0000 (20:47 +0000)]
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
Jonas Devlieghere [Wed, 3 Jul 2019 20:45:06 +0000 (20:45 +0000)]
[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
Marshall Clow [Wed, 3 Jul 2019 20:32:35 +0000 (20:32 +0000)]
Add tests for regex_match ambiguity (aka LWG2273). NFC. Reviewed as https://reviews.llvm.org/D63051
llvm-svn: 365080
Evgeniy Stepanov [Wed, 3 Jul 2019 20:19:14 +0000 (20:19 +0000)]
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
Dmitri Gribenko [Wed, 3 Jul 2019 20:18:34 +0000 (20:18 +0000)]
Fixed a link in ReleaseNotes.rst (follow-up to r365007)
llvm-svn: 365078
Florian Hahn [Wed, 3 Jul 2019 20:15:14 +0000 (20:15 +0000)]
[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
Reid Kleckner [Wed, 3 Jul 2019 20:14:54 +0000 (20:14 +0000)]
Try to XFAIL mri-utf8.test on Mac
llvm-svn: 365076
Philip Reames [Wed, 3 Jul 2019 20:03:46 +0000 (20:03 +0000)]
[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
Eric Fiselier [Wed, 3 Jul 2019 19:21:40 +0000 (19:21 +0000)]
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
Konstantin Pyzhov [Wed, 3 Jul 2019 19:11:35 +0000 (19:11 +0000)]
[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
Philip Reames [Wed, 3 Jul 2019 19:08:43 +0000 (19:08 +0000)]
[LFTR] Remove a stray variable shadow *of the same value* [NFC]
llvm-svn: 365072
Philip Reames [Wed, 3 Jul 2019 19:03:37 +0000 (19:03 +0000)]
[LFTR] Style and comment changes to clarify the narrow vs wide bitwidth evaluation behavior [NFC]
llvm-svn: 365071
Philip Reames [Wed, 3 Jul 2019 18:41:03 +0000 (18:41 +0000)]
[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
Jessica Paquette [Wed, 3 Jul 2019 18:30:01 +0000 (18:30 +0000)]
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
Louis Dionne [Wed, 3 Jul 2019 18:29:02 +0000 (18:29 +0000)]
[libc++] Update availability markup for Filesystem on Apple platforms
llvm-svn: 365068
Philip Reames [Wed, 3 Jul 2019 18:24:06 +0000 (18:24 +0000)]
[LFTR] Remove falsely generalized (dead) code [NFC]
llvm-svn: 365067
Philip Reames [Wed, 3 Jul 2019 18:18:36 +0000 (18:18 +0000)]
[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
Alex Lorenz [Wed, 3 Jul 2019 18:01:32 +0000 (18:01 +0000)]
[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
Alex Lorenz [Wed, 3 Jul 2019 17:46:30 +0000 (17:46 +0000)]
[macCatalyst] Print out macCatalyst in llvm-objdump for the platform
'macCatalyst' is more readable than 'maccatalyst'.
llvm-svn: 365064
Jessica Paquette [Wed, 3 Jul 2019 17:46:23 +0000 (17:46 +0000)]
[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
Robert Lougher [Wed, 3 Jul 2019 17:45:24 +0000 (17:45 +0000)]
[X86] Update test; NFC
This updates pr38743.ll after D62605.
llvm-svn: 365062
Robert Lougher [Wed, 3 Jul 2019 17:43:55 +0000 (17:43 +0000)]
[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
Joel E. Denny [Wed, 3 Jul 2019 17:31:43 +0000 (17:31 +0000)]
[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
Antonio Afonso [Wed, 3 Jul 2019 17:30:07 +0000 (17:30 +0000)]
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
Francis Visoiu Mistrih [Wed, 3 Jul 2019 17:16:45 +0000 (17:16 +0000)]
[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
Simon Pilgrim [Wed, 3 Jul 2019 17:06:59 +0000 (17:06 +0000)]
[X86] ComputeNumSignBitsForTargetNode - add target shuffle support.
llvm-svn: 365057
Roman Lebedev [Wed, 3 Jul 2019 16:48:53 +0000 (16:48 +0000)]
[NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818
llvm-svn: 365056
Sanjay Patel [Wed, 3 Jul 2019 16:46:14 +0000 (16:46 +0000)]
[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
Amaury Sechet [Wed, 3 Jul 2019 16:34:36 +0000 (16:34 +0000)]
Use getAllOnesConstants instead of -1 in DAGCombiner. NFC
llvm-svn: 365054
Philip Reames [Wed, 3 Jul 2019 16:34:08 +0000 (16:34 +0000)]
[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
Kostya Kortchinsky [Wed, 3 Jul 2019 16:32:01 +0000 (16:32 +0000)]
[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
Amaury Sechet [Wed, 3 Jul 2019 16:15:59 +0000 (16:15 +0000)]
[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
Simon Pilgrim [Wed, 3 Jul 2019 15:46:08 +0000 (15:46 +0000)]
[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
Fangrui Song [Wed, 3 Jul 2019 15:38:59 +0000 (15:38 +0000)]
[ELF][RISCV] Error on R_RISCV_PCREL_LO12_[IS] that point to absolute symbols
The referenced symbol is expected to point to an R_RISCV_*_HI20
relocation. An absolute symbol has no associated section, therefore
there cannot be a matching R_RISCV_*_HI20.
This fixes the crash reported by PR42038. For reference, ld.bfd errors:
(.init+0x4): dangerous relocation: %pcrel_lo missing matching %pcrel_hi
Differential Revision: https://reviews.llvm.org/D63273
llvm-svn: 365049
Fangrui Song [Wed, 3 Jul 2019 15:26:54 +0000 (15:26 +0000)]
Revert D63432 "[ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection"
This reverts r365015.
David Zarzycki reported this change broke stage2 and stage3 tests. The
root cause is still not very clear, but I guess some SHF_MERGE sections
with the same name have different alignments. They were not merged
before but were merged after r365015.
Something that assumes address uniqueness of such mergeable data caused
the bug.
llvm-svn: 365048
Teresa Johnson [Wed, 3 Jul 2019 15:12:38 +0000 (15:12 +0000)]
[ThinLTO] Fix gcc warnings from commit
Remove an unnecessary const from an Optional return type introduced
in r364960 that gcc 7.4.0 warns about. It is unnecessary and possibly
incorrect.
llvm-svn: 365047
Sam Parker [Wed, 3 Jul 2019 14:39:23 +0000 (14:39 +0000)]
[ARM] Fix for NDEBUG builds
Fix unused variable warning as well as a nonsense assert.
Differential Revision: https://reviews.llvm.org/D63816
llvm-svn: 365046
Kostya Kortchinsky [Wed, 3 Jul 2019 14:38:47 +0000 (14:38 +0000)]
[scudo][standalone] Potential fix for missing sized delete
Summary:
In some setups, using `-fsized-deallocation` would end up not finding
a sized delete operator at link time. For now, avoid using the flag
and declare the sized delete operator in the cpp test only.
This is a tentative fix as I do not have the failing setup.
Reviewers: rnk, morehouse, hctim, eugenis, vitalybuka
Reviewed By: rnk, hctim
Subscribers: mgorny, delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D64086
llvm-svn: 365045
Simon Pilgrim [Wed, 3 Jul 2019 14:34:16 +0000 (14:34 +0000)]
[X86][AVX] Combine vpermi(bitcast(x)) -> bitcast(vpermi(x))
iff the number of elements doesn't change.
This gets around an issue with combineX86ShuffleChain not being able to hint which domain is preferred for shuffles that can be done with either.
Fixes regression introduced in rL365041
llvm-svn: 365044
James Molloy [Wed, 3 Jul 2019 14:33:29 +0000 (14:33 +0000)]
[SelectionDAG] Propagate alias metadata to target intrinsic nodes
When a target intrinsic has been determined to touch memory, we construct a MachineMemOperand during SDAG construction. In this case, we should propagate AAMDNodes metadata to the MachineMemOperand where available.
Differential revision: https://reviews.llvm.org/D64131
llvm-svn: 365043
James Henderson [Wed, 3 Jul 2019 14:21:48 +0000 (14:21 +0000)]
[docs][llvm-objcopy] Write documentation for llvm-objcopy
This patch addresses https://bugs.llvm.org/show_bug.cgi?id=42183 by replacing
the stub markdown doc for llvm-objcopy with a full one describing the current
options available in llvm-objcopy.
Reviewed by: jakehehrlich, MaskRay
Differential Revision: https://reviews.llvm.org/D63820
llvm-svn: 365042
Simon Pilgrim [Wed, 3 Jul 2019 14:17:21 +0000 (14:17 +0000)]
[X86][AVX] combineX86ShuffleChainWithExtract - add number of non-zero extract_subvectors to the combine depth
This better accounts for the cost/benefit of removing extract_subvectors from the shuffle and will be more useful in future patches.
The vpermq predicate regression will be fixed shortly.
llvm-svn: 365041
Eugene Leviant [Wed, 3 Jul 2019 14:14:52 +0000 (14:14 +0000)]
[ThinLTO] Optimize writeonly globals out
Differential revision: https://reviews.llvm.org/D63444
llvm-svn: 365040
Owen Reynolds [Wed, 3 Jul 2019 13:47:29 +0000 (13:47 +0000)]
[llvm-ar][test] Add to MRI test coverage
This reapplies 363232 that was reverted due to a buildbot test failure, this build bot has now been fixed.
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 365039
Stefan Granitz [Wed, 3 Jul 2019 13:21:48 +0000 (13:21 +0000)]
[CMake] Avoid libcxxabi dependency when building LLDB from the monorepo on macOS
libc++abi became mandatory to link the libc++ binaries. LLDB only needs the build artifacts and not the linked output (we don't ship `libc++.dylib` and/or `libc++.a`). Disable the respective link steps to avoid the dependency to libc++abi.
<rdar://problem/
51980716>
llvm-svn: 365038
Kristof Umann [Wed, 3 Jul 2019 13:03:33 +0000 (13:03 +0000)]
Revert "[analyzer][CFG] Return the correct terminator condition"
This reverts commit
7a57118a6fcfa3770f984453543bbdfd0b233e84.
Causes a bunch of crashes, I need to time to evaluate this.
llvm-svn: 365037
Kristof Umann [Wed, 3 Jul 2019 12:53:19 +0000 (12:53 +0000)]
[analyzer][CFG] Return the correct terminator condition
For the following terminator statement:
if (A && B && C && D)
The built CFG is the following:
[B5 (ENTRY)]
Succs (1): B4
[B1]
1: 10
2: j
3: [B1.2] (ImplicitCastExpr, LValueToRValue, int)
4: [B1.1] / [B1.3]
5: int x = 10 / j;
Preds (1): B2
Succs (1): B0
[B2]
1: C
2: [B2.1] (ImplicitCastExpr, LValueToRValue, _Bool)
T: if [B4.4] && [B3.2] && [B2.2]
Preds (1): B3
Succs (2): B1 B0
[B3]
1: B
2: [B3.1] (ImplicitCastExpr, LValueToRValue, _Bool)
T: [B4.4] && [B3.2] && ...
Preds (1): B4
Succs (2): B2 B0
[B4]
1: 0
2: int j = 0;
3: A
4: [B4.3] (ImplicitCastExpr, LValueToRValue, _Bool)
T: [B4.4] && ...
Preds (1): B5
Succs (2): B3 B0
[B0 (EXIT)]
Preds (4): B1 B2 B3 B4
However, even though the path of execution in B2 only depends on C's value,
CFGBlock::getCondition() would return the entire condition (A && B && C). For
B3, it would return A && B. I changed this the actual condition.
Differential Revision: https://reviews.llvm.org/D63538
llvm-svn: 365036
Fangrui Song [Wed, 3 Jul 2019 12:48:04 +0000 (12:48 +0000)]
[ELF][RISCV] Allow R_RISCV_ADD in relocateNonAlloc()
gcc may generate .debug_info/.debug_aranges/.debug_line/etc that are
relocated by R_RISCV_ADD*/R_RISCV_SUB* pairs.
Allow R_RISCV_ADD in non-SHF_ALLOC section to fix link errors like:
ld.lld: error: print.c:(.debug_frame+0x60): has non-ABS relocation R_RISCV_ADD64 against symbol '.L0 '
Differential Revision: https://reviews.llvm.org/D63259
llvm-svn: 365035
Simon Atanasyan [Wed, 3 Jul 2019 12:28:05 +0000 (12:28 +0000)]
[mips] Mark general scheduling model as complete
llvm-svn: 365034
Simon Atanasyan [Wed, 3 Jul 2019 12:27:58 +0000 (12:27 +0000)]
[mips] Add missing atomic instructions to general scheduling definitions
llvm-svn: 365033
Simon Atanasyan [Wed, 3 Jul 2019 12:27:51 +0000 (12:27 +0000)]
[mips] Add missing microMIPS instructions to general scheduling definitions
llvm-svn: 365032
Simon Pilgrim [Wed, 3 Jul 2019 12:20:28 +0000 (12:20 +0000)]
Fix -Wcast-qual const warning. NFCI.
llvm-svn: 365031
Kristof Umann [Wed, 3 Jul 2019 12:06:10 +0000 (12:06 +0000)]
Make a buildbot using a buggy gcc happy
When specializing a template in a namespace, it has to be in a namespace
block, else gcc will get confused. Hopefully this fixes the issue.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
llvm-svn: 365030
Kristof Umann [Wed, 3 Jul 2019 11:54:47 +0000 (11:54 +0000)]
Specialize an anchor() function in the correct namespace
llvm-svn: 365029
Kristof Umann [Wed, 3 Jul 2019 11:39:12 +0000 (11:39 +0000)]
[analyzer][Dominator] Add post dominators to CFG + a new debug checker
Transform clang::DominatorTree to be able to also calculate post dominators.
* Tidy up the documentation
* Make it clang::DominatorTree template class (similarly to how
llvm::DominatorTreeBase works), rename it to clang::CFGDominatorTreeImpl
* Clang's dominator tree is now called clang::CFGDomTree
* Clang's brand new post dominator tree is called clang::CFGPostDomTree
* Add a lot of asserts to the dump() function
* Create a new checker to test the functionality
Differential Revision: https://reviews.llvm.org/D62551
llvm-svn: 365028
Simon Pilgrim [Wed, 3 Jul 2019 11:23:27 +0000 (11:23 +0000)]
[X86][SSE] lowerUINT_TO_FP_v2i32 - explicitly cast half word to double
Fixes MSVC analyzer extension->double warning.
llvm-svn: 365027
Kristof Umann [Wed, 3 Jul 2019 11:14:42 +0000 (11:14 +0000)]
[Dominators] PR42041: Skip nullpointer successors
https://bugs.llvm.org/show_bug.cgi?id=42041
In Clang's CFG, we use nullpointers to represent unreachable nodes, for
example, in the included testfile, block B0 is unreachable from block
B1, resulting in a nullpointer dereference somewhere in
llvm::DominatorTreeBase<clang::CFGBlock, false>::recalculate.
This patch fixes this issue by specializing
llvm::DomTreeBuilder::SemiNCAInfo::ChildrenGetter::Get for
clang::CFG to not contain nullpointer successors.
Differential Revision: https://reviews.llvm.org/D62507
llvm-svn: 365026
Simon Pilgrim [Wed, 3 Jul 2019 10:59:52 +0000 (10:59 +0000)]
[X86][SSE] LowerINSERT_VECTOR_ELT - ensure insertion index correctness. NFCI.
Assert that the insertion index is in range and use uint64_t for the index to fix MSVC/cppcheck truncation warning.
llvm-svn: 365025
Simon Pilgrim [Wed, 3 Jul 2019 10:47:33 +0000 (10:47 +0000)]
[X86][SSE] LowerScalarImmediateShift - ensure shift amount correctness. NFCI.
Assert that the shift amount is in range and create vXi8 shift masks in a way that doesn't cause MSVC/cppcheck shift result is truncated then extended warnings.
llvm-svn: 365024
Simon Atanasyan [Wed, 3 Jul 2019 10:33:16 +0000 (10:33 +0000)]
[mips] Add SIGRIE,GINVI,GINVT to general scheduling definitions
llvm-svn: 365023
Simon Atanasyan [Wed, 3 Jul 2019 10:33:09 +0000 (10:33 +0000)]
[mips] Add missing mips16 instructions to general scheduling definitions
llvm-svn: 365022
Simon Atanasyan [Wed, 3 Jul 2019 10:33:01 +0000 (10:33 +0000)]
[mips] Add missing MSA and ASE instructions to general scheduling definitions
llvm-svn: 365021
Simon Atanasyan [Wed, 3 Jul 2019 10:32:54 +0000 (10:32 +0000)]
[mips] Replace some itineraries by instructions in the general scheduling definitions
llvm-svn: 365020
Simon Pilgrim [Wed, 3 Jul 2019 10:26:28 +0000 (10:26 +0000)]
Fix MSVC "signed/unsigned mismatch" warning. NFCI.
Fixes PR42426.
llvm-svn: 365019
Simon Pilgrim [Wed, 3 Jul 2019 10:22:08 +0000 (10:22 +0000)]
Fix uninitialized variable warnings. NFCI.
Both MSVC and cppcheck don't like the fact that the variables are initialized via references.
llvm-svn: 365018
Ivan Donchevskii [Wed, 3 Jul 2019 10:21:50 +0000 (10:21 +0000)]
[clang-tidy] Fix the YAML created for checks like modernize-pass-by-value
Currently this check generates the replacement with the newline in the end.
The proper way to export it to YAML is to have two \n\n instead of one.
Without this fix clients should reinterpret the replacement as
"#include <utility> " instead of "#include <utility>\n"
Differential Revision: https://reviews.llvm.org/D63482
llvm-svn: 365017
Simon Pilgrim [Wed, 3 Jul 2019 10:04:16 +0000 (10:04 +0000)]
[X86] LowerFunnelShift - use modulo constant shift amount.
This avoids the use of getZExtValue and uses the modulo shift amount which is whats expected for funnel shifts anyhow.
llvm-svn: 365016
Fangrui Song [Wed, 3 Jul 2019 10:03:49 +0000 (10:03 +0000)]
[ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection
This should fix PR42289: the Linux kernel has a use case that input
files have .rodata.cst32 sections with different alignments. The
expectation (and what ld.bfd and gold do) is that in the -r link, there
is only one .rodata.cst32 (SHF_MERGE sections with different alignments
can be combined), but lld currently creates one for each different
alignment.
The current merging strategy:
1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize and
sh_addralign). String merging is performed among a group, even if -O0 is specified.
2) Create one output section for each group. This is a special case in
addInputSec().
This patch changes 1) to:
1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize).
String merging is performed among a group, even if -O0 is specified.
We will thus create just one .rodata.cst32 . This also improves merging
efficiency when sections with the same name but different alignments are
combined.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D63432
llvm-svn: 365015
Oliver Stannard [Wed, 3 Jul 2019 09:58:52 +0000 (09:58 +0000)]
[ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize
For Thumb2, we prefer low regs (costPerUse = 0) to allow narrow
encoding. However, current allocation order is like:
R0-R3, R12, LR, R4-R11
As a result, a lot of instructs that use R12/LR will be wide instrs.
This patch changes the allocation order to:
R0-R7, R12, LR, R8-R11
for thumb2 and -Osize.
In most cases, there is no extra push/pop instrs as they will be folded
into existing ones. There might be slight performance impact due to more
stack usage, so we only enable it when opt for min size.
https://reviews.llvm.org/D30324
llvm-svn: 365014
Sven van Haastregt [Wed, 3 Jul 2019 09:57:59 +0000 (09:57 +0000)]
Remove some autoconf references from docs and comments
The autoconf build system support has been removed a while ago, remove
some outdated references.
Differential Revision: https://reviews.llvm.org/D63608
llvm-svn: 365013
Simon Pilgrim [Wed, 3 Jul 2019 09:54:25 +0000 (09:54 +0000)]
Fix MSVC "not all control paths return a value" warnings. NFCI.
llvm-svn: 365012