OSDN Git Service
Martin Storsjo [Tue, 25 Jul 2017 19:57:22 +0000 (19:57 +0000)]
[AArch64] Add a test for float argument passing to win64 vararg functions
The existing tests only tested how a va_start is lowered.
Differential Revision: https://reviews.llvm.org/D35540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309015
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 25 Jul 2017 19:42:32 +0000 (19:42 +0000)]
[LTO] Prevent dead stripping and internalization of symbols with sections
Summary:
ELF linkers generate __start_<secname> and __stop_<secname> symbols
when there is a value in a section <secname> where the name is a valid
C identifier. If dead stripping determines that the values declared
in section <secname> are dead, and we then internalize (and delete)
such a symbol, programs that reference the corresponding start and end
section symbols will get undefined reference linking errors.
To fix this, add the section name to the IRSymtab entry when a symbol is
defined in a specific section. Then use this in the gold-plugin to mark
the symbol as external and visible from outside the summary when the
section name is a valid C identifier.
Reviewers: pcc
Subscribers: mehdi_amini, inglorion, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D35639
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309009
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 25 Jul 2017 19:22:09 +0000 (19:22 +0000)]
Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements."
This reverts commit r308966.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309005
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 25 Jul 2017 18:26:35 +0000 (18:26 +0000)]
[PowerPC] Pretty-print CR bits the way the binutils disassembler does
This patch just adds printing of CR bit registers in a more human-readable
form akin to that used by the GNU binutils.
Differential Revision: https://reviews.llvm.org/D31494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309001
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 25 Jul 2017 17:54:51 +0000 (17:54 +0000)]
[PowerPC] - Recommit r304907 now that the issue has been fixed
This is just a recommit since the issue that the commit exposed is now
resolved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308995
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Hines [Tue, 25 Jul 2017 17:52:55 +0000 (17:52 +0000)]
[docs] Fix a typo: iteratation -> iteration
Reviewers: dgross
Reviewed By: dgross
Subscribers: dgross, llvm-commits
Differential Revision: https://reviews.llvm.org/D35822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308994
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Jul 2017 17:04:37 +0000 (17:04 +0000)]
[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)
D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914).
Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os).
This patch should be considered for the 5.0.0 release branch as well
Differential Revision: https://reviews.llvm.org/D35830
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308986
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Jul 2017 16:36:44 +0000 (16:36 +0000)]
[DAG] Move DAGCombiner::GetDemandedBits to SelectionDAG
This patch moves the DAGCombiner::GetDemandedBits function to SelectionDAG::GetDemandedBits as a first step towards making it easier for targets to get to the source of any demanded bits without the limitations of SimplifyDemandedBits.
Differential Revision: https://reviews.llvm.org/D35841
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308983
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Jul 2017 16:10:32 +0000 (16:10 +0000)]
[X86] Regenerate test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308981
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Jul 2017 16:09:56 +0000 (16:09 +0000)]
[X86] Regenerate test with broadcast comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308980
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Tue, 25 Jul 2017 15:28:28 +0000 (15:28 +0000)]
[Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed
Summary:
Some SPARC TLS relocations were applying nontrivial adjustments
to zero value, leading to unexpected non-zero values in ELF and then
Solaris linker failures.
Getting rid of these adjustments.
Fixes PR33825.
Reviewers: rafael, asb, jyknight
Subscribers: joerg, jyknight, llvm-commits
Differential Revision: https://reviews.llvm.org/D35567
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308978
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Tue, 25 Jul 2017 13:05:12 +0000 (13:05 +0000)]
X86 Asm uses assertions instead of proper diagnostic. This patch fixes that.
Differential Revision: https://reviews.llvm.org/D35115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Jul 2017 10:48:32 +0000 (10:48 +0000)]
[LIR] Teach LIR to avoid extending the BE count prior to adding one to
it when safe.
Very often the BE count is the trip count minus one, and the plus one
here should fold with that minus one. But because the BE count might in
theory be UINT_MAX or some such, adding one before we extend could in
some cases wrap to zero and break when we scale things.
This patch checks to see if it would be safe to add one because the
specific case that would cause this is guarded for prior to entering the
preheader. This should handle essentially all of the common loop idioms
coming out of C/C++ code once canonicalized by LLVM.
Before this patch, both forms of loop in the added test cases ended up
subtracting one from the size, extending it, scaling it up by 8 and then
adding 8 back onto it. This is really silly, and it turns out made it
all the way into generated code very often, so this is a surprisingly
important cleanup to do.
Many thanks to Sanjoy for showing me how to do this with SCEV.
Differential Revision: https://reviews.llvm.org/D35758
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308968
91177308-0d34-0410-b5e6-
96231b3b80d8
Matan Haroush [Tue, 25 Jul 2017 10:44:09 +0000 (10:44 +0000)]
This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements.
Differential Revision:
https://reviews.llvm.org/D33277
https://reviews.llvm.org/D33278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308966
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 25 Jul 2017 10:35:16 +0000 (10:35 +0000)]
[tests] Cleanup vect.omp.persistence.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308964
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Jul 2017 10:33:36 +0000 (10:33 +0000)]
[X86] Add 24-byte memcmp tests (PR33914)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308963
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 25 Jul 2017 09:40:35 +0000 (09:40 +0000)]
Fix endianness bug in DAGCombiner::visitTRUNCATE and visitEXTRACT_VECTOR_ELT
Summary:
Do not assume little endian architecture in DAGCombiner::visitTRUNCATE and DAGCombiner::visitEXTRACT_VECTOR_ELT.
PR33682
Reviewers: hfinkel, sdardis, RKSimon
Reviewed By: sdardis, RKSimon
Subscribers: uabelho, RKSimon, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D34990
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308960
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 25 Jul 2017 08:51:30 +0000 (08:51 +0000)]
[ARM] Enable partial and runtime unrolling
Enable runtime and partial loop unrolling of simple loops without
calls on M-class cores. The thresholds are calculated based on
whether the target is Thumb or Thumb-2.
Differential Revision: https://reviews.llvm.org/D34619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308956
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 25 Jul 2017 06:05:49 +0000 (06:05 +0000)]
[COFF] ARM64 support for COFFImportFile
A test will be committed separately in the lld repo.
Differential Revision: https://reviews.llvm.org/D35766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308951
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 25 Jul 2017 05:20:01 +0000 (05:20 +0000)]
[AArch64] Reserve a 16 byte aligned amount of fixed stack for win64 varargs
Create a dummy 8 byte fixed object for the unused slot below the first
stored vararg.
Alternative ideas tested but skipped: One could try to align the whole
fixed object to 16, but I haven't found how to add an offset to the stack
frame used in LowerWin64_VASTART.
If only the size of the fixed stack object size is padded but not the offset, via
MFI.CreateFixedObject(alignTo(GPRSaveSize, 16), -(int)GPRSaveSize, false),
PrologEpilogInserter crashes due to "Attempted to reset backwards range!".
This fixes misconceptions about where registers are spilled, since
AArch64FrameLowering.cpp assumes the offset from fixed objects is
aligned to 16 bytes (and the Win64 case there already manually aligns
the offset to 16 bytes).
This fixes cases where local stack allocations could overwrite callee
saved registers on the stack.
Differential Revision: https://reviews.llvm.org/D35720
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308950
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 25 Jul 2017 05:03:17 +0000 (05:03 +0000)]
DWARFVerifier.cpp: Fix -m32 in r308928. Use PRIx64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308949
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 25 Jul 2017 02:09:46 +0000 (02:09 +0000)]
[libFuzzer] make one test faster, fix compiler warnings in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308945
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 25 Jul 2017 02:07:38 +0000 (02:07 +0000)]
[sanitizer-coverage] simplify the code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308944
91177308-0d34-0410-b5e6-
96231b3b80d8
Spyridoula Gravani [Tue, 25 Jul 2017 01:58:27 +0000 (01:58 +0000)]
[DWARF] Modified test for die ranges verification so that it doesn't fail on windows hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308943
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 25 Jul 2017 01:44:38 +0000 (01:44 +0000)]
llvm/test/CMakeLists.txt: Add llvm-rc to LLVM_TEST_DEPENDS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308942
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 25 Jul 2017 00:51:40 +0000 (00:51 +0000)]
llvm-rc: Fixup for r308940. This should use LLVMSupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308941
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Sokolowski [Tue, 25 Jul 2017 00:25:18 +0000 (00:25 +0000)]
Add an empty shell of llvm-rc.
This starts the development on one of MS Visual Studio binutils,
Resource Converter. The tool compiles resource scripts (.rc)
into binary resource files (.res).
The current implementation does nothing but parse the command
line arguments. It is going to be extended in the future.
Differential Revision: https://reviews.llvm.org/D35810
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308940
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Mon, 24 Jul 2017 23:16:33 +0000 (23:16 +0000)]
[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308936
91177308-0d34-0410-b5e6-
96231b3b80d8
Spyridoula Gravani [Mon, 24 Jul 2017 21:04:11 +0000 (21:04 +0000)]
[DWARF] Added verification check for die ranges. If highPC is an address, then it should be greater than lowPC for each range.
Differential Revision: https://reviews.llvm.org/D35733
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308928
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 24 Jul 2017 20:48:15 +0000 (20:48 +0000)]
Revert "[X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides"
This reverts r308867 and r308866.
It broke the sanitizer-windows buildbot on C++ code similar to the
following:
namespace cl { }
void f() {
__asm {
mov al, cl
}
}
t.cpp(4,13): error: unexpected namespace name 'cl': expected expression
mov al, cl
^
In this case, MSVC parses 'cl' as a register, not a namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308926
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 24 Jul 2017 20:33:41 +0000 (20:33 +0000)]
Small tweak to one check in error handling to the dyld compact export
entries in libObject (done in r308690). In the case when the last node
has no children setting State.Current = Children + 1; where that would be past
Trie.end() is actually ok since the pointer is not used with zero children.
rdar://
33490512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308924
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Mon, 24 Jul 2017 19:44:43 +0000 (19:44 +0000)]
Followup to r308890: don't assert the llvm llvm version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308917
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 24 Jul 2017 19:35:48 +0000 (19:35 +0000)]
[Hexagon] Recognize C4_cmpneqi, C4_cmpltei and C4_cmplteui in NewValueJump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308914
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Jul 2017 19:34:26 +0000 (19:34 +0000)]
Move DWARFSectionMap to a .cpp file.
Thanks to Paul Robinson for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308913
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 24 Jul 2017 19:28:30 +0000 (19:28 +0000)]
test-release.sh: Fix phase2 and phase3 binary comparision
Summary:
scudo_utils.cpp.o from compiler-rt has one of the host compiler's builtin
include paths stored in the .debug_line section. So we need to do
sed 's,Phase1,Phase2,g` on the Phase2 object file so it matches Phase3.
Reviewers: hans
Reviewed By: hans
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34989
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308912
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 24 Jul 2017 18:38:14 +0000 (18:38 +0000)]
Revert "Revert "[libFuzzer] Add a dependency on symbolizer from libFuzzer tests""
This reverts commit
15425f2bc6eac6249ee957a2a280511306c07547.
Should work now that atos is a default symbolizer on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308910
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Mon, 24 Jul 2017 18:29:56 +0000 (18:29 +0000)]
Adding base test for interleave store VF16 and expand the test for AVX512
This patch doesn't modifay any non test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308909
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Jul 2017 18:07:55 +0000 (18:07 +0000)]
RA: Replace asserts related to empty live intervals
These don't exactly assert the same thing anymore, and
allow empty live intervals with non-empty uses.
Removed in r308808 and r308813.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308906
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Mon, 24 Jul 2017 18:06:16 +0000 (18:06 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Fine tune the resources in a couple of ASIMD loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308904
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Jul 2017 18:06:15 +0000 (18:06 +0000)]
AMDGPU: Fix allocating pseudo-registers
There's no need for these to be part of a class since
they are immediately replaced. New unreachable hit in
existing tests.'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308903
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 24 Jul 2017 17:47:46 +0000 (17:47 +0000)]
Revert "Debug: handle dumping the D language."
Reid beat me to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308902
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 24 Jul 2017 17:39:44 +0000 (17:39 +0000)]
Debug: handle dumping the D language.
Mostly just to silence a warning about an unhandled case. There don't seem to
be any tests for this operator (at least that I could find).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308901
91177308-0d34-0410-b5e6-
96231b3b80d8
Leo Li [Mon, 24 Jul 2017 17:26:28 +0000 (17:26 +0000)]
[CMake] Remove redundant logic in runtimes/CMakeList.txt
Summary:
`SUB_CHECK_TARGETS` contains all test targets in `SUB_COMPONENTS` when
we load `Components.cmake`. We don't need to add those targets
again and having duplicate targets will break the cmake policy CMP0002.
Reviewers: phosek
Subscribers: mgorny, llvm-commits, srhines, pirama
Differential Revision: https://reviews.llvm.org/D35692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308900
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 24 Jul 2017 16:30:44 +0000 (16:30 +0000)]
Add missing case to switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308894
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 24 Jul 2017 16:18:09 +0000 (16:18 +0000)]
[CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses.
This avoids excessive compile time. The case I'm looking at is
Function.cpp from an old version of LLVM that still had the giant memcmp
string matcher in it. Before r308322 this compiled in about 2 minutes,
after it, clang takes infinite* time to compile it. With this patch
we're at 5 min, which is still bad but this is a pathological case.
The cut off at 20 uses was chosen by looking at other cut-offs in LLVM
for user scanning. It's probably too high, but does the job and is very
unlikely to regress anything.
Fixes PR33900.
* I'm impatient and aborted after 15 minutes, on the bug report it was
killed after 2h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308891
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 24 Jul 2017 16:16:42 +0000 (16:16 +0000)]
[codeview] Emit 'D' as the cv source language for D code
This matches DMD:
https://github.com/dlang/dmd/blob/
522263965cf3a27ed16b31f3c3562db86cdeabec/src/ddmd/backend/cv8.c#L199
Fixes PR33899.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308890
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 24 Jul 2017 16:16:17 +0000 (16:16 +0000)]
Format some case labels and shrink an anonymous namespace NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308889
91177308-0d34-0410-b5e6-
96231b3b80d8
Ilya Biryukov [Mon, 24 Jul 2017 16:02:29 +0000 (16:02 +0000)]
NFC. Fixed typos in the comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308888
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Isoard [Mon, 24 Jul 2017 12:55:00 +0000 (12:55 +0000)]
[DOTGraphTraits] Propagate Graph template argument, NFC
Propagates the GraphT template argument to the default value of
the AnalysisGraphTraitsT template argument. This allows to specialize
the DefaultAnalysisGraphTraits<AnalysisT,GraphT> for analysis with a
graph type different from the analysis type and it will automatically
get picked-up.
Note: This was probably the intended purpose and should not result in any
functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308878
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 24 Jul 2017 12:44:35 +0000 (12:44 +0000)]
Fix spelling in comments. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308877
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Mon, 24 Jul 2017 11:41:30 +0000 (11:41 +0000)]
[LoopInterchange] Update code to use range-based for loops (NFC).
Summary:
The remaining non range-based for loops do not iterate over full ranges,
so leave them as they are.
Reviewers: karthikthecool, blitz.opensource, mcrosier, mkuper, aemerson
Reviewed By: aemerson
Subscribers: aemerson, mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D35777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308872
91177308-0d34-0410-b5e6-
96231b3b80d8
Ayman Musa [Mon, 24 Jul 2017 08:10:32 +0000 (08:10 +0000)]
[X86][AVX512] Add patterns for masked AVX512 floating point compare instructions that were missing.
patterns were missed by D33188. Adding for completion.
+Updating test.
Differential Revesion: https://reviews.llvm.org/D35179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308868
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Mon, 24 Jul 2017 07:04:55 +0000 (07:04 +0000)]
[X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides
On MS-style, the following snippet:
int eax;
__asm mov eax, ebx
should yield loading of ebx, into the location pointed by the variable eax
This patch sees to it.
Currently, a reg-to-reg move would have been invoked.
clang: D34740
Differential Revision: https://reviews.llvm.org/D34739
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308866
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 23 Jul 2017 23:39:11 +0000 (23:39 +0000)]
[AVR] Remove the instrumentation pass
I have a much better way of running integration tests now.
https://github.com/dylanmckay/avr-test-suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308857
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 23 Jul 2017 23:00:55 +0000 (23:00 +0000)]
[AVR] Improve the 'icall-func-pointer-correct-addr-space.ll' test
Patch by Carl Peto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308856
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Sun, 23 Jul 2017 22:30:00 +0000 (22:30 +0000)]
[CodeGen][X86] Fuchsia supports sincos* libcalls and sin+cos->sincos optimization
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D35748
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308854
91177308-0d34-0410-b5e6-
96231b3b80d8
Momchil Velikov [Sun, 23 Jul 2017 22:27:34 +0000 (22:27 +0000)]
Fix typo: GETTER to SETTER (NFC)
Use the CALLSITE_DELEGATE_SETTER macro in CallSiteBase::setCannotDuplicate.
Comitted as obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308853
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Sun, 23 Jul 2017 21:15:10 +0000 (21:15 +0000)]
[AArch64] Add test for function alignment for a optsize function (NFC).
Reviewers: dblaikie, t.p.northover, rengolin
Reviewed By: rengolin
Subscribers: aemerson, rengolin, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D35620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308852
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sun, 23 Jul 2017 16:38:08 +0000 (16:38 +0000)]
[AArch64] Redundant Copy Elimination - remove more zero copies.
This patch removes unnecessary zero copies in BBs that are targets of b.eq/b.ne
and we know the result of the compare instruction is zero. For example,
BB#0:
subs w0, w1, w2
str w0, [x1]
b.ne .LBB0_2
BB#1:
mov w0, wzr ; <-- redundant
str w0, [x2]
.LBB0_2
Differential Revision: https://reviews.llvm.org/D35075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308849
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Sun, 23 Jul 2017 15:40:19 +0000 (15:40 +0000)]
[SCEV] Limit max size of AddRecExpr during evolving
When SCEV calculates product of two SCEVAddRecs from the same loop, it
tries to combine them into one big AddRecExpr. If the sizes of the initial
SCEVs were `S1` and `S2`, the size of their product is `S1 + S2 - 1`, and every
operand of the resulting SCEV is combined from operands of initial SCEV and
has much higher complexity than they have.
As result, if we try to calculate something like:
%x1 = {a,+,b}
%x2 = mul i32 %x1, %x1
%x3 = mul i32 %x2, %x1
%x4 = mul i32 %x3, %x2
...
The size of such SCEVs grows as `2^N`, and the arguments
become more and more complex as we go forth. This leads
to long compilation and huge memory consumption.
This patch sets a limit after which we don't try to combine two
`SCEVAddRecExpr`s into one. By default, max allowed size of the
resulting AddRecExpr is set to 16.
Differential Revision: https://reviews.llvm.org/D35664
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308847
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 23 Jul 2017 11:47:22 +0000 (11:47 +0000)]
RuntimeDyldELF.cpp: Prune unused "TargetRegistry.h"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308846
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 23 Jul 2017 05:09:44 +0000 (05:09 +0000)]
[Modules] Rework r274270. Let Clang targets depend on intrinsics_gen.
This gets rid of almost LLVM targets unconditionally depending on intrinsic_gen.
Clang's modules still have weird dependencies and hard to remove intrinsics_gen in better way.
Then, it'd be better to give whole clang targets depend on intrinsic_gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308844
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 23 Jul 2017 03:59:39 +0000 (03:59 +0000)]
[X86] Add some hasSideEffects=0 flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308835
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 23 Jul 2017 03:59:37 +0000 (03:59 +0000)]
[X86] Add patterns for memory forms of SARX/SHLX/SHRX with careful complexity adjustment to keep shift by immediate using the legacy instructions.
These patterns were only missing to favor using the legacy instructions when the shift was a constant. With careful adjustment of the pattern complexity we can make sure the immediate instructions still have priority over these patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308834
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Sun, 23 Jul 2017 02:06:28 +0000 (02:06 +0000)]
[DAG] Fix typo preventing some stores merges to truncated stores.
Check the actual memory type stored and not the extended value size
when considering if truncated store merge is worthwhile.
Reviewers: efriedma, RKSimon, spatel, jyknight
Reviewed By: efriedma
Subscribers: llvm-commits, nhaehnle
Differential Revision: https://reviews.llvm.org/D35623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308833
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Sat, 22 Jul 2017 02:43:50 +0000 (02:43 +0000)]
Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This reverts commit
2b52298eb28ba4d3eca113353a348c02a6ef1f93.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308822
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Sat, 22 Jul 2017 02:33:45 +0000 (02:33 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308821
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Jul 2017 01:30:53 +0000 (01:30 +0000)]
[X86] Add nopq instruction which is a rex encoded version of nopl for gas compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308818
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 22 Jul 2017 01:30:51 +0000 (01:30 +0000)]
[X86] Add register form of NOPL and NOPW for assembler/disassembler.
Fixes PR32805.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308817
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 22 Jul 2017 00:40:46 +0000 (00:40 +0000)]
AMDGPU: Remove leftover td file
All of the instructions were moved out of this a while ago,
so it's just a useless comment now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308815
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 22 Jul 2017 00:24:20 +0000 (00:24 +0000)]
Commit missing/empty test file from r308789
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308814
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 22 Jul 2017 00:24:01 +0000 (00:24 +0000)]
RA: Remove another assert on empty intervals
This case is similar to the one fixed in r308808,
except when rematerializing.
Fixes bug 33884.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308813
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 22 Jul 2017 00:10:29 +0000 (00:10 +0000)]
[libFuzzer] reimplement experimental_len_control=1: bump the temporary max_len every time we failed to find new coverage during the last 1000 runs and 1 second. Also fix FileToVector to not load unfinished files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308811
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 23:56:13 +0000 (23:56 +0000)]
RA: Remove assert on empty live intervals
This is possible if there is an undef use when
splitting the vreg during spilling.
Fixes bug 33620.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308808
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 21 Jul 2017 23:39:39 +0000 (23:39 +0000)]
Revert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
This reverts commit
2f423248e140b94b8377660d4d2fe9364f30febe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308806
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 21 Jul 2017 23:27:40 +0000 (23:27 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308803
91177308-0d34-0410-b5e6-
96231b3b80d8
Erich Keane [Fri, 21 Jul 2017 22:48:47 +0000 (22:48 +0000)]
Remove Bitrig: LLVM Changes
Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.
Differential Revision: https://reviews.llvm.org/D35707
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308799
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 21 Jul 2017 21:41:15 +0000 (21:41 +0000)]
[ProfData] Detect if zlib is available
As discussed on [1], if the profile is compressed and llvm-profdata is not built with zlib support, the error message is not informative. Give a better error message if zlib is not available.
[1] http://lists.llvm.org/pipermail/llvm-dev/2017-July/115571.html
Reviewers: davidxl, dblaikie
Differential Revision: https://reviews.llvm.org/D35586
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308789
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 21 Jul 2017 21:37:46 +0000 (21:37 +0000)]
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308787
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 21 Jul 2017 21:36:25 +0000 (21:36 +0000)]
[PGOInstr] Add a debug print
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308785
91177308-0d34-0410-b5e6-
96231b3b80d8
Farhana Aleen [Fri, 21 Jul 2017 21:35:00 +0000 (21:35 +0000)]
X86InterleaveAccess: A fix for bug33826
Reviewers: DavidKreitzer
Differential Revision: https://reviews.llvm.org/D35638
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308784
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Fri, 21 Jul 2017 21:19:23 +0000 (21:19 +0000)]
AMDGPU: Implement memory model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308781
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Fri, 21 Jul 2017 21:06:08 +0000 (21:06 +0000)]
[PPC] Add Defs = [CARRY] to MIR SRADI_32
MIR SRADI uses instruction template XSForm_1rc which declares Defs = [CARRY]. But MIR SRADI_32 uses instruction template XSForm_1, and it doesn't declare such implicit definition. With patch D33720 it causes wrong code generation for perl.
This patch adds the implicit definition.
Differential Revision: https://reviews.llvm.org/D35699
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308780
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Fri, 21 Jul 2017 21:05:45 +0000 (21:05 +0000)]
AMDGPU: Introduce maybeAtomic instruction flag
Testing is in the follow up change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308779
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 19:31:44 +0000 (19:31 +0000)]
AMDGPU: Preserve undef flag in eliminateFrameIndex
Fixes verifier errors in some call tests.
Not sure why we haven't run into this before.
Test split into separate patch for once
call support is committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308774
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Fri, 21 Jul 2017 19:10:19 +0000 (19:10 +0000)]
[DAGCombiner] Update comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308772
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 18:54:54 +0000 (18:54 +0000)]
AMDGPU: Partially fix improper reliance on memoperands
There are 2 more places doing this, but I'm not sure
what they are doing and don't make any sense to me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308770
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 18:34:51 +0000 (18:34 +0000)]
AMDGPU: Don't track lgkmcnt for global_/scratch_ instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308766
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 21 Jul 2017 18:32:00 +0000 (18:32 +0000)]
Fix DebugInfo/PDB build by adding missing changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308765
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 21 Jul 2017 18:28:55 +0000 (18:28 +0000)]
[PDB] Dump extra info about the publics stream
This includes the hash table, the address map, and the thunk table and
section offset table. The last two are only used for incremental
linking, which LLD doesn't support, so they are less interesting. The
hash table is particularly important to get right, since this is the one
of the streams that debuggers use to translate addresses to symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308764
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 18:06:36 +0000 (18:06 +0000)]
AMDGPU: Fix getMemOpBaseRegImmOfs for flat with offsets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308762
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 21 Jul 2017 17:51:27 +0000 (17:51 +0000)]
[Hexagon] Add inline-asm constraint 'a' for modifier register class
For example
asm ("memw(%0++%1) = %2" : : "r"(addr),"a"(mod),"r"(val) : "memory")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308761
91177308-0d34-0410-b5e6-
96231b3b80d8
Haojie Wang [Fri, 21 Jul 2017 17:25:20 +0000 (17:25 +0000)]
ThinLTO Minimized Bitcode File Size Reduction
Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file that will be not used for thin linker. In this patch, most of the extra information is striped to reduce the minimized bitcode file. Now only ModuleVersion, ModuleInfo, ModuleGlobalValueSummary, ModuleHash, Symtab and Strtab are left. Now the minimized bitcode file size is reduced to 15%-30% of the debug info stripped bitcode file size.
Reviewers: danielcdh, tejohnson, pcc
Reviewed By: pcc
Subscribers: mehdi_amini, aprantl, inglorion, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D35334
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308760
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Fri, 21 Jul 2017 17:19:00 +0000 (17:19 +0000)]
[mips] Support -membedded-data and fix a related bug
-membedded-data changes the location of constant data from the .sdata to
the .rodata section. Previously it was (incorrectly) always located in the
.rodata section.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D35686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308758
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 21 Jul 2017 16:51:17 +0000 (16:51 +0000)]
De-brief doxygen comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308757
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 21 Jul 2017 16:51:16 +0000 (16:51 +0000)]
Use default initializers (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308756
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 21 Jul 2017 16:51:09 +0000 (16:51 +0000)]
Canonicalize the spelling of RefDie (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308755
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Fri, 21 Jul 2017 16:30:38 +0000 (16:30 +0000)]
[RuntimeUnroll] NFC: Add a profitability function for mutliexit loop
Separated out the profitability from the safety analysis for multiexit
loop unrolling. Currently, this is an NFC because profitability is true
only if the unroll-runtime-multi-exit is set to true (off-by-default).
This is to ease adding the profitability heuristic up for review at
D35380.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308753
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinar Temirbulatov [Fri, 21 Jul 2017 16:02:56 +0000 (16:02 +0000)]
[SLPVectorizer] Replace E->Scalars to VL0 at vectorizeTree and move comment, NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308750
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 21 Jul 2017 15:36:16 +0000 (15:36 +0000)]
AMDGPU: Add instruction definitions for some scratch_* instructions
Omit atomics for now since they probably aren't useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308747
91177308-0d34-0410-b5e6-
96231b3b80d8