Dave Lee [Fri, 20 Oct 2017 17:04:43 +0000 (17:04 +0000)]
Make x86 __ehhandler comdat if parent function is
Summary:
This change comes from using lld for i686-windows-msvc. Before this change, lld
emits an error of:
error: relocation against symbol in discarded section: .xdata
It's possible that this could be addressed in lld, but I think this change is
reasonable on its own.
At a high level, this is being generated:
A (.text comdat) -> B (.text) -> C (.xdata comdat)
Where A is a C++ inline function, which references B, an exception handler
thunk, which references C, the exception handling info.
With this structure, lld will error when applying relocations to B if the C it
references has been discarded (some other C has been selected).
This change checks if A is comdat, and if so places the exception registration
thunk (B) in the comdata group of A (and B).
It appears that MSVC makes the __ehhandler function comdat.
Is it possible that duplicate thunks are being emitted into the final binary
with other linkers, or are they stripping the unused thunks?
Reviewers: rnk, majnemer, compnerd, smeenai
Reviewed By: rnk, compnerd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38940
llvm-svn: 316219
Krzysztof Parzyszek [Fri, 20 Oct 2017 16:56:33 +0000 (16:56 +0000)]
[Hexagon] Allow redefinition with immediates for hw loop conversion
Normally, if the registers holding the induction variable's bounds
are redefined inside of the loop's body, the loop cannot be converted
to a hardware loop. However, if the redefining instruction is actually
loading an immediate value into the register, this conversion is both
possible and legal (since the immediate itself will be used in the
loop setup in the preheader).
llvm-svn: 316218
Simon Pilgrim [Fri, 20 Oct 2017 16:55:51 +0000 (16:55 +0000)]
[X86] Check all CPU target names.
We ignore the 32-bit/64-bit triple but I've tried to use i686 triples for CPUs that don't support x86_64
llvm-svn: 316217
Zvi Rackover [Fri, 20 Oct 2017 15:32:14 +0000 (15:32 +0000)]
X86 Tests: Add tests for vector permutes with variable indices. NFC.
Basic tests which are the equivalent of single-source shufflevector with variable mask.
llvm-svn: 316216
Aleksandar Beserminji [Fri, 20 Oct 2017 14:35:41 +0000 (14:35 +0000)]
Revert "[mips] Reordering callseq* nodes to be linear"
This reverts commit r314507, because the original patch is causing test
failures.
llvm-svn: 316215
Eugene Leviant [Fri, 20 Oct 2017 14:29:17 +0000 (14:29 +0000)]
[ARM] Use post-RA MI scheduler when +use-misched is set
Differential revision: https://reviews.llvm.org/D39100
llvm-svn: 316214
Simon Pilgrim [Fri, 20 Oct 2017 14:13:02 +0000 (14:13 +0000)]
[X86][AVX512] Regenerate regcall tests.
As part of tracking down machine verifier issues (PR27481)
llvm-svn: 316213
Haojian Wu [Fri, 20 Oct 2017 12:37:16 +0000 (12:37 +0000)]
[clang-refactor] Add "-Inplace" option to the commandline tool.
Summary:
Change clang-refactor default behavior to print the new code after refactoring
(instead of editing the source files), which would make it easier to use
and debug the refactoring action.
Reviewers: arphaman, ioeric
Reviewed By: arphaman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D39092
llvm-svn: 316212
Ivan A. Kosarev [Fri, 20 Oct 2017 12:35:17 +0000 (12:35 +0000)]
[CodeGen] Fix generation of TBAA info for array-to-pointer conversions
Resolves:
Fatal error: Offset not zero at the point of scalar access.
http://llvm.org/PR34992
Differential Revision: https://reviews.llvm.org/D39083
llvm-svn: 316211
Dmitry Vyukov [Fri, 20 Oct 2017 12:10:21 +0000 (12:10 +0000)]
tsan: add tests missed in r316209
llvm-svn: 316210
Dmitry Vyukov [Fri, 20 Oct 2017 12:08:53 +0000 (12:08 +0000)]
[tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior
Add a new flag, __tsan_mutex_not_static, which has the opposite sense
of __tsan_mutex_linker_init. When the new __tsan_mutex_not_static flag
is passed to __tsan_mutex_destroy, tsan ignores the destruction unless
the mutex was also created with the __tsan_mutex_not_static flag.
This is useful for constructors that otherwise woud set
__tsan_mutex_linker_init but cannot, because they are declared constexpr.
Google has a custom mutex with two constructors, a "linker initialized"
constructor that relies on zero-initialization and sets
__tsan_mutex_linker_init, and a normal one which sets no tsan flags.
The "linker initialized" constructor is morally constexpr, but we can't
declare it constexpr because of the need to call into tsan as a side effect.
With this new flag, the normal c'tor can set __tsan_mutex_not_static,
the "linker initialized" constructor can rely on tsan's lazy initialization,
and __tsan_mutex_destroy can still handle both cases correctly.
Author: Greg Falcon (gfalcon)
Reviewed in: https://reviews.llvm.org/D39095
llvm-svn: 316209
Nikolai Bozhenov [Fri, 20 Oct 2017 10:08:47 +0000 (10:08 +0000)]
[ValueTracking] Enabling ValueTracking patch by default
(recommit #2 after checking for timeout issue).
The original patch was an improvement to IR ValueTracking on
non-negative integers. It has been checked in to trunk (D18777,
r284022). But was disabled by default due to performance regressions.
Perf impact has improved. The patch would be enabled by default.
Reviewers: reames, hfinkel
Differential Revision: https://reviews.llvm.org/D34101
Patch by: Olga Chupina <olga.chupina@intel.com>
llvm-svn: 316208
Max Kazantsev [Fri, 20 Oct 2017 06:40:48 +0000 (06:40 +0000)]
Add test case for LoopSink pass
This test checks that load from constant memory will be sunk regardless of
aliasing stores in the loop.
Patch by Daniil Suchkov!
Differential Revision: https://reviews.llvm.org/D39113
llvm-svn: 316207
Dylan McKay [Fri, 20 Oct 2017 04:17:14 +0000 (04:17 +0000)]
[AVR] Fix the select-mbb-placement-bug.ll
llvm-svn: 316205
Saleem Abdulrasool [Fri, 20 Oct 2017 04:11:28 +0000 (04:11 +0000)]
Basic: restore {,u}intptr_t on NetBSD/ARM
NetBSD uses `long int` for `intptr_t` on ARM. This was changed in SVN
r316046, referenced against other compilers. However, NetBSD's
reference was incorrect as the current clang behaviour is more
up-to-date. Restore the original behaviour for that target.
llvm-svn: 316204
Lang Hames [Fri, 20 Oct 2017 01:18:00 +0000 (01:18 +0000)]
[ExecutionEngine] Temporarily remove the ExecutionEngine tls tests.
Will re-enable once I figure out why the necessary runtime functions are
missing on some bots.
llvm-svn: 316203
Lang Hames [Fri, 20 Oct 2017 00:53:16 +0000 (00:53 +0000)]
[ExecutionEngine] After a heroic dev-meeting hack session, the JIT supports TLS.
Turns on EmulatedTLS support by default in EngineBuilder. ;)
llvm-svn: 316200
Nemanja Ivanovic [Fri, 20 Oct 2017 00:36:46 +0000 (00:36 +0000)]
Disabling the transformation introduced in r315888
The commit at https://reviews.llvm.org/rL315888 is causing some failures
with internal testing. Disabling this code until we can resolve the issues.
llvm-svn: 316199
Richard Smith [Fri, 20 Oct 2017 00:25:07 +0000 (00:25 +0000)]
Revert r316193.
This patch breaks users using -fno-canonical-prefixes, for whom resolving
symlinks is not acceptable.
llvm-svn: 316195
Peter Wu [Thu, 19 Oct 2017 23:53:27 +0000 (23:53 +0000)]
Try to shorten system header paths when using -MD depfiles
GCC tries to shorten system headers in depfiles using its real path
(resolving components like ".." and following symlinks). Mimic this
feature to ensure that the Ninja build tool detects the correct
dependencies when a symlink changes directory levels, see
https://github.com/ninja-build/ninja/issues/1330
An option to disable this feature is added in case "these changed header
paths may conflict with some compilation environments", see
https://gcc.gnu.org/ml/gcc-patches/2012-09/msg00287.html
Note that the original feature request for GCC
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974) also included paths
preprocessed output (-E) and diagnostics. That is not implemented now
since I am not sure if it breaks something else.
Differential Revision: https://reviews.llvm.org/D37954
llvm-svn: 316193
Keith Wyss [Thu, 19 Oct 2017 22:35:09 +0000 (22:35 +0000)]
[XRay] [docs] Document how to generate flamegraphs from xray traces.
Summary:
Updated the XRayExample docs with instructions for using the llvm-xray stacks
command.
Reviewers: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39106
llvm-svn: 316192
Marshall Clow [Thu, 19 Oct 2017 22:10:41 +0000 (22:10 +0000)]
Fix an unsigned integer overflow in regex that lead to a bad memory access. Found by OSS-Fuzz
llvm-svn: 316191
Eugene Zelenko [Thu, 19 Oct 2017 22:07:16 +0000 (22:07 +0000)]
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316190
Alex Bradbury [Thu, 19 Oct 2017 21:43:29 +0000 (21:43 +0000)]
[RISCV] Add missing hunk from r316188
r316188 didn't set guessInstructionProperties=1 as it should have done.
llvm-svn: 316189
Alex Bradbury [Thu, 19 Oct 2017 21:37:38 +0000 (21:37 +0000)]
[RISCV] Initial codegen support for ALU operations
This adds the minimum necessary to support codegen for simple ALU operations
on RV32. Prolog and epilog insertion, support for memory operations etc etc
follow in future patches.
Leave guessInstructionProperties=1 until https://reviews.llvm.org/D37065 is
reviewed and lands.
Differential Revision: https://reviews.llvm.org/D29933
llvm-svn: 316188
Eugene Zelenko [Thu, 19 Oct 2017 21:21:30 +0000 (21:21 +0000)]
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316187
Aaron Ballman [Thu, 19 Oct 2017 21:20:28 +0000 (21:20 +0000)]
These attributes are not supported by GCC and should not be in the gnu namespace. Switching from the GCC spelling to the GNU spelling so that they are only supported with __attribute__(()).
llvm-svn: 316186
James Y Knight [Thu, 19 Oct 2017 21:09:49 +0000 (21:09 +0000)]
Add an svn project to contain the files that appear at the root of the
monorepo.
llvm-svn: 316185
Aaron Ballman [Thu, 19 Oct 2017 21:09:39 +0000 (21:09 +0000)]
These attributes are supported by GCC with the gnu vendor namespace for C++11-style attributes. Enabling the gnu namespace by switching to the GCC spelling.
llvm-svn: 316184
Craig Topper [Thu, 19 Oct 2017 20:59:41 +0000 (20:59 +0000)]
[SelectionDAG] Add a check to getVectorShuffle to ensure that the only negative index we allow is -1.
llvm-svn: 316183
Craig Topper [Thu, 19 Oct 2017 20:59:40 +0000 (20:59 +0000)]
[X86] Remove LowerEXTRACT_SUBVECTOR handler. All EXTRACT_SUBVECTORs are marked as legal.
llvm-svn: 316182
Jan Vesely [Thu, 19 Oct 2017 20:40:13 +0000 (20:40 +0000)]
AMDGPU: Parse r600 CPU name early and expose FMAF capability
Improve amdgcn macro test
Differential Revision: https://reviews.llvm.org/D38667
llvm-svn: 316181
Martin Storsjo [Thu, 19 Oct 2017 20:19:16 +0000 (20:19 +0000)]
[COFF] Avoid forward declaring StringSet, fix build
This should fix the build after SVN r316178, which worked fine
on GCC 5.4, but failed on clang with errors like these:
MinGW.h:26:3: error: too few template arguments for class template 'StringSet'
StringSet<> ExcludeSymbols;
^
lld/Common/LLVM.h:28:30: note: template is declared here
template<typename T> class StringSet;
Don't forward declare and add the using directive in the main
lld/Common/LLVM.h header, but just qualify the class name
in MinGW.h instead.
llvm-svn: 316180
Guozhi Wei [Thu, 19 Oct 2017 20:11:23 +0000 (20:11 +0000)]
[CGExprScalar] Add missing types in function GetIntrinsic
In function GetIntrinsic, not all types are covered. Types double and long long are missed, type long is wrongly treated same as int, it should be same as long long. These problems cause compiler crashes when compiling code in PR31161. This patch fixed the problem.
Differential Revision: https://reviews.llvm.org/D38820
llvm-svn: 316179
Martin Storsjo [Thu, 19 Oct 2017 19:49:38 +0000 (19:49 +0000)]
[COFF] Move MinGW specific functions/classes to a separate file. NFC.
Differential Revision: https://reviews.llvm.org/D39067
llvm-svn: 316178
Benjamin Kramer [Thu, 19 Oct 2017 19:07:13 +0000 (19:07 +0000)]
[Sema] Fix assertion failure when checking for unused variables in a dependent context.
llvm-svn: 316177
Simon Pilgrim [Thu, 19 Oct 2017 19:05:04 +0000 (19:05 +0000)]
[X86][AES] Test AES intrinsics on 32/64-bit targets with/without VEX encoding
Don't just test on 32-bit
llvm-svn: 316176
Graham Yiu [Thu, 19 Oct 2017 18:16:31 +0000 (18:16 +0000)]
The cost of splitting a large vector instruction is not being taken into account by the getUserCost function. This was leading to some loops being over unrolled. The cost of a vector instruction is now being multiplied by the cost of the type legalization. This will return a more accurate cost.
Committing on behalf on Brad Nemanich (brad.nemanich@ibm.com)
Differential Revision: https://reviews.llvm.org/D38961
llvm-svn: 316174
Pavel Labath [Thu, 19 Oct 2017 17:40:51 +0000 (17:40 +0000)]
Logging: Make sure logging machinery is in a consistent state after forking
Summary:
We had a bug where if we had forked (in the ProcessLauncherPosixFork)
while another thread was writing a log message, we would deadlock. This
happened because the fork child inherited the locked log rwmutex, which
would never get unlocked. This meant the child got stuck trying to
disable all log channels.
The bug existed for a while but only started being apparent after
D37930, which started using ThreadLauncher (which uses logging) instead
of std::thread (which does not) for launching TaskPool threads.
The fix is to use pthread_atfork to make sure noone is writing a log
message while we are forking.
Reviewers: zturner, eugene, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D38938
llvm-svn: 316173
Marshall Clow [Thu, 19 Oct 2017 17:39:16 +0000 (17:39 +0000)]
Fix UB - signed integer overflow in regex. Thanks to Tim Shen for the patch. Reviewed as https://reviews.llvm.org/D39066
llvm-svn: 316172
Konstantin Zhuravlyov [Thu, 19 Oct 2017 17:12:55 +0000 (17:12 +0000)]
AMDGPU/Docs: Fix unreadable characters
llvm-svn: 316171
Krzysztof Parzyszek [Thu, 19 Oct 2017 16:59:22 +0000 (16:59 +0000)]
[Hexagon] Fix store conversion from rr to io in optimize addressing modes
llvm-svn: 316170
Saleem Abdulrasool [Thu, 19 Oct 2017 16:57:40 +0000 (16:57 +0000)]
ExecutionEngine: adjust COFF i386 tautological asserts
Modify static_casts to not be tautological in some COFF i386
relocations.
Patch by Alex Langford!
llvm-svn: 316169
Alex Bradbury [Thu, 19 Oct 2017 16:22:51 +0000 (16:22 +0000)]
[RISCV] RISCVAsmParser: early exit if RISCVOperand isn't immediate as expected
This is necessary to avoid an assertion in the included test case and similar
assembler inputs.
llvm-svn: 316168
Alex Bradbury [Thu, 19 Oct 2017 16:09:20 +0000 (16:09 +0000)]
[RISCV][NFC] Drop unused parameter from createImm helper in RISCVAsmParser
llvm-svn: 316167
Erich Keane [Thu, 19 Oct 2017 15:58:58 +0000 (15:58 +0000)]
Fix nodiscard for volatile references
As reported here https://bugs.llvm.org/show_bug.cgi?id=34988
[[nodiscard]] warnings were not being suppressed for
volatile-ref return values.
Differential Revision: https://reviews.llvm.org/D39075
llvm-svn: 316166
Yaxun Liu [Thu, 19 Oct 2017 15:56:13 +0000 (15:56 +0000)]
[AMDGPU] Fix bug in enqueued block codegen due to an extra line
llvm-svn: 316165
Nikolai Bozhenov [Thu, 19 Oct 2017 15:36:18 +0000 (15:36 +0000)]
Revert r315992 because of a found miscompilation failure
llvm-svn: 316164
George Rimar [Thu, 19 Oct 2017 15:03:59 +0000 (15:03 +0000)]
[ELF] - Simplify. NFC.
llvm-svn: 316163
Simon Pilgrim [Thu, 19 Oct 2017 15:02:24 +0000 (15:02 +0000)]
[X86] Replace custom scalar integer absolute matching with ISD::ABS lowering.
x86 has its own copy of integer absolute pattern matching to combine directly to a SUB+CMOV.
This patch removes the x86 combine and adds custom lowering support for ISD::ABS instead, allowing us to use the DAGCombiner version.
Additional test cases are already covered by iabs.ll (rL315706 and rL315711).
Differential Revision: https://reviews.llvm.org/D38895
llvm-svn: 316162
Simon Pilgrim [Thu, 19 Oct 2017 15:00:31 +0000 (15:00 +0000)]
Fix MSVC signed/unsigned comparison warning
llvm-svn: 316161
Simon Pilgrim [Thu, 19 Oct 2017 14:59:26 +0000 (14:59 +0000)]
[X86] Add scalar (abs (abs x)) -> (abs x) combine test.
Before landing D38895
llvm-svn: 316160
Alex Bradbury [Thu, 19 Oct 2017 14:29:03 +0000 (14:29 +0000)]
[RISCV] Prepare for the use of variable-sized register classes
While parameterising by XLen, also take the opportunity to clean up the
formatting of the RISCV .td files.
This commit unifies the in-tree code with my patchset at
<https://github.com/lowrisc/riscv-llvm>.
llvm-svn: 316159
Max Kazantsev [Thu, 19 Oct 2017 12:22:39 +0000 (12:22 +0000)]
Revert rL316156 due to failure on APFloatTest.fromToStringSpecials
llvm-svn: 316158
Gabor Horvath [Thu, 19 Oct 2017 11:58:21 +0000 (11:58 +0000)]
[analyzer] Dump signed integers in SymIntExpr and IntSymExpr correctly
Patch by: Adam Balogh!
Differential Revision: https://reviews.llvm.org/D39048
llvm-svn: 316157
Serguei Katkov [Thu, 19 Oct 2017 11:16:03 +0000 (11:16 +0000)]
Fix APFloat from string conversion for Inf
The method IEEEFloat::convertFromStringSpecials() does not recognize
the "+Inf" and "-Inf" strings but these strings are printed for
the double Infinities by the IEEEFloat::toString().
This patch adds the "+Inf" and "-Inf" strings to the list of recognized
patterns in IEEEFloat::convertFromStringSpecials().
Reviewers: sberg, bogner, majnemer, timshen, rnk, skatkov, gottesmm, bkramer, scanon
Reviewed By: skatkov
Subscribers: apilipenko, reames, llvm-commits
Differential Revision: https://reviews.llvm.org/D38030
llvm-svn: 316156
Diana Picus [Thu, 19 Oct 2017 09:28:19 +0000 (09:28 +0000)]
[ARM GlobalISel] Fix liveins in test. NFC
llvm-svn: 316155
Diana Picus [Thu, 19 Oct 2017 08:50:28 +0000 (08:50 +0000)]
[ARM GlobalISel] Remove redundant tests
These test cases don't really add anything that isn't covered by other
tests as well, so we can safely remove them.
llvm-svn: 316154
Vassil Vassilev [Thu, 19 Oct 2017 08:44:19 +0000 (08:44 +0000)]
Revert 316150 which reinstated r316025.
It fails on some bots and now we know how to reproduce it.
llvm-svn: 316153
Haojian Wu [Thu, 19 Oct 2017 08:20:55 +0000 (08:20 +0000)]
Fix a few nits in RenamingAction.
* Add missing override keyword.
* avoid unnecessary copy of std::string.
llvm-svn: 316152
Sam McCall [Thu, 19 Oct 2017 08:13:49 +0000 (08:13 +0000)]
Const fix for YAMLParser.
llvm-svn: 316151
Vassil Vassilev [Thu, 19 Oct 2017 08:04:22 +0000 (08:04 +0000)]
Reinstate r316025, reverted in r316029.
Original commit message:
"[cmake] Use find_package to discover zlib
This allows us to use standard cmake utilities to point to non-system zlib
locations.
Patch by Oksana Shadura and me (D39002)."
The new patch brings back the old behavior in the cases where find_package
cannot find zlib.
llvm-svn: 316150
Martin Storsjo [Thu, 19 Oct 2017 07:40:45 +0000 (07:40 +0000)]
[Headers] Fix typoed __ARM_DWARF_EH__ ifdefs
These typos appeared in SVN r309226 and r309327.
llvm-svn: 316149
Martin Storsjo [Thu, 19 Oct 2017 06:56:04 +0000 (06:56 +0000)]
[COFF] Exclude certain static libraries and object files when exporting all symbols
This more or less matches what GNU ld does.
Differential Revision: https://reviews.llvm.org/D38937
llvm-svn: 316148
Vedant Kumar [Thu, 19 Oct 2017 06:16:23 +0000 (06:16 +0000)]
[Coverage] Simplify r316141. NFC.
llvm-svn: 316147
Max Kazantsev [Thu, 19 Oct 2017 05:33:28 +0000 (05:33 +0000)]
[NFC][IRCE] Filter out empty ranges early
llvm-svn: 316146
whitequark [Thu, 19 Oct 2017 04:47:48 +0000 (04:47 +0000)]
[MergeFunctions] Don't blindly RAUW a GlobalValue with a ConstantExpr.
MergeFunctions uses (through FunctionComparator) a map of GlobalValues
to identifiers because it needs to compare functions and globals
do not have an inherent total order. Thus, FunctionComparator
(through GlobalNumberState) has a ValueMap<GlobalValue *>.
r315852 added a RAUW on globals that may have been previously
encountered by the FunctionComparator, which would replace
a GlobalValue * key with a ConstantExpr *, which is illegal.
This commit adjusts that code path to remove the function being
replaced from the ValueMap as well.
llvm-svn: 316145
Rafael Espindola [Thu, 19 Oct 2017 01:32:18 +0000 (01:32 +0000)]
Simplify.
llvm-svn: 316144
Rafael Espindola [Thu, 19 Oct 2017 01:25:48 +0000 (01:25 +0000)]
Fix buffer overflow.
We were reading past the end of the buffer.
llvm-svn: 316143
Chris Bieneman [Thu, 19 Oct 2017 00:43:48 +0000 (00:43 +0000)]
[CMake] Allow parent projects to use in-source builds
LLVM checks if it is performing an in-source build and then stop the
build. However, this check is also triggered if LLVM is being build as
part of a parent project, which prevents the parent project itself from
using in-source builds. For example, CMake allows a parent project to
specify the output of its subproject:
add_subdirectory(llvm llvm_build)
This tells CMake to conduct an out-tree build of LLVM, which without
this patch will still fails because what is being tested is the parent
project, not LLVM. This is fixed by using the "CURRENT" variable, which
is only concerned by the CMakeLists that is actually bein processed at
the moment.
Tests:
Ran `make check-llvm`.
Patch by Henrique Jung <henriquenj_AT_gmail_DOT_com>
llvm-svn: 316142
Vedant Kumar [Wed, 18 Oct 2017 23:58:28 +0000 (23:58 +0000)]
[llvm-cov] Move LineCoverageIterator to libCoverage. NFC.
LineCoverageIterator makes it easy for clients of coverage data to
determine line execution counts for a file or function. The coverage
iteration logic is tricky enough that it really pays not to have
multiple copies of it. Hopefully having just one implementation in LLVM
will make the iteration logic easier to test, reuse, and update.
This commit is NFC but I've added a unit test to go along with it just
because it's easy to do now.
llvm-svn: 316141
Vedant Kumar [Wed, 18 Oct 2017 23:58:27 +0000 (23:58 +0000)]
[llvm-cov] Use the coverage namespace. NFC.
This is a simple code cleanup. It will facilitate moving
LineCoverageIterator to libCoverage.
llvm-svn: 316140
Justin Bogner [Wed, 18 Oct 2017 23:33:31 +0000 (23:33 +0000)]
GISel: Canonicalize select tests using update_mir_test_checks
This runs `udpate_mir_test_checks --add-vreg-checks` on the tests taht
are already more or less in the format that generates, so that there
will be less churn in some upcoming changes.
llvm-svn: 316139
Justin Bogner [Wed, 18 Oct 2017 23:26:24 +0000 (23:26 +0000)]
AArch64/GISel: Modernize the localizer test
llvm-svn: 316138
Justin Bogner [Wed, 18 Oct 2017 23:18:12 +0000 (23:18 +0000)]
Canonicalize a large number of mir tests using update_mir_test_checks
This converts a large and somewhat arbitrary set of tests to use
update_mir_test_checks. I ran the script on all of the tests I expect
to need to modify for an upcoming mir syntax change and kept the ones
that obviously didn't change the tests in ways that might make it
harder to understand.
llvm-svn: 316137
Richard Smith [Wed, 18 Oct 2017 22:45:01 +0000 (22:45 +0000)]
Don't suppress instantiation of definitions for variables subject to explicit
instantiation declarations if they are usable from constant expressions.
We are permitted to instantiate in these cases, and required to do so in order
to have an initializer available for use within constant evaluation.
llvm-svn: 316136
Chandler Carruth [Wed, 18 Oct 2017 22:42:36 +0000 (22:42 +0000)]
[PM] Refactor the bounds checking pass to remove a method only called in
one place.
llvm-svn: 316135
Justin Bogner [Wed, 18 Oct 2017 22:39:55 +0000 (22:39 +0000)]
update_mir_test_checks: Support adding checks for vreg classes
This is a temporary hack to support adding checks for the "registers:"
block of mir functions. This is necessary to convert a number of tests
so that there's less churn when we change the MIR printer to put the
vreg classes on defs instead of in their own block.
llvm-svn: 316134
Justin Bogner [Wed, 18 Oct 2017 22:36:08 +0000 (22:36 +0000)]
update_mir_test_checks: Improve message when updating fails
llvm-svn: 316133
Erich Keane [Wed, 18 Oct 2017 22:17:16 +0000 (22:17 +0000)]
Fix capitalization of parameter
The .cpp file has this properly capitalized, but
the header does not. Simply fixed it.
llvm-svn: 316132
Tony Tye [Wed, 18 Oct 2017 22:16:55 +0000 (22:16 +0000)]
[AMDGPU] Corrections to memory model description.
- Add description on nontemporal support.
- Correct OpenCL sequentially consistent and fence code sequences.
- Minor test cleanup.
Differential Revision: https://reviews.llvm.org/D39073
llvm-svn: 316131
Krasimir Georgiev [Wed, 18 Oct 2017 22:13:25 +0000 (22:13 +0000)]
[clang-format] Sort whole block of using declarations while partially formatting
Summary:
This patch enables sorting the full block of using declarations when
some line is affected.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D39024
llvm-svn: 316130
Sanjoy Das [Wed, 18 Oct 2017 22:00:57 +0000 (22:00 +0000)]
Revert "[ScalarEvolution] Handling for ICmp occuring in the evolution chain."
This reverts commit r316054. There was some confusion over the review process:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20171016/495884.html
llvm-svn: 316129
Eugene Zelenko [Wed, 18 Oct 2017 21:46:47 +0000 (21:46 +0000)]
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316128
Benjamin Kramer [Wed, 18 Oct 2017 21:43:42 +0000 (21:43 +0000)]
[Driver] Fix use after free in Hexagon toolchain code.
No functionality change intended.
llvm-svn: 316127
Sam Clegg [Wed, 18 Oct 2017 20:46:05 +0000 (20:46 +0000)]
Fix lit.site.cfg.py.in after rL316123
llvm-svn: 316126
Marshall Clow [Wed, 18 Oct 2017 20:40:57 +0000 (20:40 +0000)]
Fix a think-o in the design of the stable_XXX sort tests; only shows up for test cases > 255 elements
llvm-svn: 316125
Dylan McKay [Wed, 18 Oct 2017 20:04:57 +0000 (20:04 +0000)]
[AVR] Fix the select_mbb_placement_bug.ll test
llvm-svn: 316124
Sam Clegg [Wed, 18 Oct 2017 19:37:30 +0000 (19:37 +0000)]
Don't set static-libs test feature when using LLVM_LINK_LLVM_DYLIB
This was causing execname-options.ll to fail on the wasm
waterfall.
Differential Revision: https://reviews.llvm.org/D39022
llvm-svn: 316123
Vedant Kumar [Wed, 18 Oct 2017 18:52:29 +0000 (18:52 +0000)]
[llvm-cov] Suppress sub-line highlights in simple cases
llvm-cov tends to highlight too many regions because its policy is to
highlight all region entry segments. This can look confusing to users:
not all region entry segments are interesting and deserve highlighting.
Emitting these highlights only when the region count differs from the
line count is a more user-friendly policy.
llvm-svn: 316109
Vedant Kumar [Wed, 18 Oct 2017 18:52:28 +0000 (18:52 +0000)]
[llvm-cov] Pass LineCoverageStats in SourceCoverageView. NFC.
Instead of copying around the wrapped segment and the list of line
segments, just pass a reference to a LineCoverageStats object. This
simplifies the interface. It also makes an upcoming change to suppress
distracting highlights possible.
llvm-svn: 316108
Vedant Kumar [Wed, 18 Oct 2017 18:52:27 +0000 (18:52 +0000)]
[llvm-cov] Highlight gaps in consecutive uncovered regions
llvm-cov typically doesn't highlight gap segments, but it should if the
gap occurs after an uncovered region in order to preserve continuity.
llvm-svn: 316107
Pavel Labath [Wed, 18 Oct 2017 18:52:16 +0000 (18:52 +0000)]
lldb-server tests: Fix undefined behavior
We were creating a StringRef pointing to a temporary string. Problem manifested
itself when running the test on osx.
llvm-svn: 316106
Alex Lorenz [Wed, 18 Oct 2017 18:51:48 +0000 (18:51 +0000)]
[refactor] Add a doc comment to the test function in the selection
unittest.
As suggested by Haojian Wu!
llvm-svn: 316105
Alex Lorenz [Wed, 18 Oct 2017 18:48:58 +0000 (18:48 +0000)]
[refactor] selection: new CodeRangeASTSelection represents a set of selected
consecutive statements
This commit adds a CodeRangeASTSelection value to the refactoring library. This
value represents a set of selected statements in one body of code.
Differential Revision: https://reviews.llvm.org/D38835
llvm-svn: 316104
Matt Morehouse [Wed, 18 Oct 2017 18:38:04 +0000 (18:38 +0000)]
[clang-proto-fuzzer] Use ToT protobuf-mutator.
llvm-svn: 316103
Sumanth Gundapaneni [Wed, 18 Oct 2017 18:10:13 +0000 (18:10 +0000)]
[Hexagon] Handling of new HVX flags and target-features
This patch has the following changes
A new flag "-mhvx-length={64B|128B}" is introduced to specify the length of the vector.
Previously we have used "-mhvx-double" for 128 Bytes. This adds the target-feature "+hvx-length{64|128}b"
The "-mhvx" flag must be provided on command line to enable HVX for Hexagon. If no -mhvx-length flag
is specified, a default length is picked from the arch mentioned in this priority order from either -mhvx=vxx
or -mcpu. For v60 and v62 the default length is 64 Byte. For unknown versions, the length is 128 Byte. The
-mhvx flag adds the target-feature "+hvxv{hvx_version}"
The 64 Byte mode is soon going to be deprecated. A warning is emitted if 64 Byte is enabled. A warning is
still emitted for the default 64 Byte as well. This warning can be suppressed with a -Wno flag.
The "-mhvx-double" and "-mno-hvx-double" flags are deprecated. A warning is emitted if the driver sees
them on commandline. "-mhvx-double" is an alias to "-mhvx-length=128B"
The compilation will error out if -mhvx-length is specified with out an -mhvx/-mhvx= flag
The macro HVX_LENGTH is defined and is set to the length of the vector.
Eg: #define HVX_LENGTH 64
The macro HVX_ARCH is defined and is set to the version of the HVX.
Eg: #define HVX_ARCH 62
Differential Revision: https://reviews.llvm.org/D38852
llvm-svn: 316102
Sumanth Gundapaneni [Wed, 18 Oct 2017 18:07:07 +0000 (18:07 +0000)]
[Hexagon] New HVX target features.
This patch lets the llvm tools handle the new HVX target features that
are added by frontend (clang). The target-features are of the form
"hvx-length64b" for 64 Byte HVX mode, "hvx-length128b" for 128 Byte mode HVX.
"hvx-double" is an alias to "hvx-length128b" and is soon will be deprecated.
The hvx version target feature is upgated form "+hvx" to "+hvxv{version_number}.
Eg: "+hvxv62"
For the correct HVX code generation, the user must use the following
target features.
For 64B mode: "+hvxv62" "+hvx-length64b"
For 128B mode: "+hvxv62" "+hvx-length128b"
Clang picks a default length if none is specified. If for some reason,
no hvx-length is specified to llvm, the compilation will bail out.
There is a corresponding clang patch.
Differential Revision: https://reviews.llvm.org/D38851
llvm-svn: 316101
Konstantin Zhuravlyov [Wed, 18 Oct 2017 17:59:20 +0000 (17:59 +0000)]
AMDGPU/Docs: Make target naming consistent
- R600 Arch: Use Radeon HD XXXX Series
- GCN Arch: Use GFXX
Differential Revision: https://reviews.llvm.org/D39019
llvm-svn: 316100
Sumanth Gundapaneni [Wed, 18 Oct 2017 17:45:22 +0000 (17:45 +0000)]
[Hexagon] Update Hexagon ArchEnum and sync some downstream changes(NFC)
Differential Revision: https://reviews.llvm.org/D38850
llvm-svn: 316099