OSDN Git Service
Anton Korobeynikov [Fri, 16 Nov 2018 09:47:58 +0000 (09:47 +0000)]
[MSP430] Add more tests for ABI and calling convention
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D54582
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347040
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Fri, 16 Nov 2018 08:35:19 +0000 (08:35 +0000)]
[DAGCombine] Fix non-deterministic debug output
PR37970 reported non-deterministic debug output, this was caused by
iterating through a set and not a a vector.
bugzilla: https://bugs.llvm.org/show_bug.cgi?id=37970
Differential Revision: https://reviews.llvm.org/D54570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347037
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 07:13:34 +0000 (07:13 +0000)]
[LegalizeVectorTypes] Teach WidenVecRes_Convert to turn ANY_EXTEND into ANY_EXTEND_VECTOR_INREG when the input and output types need to be widened to the same width.
If we don't do it here, DAGCombine will just end up creating it from the scalar any_extend+build_vector so might as well save a step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347034
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Fri, 16 Nov 2018 07:08:00 +0000 (07:08 +0000)]
[ThinLTO] Internalize readonly globals
An attempt to recommit r346584 after failure on OSX build bot.
Fixed cache key computation in ThinLTOCodeGenerator and added
test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347033
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 06:15:21 +0000 (06:15 +0000)]
[X86] Add custom type legalization for v2i8/v4i8/v8i8 mul under -x86-experimental-vector-widening.
By early promoting the multiply to use an i16 element type we can avoid op legalization emit a second multiply for the 8 upper elements of the v16i8 type we would otherwise get.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347032
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 06:15:20 +0000 (06:15 +0000)]
[X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347031
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 16 Nov 2018 05:03:02 +0000 (05:03 +0000)]
AMDGPU: Fix analyzeBranch failing with pseudoterminators
If a block had one of the _term instructions used for gluing
exec modifying instructions to the end of the block,
analyzeBranch would fail, preventing the verifier from catching
a broken successor list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347027
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 16 Nov 2018 04:46:48 +0000 (04:46 +0000)]
[CMake] Support cross-compiling with multi-stage builds
When using multi-stage builds, we would like support cross-compilation.
Example is 2-stage build when the first stage is compiled for host while
the second stage is compiled for the target.
Normally, the second stage would be also used for compiling runtimes,
but that's not possible when cross-compiling, so we use the first stage
compiler instead. However, we still want to use the second stage paths.
To do so, we set the -resource-dir of the first stage compiler to point
to the resource directory of the second stage.
We also need compiler tools that support the target architecture. These
tools are not guaranteed to be present on the host, but in case of
multi-stage build, we can build these tools in the first stage.
Differential Revision: https://reviews.llvm.org/D54461
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347025
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 16 Nov 2018 02:42:32 +0000 (02:42 +0000)]
[NativePDB] Rewrite the PdbSymUid to use our own custom namespacing scheme.
Originally we created our 64-bit UID scheme by using the first byte as
sort of a "tag" to represent what kind of symbol this was, and we
re-used the PDB_SymType enumeration for this. For native pdb support,
this is not really the right abstraction layer, because what we really
want is something that tells us *how* to find the symbol. This means,
specifically, is in the globals stream / public stream / module stream /
TPI stream / etc, and for whichever one it is in, where is it within
that stream?
A good example of why the old namespacing scheme was insufficient is
that it is more or less impossible to create a uid for a field list
member of a class/struction/union/enum that tells you how to locate
the original record.
With this new scheme, the first byte is no longer a PDB_SymType enum
but a new enum created specifically to identify where in the PDB
this record lives. This gives us much better flexibility in
what kinds of symbols the uids can identify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347018
91177308-0d34-0410-b5e6-
96231b3b80d8
Volodymyr Sapsai [Fri, 16 Nov 2018 02:20:33 +0000 (02:20 +0000)]
[VFS] Update unittest to fix Windows buildbot.
Buildbot http://lab.llvm.org:8011/builders/clang-x64-windows-msvc is failing
because it doesn't like paths in VFS, make them more Windows-friendly.
Follow up to r347009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347016
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 01:57:55 +0000 (01:57 +0000)]
Revert r347014 "[X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization."
Apparently I failed to update this after turnign sign extend to any extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347015
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 01:52:32 +0000 (01:52 +0000)]
[X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347014
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Fri, 16 Nov 2018 01:23:12 +0000 (01:23 +0000)]
Added missing whitespace in the link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347013
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 01:16:59 +0000 (01:16 +0000)]
[X86] Use ANY_EXTEND instead of SIGN_EXTEND in the AVX2 and later path for legalizing vXi8 multiply.
We aren't going to use the upper bits of the multiply result that the extend would effect. So we don't need a specific type of extend.
This makes some reduction test cases shorter because we were previously trying to sign_extend a truncate which we can't eliminate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347011
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Nov 2018 01:16:51 +0000 (01:16 +0000)]
[X86] Update a couple comments to remove a mention of a sign extending that no longer happens. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347010
91177308-0d34-0410-b5e6-
96231b3b80d8
Volodymyr Sapsai [Fri, 16 Nov 2018 01:15:54 +0000 (01:15 +0000)]
[VFS] Implement `RedirectingFileSystem::getRealPath`.
It fixes the case when Objective-C framework is added as a subframework
through a symlink. When parent framework infers a module map and fails
to detect a symlink, it would add a subframework as a submodule. And
when we parse module map for the subframework, we would encounter an
error like
> error: umbrella for module 'WithSubframework.Foo' already covers this directory
By implementing `getRealPath` "an egregious but useful hack" in
`ModuleMap::inferFrameworkModule` works as expected.
rdar://problem/
45821279
Reviewers: bruno, benlangmuir, erik.pilkington
Reviewed By: bruno
Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D54245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347009
91177308-0d34-0410-b5e6-
96231b3b80d8
Ron Lieberman [Fri, 16 Nov 2018 01:13:34 +0000 (01:13 +0000)]
[AMDGPU] Add FixupVectorISel pass, currently Supports SREGs in GLOBAL LD/ST
Add a pass to fixup various vector ISel issues.
Currently we handle converting GLOBAL_{LOAD|STORE}_*
and GLOBAL_Atomic_* instructions into their _SADDR variants.
This involves feeding the sreg into the saddr field of the new instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347008
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Fri, 16 Nov 2018 01:02:43 +0000 (01:02 +0000)]
[CUDA] updated CompileCudaWithLLVM.rst
Differential Revision: https://reviews.llvm.org/D54608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347007
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 16 Nov 2018 00:47:24 +0000 (00:47 +0000)]
Re-apply r346985: [ADT] Drop llvm::Optional clang-specific optimization for trivially copyable types
Remove a test case that was added with the optimization we are now
removing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347004
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Fri, 16 Nov 2018 00:47:18 +0000 (00:47 +0000)]
[WebAssembly] Split BBs after throw instructions
Summary:
`throw` instruction is a terminator in wasm, but BBs were not splitted
after `throw` instructions, causing machine instruction verifier to
fail.
This patch
- Splits BBs after `throw` instructions in WasmEHPrepare and adding an
unreachable instruction after `throw`, which will be deleted in
LateEHPrepare pass
- Refactors WasmEHPrepare into two member functions
- Changes the semantics of `eraseBBsAndChildren` in LateEHPrepare pass
to match that of WasmEHPrepare pass, which is newly added. Now
`eraseBBsAndChildren` does not delete BBs with remaining predecessors.
- Fixes style nits, making static function names conform to clang-tidy
- Re-enables the test temporarily disabled by rL346840 && rL346845
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54571
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347003
91177308-0d34-0410-b5e6-
96231b3b80d8
Ron Lieberman [Fri, 16 Nov 2018 00:46:51 +0000 (00:46 +0000)]
[AMDGPU] NFC Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347002
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Thu, 15 Nov 2018 23:14:23 +0000 (23:14 +0000)]
AMDHSA: More code object v3 fixes:
- Make sure IsaInfo::hasCodeObjectV3 returns true only
for AMDHSA
- Update assembler metadata tests to use v2 by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347001
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 21:19:32 +0000 (21:19 +0000)]
[X86] Remove ANY_EXTEND special case from canReduceVMulWidth
Removing this code doesn't affect any lit tests so it doesn't appear to be tested anymore. I assume it was when it was added, but I guess something else changed? Code coverage report also says its unused.
I mostly didn't like that it seemed to count the sign bits as if it was a sign_extend, but then set isPositive as if it was a zero_extend. It feels like we should have picked one interpretation?
Differential Revision: https://reviews.llvm.org/D54596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346995
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Thu, 15 Nov 2018 20:46:55 +0000 (20:46 +0000)]
[AMDGPU] Update code object metadata format documentation
* Add amdhsa prefix to names to allow other tools to use the metadata
without collision.
* Make names consistent.
* Simplify structure.
* Change note record ID.
* Switch from YAML to MsgPack format.
* Document metadata assembler directive.
Patch By: t-tye (Tony Tye)
Differential Revision: https://reviews.llvm.org/D53445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346992
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 Nov 2018 20:27:11 +0000 (20:27 +0000)]
Revert "[ADT] Drop llvm::Optional clang-specific optmization for trivially copyable types"
This reverts commit r346985.
It looks like one of the unittests also needs to be updated, reverting while I investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346990
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 15 Nov 2018 19:32:24 +0000 (19:32 +0000)]
[ADT] Drop llvm::Optional clang-specific optmization for trivially copyable types
Summary:
This fixes libLLVM.so ABI mismatches between llvm compiled with clang
and llvm compiled with gcc (PR39427).
Reviewers: bkramer, sylvestre.ledru, mgorny, hans
Reviewed By: bkramer, hans
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D54540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346985
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 19:20:22 +0000 (19:20 +0000)]
[X86] Minor cleanup to getExtendInVec. NFCI
Use unsigned to calculate the subvector index to avoid a cast.
Remove an unnecessary condition and replace it with a stronger assert.
Use the InVT variable we updated when we extracted instead of grabbing it from the In SDValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346983
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 15 Nov 2018 19:15:41 +0000 (19:15 +0000)]
[InstCombine] adjust rotate direction in tests; NFC
Copy/paste errors - all of the changed tests rotated left before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346982
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 18:59:31 +0000 (18:59 +0000)]
[X86] Add -x86-experimental-vector-widening support to reduceVMULWidth and combineMulToPMADDWD
In reduceVMULWidth, we no longer need to worry about extending the vector to 128 bits first. Regular widening of extends, muls and shuffles will take care of that for us.
In combineMulToPMADDWD, we can handle v2i32 multiplies and allow the VPMADDWD to be widened to v4i32 during type legalization by adding custom widening like we do have for AVG/ADDUS/SUBUS. I had to modify that code a little to allow different and output VTs.
Differential Revision: https://reviews.llvm.org/D54512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346980
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 15 Nov 2018 18:56:49 +0000 (18:56 +0000)]
[WebAssembly] Fix return type of nextByte
Summary:
The old return type did not allow for correct error reporting and was
causing a compiler warning.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54586
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346979
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Thu, 15 Nov 2018 18:50:01 +0000 (18:50 +0000)]
[BinaryFormat] Add MsgPackTypes
Add data structure to represent MessagePack "documents" and convert
to/from both MessagePack and YAML encodings.
Differential Revision: https://reviews.llvm.org/D48175
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346978
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 15 Nov 2018 18:19:56 +0000 (18:19 +0000)]
[InstCombine] add tests for funnel shift (rotate) canonicalization; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346975
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 18:11:52 +0000 (18:11 +0000)]
[X86] Guess that a CPU is Icelake it if reports support for AVX512VBMI2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346973
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Thu, 15 Nov 2018 18:06:42 +0000 (18:06 +0000)]
[LTO] Load sample profile in LTO link step.
Summary:
Load sample profile in LTO link step.
ThinLTO calls populateModulePassManager to load the profile
Reviewers: tejohnson, davidxl, danielcdh
Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D54564
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346971
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 15 Nov 2018 17:42:53 +0000 (17:42 +0000)]
[TTI] Reduction costs only need to include a single extract element cost
We were adding the entire scalarization extraction cost for reductions, which returns the total cost of extracting every element of a vector type.
For reductions we don't need to do this - we just need to extract the 0'th element after the reduction pattern has completed.
Fixes PR37731
Differential Revision: https://reviews.llvm.org/D54585
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346970
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 15 Nov 2018 17:19:14 +0000 (17:19 +0000)]
[InstCombine] fix rotate narrowing bug for non-pow-2 types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346968
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 15 Nov 2018 16:34:26 +0000 (16:34 +0000)]
[InstCombine] add rotate narrowing tests with odd types; NFC
There's a potential miscompile here. It's unlikely in the real
world because this transform is guarded with shouldChangeType(),
but this test file doesn't include a standard data-layout for
some reason (despite including a custom 1), so we can see the bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346966
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 15 Nov 2018 16:34:15 +0000 (16:34 +0000)]
[SLPVectorizer][X86] Regenerate reduction minmax tests and cleanup check prefixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346965
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 15 Nov 2018 16:08:25 +0000 (16:08 +0000)]
[SLPVectorizer][X86] Regenerate reduction tests and add PR37731 test
Cleanup check prefixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346964
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 15 Nov 2018 15:17:15 +0000 (15:17 +0000)]
[X86] Fix MCNullStreamer support for modules with a CodeView flag
This fixes -filetype=null support when compiling for a Win32 target and the module has a CodeView flag.
The only places changed are the uses of getTargetStreamer function - this patch guards both of them with null checks.
Committed on behalf of @eush (Eugene Sharygin)
Differential Revision: https://reviews.llvm.org/D54008
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346962
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 15 Nov 2018 14:53:37 +0000 (14:53 +0000)]
[InstSimplify] delete shift-of-zero guard ops around funnel shifts
This is a problem seen in common rotate idioms as noted in:
https://bugs.llvm.org/show_bug.cgi?id=34924
Note that we are not canonicalizing standard IR (shifts and logic) to the intrinsics yet.
(Although I've written this before...) I think this is the last step before we enable
that transform. Ie, we could regress code by doing that transform without this
simplification in place.
In PR34924, I questioned whether this is a valid transform for target-independent IR,
but I convinced myself this is ok. If we're speculating a funnel shift by turning cmp+br
into select, then SimplifyCFG has already determined that the transform is justified.
It's possible that SimplifyCFG is not taking into account profile or other metadata,
but if that's true, then it's a bug independent of funnel shifts.
Also, we do have CGP code to restore a guard like this around an intrinsic if it can't
be lowered cheaply. But that isn't necessary for funnel shift because the default
expansion in SelectionDAGBuilder includes this same cmp+select.
Differential Revision: https://reviews.llvm.org/D54552
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346960
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 15 Nov 2018 14:52:24 +0000 (14:52 +0000)]
[RISCV] Mark C.EBREAK instruction as having side effects
C.EBREAK was defined with hasSideEffects = 0, which is incorrect and
inconsistent with the non-compressed instruction form. This patch corrects
this oversight.
This wouldn't cause codegen issues, as compressed instructions are only ever
generated by converting the non-compressed form as an MCInst. But having
correct flags is still worthwhile.
Differential Revision: https://reviews.llvm.org/D54256
Patch by Luís Marques.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346959
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 15 Nov 2018 14:46:11 +0000 (14:46 +0000)]
[RISCV] Mark FREM as Expand
Mark the FREM SelectionDAG node as Expand, which is necessary in order to
support the frem IR instruction on RISC-V. This is expanded into a library
call. Adds the corresponding test. Previously, this would have triggered an
assertion at instruction selection time.
Differential Revision: https://reviews.llvm.org/D54159
Patch by Luís Marques.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346958
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 15 Nov 2018 12:35:04 +0000 (12:35 +0000)]
Add missed files from prev. commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346949
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 15 Nov 2018 12:29:43 +0000 (12:29 +0000)]
[MSP430] Add MC layer
Reapply r346374 with the fixes for modules build.
Original summary:
This change implements assembler parser, code emitter, ELF object writer
and disassembler for the MSP430 ISA. Also, more instruction forms are added
to the target description.
Patch by Michael Skvortsov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346948
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing GUO [Thu, 15 Nov 2018 11:51:13 +0000 (11:51 +0000)]
[llvm-objdump] Use `auto` declaration in typecasting
Summary:
According to `MaskRay`, use `auto` for type inference, according to coding standards.
Delete some comments, because these comments can be easily inferred from codes.
Reviewers: jhenderson, MaskRay
Reviewed By: jhenderson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54573
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346946
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 15 Nov 2018 10:11:31 +0000 (10:11 +0000)]
[RISCV] Introduce the RISCVMatInt::generateInstSeq helper
Logic to load 32-bit and 64-bit immediates is currently present in
RISCVAsmParser::emitLoadImm in order to support the li pseudoinstruction. With
the introduction of RV64 codegen, there is a greater benefit of sharing
immediate materialisation logic between the MC layer and codegen. The
generateInstSeq helper allows this by producing a vector of simple structs
representing the chosen instructions. This can then be consumed in the MC
layer to produce MCInsts or at instruction selection time to produce
appropriate SelectionDAG node. Sharing this logic means that both the li
pseudoinstruction and codegen can benefit from future optimisations, and
that this logic can be used for materialising constants during RV64 codegen.
This patch does contain a behaviour change: addi will now be produced on RV64
when no lui is necessary to materialise the constant. In that case addiw takes
x0 as the source register, so is semantically identical to addi.
Differential Revision: https://reviews.llvm.org/D52961
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346937
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 08:23:40 +0000 (08:23 +0000)]
[X86] Add some custom type legalization rules for truncate with -x86-experimental-vector-widening-legalization.
This avoids some nasty shuffles when we have avx512. It will also prevent using zmm truncate instructions when a ymm instruction that zeroes part of an xmm register will do. Also avoid using avx512 truncate instructions when the input is 128 bits or less. These instructions are 2 uops on skx so we can probably find a better single uop shuffle like pshufb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346936
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 08:23:37 +0000 (08:23 +0000)]
[X86] Add -x86-experimental-vector-widening-legalization versions of shuffle-vs-trunc tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346935
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 15 Nov 2018 03:38:59 +0000 (03:38 +0000)]
[WebAssembly] Renumber SIMD bitwise instructions
Summary: Changed to match https://github.com/WebAssembly/simd/pull/54.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54561
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346931
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Thu, 15 Nov 2018 02:42:04 +0000 (02:42 +0000)]
AMDGPU: Fix check lines in fdot2 test:
GCN900 -> GFX900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346925
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing GUO [Thu, 15 Nov 2018 02:36:20 +0000 (02:36 +0000)]
[commit-test] Add blank line for test/tools/llvm-objdump/symbol-table-elf.test
Summary: Test commit
Reviewers: Higuoxing
Reviewed By: Higuoxing
Subscribers: llvm-commits, Higuoxing
Differential Revision: https://reviews.llvm.org/D54562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346924
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Thu, 15 Nov 2018 02:32:43 +0000 (02:32 +0000)]
AMDGPU: Enable code object v3 for AMDHSA only
Differential Revision: https://reviews.llvm.org/D54186
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346923
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 15 Nov 2018 00:21:41 +0000 (00:21 +0000)]
[X86] Don't mark SEXTLOADS with narrow types as Custom with -x86-experimental-vector-widening-legalization.
The narrow types end up requesting widening, but generic legalization will end up scalaring and using a build_vector to do the widening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346916
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 15 Nov 2018 00:02:24 +0000 (00:02 +0000)]
[MachineOutliner][NFC] Check if CandidatesForRepeatedSeq < 2
There's no reason to call getOutliningCandidateInfo with a single candidate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346913
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 Nov 2018 23:13:27 +0000 (23:13 +0000)]
[X86] Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346909
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Nov 2018 23:02:09 +0000 (23:02 +0000)]
[X86] Support v2i32/v4i16/v8i8 load/store using f64 on 32-bit targets under -x86-experimental-vector-widening-legalization.
On 64-bit targets the type legalizer will use i64 to legalize these. But when i64 isn't legal, the type legalizer won't try an FP type. So do it manually instead.
There are a few regressions in here due to some v2i32 operations like mul and div now being reassembled into a full vector just to store instead of storing the pieces. But this was already occuring in 64-bit mode so its not a new issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346908
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 22:44:08 +0000 (22:44 +0000)]
[X86] Update masked expandload/compressstore test names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346903
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Nov 2018 22:34:25 +0000 (22:34 +0000)]
[InstSimplify] add more tests for funnel shift with select; NFC
The cases are just different enough that we should have
complete tests to avoid bugs from typos in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346902
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 14 Nov 2018 22:23:38 +0000 (22:23 +0000)]
[MachineOutliner][NFC] Don't compute liveness if X16/X17/NZCV are unused
Using the MBB flags, we can tell if X16/X17/NZCV are unused in a block,
and also not live out.
If this holds for all MBBs, then we can avoid checking for liveness on
that candidate. Furthermore, if it holds for an individual candidate's
MBB, then we can avoid checking for liveness on that candidate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346901
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 14 Nov 2018 21:57:51 +0000 (21:57 +0000)]
Remove unused getMDNodeFwdRefOrNull interfaces (NFC)
Summary:
Followup from D53596/r346891. Remove the getMDNodeFwdRefOrNull interface
to the MDLoader since it is no longer used. Also improve error messages
when the internal implementation is used within the MDLoader.
Reviewers: steven_wu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346899
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 21:31:50 +0000 (21:31 +0000)]
[X86][SSE] Add SSE2/SSE42 masked load/store tests
Now that the load/store tests are split the impact of running the tests on multiple (illegal) targets is a lot less impactful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346896
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 14 Nov 2018 21:11:53 +0000 (21:11 +0000)]
Bias physical register immediate assignments
The machine scheduler currently biases register copies to/from
physical registers to be closer to their point of use / def to
minimize their live ranges. This change extends this to also physical
register assignments from immediate values.
This causes a reduction in reduction in overall register pressure and
minor reduction in spills and indirectly fixes an out-of-registers
assertion (PR39391).
Most test changes are from minor instruction reorderings and register
name selection changes and direct consequences of that.
Reviewers: MatzeB, qcolombet, myatsina, pcc
Subscribers: nemanjai, jvesely, nhaehnle, eraman, hiraditya,
javed.absar, arphaman, jfb, jsji, llvm-commits
Differential Revision: https://reviews.llvm.org/D54218
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346894
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 14 Nov 2018 20:58:04 +0000 (20:58 +0000)]
[ThinLTO] Fix a crash in lazy loading of Metadata
This is a revised version of D41474.
When the debug location is parsed in BitcodeReader::parseFunction, the
scope and inlinedAt MDNodes are obtained via MDLoader->getMDNodeFwdRefOrNull(),
which will create a forward ref if they were not yet loaded.
Specifically, if one of these MDNodes is in the module level metadata
block, and this is during ThinLTO importing, that metadata block is
lazily loaded.
Most places in that invoke getMDNodeFwdRefOrNull have a corresponding call
to resolveForwardRefsAndPlaceholders which will take care of resolving them.
E.g. places that call getMetadataFwdRefOrLoad, or at the end of parsing a
function-level metadata block, or at the end of the initial lazy load of
module level metadata in order to handle invocations of getMDNodeFwdRefOrNull
for named metadata and global object attachments. However, the calls for
the scope/inlinedAt of debug locations are not backed by any such call to
resolveForwardRefsAndPlaceholders.
To fix this, change the scope and inlinedAt parsing to instead use
getMetadataFwdRefOrLoad, which will ensure the forward refs to lazily
loaded metadata are resolved.
Fixes PR35472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346891
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 20:44:59 +0000 (20:44 +0000)]
[X86] Split masked load/store test files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346889
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 20:25:50 +0000 (20:25 +0000)]
[X86] Update masked load/store test names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346887
91177308-0d34-0410-b5e6-
96231b3b80d8
Aakanksha Patil [Wed, 14 Nov 2018 20:10:41 +0000 (20:10 +0000)]
AMDGPU: Additional pattern for i16 median3 matching
min(max(a, b), max(min(a, b), c))
Differential Revision: https://reviews.llvm.org/D54494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346886
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 14 Nov 2018 19:53:41 +0000 (19:53 +0000)]
Mark @llvm.trap cold
A call to @llvm.trap can be expected to be cold (i.e. unlikely to be
reached in a normal program execution).
Outlining paths which unconditionally trap is an important memory
saving. As the hot/cold splitting pass (imho) should not treat all
noreturn calls as cold, explicitly mark @llvm.trap cold so that it can
be outlined.
Split out of https://reviews.llvm.org/D54244.
Differential Revision: https://reviews.llvm.org/D54329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346885
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Wed, 14 Nov 2018 19:39:59 +0000 (19:39 +0000)]
[Support] Teach YAMLIO about polymorphic types
Add support for "polymorphic" types to YAMLIO.
PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or
Sequence). When inputting, the PolymorphicTraits type is told which type to
become, and when outputting the PolymorphicTraits type is asked which type it
currently is.
Also add support for TaggedScalarTraits to allow dynamically differentiating
between multiple scalar types using YAML tags.
Serialize empty maps as "{}" and empty sequences as "[]", so that types
are preserved when round-tripping PolymorphicTraits. This change has
equivalent semantics, but may break e.g. tests which compare output
verbatim.
Differential Revision: https://reviews.llvm.org/D48144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346884
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 14 Nov 2018 19:30:13 +0000 (19:30 +0000)]
[ThinLTO] Update handling of vararg functions to match inliner
Summary:
Previously we marked all vararg functions as non-inlinable in the
function summary, which prevented their importing. However, the
corresponding inliner restriction was loosened in r321940/r342675
to only apply to functions calling va_start. Adjust the summary
flag computation to match.
Reviewers: davidxl
Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D54270
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346883
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Nov 2018 19:12:54 +0000 (19:12 +0000)]
[InstSimplify] add tests for funnel shift with select; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346881
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 14 Nov 2018 18:36:24 +0000 (18:36 +0000)]
[WebAssembly] Add support for dylink section in object format
See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md.
Differential Revision: https://reviews.llvm.org/D54490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346880
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Nov 2018 18:16:21 +0000 (18:16 +0000)]
[X86] Allow pmulh to be formed from narrow vXi16 vectors under -x86-experimental-vector-widening-legalization
Narrower vectors will be widened to 128 bits without changing the element size. And generic type legalization can already handle widening mulhu/mulhs.
Differential Revision: https://reviews.llvm.org/D54513
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346879
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Wed, 14 Nov 2018 17:55:07 +0000 (17:55 +0000)]
[InstCombine] Remove a couple of asserts based on incorrect assumptions
Summary:
These asserts are based on the assumption that the order of true/false operands in a select and those in the compare would always be the same.
This fixes PR39595.
Reviewers: craig.topper, spatel, dmgreen
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54359
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346874
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Nov 2018 16:03:36 +0000 (16:03 +0000)]
[InstCombine] fix formatting for matchBSwap(); NFC
We should have a similar function for matching rotate and/or
funnel shift, so tidy up the related existing call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346871
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Nov 2018 15:58:40 +0000 (15:58 +0000)]
[VPlan, SLP] Use SmallPtrSet for Candidates.
This slightly improves the candidate handling in getBest().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346870
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Wed, 14 Nov 2018 15:27:07 +0000 (15:27 +0000)]
[SimplifyCFG] Regenerate preserve-branchweights.ll test. NFC
Regenerate this test using update_test_checks.py in preparation for an
upcomming commit, to make it not depend on the names of instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346869
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 15:04:08 +0000 (15:04 +0000)]
[TTI] getOperandInfo - a broadcast shuffle means the result is OK_UniformValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346868
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 14 Nov 2018 13:43:19 +0000 (13:43 +0000)]
Document how to comment an actual parameter.
Differential Revision: https://reviews.llvm.org/D54446
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346861
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Nov 2018 13:33:44 +0000 (13:33 +0000)]
[VPlan] Remove LLVM_DEBUG from VPlanSlp::dumpBundle.
The caller should take care of only calling it with debug enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346860
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 13:23:28 +0000 (13:23 +0000)]
[TTI] Pull out repeated 'ConcreteTTI' static_casts. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346859
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Nov 2018 13:21:26 +0000 (13:21 +0000)]
[VPlan] Update ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346858
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Nov 2018 13:11:49 +0000 (13:11 +0000)]
[VPlan, SLP] Add simple SLP analysis on top of VPlan.
This patch adds an initial implementation of the look-ahead SLP tree
construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence
of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha,
Luís F. W. Góes'.
It returns an SLP tree represented as VPInstructions, with combined
instructions represented as a single, wider VPInstruction.
This initial version does not support instructions with multiple
different users (either inside or outside the SLP tree) or
non-instruction operands; it won't generate any shuffles or
insertelement instructions.
It also just adds the analysis that builds an SLP tree rooted in a set
of stores. It does not include any cost modeling or memory legality
checks. The plan is to integrate it with VPlan based cost modeling, once
available and to only apply it to operations that can be widened.
A follow-up patch will add a support for replacing instructions in a
VPlan with their SLP counter parts.
Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev
Reviewed By: rengolin
Differential Revision: https://reviews.llvm.org/D4949
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346857
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 12:24:50 +0000 (12:24 +0000)]
[CostModel] Add generic expansion funnel shift cost support
Add support for the expansion of funnelshift/rotates to getIntrinsicInstrCost.
This also required us to move the X86 fshl/fshr costs to the same place as the rotates to avoid expansion and get correct scalarization vs vectorization costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346854
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing GUO [Wed, 14 Nov 2018 11:30:34 +0000 (11:30 +0000)]
[llvm-objdump] Improve ELF file type checking statements (D54509)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346851
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 14 Nov 2018 11:26:35 +0000 (11:26 +0000)]
[X86][AVX512] Remove constant pool shuffle decoding from SelectionDAG
This patch removes the last use of the constant pool shuffle decode helper and consistently uses the 'getTargetShuffleMaskIndices' versions instead. The constant pool versions are now purely used for assembly comments.
The avx512vbmi intrinsic upgrades had to be altered as they were being decoded as broadcasts, similar to what I fixed in rL346032. I don't think the change is critical - although its annoying that we lose the {k}{z} instruction test coverage as they are tricky to generate....
Differential Revision: https://reviews.llvm.org/D54083
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346850
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 14 Nov 2018 10:11:22 +0000 (10:11 +0000)]
[WebAssembly] Make sure event-section XFAILs for build options
rL346840 temporarily marked event-section.ll as XFAIL because it was
failing for builds with LLVM_ENABLE_EXPENSIVE_CHECKS turned on, but
to make sure it XFAILs even without LLVM_ENABLE_EXPENSIVE_CHECKS on we
need this `-verify-machineinstrs` flag, which was missing in the
previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346845
91177308-0d34-0410-b5e6-
96231b3b80d8
Sven van Haastregt [Wed, 14 Nov 2018 10:05:28 +0000 (10:05 +0000)]
Print newline after banner for ModulePass
Before this commit, `llc -print-after-all` would print something like:
*** IR Dump After Pre-ISel Intrinsic Lowering ***; ModuleID = ...
Emit a newline such that ModuleID appears on a line by its own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346844
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Nov 2018 10:04:30 +0000 (10:04 +0000)]
Recommit r346483: [CallSiteSplitting] Only record conditions up to the IDom(call site).
The underlying problem causing the expensive-check failure was fixed in
rL346769.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346843
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 14 Nov 2018 09:51:21 +0000 (09:51 +0000)]
[WebAssembly] Temporarily disable event-section.ll
This test is failing in builds with LLVM_ENABLE_EXPENSIVE_CHECKS after
rL346825 not because of the patch but due to a pre-existing codegen
problem. Marking this as XFAIL temporarily until the bug is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346840
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Nov 2018 07:51:26 +0000 (07:51 +0000)]
[X86] Add -x86-experimental-vector-widening command lines to pmulh.ll
I've only added sse2 and sse4.1 variants as I'm only interested in the two v4i16 tests and I don't expect that to different with AVX other than a v prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346834
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 14 Nov 2018 07:19:21 +0000 (07:19 +0000)]
Correctly instantiate `iterator_adaptor_base` when defining `pointer_iterator`
The definition of `pointer_iterator` omits what should be a `iterator_traits::<>::iterator_category` parameter from `iterator_adaptor_base`. As a result, iterators based on `pointer_iterator` always have defaulted value types and the wrong iterator category.
The definition of `pointee_iterator` just a few lines above does this correctly.
This resolves [[ https://bugs.llvm.org/show_bug.cgi?id=39617 | bug 39617 ]].
Patch by Dylan MacKenzie!
Reviewers: dblaikie
Differential Revision: https://reviews.llvm.org/D54377
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346833
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 14 Nov 2018 02:46:21 +0000 (02:46 +0000)]
[WebAssembly] Add support for the event section
Summary:
This adds support for the 'event section' specified in the exception
handling proposal. (This was named 'exception section' first, but later
renamed to 'event section' to take possibilities of other kinds of
events into consideration. But currently we only store exception info in
this section.)
The event section is added between the global section and the export
section. This is for ease of validation per request of the V8 team.
This patch:
- Creates the event symbol type, which is a weak symbol
- Makes 'throw' instruction take the event symbol '__cpp_exception'
- Adds relocation support for events
- Adds WasmObjectWriter / WasmObjectFile (Reader) support
- Adds obj2yaml / yaml2obj support
- Adds '.eventtype' printing support
Reviewers: dschuff, sbc100, aardappel
Subscribers: jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346825
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Wed, 14 Nov 2018 02:34:45 +0000 (02:34 +0000)]
[PowerPC] Enhance the selection(ISD::VSELECT) of vector type
To make ISD::VSELECT available(legal) so long as there are altivec instruction, otherwise it's default behavior is expanding,
which is legalized at type-legalization phase. Use xxsel to match vselect if vsx is open, or use vsel.
Differential Revision: https://reviews.llvm.org/D49531
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346824
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 14 Nov 2018 01:47:32 +0000 (01:47 +0000)]
Revert r346810 "Preserve loop metadata when splitting exit blocks"
It broke the Windows self-host:
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1457
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346823
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 14 Nov 2018 00:39:29 +0000 (00:39 +0000)]
[CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness.
The scan was incorrectly skipping the first instruction, so a register
could appear to be dead when it was actually live. This eventually leads
to a machine verifier failure and miscompile in arm-ldst-opt.
Differential Revision: https://reviews.llvm.org/D54491
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346821
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Tue, 13 Nov 2018 23:41:31 +0000 (23:41 +0000)]
[MachineOutliner][NFC] Use flags set in all candidates to check for calls
If we keep track of if the ContainsCalls bit is set in the MBB flags for each
candidate, then we have a better chance of not checking the candidate for calls
at all.
This saves quite a few checks in some CTMark tests (~200 in Bullet, for
example.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346816
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 13 Nov 2018 23:31:25 +0000 (23:31 +0000)]
Make dsymutil more robust when parsing load commands.
rdar://problem/
45883463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346815
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Nov 2018 23:27:23 +0000 (23:27 +0000)]
[InstCombine] fold funnel shift amount based on demanded bits
The shift amount of a funnel shift is modulo the scalar bitwidth:
http://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic
...so we can use demanded bits analysis on that operand to simplify it
when we have a power-of-2 bitwidth.
This is another step towards canonicalizing {shift/shift/or} to the
intrinsics in IR.
Differential Revision: https://reviews.llvm.org/D54478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346814
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Voss [Tue, 13 Nov 2018 23:21:00 +0000 (23:21 +0000)]
Make the ExpandTilde unit test expect "\" (not "/") on Win32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346813
91177308-0d34-0410-b5e6-
96231b3b80d8