Craig Topper [Thu, 13 Oct 2016 04:14:47 +0000 (04:14 +0000)]
[X86] Simplify the lowering code for extracting and inserting subvectors.
We don't need to check if AVX is enabled. It's implied by the operation action being set to Custom.
We don't need to check both the input and output type widths. We only need to check the type that's being inserted or extracted. The other type is known to be a legal type and we can assume its a different width.
llvm-svn: 284102
Eric Fiselier [Thu, 13 Oct 2016 04:07:58 +0000 (04:07 +0000)]
Revert r282345 - Use __attribute__((internal_linkage)) when available.
llvm-svn: 284101
Vadim Macagon [Thu, 13 Oct 2016 04:07:22 +0000 (04:07 +0000)]
Fix Python binding generation build step on Windows
Summary:
If Python is installed to a location that contains spaces
(e.g. "C:\Program Files\Python3") then the build fails while attempting
to run the modify-python-lldb.py script because the path to the Python
executable is not double-quoted before being passed to the shell. The
fix consists of letting Python handle the formatting of the command
line, since subprocess.Popen() is perfectly capable of handling paths
containing spaces if it's given the command and arguments as a list
instead of a single pre-formatted string.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25396
llvm-svn: 284100
Sebastian Pop [Thu, 13 Oct 2016 03:23:33 +0000 (03:23 +0000)]
Memory-SSA: strengthen defClobbersUseOrDef interface
As Danny pointed out, defClobbersUseOrDef should use MemoryLocOrCall to make
sure fences are properly handled.
llvm-svn: 284099
Sebastian Pop [Thu, 13 Oct 2016 01:39:10 +0000 (01:39 +0000)]
commit back "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This is with an extra change to avoid calling MemoryLocation::get() on a call instruction.
Differential Revision: https://reviews.llvm.org/D25542
llvm-svn: 284098
Quentin Colombet [Thu, 13 Oct 2016 01:01:23 +0000 (01:01 +0000)]
[AArch64][RegisterBankInfo] Provide alternative mappings for 64-bit load
This allows RegBankSelect in greedy mode to get rid some of the cross
register bank copies when loads are involved in the chain of
computation.
llvm-svn: 284097
Reid Kleckner [Thu, 13 Oct 2016 00:55:24 +0000 (00:55 +0000)]
Correct PrivateLinkage for COFF
- Use storage class C_STAT for 'PrivateLinkage' The storage class for
PrivateLinkage should equal to the Internal Linkage.
- Set 'PrivateGlobalPrefix' from "L" to ".L" for MM_WinCOFF (includes
x86_64) MM_WinCOFF has empty GlobalPrefix '\0' so PrivateGlobalPrefix
"L" may conflict to the normal symbol name starting with 'L'.
Based on a patch by Han Sangjin! Manually updated test cases.
llvm-svn: 284096
Peter Collingbourne [Thu, 13 Oct 2016 00:49:21 +0000 (00:49 +0000)]
Add "opt" to the list of test dependencies.
We've started using it in the ThinLTO tests.
Also remove a repeated dependency on llvm-nm.
llvm-svn: 284095
Quentin Colombet [Thu, 13 Oct 2016 00:34:48 +0000 (00:34 +0000)]
[AArch64][RegisterBankInfo] Provide alternative mappings for G_BITCASTs.
Thanks to this patch, RegBankSelect is able to get rid of some register
bank copies as demonstrated in the test case.
llvm-svn: 284094
Reid Kleckner [Thu, 13 Oct 2016 00:18:26 +0000 (00:18 +0000)]
Revert "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This CL didn't actually address the test case in PR30499, and clang
still crashes.
Also revert dependent change "Memory-SSA cleanup of clobbers interface, NFC"
Reverts r283965 and r283967.
llvm-svn: 284093
Rui Ueyama [Thu, 13 Oct 2016 00:13:15 +0000 (00:13 +0000)]
Move a utility function to Strings.cpp.
So that we can use the function from anywhere.
llvm-svn: 284092
Quentin Colombet [Thu, 13 Oct 2016 00:12:06 +0000 (00:12 +0000)]
[AArch64][RegisterBankInfo] Describe cross regbank copies statically.
NFC.
llvm-svn: 284091
Quentin Colombet [Thu, 13 Oct 2016 00:12:04 +0000 (00:12 +0000)]
[AArch64][RegisterBankInfo] Use static mapping for same bank G_BITCAST.
NFC.
llvm-svn: 284090
Quentin Colombet [Thu, 13 Oct 2016 00:12:01 +0000 (00:12 +0000)]
[AArch64][MachineLegalizer] Mark more G_BITCAST as legal.
Basically any vector types that fits in a 32-bit register is also valid
as far as copies are concerned.
llvm-svn: 284089
Quentin Colombet [Thu, 13 Oct 2016 00:11:59 +0000 (00:11 +0000)]
[AArch64][RegisterBankInfo] Bump the cost of vector loads.
This does not change anything yet, because we do not offer any
alternative mapping.
llvm-svn: 284088
Quentin Colombet [Thu, 13 Oct 2016 00:11:57 +0000 (00:11 +0000)]
[AArch64][RegisterBankInfo] Use a proper cost for cross regbank G_BITCASTs.
This does not change anything yet, because we do not offer any
alternative mapping.
llvm-svn: 284087
Quentin Colombet [Thu, 13 Oct 2016 00:11:55 +0000 (00:11 +0000)]
[AArch64][RegisterBankInfo] Provide more realistic copy costs.
llvm-svn: 284086
Albert Gutowski [Wed, 12 Oct 2016 23:58:45 +0000 (23:58 +0000)]
fix function label name in addressofreturnaddress test
llvm-svn: 284085
Devin Coughlin [Wed, 12 Oct 2016 23:57:05 +0000 (23:57 +0000)]
[analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS
On macOS (but not iOS), if an ObjC property has no setter, the nib-loading code
for an IBOutlet is documented as directly setting the backing ivar without
retaining the value -- even if the property is 'retain'.
This resulted in false positives from the DeallocChecker for code that did not
release such ivars in -dealloc.
To avoid these false positives, treat IBOutlet ivars that back a property
without a setter as having an unknown release requirement in macOS.
rdar://problem/
28507353
llvm-svn: 284084
Albert Gutowski [Wed, 12 Oct 2016 23:52:38 +0000 (23:52 +0000)]
fix ms-intrinsics labels code to work with builds with assertions
llvm-svn: 284083
Mehdi Amini [Wed, 12 Oct 2016 23:36:11 +0000 (23:36 +0000)]
[GitHubMove Doc] Properly nest a subsection in the proposal
llvm-svn: 284082
Richard Smith [Wed, 12 Oct 2016 23:29:02 +0000 (23:29 +0000)]
Revert r284008. This is us to fail to instantiate static data members in some
cases. I'm working on reducing a testcase.
llvm-svn: 284081
Yunzhong Gao [Wed, 12 Oct 2016 23:27:27 +0000 (23:27 +0000)]
[NFC] Fixing the description for _mm_store_ps and _mm_store_ps1.
It seems that the doxygen description of these two intrinsics were swapped by
mistake.
llvm-svn: 284080
Rui Ueyama [Wed, 12 Oct 2016 23:22:59 +0000 (23:22 +0000)]
Fix variable name. NFC.
llvm-svn: 284079
Albert Gutowski [Wed, 12 Oct 2016 23:10:02 +0000 (23:10 +0000)]
fix title underline length
llvm-svn: 284078
Mehdi Amini [Wed, 12 Oct 2016 23:02:02 +0000 (23:02 +0000)]
Moving to GitHub - Unified Proposal
This document describes the proposal to move to GitHub, and
compare the two proposals through various workflow examples,
presenting the current set of commands following by the ones
involved in each of the two proposals.
It is intended to supersede the previous "submodule proposal"
document entirely, and drive the discussion at the BoF during
the next Dev Meeting.
Differential Revision: https://reviews.llvm.org/D24167
llvm-svn: 284077
Krzysztof Parzyszek [Wed, 12 Oct 2016 22:53:41 +0000 (22:53 +0000)]
Handle lane masks in LivePhysRegs when adding live-ins
Differential Revision: https://reviews.llvm.org/D25533
llvm-svn: 284076
Tim Northover [Wed, 12 Oct 2016 22:49:15 +0000 (22:49 +0000)]
GlobalISel: support G_TRUNC selection on AArch64.
Ahmed's patch again.
llvm-svn: 284075
Tim Northover [Wed, 12 Oct 2016 22:49:11 +0000 (22:49 +0000)]
GlobalISel: support int <-> float conversions on AArch64.
More of Ahmed's work.
llvm-svn: 284074
Tim Northover [Wed, 12 Oct 2016 22:49:07 +0000 (22:49 +0000)]
GlobalISel: select G_FCMP instructions on AArch64.
Another of Ahmed's patches.
llvm-svn: 284073
Tim Northover [Wed, 12 Oct 2016 22:49:04 +0000 (22:49 +0000)]
GlobalISel: support selection of G_ICMP on AArch64.
Patch from Ahmed Bougaca again.
llvm-svn: 284072
Tim Northover [Wed, 12 Oct 2016 22:49:01 +0000 (22:49 +0000)]
GlobalISel: select G_BRCOND instructions on AArch64.
llvm-svn: 284071
Tim Northover [Wed, 12 Oct 2016 22:48:36 +0000 (22:48 +0000)]
GlobalISel: mark G_BRCOND on s1 as legal.
It's going to be a TBNZ (at -O0) anyway, so the high bits don't matter.
llvm-svn: 284070
Vedant Kumar [Wed, 12 Oct 2016 22:44:50 +0000 (22:44 +0000)]
[unittests] Delete even more copy constructors (NFC)
llvm-svn: 284069
Rui Ueyama [Wed, 12 Oct 2016 22:36:31 +0000 (22:36 +0000)]
Support GNU-style ZLIB-compressed input sections.
Previously, we supported only SHF_COMPRESSED sections because it's
new and it's the ELF standard. But there are object files compressed
in the GNU style out there, so we had to support it.
Sections compressed in the GNU style start with ".zdebug_" and
contain different headers than the ELF standard's one. In this
patch, getRawCompressedData is responsible to handle it.
A tricky thing about GNU-style compressed sections is that we have
to rename them when creating output sections. ".zdebug_" prefix
implies the section is compressed. We need to rename ".zdebug_"
".debug" because our output sections are not compressed.
We do that in this patch.
llvm-svn: 284068
Reid Kleckner [Wed, 12 Oct 2016 22:33:57 +0000 (22:33 +0000)]
Make __asan_handle_no_return a no-op during initialization
Some of our existing tests hang on the new Windows bot with this stack:
770, clang_rt.asan_dynamic-i386.dll!__asan::AsanTSDGet+0x3e
771, clang_rt.asan_dynamic-i386.dll!__asan::GetCurrentThread+0x9
772, clang_rt.asan_dynamic-i386.dll!__asan_handle_no_return+0xe
773, clang_rt.asan_dynamic-i386.dll!__asan_wrap__except_handler4_common+0x12
774, ntdll.dll!wcstombs+0xb0 (No unwind info)
775, ntdll.dll!ZwWow64CallFunction64+0x2001 (No unwind info)
776, ntdll.dll!ZwWow64CallFunction64+0x1fd3 (No unwind info)
777, ntdll.dll!KiUserExceptionDispatcher+0xf (No unwind info)
778, clang_rt.asan_dynamic-i386.dll!destroy_fls+0x13
779, ntdll.dll!RtlLockHeap+0xea (No unwind info)
780, ntdll.dll!LdrShutdownProcess+0x7f (No unwind info)
781, ntdll.dll!RtlExitUserProcess+0x81 (No unwind info)
782, kernel32.dll!ExitProcess+0x13 (No unwind info)
783, clang_rt.asan_dynamic-i386.dll!__sanitizer::internal__exit+0xc
784, clang_rt.asan_dynamic-i386.dll!__sanitizer::Die+0x3d
785, clang_rt.asan_dynamic-i386.dll!__asan::AsanInitInternal+0x50b
786, clang_rt.asan_dynamic-i386.dll!__asan::Allocator::Allocate+0x1c
787, clang_rt.asan_dynamic-i386.dll!__asan::Allocator::Calloc+0x43
We hang because AsanDie tries to defend against multi-threaded death by
infinite looping if someone is already exiting. We might want to
reconsider that, but one easy way to avoid getting here is not to let
our noreturn interceptors call back into fragile parts of ASan.
llvm-svn: 284067
Vedant Kumar [Wed, 12 Oct 2016 22:27:54 +0000 (22:27 +0000)]
[unittests] Delete some copy constructors (NFC)
llvm-svn: 284066
Vedant Kumar [Wed, 12 Oct 2016 22:27:52 +0000 (22:27 +0000)]
[unittest] Pass a reference instead of making a copy (NFC)
llvm-svn: 284065
Vedant Kumar [Wed, 12 Oct 2016 22:27:49 +0000 (22:27 +0000)]
[Coverage] Delete some copy constructors (NFC)
llvm-svn: 284064
Vedant Kumar [Wed, 12 Oct 2016 22:27:45 +0000 (22:27 +0000)]
[Coverage] Factor out logic to create FunctionRecords (NFC)
llvm-svn: 284063
Albert Gutowski [Wed, 12 Oct 2016 22:22:34 +0000 (22:22 +0000)]
fix regexes for label names in ms-intrinsics test
llvm-svn: 284062
Albert Gutowski [Wed, 12 Oct 2016 22:13:19 +0000 (22:13 +0000)]
Create llvm.addressofreturnaddress intrinsic
Summary: We need a new LLVM intrinsic to implement MS _AddressOfReturnAddress builtin on 64-bit Windows.
Reviewers: majnemer, rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25293
llvm-svn: 284061
Albert Gutowski [Wed, 12 Oct 2016 22:01:05 +0000 (22:01 +0000)]
Implement MS _BitScan intrinsics
Summary: _BitScan intrinsics (and some others, for example _Interlocked and _bittest) are supposed to work on both ARM and x86. This is an attempt to isolate them, avoiding repeating their code or writing separate function for each builtin.
Reviewers: hans, thakis, rnk, majnemer
Subscribers: RKSimon, cfe-commits, aemerson
Differential Revision: https://reviews.llvm.org/D25264
llvm-svn: 284060
Reid Kleckner [Wed, 12 Oct 2016 21:59:56 +0000 (21:59 +0000)]
Follow up to r283955: add _recalloc_base dll thunk
llvm-svn: 284059
Reid Kleckner [Wed, 12 Oct 2016 21:51:14 +0000 (21:51 +0000)]
Update _MSC_VER equality checks for msdiaNNN.dll
Use inequality instead of equality to defend against minor version
increases in _MSC_VER. An _MSC_VER value of 1901 should still use
msdia140.dll, as described in this blog post:
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/visual-c-compiler-version/
llvm-svn: 284058
Michal Gorny [Wed, 12 Oct 2016 21:40:08 +0000 (21:40 +0000)]
[lit] Fix test shtest-timeout.py for modern output
Update the CHECK lines in the shtest-timeout.py lit test to account for
the current output. The output has been changed in r271610 without
adjusting the tests.
Differential Revision: https://reviews.llvm.org/D25236
llvm-svn: 284057
Michal Gorny [Wed, 12 Oct 2016 21:40:04 +0000 (21:40 +0000)]
[lit] Fix FormatError on individual test timeout
Differential Revision: https://reviews.llvm.org/D25195
llvm-svn: 284056
Arnold Schwaighofer [Wed, 12 Oct 2016 21:36:15 +0000 (21:36 +0000)]
Remove basic block label in test case
Another attempt to make a bot happy
llvm-svn: 284055
Haicheng Wu [Wed, 12 Oct 2016 21:29:38 +0000 (21:29 +0000)]
Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
Reappy r284044 after revert in r284051. Krzysztof fixed the error in r284049.
The original summary:
This patch tries to fully unroll loops having break statement like this
for (int i = 0; i < 8; i++) {
if (a[i] == value) {
found = true;
break;
}
}
GCC can fully unroll such loops, but currently LLVM cannot because LLVM only
supports loops having exact constant trip counts.
The upper bound of the trip count can be obtained from calling
ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the
refactoring work in SCEV to prevent duplicating code.
The feature of using the upper bound is enabled under the same circumstance
when runtime unrolling is enabled since both are used to unroll loops without
knowing the exact constant trip count.
llvm-svn: 284053
Krzysztof Parzyszek [Wed, 12 Oct 2016 21:06:45 +0000 (21:06 +0000)]
[MIRParser] Parse lane masks for register live-ins
Differential Revision: https://reviews.llvm.org/D25530
llvm-svn: 284052
Haicheng Wu [Wed, 12 Oct 2016 21:02:22 +0000 (21:02 +0000)]
Revert "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
This reverts commit r284044.
llvm-svn: 284051
Davide Italiano [Wed, 12 Oct 2016 20:52:52 +0000 (20:52 +0000)]
[ThinLTO] Test we handle collisions correctly in presence of --whole-archive.
llvm-svn: 284050
Krzysztof Parzyszek [Wed, 12 Oct 2016 20:39:33 +0000 (20:39 +0000)]
Fix testcases failing after r284036
The codegen has changed slightly between my tests and the commit.
llvm-svn: 284049
Arnold Schwaighofer [Wed, 12 Oct 2016 20:30:24 +0000 (20:30 +0000)]
Specify a target cpu in test case
Hopefully, this makes the bots happy
llvm-svn: 284048
Dimitry Andric [Wed, 12 Oct 2016 20:26:47 +0000 (20:26 +0000)]
Disable trivial pair copy/move tests when unsupported
Summary:
On FreeBSD, for ABI compatibility reasons, the pair trivial copy
constructor is disabled, using the aptly-named
`_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR` define.
Disable the related tests when this define is on, so they don't fail
unexpectedly.
Reviewers: emaste, rsmith, theraven, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25449
llvm-svn: 284047
Chris Bieneman [Wed, 12 Oct 2016 20:26:13 +0000 (20:26 +0000)]
[CMake] Cleanup check-lldb targets
Summary:
This patch adds the following fixes to the check-lldb targets:
* Adds missing dependencies on lldb tools so they get built before tests execute
* Adds Ninja USES_TERMINAL to the target so that the output streams to stdout as it executes
* Uses a generator expression to find the lldb executable, this is more robust than constructing the path manually
Reviewers: tfiala, zturner
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D25490
llvm-svn: 284046
Chris Bieneman [Wed, 12 Oct 2016 20:24:42 +0000 (20:24 +0000)]
Use LLDB_SRC for relative paths
Summary:
Going from LLDB_SRC instead of the file path is safer when looking for compiler-rt. Also need to add support for looking inside the LLVM runtimes subdirectory.
Eventually we should just get CMake to provide these paths during configuration.
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25489
llvm-svn: 284045
Haicheng Wu [Wed, 12 Oct 2016 20:24:32 +0000 (20:24 +0000)]
[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop
This patch tries to fully unroll loops having break statement like this
for (int i = 0; i < 8; i++) {
if (a[i] == value) {
found = true;
break;
}
}
GCC can fully unroll such loops, but currently LLVM cannot because LLVM only
supports loops having exact constant trip counts.
The upper bound of the trip count can be obtained from calling
ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the
refactoring work in SCEV to prevent duplicating code.
The feature of using the upper bound is enabled under the same circumstance
when runtime unrolling is enabled since both are used to unroll loops without
knowing the exact constant trip count.
Differential Revision: https://reviews.llvm.org/D24790
llvm-svn: 284044
Chris Bieneman [Wed, 12 Oct 2016 20:22:02 +0000 (20:22 +0000)]
Fix test suite lookup path for LLDB.h
Summary:
When running on Darwin, the test suite assumes a specific directory structure for the build directory. This works for the Xcode project builds, but fails for CMake builds regardless of whether or not you are generating the LLDB framework.
This patch allows the Darwin code path to fall back to the more generic code path used by other platforms in the event that LLDB.h isn't where the test suite expects it.
This allows API tests to run on Darwin when building with CMake with the framework build enabled or disabled.
Reviewers: tfiala, zturner
Subscribers: labath, lldb-commits
Differential Revision: https://reviews.llvm.org/D25488
llvm-svn: 284043
Chris Bieneman [Wed, 12 Oct 2016 20:19:19 +0000 (20:19 +0000)]
Fix building tests without system headers on Darwin
Summary: Default installations of OS X do not have system headers installed at /usr/include. This patch allows the LLDB test executables to properly compile when built on a system without headers at /usr/include by specifying a default value for the apple-sdk flag as "macosx".
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25487
llvm-svn: 284042
Chris Bieneman [Wed, 12 Oct 2016 20:15:46 +0000 (20:15 +0000)]
Fix lookup path for lldb-mi
Summary:
The test suite calls realpath on the lldb executable then append "-mi" to it to find the path of the lldb-mi executable. This does not work when using CMake builds on *nix platforms. On *nix platforms when a version number is set on executables CMake generates the binary as ${name}-${version} with a symlink named ${name} pointing to it.
This results in the lldb executable being named lldb-4.0.0, and since lldb-4.0.0-mi doesn't ever match the lldb-mi executable these tests are always disabled.
This patch looks for lldb-mi in the same directory as lldb.
Reviewers: zturner, tfiala
Subscribers: ki.stfu, enlight, lldb-commits
Differential Revision: https://reviews.llvm.org/D25486
llvm-svn: 284041
Peter Collingbourne [Wed, 12 Oct 2016 20:12:19 +0000 (20:12 +0000)]
LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions().
We need to use the overload of Mangler::getNameWithPrefix that takes a
GlobalValue in order to mangle in the stdcall stack byte count for Windows
targets.
Differential Revision: https://reviews.llvm.org/D25529
llvm-svn: 284040
Teresa Johnson [Wed, 12 Oct 2016 20:06:02 +0000 (20:06 +0000)]
[ThinLTO] Fix bot failure due to unused variable with NDEBUG
Put variable only used in assert under #ifndef NDEBUG.
This should fix bot failure at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/28537
llvm-svn: 284039
Mehdi Amini [Wed, 12 Oct 2016 19:54:08 +0000 (19:54 +0000)]
Revert "[ADT] Zip range adapter"
This reverts commit r284035, which breaks with MSVC 2013.
llvm-svn: 284037
Krzysztof Parzyszek [Wed, 12 Oct 2016 19:50:57 +0000 (19:50 +0000)]
Do not remove implicit defs in BranchFolder
Branch folder removes implicit defs if they are the only non-branching
instructions in a block, and the branches do not use the defined registers.
The problem is that in some cases these implicit defs are required for
the liveness information to be correct.
Differential Revision: https://reviews.llvm.org/D25478
llvm-svn: 284036
Mehdi Amini [Wed, 12 Oct 2016 19:43:02 +0000 (19:43 +0000)]
[ADT] Zip range adapter
This augments the STLExtras toolset with a zip iterator and range
adapter. Zip comes in two varieties: `zip`, which will zip to the
shortest of the input ranges, and `zip_first`, which limits its
`begin() == end()` checks to just the first krange.
Patch by: Bryant Wong <github.com/bryant>
Differential Revision: https://reviews.llvm.org/D23252
llvm-svn: 284035
Davide Italiano [Wed, 12 Oct 2016 19:35:54 +0000 (19:35 +0000)]
[ThinLTO] Avoid archive member collisions.
This fixes PR30665.
Differential Revision: https://reviews.llvm.org/D25495
llvm-svn: 284034
Yunzhong Gao [Wed, 12 Oct 2016 19:33:33 +0000 (19:33 +0000)]
[NFC] Trial change to remove a redundant blank line.
llvm-svn: 284033
Arnold Schwaighofer [Wed, 12 Oct 2016 18:59:24 +0000 (18:59 +0000)]
Declare WinX86_64ABIInfo to satisfy SwiftABI info
This is minimal support that allows swift's test cases on non windows platforms
to pass.
rdar://
28738985
llvm-svn: 284032
Matt Arsenault [Wed, 12 Oct 2016 18:49:05 +0000 (18:49 +0000)]
AMDGPU: Initial implementation of VGPR indexing mode
This is the most basic handling of the indirect access
pseudos using GPR indexing mode. This currently only enables
the mode for a single v_mov_b32 and then disables it.
This is much more complicated to use than the movrel instructions,
so a new optimization pass is probably needed to fold the access
into the uses and keep the mode enabled for them.
llvm-svn: 284031
Teresa Johnson [Wed, 12 Oct 2016 18:39:29 +0000 (18:39 +0000)]
[ThinLTO] Don't link module level assembly when importing
Module inline asm was always being linked/concatenated
when running the IRLinker. This is correct for full LTO but not when
we are importing for ThinLTO, as it can result in multiply defined
symbols when the module asm defines a global symbol.
In order to test with llvm-lto2, I had to work around PR30396,
where a symbol that is defined in module assembly but defined in the
LLVM IR appears twice. Added workaround to llvm-lto2 with a FIXME.
Fixes PR30610.
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25359
llvm-svn: 284030
Kostya Serebryany [Wed, 12 Oct 2016 18:33:54 +0000 (18:33 +0000)]
Document potential implementation of CFI in hardware.
Summary: Document potential implementation of CFI in hardware.
Reviewers: eugenis, pcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25455
llvm-svn: 284029
Sanjoy Das [Wed, 12 Oct 2016 18:15:33 +0000 (18:15 +0000)]
[SimplifyCFG] Don't create PHI nodes for constant bundle operands
Summary:
Constant bundle operands may need to retain their constant-ness for
correctness. I'll admit that this is slightly odd, but it looks like
SimplifyCFG already does this for things like @llvm.frameaddress and
@llvm.stackmap, so I suppose adding one more case is not a big deal.
It is possible to add a mechanism to denote bundle operands that need to
remain constants, but that's probably too complicated for the time
being.
Reviewers: jmolloy
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D25502
llvm-svn: 284028
Matt Arsenault [Wed, 12 Oct 2016 18:00:51 +0000 (18:00 +0000)]
AMDGPU: Add instruction definitions for VGPR indexing
VI added a second method of indexing into VGPRs
besides using v_movrel*
llvm-svn: 284027
Albert Gutowski [Wed, 12 Oct 2016 17:28:44 +0000 (17:28 +0000)]
Move x86-64 builtins from SemaChecking.cpp to BuiltinsX86_64.def
Summary: Follow-up to https://reviews.llvm.org/D24598 (separating builtins for x84-64 and i386).
Reviewers: hans, thakis, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25494
llvm-svn: 284026
Zvi Rackover [Wed, 12 Oct 2016 17:06:30 +0000 (17:06 +0000)]
[X86] Add the v4i32 flavor test-case for pr30371
llvm-svn: 284025
Tom Stellard [Wed, 12 Oct 2016 16:35:29 +0000 (16:35 +0000)]
AMDGPU/SI: Change mimg intrinsic signatures
This makes more fields overridable and removes redundant bits.
Patch by: Changpeng Fang
llvm-svn: 284024
Michael Kruse [Wed, 12 Oct 2016 16:31:09 +0000 (16:31 +0000)]
[ScopInfo/CodeGen] ExitPHI reads are implicit.
Under some conditions MK_Value read accessed where converted to MK_ExitPHI read
accessed. This is unexpected because MK_ExitPHI read accesses are implicit after
the scop execution. This behaviour was introduced in r265261, which fixed a
failed assertion/crash in CodeGen.
Instead, we fix this failure in CodeGen itself. createExitPHINodeMerges(),
despite its name, also handles accesses of kind MK_Value, only to skip them
because they access values that are usually not PHI nodes in the SCoP region's
exit block. Except in the situation observed in r265261.
Do not convert value accessed to ExitPHI accesses and do not handle
value accesses like ExitPHI accessed in CodeGen anymore.
llvm-svn: 284023
Artur Pilipenko [Wed, 12 Oct 2016 16:18:43 +0000 (16:18 +0000)]
[ValueTracking] An improvement to IR ValueTracking on Non-negative Integers
Since this change is known to cause performance degradations in some cases it's commited under a temporary flag which is turned off by default.
Patch by Li Huang
Differential Revision: https://reviews.llvm.org/D18777
llvm-svn: 284022
Marshall Clow [Wed, 12 Oct 2016 16:13:48 +0000 (16:13 +0000)]
Mark ostream_iterator's constructors as noexcept.
llvm-svn: 284021
Haojian Wu [Wed, 12 Oct 2016 15:50:30 +0000 (15:50 +0000)]
[clang-move] Compare with real paths of symlinks
Summary: MakeAbsolutePath does wrong things with symlinks previously. When comparing with a symlink, we need to compare with the real path of it. This fixes issues when the build directory is a symlink.
Reviewers: ioeric
Subscribers: beanz, mgorny, cfe-commits, bkramer
Differential Revision: https://reviews.llvm.org/D25508
llvm-svn: 284020
Alex Lorenz [Wed, 12 Oct 2016 15:33:35 +0000 (15:33 +0000)]
NFC: CodeCompletionResult's constructor should take const NamedDecl
CodeCompletionResult's Declaration field is a const pointer to the
NamedDecl, and thus the constructor should take a const pointer as well.
llvm-svn: 284019
Matt Arsenault [Wed, 12 Oct 2016 15:32:04 +0000 (15:32 +0000)]
BranchRelaxation: Unique live ins when creating block
llvm-svn: 284018
Nirav Dave [Wed, 12 Oct 2016 13:58:07 +0000 (13:58 +0000)]
[MC] Fix Error Location for ParseIdentifier
Prevent partial parsing of '$' or '@' of invalid identifiers and fixup
workaround points. NFC Intended.
llvm-svn: 284017
Shoaib Meenai [Wed, 12 Oct 2016 13:48:14 +0000 (13:48 +0000)]
[libc++] Correct explanation of _LIBCPP_NEW_DELETE_VIS
The behavior of this macro actually needs to apply universally on
Windows and not just when using the Microsoft CRT. Update the macro
definition and documentation accordingly.
Differential Revision: https://reviews.llvm.org/D25145
llvm-svn: 284016
Simon Pilgrim [Wed, 12 Oct 2016 13:48:10 +0000 (13:48 +0000)]
[DAGCombiner] Update most ADD combines to support general vector combines
Add a number of helper functions to match scalar or vector equivalent constant/splat values to allow most of the combine patterns to be used by vectors.
Differential Revision: https://reviews.llvm.org/D25374
llvm-svn: 284015
Konstantin Zhuravlyov [Wed, 12 Oct 2016 13:44:24 +0000 (13:44 +0000)]
[DAGCombiner] Do not remove the load of stored values when optimizations are disabled
This combiner breaks debug experience and should not be run when optimizations are disabled.
For example:
int main() {
int j = 0;
j += 2;
if (j == 2)
return 0;
return 5;
}
When debugging this code compiled in /O0, it should be valid to break at line "j+=2;" and edit the value of j. It should change the return value of the function.
Differential Revision: https://reviews.llvm.org/D19268
llvm-svn: 284014
Chad Rosier [Wed, 12 Oct 2016 13:41:38 +0000 (13:41 +0000)]
[CVP] Convert an AShr to a LShr if 1st operand is known to be nonnegative.
An arithmetic shift can be safely changed to a logical shift if the first
operand is known positive. This allows ComputeKnownBits (and similar analysis)
to determine the sign bit of the shifted value in some cases. In turn, this
allows InstCombine to canonicalize a signed comparison (a > 0) into an equality
check (a != 0).
PR30577
Differential Revision: https://reviews.llvm.org/D25119
llvm-svn: 284013
Alexey Bataev [Wed, 12 Oct 2016 13:24:13 +0000 (13:24 +0000)]
NFC: The Cost Model specialization, by Andrey Tischenko
The current Cost Model implementation is very inaccurate and has to be
updated, improved, re-implemented to be able to take into account the
concrete CPU models and the concrete targets where this Cost Model is
being used. For example, the Latency Cost Model should be differ from
Code Size Cost Model, etc.
This patch is the first step to launch the developing and implementation
of a new Cost Model generation.
Differential Revision: https://reviews.llvm.org/D25186
llvm-svn: 284012
Eric Liu [Wed, 12 Oct 2016 12:34:18 +0000 (12:34 +0000)]
[change-namespace] don't miss comments in the beginning of a namespace block.
Reviewers: hokein
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25397
llvm-svn: 284011
Eugene Leviant [Wed, 12 Oct 2016 12:31:34 +0000 (12:31 +0000)]
Alternative fix for reloc tareting discarded section
r283984 introduced a problem of too many warning messages being shown
when -ffunction-sections and -fdata-sections were used in conjunction
with --gc-sections linker flag and debugging information present. This
happens because lot of relocations from .debug_line section may become
invalid in such case. The newer fix doesn't show any warning message but
zeroes OutSec pointer in createInputSectionList() to avoid crash, when
relocations are written
llvm-svn: 284010
Javed Absar [Wed, 12 Oct 2016 12:13:55 +0000 (12:13 +0000)]
[ARM] Fix - missing target-cpu in test
Fixes an incomplete test, wherein the target-cpu name (cortex-r52) was missing.
Differential Revision: http://reviews.llvm.org/D25474
llvm-svn: 284009
Vassil Vassilev [Wed, 12 Oct 2016 11:57:08 +0000 (11:57 +0000)]
Reinstate r283887 and r283882.
Original message:
"[modules] PR28752: Do not instantiate variable declarations which are not visible.
https://reviews.llvm.org/D24508
Patch developed in collaboration with Richard Smith!"
llvm-svn: 284008
Alex Lorenz [Wed, 12 Oct 2016 11:40:15 +0000 (11:40 +0000)]
[CodeCompletion] Show protocol properties that are accessed through qualified id
This commit improves code completion for properties that are declared in
Objective-C protocols by making sure that properties show up in completions
when they are accessed through a qualified id.
rdar://
24426041
Differential Revision: https://reviews.llvm.org/D25436
llvm-svn: 284007
Eric Fiselier [Wed, 12 Oct 2016 11:35:37 +0000 (11:35 +0000)]
Correctly grant rebound limited_allocators friendship.
llvm-svn: 284006
Eric Fiselier [Wed, 12 Oct 2016 11:29:18 +0000 (11:29 +0000)]
Remove incorrect XFAILS
llvm-svn: 284005
Eric Fiselier [Wed, 12 Oct 2016 11:20:27 +0000 (11:20 +0000)]
Unbreak C++03 build
llvm-svn: 284004
Nitesh Jain [Wed, 12 Oct 2016 10:53:57 +0000 (10:53 +0000)]
[LLDB][MIPS] fix Floating point register read/write for big endian
Reviewers: clayborg, labath, jaydeep
Subscribers: bhushan, slthakur, lldb-commits
Differential Revision: https://reviews.llvm.org/D24603
llvm-svn: 284003
Eric Fiselier [Wed, 12 Oct 2016 10:28:09 +0000 (10:28 +0000)]
Remove usages of _LIBCPP_CONSTEXPR under test/std
llvm-svn: 284002
Nitesh Jain [Wed, 12 Oct 2016 10:21:09 +0000 (10:21 +0000)]
[LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI
Reviewers: clayborg, labath
Subscribers: jaydeep, bhushan, slthakur, lldb-commits
Differential Revision: https://reviews.llvm.org/D25021
llvm-svn: 284001