OSDN Git Service
Lang Hames [Sun, 23 Sep 2018 02:09:18 +0000 (02:09 +0000)]
[ORC] Update ORC C bindings to use the new llvm::Error C API.
This replaces instances of the LLVMOrcErrorCode type with LLVMErrorRef,
simplifying the implementation of the OrcCBindingsStack class and ORC
C API bindings and making it possible to return arbitrary (wrapped)
llvm::Errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342828
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Sep 2018 23:12:34 +0000 (23:12 +0000)]
[DAGCombiner] Simplify some code in visitBITCAST. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342826
91177308-0d34-0410-b5e6-
96231b3b80d8
Tri Vo [Sat, 22 Sep 2018 22:17:50 +0000 (22:17 +0000)]
[AArch64] Support adding X[8-15,18] registers as CSRs.
Summary:
Specifying X[8-15,18] registers as callee-saved is used to support
CONFIG_ARM64_LSE_ATOMICS in Linux kernel. As part of this patch we:
- use custom CSR list/mask when user specifies custom CSRs
- update Machine Register Info's list of CSRs with additional custom CSRs in
LowerCall and LowerFormalArguments.
Reviewers: srhines, nickdesaulniers, efriedma, javed.absar
Reviewed By: nickdesaulniers
Subscribers: kristof.beyls, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D52216
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342824
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Sep 2018 18:03:14 +0000 (18:03 +0000)]
[DAGCombiner] Rewrite r331896 in a different way to address a FIXME. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342809
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Sat, 22 Sep 2018 17:31:01 +0000 (17:31 +0000)]
[bpf] Test case for symbol information in object file
This patch tests the change introduced in r342556.
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342807
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 22 Sep 2018 14:43:55 +0000 (14:43 +0000)]
[InstCombine][x86] try even harder to convert blendv intrinsic to generic IR (PR38814)
Follow-up to rL342324 (D52059):
Missing optimizations with blendv are shown in:
https://bugs.llvm.org/show_bug.cgi?id=38814
This is an easier and more powerful solution than adding pattern matching for a few
special cases in the backend. The potential danger with this transform in IR is that
the condition value can get separated from the select, and the backend might not be
able to make a blendv out of it again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342806
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 22 Sep 2018 07:36:20 +0000 (07:36 +0000)]
[lib/MC] - Set SHF_EXCLUDE flag for .dwo sections.
DWARF5 spec says about single file split case:
"The sections that do not require relocation, however, can be written
to the relocatable object (.o) file but ignored by the
the linker or they can be written to a separate DWARF object (.dwo) file
that need not be accessed by the linker."
Nice way to make linker to ignore them is to set SHF_EXCLUDE flag.
It seems to be not harmful to always set it for .dwo sections.
That is what this patch does.
Differential revision: https://reviews.llvm.org/D52303
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342800
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 22 Sep 2018 06:04:32 +0000 (06:04 +0000)]
[mips] Provide more detailed description for MIPS targets. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342799
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 22 Sep 2018 06:04:26 +0000 (06:04 +0000)]
[mips] Remove obsoleted "experimental" tag from MIPS 64-bit targets. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342798
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Sep 2018 05:53:27 +0000 (05:53 +0000)]
[InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely invertible
Summary: This restores the combine that was reverted in r341883. The infinite loop from the failing test no longer occurs due to changes from r342163.
Reviewers: spatel, dmgreen
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52070
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342797
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Sep 2018 05:16:35 +0000 (05:16 +0000)]
[X86] Fix inline expansion for memset in x32
Summary: Similar to D51893 which was for memcpy
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342796
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Sep 2018 05:08:38 +0000 (05:08 +0000)]
[X86] Fold (movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C)) for vXi8 vectors.
We don't have a vXi8 shift left so we need to bitcast to a vXi16 vector to perform the shift. If we let lowering legalize the vXi8 shift we get an extra and that we don't need and fail to remove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342795
91177308-0d34-0410-b5e6-
96231b3b80d8
Vyacheslav Zakharin [Sat, 22 Sep 2018 01:01:03 +0000 (01:01 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342792
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Fri, 21 Sep 2018 23:48:12 +0000 (23:48 +0000)]
[llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters.
This matches GNU behavior for size and allows use of cut to parse the output of llvm-size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342791
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 21 Sep 2018 23:14:05 +0000 (23:14 +0000)]
[X86] Teach fast isel to use MOV32ri64 for loading an unsigned 32 immediate into a 64-bit register.
Previously we used SUBREG_TO_REG+MOV32ri. But regular isel was changed recently to use the MOV32ri64 pseudo. Fast isel now does the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342788
91177308-0d34-0410-b5e6-
96231b3b80d8
Warren Ristow [Fri, 21 Sep 2018 23:03:50 +0000 (23:03 +0000)]
[Loop Vectorizer] Abandon vectorization when no integer IV found
Support for vectorizing loops with secondary floating-point induction
variables was added in r276554. A primary integer IV is still required
for vectorization to be done. If an FP IV was found, but no integer IV
was found at all (primary or secondary), the attempt to vectorize still
went forward, causing a compiler-crash. This change abandons that
attempt when no integer IV is found. (Vectorizing FP-only cases like
this, rather than bailing out, is discussed as possible future work
in D52327.)
See PR38800 for more information.
Differential Revision: https://reviews.llvm.org/D52327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342786
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 21 Sep 2018 23:01:32 +0000 (23:01 +0000)]
Move individual benchmark targets into the Utils folder in IDEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342785
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 21 Sep 2018 23:00:37 +0000 (23:00 +0000)]
Try moving this function to another file.
I can't reproduce this compilation failure so I can't really
test this fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342784
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 21 Sep 2018 22:59:48 +0000 (22:59 +0000)]
[ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file
has been finalized.
This prevents crashes on unfinalized objects for clients using
JITEventListeners.
Patch by Geoff Levner. Thanks Geoff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342783
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 21 Sep 2018 22:55:57 +0000 (22:55 +0000)]
Add benchmark and benchmark_main to the Utils folder in IDEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342782
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 21 Sep 2018 22:44:31 +0000 (22:44 +0000)]
Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342781
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 21 Sep 2018 22:36:28 +0000 (22:36 +0000)]
[NativePDB] Add support for reading function signatures.
This adds support for parsing function signature records and returning
them through the native DIA interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342780
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 21 Sep 2018 22:36:04 +0000 (22:36 +0000)]
[PDB] Add native reading support for UDT / class types.
This allows the native reader to find records of class/struct/
union type and dump them. This behavior is tested by using the
diadump subcommand against golden output produced by actual DIA
SDK on the same PDB file, and again using pretty -native to
confirm that we actually dump the classes. We don't find class
members or anything like that yet, for now it's just the class
itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342779
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Fri, 21 Sep 2018 22:10:17 +0000 (22:10 +0000)]
[New PM][PassInstrumentation] Adding PassInstrumentation to the AnalysisManager runs
As a prerequisite to time-passes implementation which needs to time both passes
and analyses, adding instrumentation points to the Analysis Manager.
The are two functional differences between Pass and Analysis instrumentation:
- the latter does not increment pass execution counter
- it does not provide ability to skip execution of the corresponding analysis
Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D51275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342778
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 21 Sep 2018 21:59:34 +0000 (21:59 +0000)]
llvm-dwarfdump --statistics: Unique abstract origins across multiple CUs.
Instead of indexing local variables by DIE offset, use the variable
name + the path through the lexical block tree. This makes the lookup
key consistent across duplicate abstract origins in different CUs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342776
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Sep 2018 21:25:16 +0000 (21:25 +0000)]
[x86] add more tests for poetntial andnp splitting with AVX1; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342775
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 21 Sep 2018 21:08:26 +0000 (21:08 +0000)]
[X86] Add AVX512 target to load scalar to vector tests
To investigate broadcast instruction codegen for D51553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342773
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Fri, 21 Sep 2018 20:53:55 +0000 (20:53 +0000)]
[WebAssembly] Simplified selecting asmmatcher stack instructions.
Summary:
By using the existing isCodeGenOnly bit in the tablegen defs, as
suggested by tlively in https://reviews.llvm.org/D51662
Tested: llvm-lit -v `find test -name WebAssembly`
Reviewers: tlively
Subscribers: dschuff, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342772
91177308-0d34-0410-b5e6-
96231b3b80d8
Jorge Gorbe Moya [Fri, 21 Sep 2018 20:45:08 +0000 (20:45 +0000)]
Test commit. Removed a blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342771
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Fri, 21 Sep 2018 18:46:39 +0000 (18:46 +0000)]
[WebAssembly][NFC] Rename simd-conversions test to simd-bitcasts
Summary:
This name is more accurate and I want to reuse the simd-conversions
name for testing the actual conversion ops.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52333
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342761
91177308-0d34-0410-b5e6-
96231b3b80d8
Caroline Tice [Fri, 21 Sep 2018 18:41:31 +0000 (18:41 +0000)]
Pass code-model through Module IR to LTO which will use it.
Currently the code-model does not get saved in the module IR,
so if a code model is specified when compiling with LTO,
it gets lost and is not propagated properly to LTO. This patch,
along with one for the front end, fixes that.
Differential Revision: https://reviews.llvm.org/D52322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342760
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 21 Sep 2018 18:35:32 +0000 (18:35 +0000)]
[NFC] use bit_cast in PointerSumType
The code was already using union and memcpy to do this. Remove the memcpy. We can't just change the union because a reference to its member is returned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342759
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Sep 2018 18:24:53 +0000 (18:24 +0000)]
[x86] add (negative) andnp test for D52318; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342756
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Sep 2018 18:03:49 +0000 (18:03 +0000)]
[x86] add test with optsize attribute for scalar->vector transform; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342755
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Fri, 21 Sep 2018 17:47:58 +0000 (17:47 +0000)]
[WebAssembly] Made assembler only use stack instruction tablegen defs
Summary:
This ensures we have the non-register version of the instruction.
The stack version of call_indirect now wants a type index argument,
so that has been added in the existing tests.
Tested:
llvm-lit -v `find test -name WebAssembly`
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D51662
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342753
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 21 Sep 2018 17:40:35 +0000 (17:40 +0000)]
[Hexagon] Avoid functions with exception handling in HexagonConstExtenders
The constant-extender optimization does a form of code motion, which is
complicated in the presence of exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342751
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 21 Sep 2018 16:32:49 +0000 (16:32 +0000)]
[tblgen] Fix undefined behaviour when assigning integers to large bits<n>'s
This code:
bits<96> X = 0;
was triggering undefined behaviour since it iterates over bits 0..95 and tests
them against the IntInit using 1LL << I.
This patch resolves the undefined behaviour by continuing to treat the IntInit
as a 64-bit value and simply causing all bit tests in excess of 64-bits to report
false. As a result,
bits<96> X = -1;
will be equivalent to:
bits<96> X;
let X{0-63} = -1;
let X{64-95} = 0;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342744
91177308-0d34-0410-b5e6-
96231b3b80d8
Sameer Sahasrabuddhe [Fri, 21 Sep 2018 16:31:51 +0000 (16:31 +0000)]
revert changes from r342722
"[AMDGPU] lower-switch in preISel as a workaround for legacy DA"
This broke regression tests. The first breakage was noticed here:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/23549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342743
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 21 Sep 2018 15:47:41 +0000 (15:47 +0000)]
AArch64FastISel: Abort if we failed to select operand of intrinsic
rdar://
44642447
Differential Revision: https://reviews.llvm.org/D52335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342742
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 21 Sep 2018 14:43:49 +0000 (14:43 +0000)]
[InstCombine] add tests for extractelement; NFC
There are folds under visitExtractElementInst() that don't appear
to have any test coverage, so adding a few basic cases here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342740
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 21 Sep 2018 14:31:25 +0000 (14:31 +0000)]
[ADT] restrict bit_cast to trivially-constructible To
Summary: As discussed in r341853 by blaikie, the reinterpret_cast was technically an aliasing violation. Restrict our bit_cast implementation to To which are trivially-constructible (and note the existing restriction to constexpr). Once we move to C++17 we can use a version of bit_cast without these restrictions, or if we care we can SFINAE a different implementation when To isn't trivially-constructible.
Originally landed in r342710 and reverted in r342711 because is_trivially_copyable is only in GCC 5.1 and later.
Reviewers: dblaikie, rsmith
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D52332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342739
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 21 Sep 2018 14:07:20 +0000 (14:07 +0000)]
[X86][Sched] Add zero idiom sched data to the SNB model.
Summary:
On SNB, renamer-based zeroing does not work for:
- 16 and 8-bit GPRs[1].
- MMX [2].
- ANDN variants [3]
[1] echo 'sub %ax, %ax' | /tmp/llvm-exegesis -mode=uops -snippets-file=-
[2] echo 'pxor %mm0, %mm0' | /tmp/llvm-exegesis -mode=uops -snippets-file=-
[3] echo 'andnps %xmm0, %xmm0' | /tmp/llvm-exegesis -mode=uops -snippets-file=-
Reviewers: RKSimon, andreadb
Subscribers: gbedwell, craig.topper, llvm-commits
Differential Revision: https://reviews.llvm.org/D52358
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342736
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 21 Sep 2018 12:43:07 +0000 (12:43 +0000)]
[X86][BtVer2] Fix latency and resource cycles of AVX 256-bit zero-idioms.
This patch introduces a SchedWriteVariant to describe zero-idiom VXORP(S|D)Yrr
and VANDNP(S|D)Yrr.
This is a follow-up of r342555.
On Jaguar, a VXORPSYrr is 2 macro opcodes. Only one opcode is eliminated at
register-renaming stage. The other opcode has to be executed to set the upper
half of the destination YMM.
Same for VANDNP(S|D)Yrr.
Differential Revision: https://reviews.llvm.org/D52347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342728
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 21 Sep 2018 12:28:44 +0000 (12:28 +0000)]
[test] Fix Assembler/debug-info.ll
Update Assembler/debug-info.ll to contain discriminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342727
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 21 Sep 2018 12:22:14 +0000 (12:22 +0000)]
[X86] Add scheduling tests for AVX1 256-bit zero-idioms. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 21 Sep 2018 12:03:14 +0000 (12:03 +0000)]
Ensure that variant part discriminator is read by MetadataLoader
https://reviews.llvm.org/D42082 introduced variant parts to debug info
in LLVM. Subsequent work on the Rust compiler has found a bug in that
patch; namely, there is a path in MetadataLoader that fails to restore
the discriminator.
This patch fixes the bug.
Patch by: Tom Tromey
Differential revision: https://reviews.llvm.org/D52340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 21 Sep 2018 11:55:17 +0000 (11:55 +0000)]
[dsymutil] Suppress CoreFoundation leaks in tests.
This suppresses CoreFoundation originated leaks in the dsymutil tests.
I'm not sure if this is a false positive or not, but either way we don't
have control over it and shouldn't keep the bot red.
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342724
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 21 Sep 2018 11:38:35 +0000 (11:38 +0000)]
[ADT] Hack around GCC 5.4 miscompiling Optional of enum.
I'm still not 100% sure that this is not UB lingering (Optional has UB
and should use std::launder, but we don't have std::launder)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342723
91177308-0d34-0410-b5e6-
96231b3b80d8
Sameer Sahasrabuddhe [Fri, 21 Sep 2018 11:26:55 +0000 (11:26 +0000)]
[AMDGPU] lower-switch in preISel as a workaround for legacy DA
Summary:
The default target of the switch instruction may sometimes be an
"unreachable" block, when it is guaranteed that one of the cases is
always taken. The dominator tree concludes that such a switch
instruction does not have an immediate post dominator. This confuses
divergence analysis, which is unable to propagate sync dependence to
the targets of the switch instruction.
As a workaround, the AMDGPU target now invokes lower-switch as a
preISel pass. LowerSwitch is designed to handle the unreachable
default target correctly, allowing the divergence analysis to locate
the correct immediate dominator of the now-lowered switch.
Reviewers: arsenm, nhaehnle
Reviewed By: nhaehnle
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits, simoll
Differential Revision: https://reviews.llvm.org/D52221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342722
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Timofeev [Fri, 21 Sep 2018 10:31:22 +0000 (10:31 +0000)]
[AMDGPU] Divergence driven instruction selection. Part 1.
Summary: This change is the first part of the AMDGPU target description
change. The aim of it is the effective splitting the vector and scalar
flows at the selection stage. Selection uses predicate functions based
on the framework implemented earlier - https://reviews.llvm.org/D35267
Differential revision: https://reviews.llvm.org/D52019
Reviewers: rampitec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342719
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 21 Sep 2018 07:50:21 +0000 (07:50 +0000)]
[dwarfdump] Verify DW_AT_type is set and points to a compatible DIE.
This extends the verifier to catch three new errors:
* Missing DW_AT_type attributes for DW_TAG_formal_parameter,
DW_TAG_variable and DW_TAG_array_type.
* Valid references for DW_AT_type pointing to a non-type tag.
Differential revision: https://reviews.llvm.org/D52223
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342713
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 21 Sep 2018 07:49:29 +0000 (07:49 +0000)]
[dwarfdump] Verify compatibility of attribute TAGs.
Verify that DW_AT_specification and DW_AT_abstract_origin reference a
DIE with a compatible tag.
Differential revision: https://reviews.llvm.org/D38719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342712
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 21 Sep 2018 05:34:12 +0000 (05:34 +0000)]
Revert "[ADT] restrict bit_cast to trivially-constructible To"
Of course some bots don't have std::is_trivially_constructible...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342711
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 21 Sep 2018 05:18:49 +0000 (05:18 +0000)]
[ADT] restrict bit_cast to trivially-constructible To
Summary: As discussed in r341853 by blaikie, the reinterpret_cast was technically an aliasing violation. Restrict our bit_cast implementation to To which are trivially-constructible (and note the existing restriction to constexpr). Once we move to C++17 we can use a version of bit_cast without these restrictions, or if we care we can SFINAE a different implementation when To isn't trivially-constructible.
Reviewers: dblaikie, rsmith
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D52332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342710
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 21 Sep 2018 05:17:42 +0000 (05:17 +0000)]
Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue
Summary:
his code was in CGDecl.cpp and really belongs in LLVM's isBytewiseValue. Teach isBytewiseValue the tricks clang's isRepeatedBytePattern had, including merging undef properly, and recursing on more types.
clang part of this patch: D51752
Subscribers: dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D51751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342709
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Sep 2018 03:24:42 +0000 (03:24 +0000)]
[WebAssembly] Revert r342701, "Add WebAssembly to LLVM_ALL_TARGTS."
There is a memory leak which is detected in some of the sanitizer builds.
MCSymbolWasm contains SmallVectors for holding signature information,
however MCContext doesn't run destructors for MCSymbols, so in cases
where the SmallVectors heap-allocate, the memory is leaked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342707
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 21 Sep 2018 01:54:08 +0000 (01:54 +0000)]
[MCA] Remove dependency on CodeGen.
Summary:
There isn't any actual dependency - there's one #include from CodeGen
but nothing from the header is actually used.
With this change we can use the MCA library from CodeGen without
circular dependencies (e.g. for scheduling).
Reviewers: andreadb
Reviewed By: andreadb
Authored By: orodley
Subscribers: mgorny, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D52288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342706
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristina Brooks [Fri, 21 Sep 2018 01:53:51 +0000 (01:53 +0000)]
[Docs] [Support] Correct a missed reference and use up to date .inc examples.
In my original diff I missed #include "llvm/System/Thing.h" and forgot to update a
reference to .inc files a few lines down. This patch corrects these things as
they were missed in revision 342500.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342705
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 21 Sep 2018 00:51:04 +0000 (00:51 +0000)]
[MachineCopyPropagation] Refactor copy tracking into a class. NFC
This is a bit easier to follow than handling the copy and src maps
directly in the pass, and will make upcoming changes to how this is
done easier to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342703
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Fri, 21 Sep 2018 00:47:31 +0000 (00:47 +0000)]
[llvm-objcopy/llvm-strip]: handle --version
Summary:
Implement --version for objcopy and strip.
I think there are LLVM utilities that automatically handle this, but that doesn't seem to work with custom parsing since this binary handles both objcopy and strip, so it uses custom parsing.
This fixes PR38298
Reviewers: jhenderson, alexshap, jakehehrlich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52328
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342702
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Sep 2018 00:39:57 +0000 (00:39 +0000)]
[WebAssembly] Add WebAssembly to LLVM_ALL_TARGTS.
This makes WebAssembly build by default, rather than requiring
LLVM_EXPERIMENTAL_TARGETS_TO_BUILD!
Differential Revision: https://reviews.llvm.org/D43211
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342701
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 21 Sep 2018 00:08:33 +0000 (00:08 +0000)]
[MachineCopyPropagation] Minor clang-formatting. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342700
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 20 Sep 2018 23:11:27 +0000 (23:11 +0000)]
Fix DenseSet::ConstIterator typedefs
Fix DenseSet::ConstIterator pointer/reference typedefs to be const
Patch by Brad Moody!
Differential Revision: https://reviews.llvm.org/D52260
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342697
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Thu, 20 Sep 2018 23:01:56 +0000 (23:01 +0000)]
Add the ability to register callbacks for removal and insertion of MachineInstrs
https://reviews.llvm.org/D52127
This patch adds the ability to watch for insertions/deletions of
MachineInstructions similar to MachineRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342696
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 20 Sep 2018 22:48:09 +0000 (22:48 +0000)]
Remove an unused function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342694
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Thu, 20 Sep 2018 22:24:27 +0000 (22:24 +0000)]
bpf: check illegal usage of XADD insn return value
Currently, BPF has XADD (locked add) insn support and the
asm looks like:
lock *(u32 *)(r1 + 0) += r2
lock *(u64 *)(r1 + 0) += r2
The instruction itself does not have a return value.
At the source code level, users often use
__sync_fetch_and_add()
which eventually translates to XADD. The return value of
__sync_fetch_and_add() is supposed to be the old value
in the xadd memory location. Since BPF::XADD insn does not
support such a return value, this patch added a PreEmit
phase to check such a usage. If such an illegal usage
pattern is detected, a fatal error will be reported like
line 4: Invalid usage of the XADD return value
if compiled with -g, or
Invalid usage of the XADD return value
if compiled without -g.
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342692
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 20 Sep 2018 22:08:27 +0000 (22:08 +0000)]
[WebAssembly][NFC] Add missing tests for indirect calls
Summary: Depends on D52105.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52254
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342691
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 20 Sep 2018 22:04:44 +0000 (22:04 +0000)]
[WebAssembly] Add V128 value type to binary format
Summary: Adds the necessary support to lib/ObjectYAML and fixes SIMD
calls to allow the tests to work. Also removes some dead code that
would otherwise have to have been updated.
Reviewers: aheejin, dschuff, sbc100
Subscribers: jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342689
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 20 Sep 2018 21:53:25 +0000 (21:53 +0000)]
[MachineOutliner][NFC] Don't add MBBs with a size < 2 to the search space
The suffix tree won't ever consider sequences with a length less than 2.
Therefore, we really ought to not even consider them in the first place.
Also add a FIXME explaining that this should be defined in terms of the size
in B of an outlined call versus the size in B of the MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342688
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Thu, 20 Sep 2018 21:16:16 +0000 (21:16 +0000)]
[GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].
Summary:
AvailableExternal was not handled in isDiscardableIfUnused when isDiscardableIfUnused
was added in r158476. Till it was handled in r247044. This is a NFC.
Reviewers: pcc, tejohnson
Reviewed By: tejohnson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342684
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Sep 2018 21:10:14 +0000 (21:10 +0000)]
[InstCombine] rename test file, simplify tests, regenerate full checks; NFC
Fast-math is irrelevant for these transforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342683
91177308-0d34-0410-b5e6-
96231b3b80d8
Walter Lee [Thu, 20 Sep 2018 20:05:57 +0000 (20:05 +0000)]
[RegAllocGreedy] Fix crash in tryLocalSplit
tryLocalSplit only handles a single use block, but an interval may
have multiple use blocks. So don't crash in that case. This fixes
PR38795.
Differential revision: https://reviews.llvm.org/D52277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342682
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 20 Sep 2018 19:57:49 +0000 (19:57 +0000)]
[PDB] Fix -Wcovered-switch-default warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342681
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 20 Sep 2018 18:59:33 +0000 (18:59 +0000)]
[Bitcode] Address backwards compat bug in r342631
r342631 expanded bitc::METADATA_LOCATION by one element. The bitcode
metadata loader was changed in a backwards-incompatible way, leading to
crashes when disassembling old bitcode:
assertion: empty() && "PlaceholderQueue hasn't been flushed before being destroyed"
Assertion failed: (empty() && "PlaceholderQueue hasn't been flushed before being destroyed")
This commit teaches the metadata loader to assume that the newly-added
IsImplicitCode bit is 'false' when not present in old bitcode. I've added a
bitcode compat regression test.
rdar://
44645820
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342678
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 20 Sep 2018 18:53:53 +0000 (18:53 +0000)]
[MachineOutliner][NFC] Move debug info emission to createOutlinedFunction
When you create an outlined function, you know everything you need to know
to decide if debug info should be created. If we emit debug info in
createOutlinedFunction, then we don't need to keep track of every IR function
we create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342677
91177308-0d34-0410-b5e6-
96231b3b80d8
Sameer AbuAsal [Thu, 20 Sep 2018 18:39:34 +0000 (18:39 +0000)]
[inline Cost] Don't mark functions accessing varargs as non-inlinable
Summary:
rL323619 marks functions that are calling va_end as not viable for
inlining. This patch reverses that since this va_end doesn't need
access to the vriadic arguments list that are saved on the stack, only
va_start does.
Reviewers: efriedma, fhahn
Reviewed By: fhahn
Subscribers: eraman, haicheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D52067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342675
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 20 Sep 2018 18:26:38 +0000 (18:26 +0000)]
Fix -Wtrigraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342674
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 20 Sep 2018 17:48:44 +0000 (17:48 +0000)]
Fix warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342670
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Sep 2018 17:34:08 +0000 (17:34 +0000)]
[SelectionDAG] replace duplicated peekThroughBitcast helper functions; NFCI
x86 had 2 versions of peekThroughBitcast. DAGCombiner had 1. Plus, it had a 1-off implementation for the one-use variant.
Move the x86 versions of the code to SelectionDAG, so we don't have different copies of the code.
No functional change intended.
I'm putting this next to isBitwiseNot() because I am planning to use it in there. Another option is next to the
helpers in the ISD namespace (eg, ISD::isConstantSplatVector()). But if there's no good reason for those to be
there, I'd prefer to pull other helpers over to SelectionDAG in follow-up steps.
Differential Revision: https://reviews.llvm.org/D52285
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342669
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Sep 2018 17:10:38 +0000 (17:10 +0000)]
[InstCombine] add tests for vector concat with binop (PR33026); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342665
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Thu, 20 Sep 2018 17:08:45 +0000 (17:08 +0000)]
[New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation
of pass execution, as per "RFC: Pass Execution Instrumentation interface"
posted 06/07/2018 on llvm-dev@
The intent is to provide a common machinery to implement all
the pass-execution-debugging features like print-before/after,
opt-bisect, time-passes etc.
Here we get a basic implementation consisting of:
* PassInstrumentationCallbacks class that handles registration of callbacks
and access to them.
* PassInstrumentation class that handles instrumentation-point interfaces
that call into PassInstrumentationCallbacks.
* Callbacks accept StringRef which is just a name of the Pass right now.
There were some ideas to pass an opaque wrapper for the pointer to pass instance,
however it appears that pointer does not actually identify the instance
(adaptors and managers might have the same address with the pass they govern).
Hence it was decided to go simple for now and then later decide on what the proper
mental model of identifying a "pass in a phase of pipeline" is.
* Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies
on different IRUnits (e.g. Analyses).
* PassInstrumentationAnalysis analysis is explicitly requested from PassManager through
usual AnalysisManager::getResult. All pass managers were updated to run that
to get PassInstrumentation object for instrumentation calls.
* Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra
args out of a generic PassManager's extra args. This is the only way I was able to explicitly
run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or
RepeatedPass::run.
TODO: Upon lengthy discussions we agreed to accept this as an initial implementation
and then get rid of getAnalysisResult by improving RepeatedPass implementation.
* PassBuilder takes PassInstrumentationCallbacks object to pass it further into
PassInstrumentationAnalysis. Callbacks registration should be performed directly
through PassInstrumentationCallbacks.
* new-pm tests updated to account for PassInstrumentationAnalysis being run
* Added PassInstrumentation tests to PassBuilderCallbacks unit tests.
Other unit tests updated with registration of the now-required PassInstrumentationAnalysis.
Made getName helper to return std::string (instead of StringRef initially) to fix
asan builtbot failures on CGSCC tests.
Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D47858
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342664
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 20 Sep 2018 16:12:27 +0000 (16:12 +0000)]
[PDB] Fix failing test.
This test was missed on the last run since I only ran a subset
of them before commiting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342659
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 20 Sep 2018 16:12:05 +0000 (16:12 +0000)]
[PDB] Better printing of builtin types when using DIA dumper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342658
91177308-0d34-0410-b5e6-
96231b3b80d8
Calixte Denizet [Thu, 20 Sep 2018 16:09:30 +0000 (16:09 +0000)]
[gcov] Fix wrong line hit counts when multiple blocks are on the same line
Summary:
The goal of this patch is to have the same behaviour than gcc-gcov.
Currently the hit counts for a line is the sum of the counts for each block on that line.
The idea is to detect the cycles in the graph of blocks in using the algorithm by Hawick & James.
The count for a cycle is the min of the counts for each edge in the cycle.
Once we've the count for each cycle, we can sum them and add the transition counts of those cycles.
Fix both https://bugs.llvm.org/show_bug.cgi?id=38065 and https://bugs.llvm.org/show_bug.cgi?id=38066
Reviewers: marco-c, davidxl
Reviewed By: marco-c
Subscribers: vsk, lebedev.ri, sylvestre.ledru, dblaikie, llvm-commits
Differential Revision: https://reviews.llvm.org/D49659
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342657
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 20 Sep 2018 15:50:13 +0000 (15:50 +0000)]
[PDB] Add the ability to map forward references to full decls.
Some records point to an LF_CLASS, LF_UNION, LF_STRUCTURE, or LF_ENUM
which is a forward reference and doesn't contain complete debug
information. In these cases, we'd like to be able to quickly locate the
full record. The TPI stream stores an array of pre-computed record hash
values, one for each type record. If we pre-process this on startup, we
can build a mapping from hash value -> {list of possible matching type
indices}. Since hashes of full records are only based on the name and or
unique name and not the full record contents, we can then use forward
ref record to compute the hash of what *would* be the full record by
just hashing the name, use this to get the list of possible matches, and
iterate those looking for a match on name or unique name.
llvm-pdbutil is updated to resolve forward references for the purposes
of testing (plus it's just useful).
Differential Revision: https://reviews.llvm.org/D52283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342656
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 20 Sep 2018 15:48:23 +0000 (15:48 +0000)]
[llvm-mca][BtVer2] Modify ANDN tests in zero-idioms-avx-256.s. NFC
Two test cases should have tested 256-bit variants of VANDN zero-idioms instead
of the 128-bit variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342655
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Sep 2018 15:21:52 +0000 (15:21 +0000)]
[IR] add shuffle query for vector concatenation
This can be used for combining and in the vectorizers/cost models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342653
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Sep 2018 14:36:09 +0000 (14:36 +0000)]
[IR] reduce duplication in unittest for shuffles; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342650
91177308-0d34-0410-b5e6-
96231b3b80d8
Jesper Antonsson [Thu, 20 Sep 2018 13:37:28 +0000 (13:37 +0000)]
[InstCombine] Handle vector compares in foldGEPIcmp()
Summary:
This is to fix PR38984 "InstCombine assertion at vector gep/icmp folding":
https://bugs.llvm.org/show_bug.cgi?id=38984
Reviewers: majnemer, spatel, lattner, lebedev.ri
Reviewed By: lebedev.ri
Subscribers: lebedev.ri, llvm-commits
Differential Revision: https://reviews.llvm.org/D52263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342647
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Thu, 20 Sep 2018 13:37:04 +0000 (13:37 +0000)]
[llvm-exegesis] Fix broken build bots.
Reviewers: javed.absar
Subscribers: tschuett, courbet, llvm-commits
Differential Revision: https://reviews.llvm.org/D52302
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342646
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Sep 2018 13:10:22 +0000 (13:10 +0000)]
[X86][SSE] Remove UNPCKL(SHUFFLE)->UNPCKH custom combine
This can be achieved more generally by combineX86ShufflesRecursively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342645
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Thu, 20 Sep 2018 12:22:18 +0000 (12:22 +0000)]
[llvm-exegesis] Improve Register Setup (roll forward of D51856).
Summary:
Added function to set a register to a particular value + tests.
Add EFLAGS test, use new setRegTo instead of setRegToConstant.
Reviewers: courbet, javed.absar
Subscribers: llvm-commits, tschuett, mgorny
Differential Revision: https://reviews.llvm.org/D52297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342644
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 20 Sep 2018 12:21:24 +0000 (12:21 +0000)]
[ADT] Bring back memmove to make GCC 5.4 happy
All other GCCs look good so far. GCC 5.4 complains about strict
aliasing, so fix that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342643
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Sep 2018 12:11:38 +0000 (12:11 +0000)]
[X86][SSE] Remove PSHUFLW/PSHUFHW combineRedundantHalfShuffle combine
This can be achieved more generally by combineX86ShufflesRecursively and was causing a fuzz test failure found by Mikael Holmén.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342642
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 20 Sep 2018 11:40:43 +0000 (11:40 +0000)]
[RISCV][MC] Modify evaluateConstantImm interface to allow reuse from addExpr
This is a trivial refactoring that I'm committing now as it makes a patch I'm
about to post for review easier to follow. There is some overlap between
evaluateConstantImm and addExpr in RISCVAsmParser. This patch allows
evaluateConstantImm to be reused from addExpr to remove this overlap. The
benefit will be greater when a future patch adds extra code to allows
immediates to be evaluated from constant symbols (e.g. `.equ CONST, 0x1234`).
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342641
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 20 Sep 2018 11:07:57 +0000 (11:07 +0000)]
Fix -Wdocumentation warnings introduced by r342555. NFC
These were reported by buildbot llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast (see
build #36798).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342640
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Sep 2018 10:59:08 +0000 (10:59 +0000)]
Fix line-endings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342639
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 20 Sep 2018 10:02:06 +0000 (10:02 +0000)]
[ADT] Try again to use the same version of llvm::Optional on all compilers
The miscompile doesn't reproduce for me anymore with GCC 7.3. I'll watch
the buildbots closely.
Having different versions of Optional is an ABI violation when linking
GCC- and clang-built code together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342637
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 20 Sep 2018 09:17:36 +0000 (09:17 +0000)]
[DWARF] - Emit the correct value for DW_AT_addr_base.
Currently, we emit DW_AT_addr_base that points to the beginning of
the .debug_addr section. That is not correct for the DWARF5 case because address
table contains the header and the attribute should point to the first entry
following the header.
This is currently the reason why LLDB does not work with such executables correctly.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D52168
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342635
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Thu, 20 Sep 2018 09:00:17 +0000 (09:00 +0000)]
[IPSCCP] Fix a problem with removing labels in a switch with undef condition
Summary:
Before removing basic blocks that ipsccp has considered as dead
all uses of the basic block label must be removed. That is done
by calling ConstantFoldTerminator on the users. An exception
is when the branch condition is an undef value. In such
scenarios ipsccp is using some internal assumptions regarding
which edge in the control flow that should remain, while
ConstantFoldTerminator don't know how to fold the terminator.
The problem addressed here is related to ConstantFoldTerminator's
ability to rewrite a 'switch' into a conditional 'br'. In such
situations ConstantFoldTerminator returns true indicating that
the terminator has been rewritten. However, ipsccp treated the
true value as if the edge to the dead basic block had been
removed. So the code for resolving an undef branch condition
did not trigger, and we ended up with assertion that there were
uses remaining when deleting the basic block.
The solution is to resolve indeterminate branches before the
call to ConstantFoldTerminator.
Reviewers: efriedma, fhahn, davide
Reviewed By: fhahn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52232
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342632
91177308-0d34-0410-b5e6-
96231b3b80d8