OSDN Git Service
Wolfgang Pieb [Thu, 13 Jul 2017 01:03:28 +0000 (01:03 +0000)]
[DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5
section names was in the wrong place.
Differential Revision: https://reviews.llvm.org/D35321
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307872
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 00:49:03 +0000 (00:49 +0000)]
[sanstats] Print the correct line information.
The instrumentation tracks the return address and not that of the
call so we remove one to compensate. Thanks for Peter Collingbourne
for confirming the analysis of the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307871
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Jul 2017 23:30:02 +0000 (23:30 +0000)]
[CodeGenPrepare] Don't create dead instructions in addrmode sinking
When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33608 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307866
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 12 Jul 2017 23:27:44 +0000 (23:27 +0000)]
[PGO] Enhance pgo counter promotion
This is an incremental change to the promotion feature.
There are two problems with the current behavior:
1) loops with multiple exiting blocks are totally disabled
2) a counter update can only be promoted one level up in
the loop nest -- which does help much for short trip
count inner loops inside a high trip-count outer loops.
Due to this limitation, we still saw very large profile
count fluctuations from run to run for the affected loops
which are usually very hot.
This patch adds the support for promotion counters iteratively
across the loop nest. It also turns on the promotion for
loops with multiple exiting blocks (with a limit).
For single-threaded applications, the performance impact is flat
on average. For instance, dealII improves, but povray regresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307863
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 23:22:32 +0000 (23:22 +0000)]
[libFuzzer] relax test/shrink.test a bit (got broken on windows)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307862
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 12 Jul 2017 23:06:18 +0000 (23:06 +0000)]
AMDGPU: Fix converting unanalyzable global loads to SMRD
Not all memory dependence queries succeed, so this needs to
be conservative if it fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307861
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Wed, 12 Jul 2017 23:05:15 +0000 (23:05 +0000)]
[SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary:
Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.
Reviewers: MatzeB, t.p.northover, dblaikie
Reviewed By: MatzeB
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307860
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 22:42:39 +0000 (22:42 +0000)]
[x86] add select-of-constant tests; NFC
We're using cmov in these cases, but we could reduce to simpler ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307859
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:22:36 +0000 (22:22 +0000)]
[libFuzzer] remove include <sanitizer/coverage_interface.h>, not needed any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307858
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:20:04 +0000 (22:20 +0000)]
[libFuzzer] refactoring in preparation for -reduce_inputs; NFC intended
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307857
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 21:57:23 +0000 (21:57 +0000)]
Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.
Reviewers: eli.friedman, reames, mkazantsev, skatkov
Reviewed By: reames
Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D34885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307854
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:43:14 +0000 (21:43 +0000)]
[Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.
Patch by: Fedor Sergeev
Differential Revision: https://reviews.llvm.org/D35325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307852
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 21:41:28 +0000 (21:41 +0000)]
[AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar
Reviewed By: evandro
Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34959
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307851
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:37:02 +0000 (21:37 +0000)]
Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.
Differential Revision: https://reviews.llvm.org/D35327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Wed, 12 Jul 2017 21:22:45 +0000 (21:22 +0000)]
Allow clients to specify search order of DynamicLibraries.
Summary: Different JITs and other clients of LLVM may have different needs in how symbol resolution should occur.
Reviewers: v.g.vassilev, lhames, karies
Reviewed By: v.g.vassilev
Subscribers: pcanal, llvm-commits
Differential Revision: https://reviews.llvm.org/D33529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307849
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 12 Jul 2017 21:20:28 +0000 (21:20 +0000)]
[AMDGPU] fcanonicalize elimination optimization
We are using multiplication by 1.0 to flush denormals and quiet sNaNs.
That is possible to omit this multiplication if source of the
fcanonicalize instruction is known to be flushed/quieted, i.e.
if it comes from another instruction known to do the normalization
and we are using IEEE mode to quiet sNaNs.
Differential Revision: https://reviews.llvm.org/D35218
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307848
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Jul 2017 21:08:24 +0000 (21:08 +0000)]
Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.
I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307846
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 12 Jul 2017 20:55:43 +0000 (20:55 +0000)]
[LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307843
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 20:53:22 +0000 (20:53 +0000)]
[AArch64] Add AArch64Subtarget::isFusion function.
Summary:
isFusion returns true if the subtarget supports any kind of instruction
fusion, similar to ARMSubtarget::isFusion. This was suggested in D34142.
This changes the current behavior slightly, because the macro fusion mutation
is now added to the PostRA MachineScheduler in case the subtarget supports
any kind of fusion. I think that makes sense because if the PostRA
MachineScheduler is run, there is potential that instructions scheduled back to
back are re-scheduled.
Reviewers: evandro, t.p.northover, joelkevinjones, joel_k_jones, steleman
Reviewed By: joelkevinjones
Subscribers: joel_k_jones, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34958
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307842
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 12 Jul 2017 20:50:04 +0000 (20:50 +0000)]
[WebAssembly] Mark element atomic memcpy/memmove intrinsics as unsupported
Summary:
Element atomic intrinsicAtomic instructions are not yet supported in WebAssembly, so we mark them as
unsupported for the moment.
Reviewers: sunfish, dschuff, sbc100
Reviewed By: dschuff, sbc100
Subscribers: jfb, sbc100, jgravelle-google
Differential Revision: https://reviews.llvm.org/D35322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 12 Jul 2017 20:49:21 +0000 (20:49 +0000)]
Remove unneeded use of #undef DEBUG_TYPE. NFC
Where is is needed (at the end of headers that define it), be
consistent about its use.
Also fix a few header guards that I found in the process.
Differential Revision: https://reviews.llvm.org/D34916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307840
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 12 Jul 2017 19:53:55 +0000 (19:53 +0000)]
[LV] Don't allow outside uses of IVs if the SCEV is predicated on loop conditions.
This fixes PR33706.
Differential Revision: https://reviews.llvm.org/D35227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 19:47:45 +0000 (19:47 +0000)]
[mips][mt][6/7] Add support for mftr, mttr instructions.
Unlike many other instructions, these instructions have aliases which
take coprocessor registers, gpr register, accumulator (and dsp accumulator)
registers, floating point registers, floating point control registers and
coprocessor 2 data and control operands.
For the moment, these aliases are treated as pseudo instructions which are
expanded into the underlying instruction. As a result, disassembling these
instructions shows the underlying instruction and not the alias.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35253
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307836
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 19:46:35 +0000 (19:46 +0000)]
Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307835
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 12 Jul 2017 19:38:11 +0000 (19:38 +0000)]
[PDB] Enable NativeSession to create symbols for built-in types on demand
Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built-in type if the caller askes for one by
type index. This is also plumbing for being able to recall symbols by type
index in general, but user-defined types will come in subsequent patches.
Reviewers: rnk, zturner
Subscribers: mgorny, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307834
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 19:24:07 +0000 (19:24 +0000)]
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
545 static const char *
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
static const char *
RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCALL] = {
That is defining a runtime lib call name for each entry in the enum RTLIB:Libcall from include/llvm/CodeGen/RuntimeLibcalls.h.
Revision 307796 added entries to the enum, but didn’t add entries to the RuntimeLibcallNames array, which caused a crash when attempting
to access past the end of the array.
This patch fixes the issue by adding the element atomic memmove to the WebAssembly arrays.
Reviewed by: reames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307831
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Wed, 12 Jul 2017 18:42:16 +0000 (18:42 +0000)]
[LoopRotate] Fix DomTree update logic for unreachable nodes. Fix PR33701.
Summary:
LoopRotate manually updates the DoomTree by iterating over all predecessors of a basic block and computing the Nearest Common Dominator.
When a predecessor happens to be unreachable, `DT.findNearestCommonDominator` returns nullptr.
This patch teaches LoopRotate to handle this case and fixes [[ https://bugs.llvm.org/show_bug.cgi?id=33701 | PR33701 ]].
In the future, LoopRotate should be taught to use the new incremental API for updating the DomTree.
Reviewers: dberlin, davide, uabelho, grosser
Subscribers: efriedma, mzolotukhin
Differential Revision: https://reviews.llvm.org/D35074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307828
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 18:23:06 +0000 (18:23 +0000)]
Use std::mutex to avoid memory allocation after OOM
ManagedStatic<sys::Mutex> would lazilly allocate a sys::Mutex to lock
when reporting an OOM, which is a bad idea.
The three STL implementations that I know of use pthread_mutex_lock and
EnterCriticalSection to implement std::mutex. I'm pretty sure that
neither of those allocate heap memory.
It seems that we unconditionally use std::mutex without testing
LLVM_ENABLE_THREADS elsewhere in the codebase, so this should be
portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307827
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:17:34 +0000 (18:17 +0000)]
[libFuzzer] Add a dependency on symbolizer from libFuzzer tests
Some libFuzzer tests on Linux would fail with bizarre error messages
unless llvm-symbolizer binary is present.
Differential Revision: https://reviews.llvm.org/D35313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307826
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:16:09 +0000 (18:16 +0000)]
[libFuzzer] NFC Declare LIBFUZZER_FLAGS_BASE outside of an if-block
The current code relies on the assumption that tests are included only
if LLVM_USE_SANITIZE_COVERAGE is enabled.
This commit makes it easier to relax the assumption in the future, as
the variable LIBFUZZER_FLAGS_BASE is used further in libFuzzer tests.
Differential Revision: https://reviews.llvm.org/D35314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307825
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:14:19 +0000 (18:14 +0000)]
[libFuzzer] Do not use LLVM ostream in tests
Differential Revision: https://reviews.llvm.org/D35312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307824
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:56:46 +0000 (17:56 +0000)]
[x86] improve SBB optimizations for SETB/SETA with subtract
This is another step towards removing a combine that turns sext
into select of constants and preparing the backend for an IR
future where select is the canonical form.
Earlier commits in this area:
https://reviews.llvm.org/rL306040
https://reviews.llvm.org/rL306072
https://reviews.llvm.org/rL307404 (https://reviews.llvm.org/D34652)
https://reviews.llvm.org/rL307471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307821
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:44:50 +0000 (17:44 +0000)]
[x86] add tests for improving sbb transforms; NFC
We're subtracting X from X the hard way...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307819
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 12 Jul 2017 17:32:32 +0000 (17:32 +0000)]
GlobalISel: Handle selection of G_IMPLICIT_DEF in AArch64
A generic variant of IMPLICIT_DEF was added in r306875, but this
survives to selection and hits a `Cannot Select`. Add handling that
converts the note to a regular IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307817
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 12 Jul 2017 16:30:37 +0000 (16:30 +0000)]
Add a test for r307754
As promised in D35003.
Uses -codegenprepare instead of -instcombine since we hit the same
buggy path anyway, and CGP lets us keep this test really simple
(instcombine likes turning the alloca T, N into alloca [N x T], which
hides the bug this is testing for).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307811
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 16:23:57 +0000 (16:23 +0000)]
[mips][mt][5/7] Add support for fork and yield instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307808
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Jul 2017 16:14:00 +0000 (16:14 +0000)]
Add back a CHECK line.
I accidentally removed it in r307730.
Thanks to Martin Storsjö for noticing!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307801
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 12 Jul 2017 15:30:59 +0000 (15:30 +0000)]
[CodeGen] Add dependency printer
Add SDep printer to make debugging sessions more productive.
Differential revision: https://reviews.llvm.org/D35144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307799
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 12 Jul 2017 15:26:06 +0000 (15:26 +0000)]
[X86/FastIsel] Fall-back to SelectionDAG when lowering soft-floats.
FastIsel can't handle them, so we would end up crashing during
register class selection.
Fixes PR26522.
Differential Revision: https://reviews.llvm.org/D35272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307797
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 15:25:26 +0000 (15:25 +0000)]
Add element atomic memmove intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memmove intrinsic. This intrinsic is essentially memmove with the implementation requirement that all loads/stores used for the copy are done with unordered-atomic loads/stores of a given element size.
Reviewers: eli.friedman, reames, mkazantsev, skatkov
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34884
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307796
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 14:48:27 +0000 (14:48 +0000)]
[mips][mt][4/7] Add IAS support for dvpe, evpe instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35251
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307793
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Jul 2017 13:41:13 +0000 (13:41 +0000)]
[X86][SSE] Fix file check prefix warning breaking buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307790
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Wed, 12 Jul 2017 13:24:46 +0000 (13:24 +0000)]
Make shell redirection construct portable
Summary:
NetBSD shell sh(1) does not support ">& /dev/null" construct.
This is bashism. The portable and POSIX solution is to use:
"> /dev/null 2>&1".
This change fixes 22 Unexpected Failures on NetBSD/amd64
for the "check-llvm" target.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, dim, rnk
Reviewed By: joerg, rnk
Subscribers: rnk, davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D35277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307789
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Wed, 12 Jul 2017 13:23:10 +0000 (13:23 +0000)]
[ARM] Adjust ifcvt heuristic for the diamond ifcvt case
When we have a diamond ifcvt the fallthough block will have a branch at the end
of it that disappears when predicated, so discount it from the predication cost.
Differential Revision: https://reviews.llvm.org/D34952
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307788
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Jul 2017 12:44:10 +0000 (12:44 +0000)]
[X86][SSE] Add 512-bit (iX bitcast(vXi1)) test cases
Improves test coverage for pre-AVX512 targets as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307783
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 12:33:40 +0000 (12:33 +0000)]
[mips][mt] Add missing files from last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307779
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Wed, 12 Jul 2017 12:16:22 +0000 (12:16 +0000)]
fix typo in document; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307775
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 11:57:44 +0000 (11:57 +0000)]
[mips][mt][3/7] Add IAS support for emt, dmt instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35250
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307774
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 11:52:28 +0000 (11:52 +0000)]
[Linker] Add directives to support mixing ARM/Thumb module-level inline asm.
Summary:
By prepending `.text .thumb .balign 2` to the module-level inline
assembly from a Thumb module, the assembler will generate the assembly
from that module as Thumb, even if the destination module uses an ARM
triple. Similar directives are used for module-level inline assembly in
ARM modules.
The alignment and instruction set are reset based on the target triple
before emitting the first function label.
Reviewers: olista01, tejohnson, echristo, t.p.northover, rafael
Reviewed By: echristo
Subscribers: aemerson, javed.absar, eraman, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34622
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307772
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 12 Jul 2017 10:31:16 +0000 (10:31 +0000)]
[ARM] GlobalISel: Simplify inst selector code. NFC
Refactor CmpHelper into something simpler. It was overkill to use
templates for this - instead, use a simple CmpConstants structure to
hold the opcodes and other constants that are different when selecting
int / float / double comparisons. Also, extract some of the helpers that
were in CmpHelper into ARMInstructionSelector and make use of some of
them when selecting other things than just compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 12 Jul 2017 09:08:11 +0000 (09:08 +0000)]
[PM] Fix a silly bug in my recent update to the CG update logic.
I used the wrong variable to update. This was even covered by a unittest
I wrote, and the comments for the unittest were correct (if confusing)
but the test itself just matched the buggy behavior. =[
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307764
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 12 Jul 2017 09:01:54 +0000 (09:01 +0000)]
[ARM] GlobalISel: Select s64 G_FCMP
Very similar to how we select s32 G_FCMP, the only thing that is
different is the exact opcodes that we use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307763
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Guelton [Wed, 12 Jul 2017 08:03:44 +0000 (08:03 +0000)]
Have Module::createRNG return a unique_ptr
Instead of a raw pointer, this makes memory management safer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307762
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 12 Jul 2017 08:01:44 +0000 (08:01 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Adding base test for AVX512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307761
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:58 +0000 (06:49 +0000)]
[X86] Synchronize the ProcessorFeatures enum used by getHostCPUName with the enum in libgcc and soon compiler-rt.
This adds all the feature bits libgcc has. They will soon be added to compiler-rt as well. This adds a second 32 bit feature variable to hold the bits that are needed by getHostCPUName that are not in libgcc. libgcc had already used 31 of the 32 bits in the existing variable and we needed 3 bits so at minimum 2 bits would spill over. I chose to move all 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307758
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:57 +0000 (06:49 +0000)]
[X86] Sync ProcessorTypes and ProcessorSubtypes enums used by getHostCPUName with the version proposed to for compiler-rt's cpu_model.c
This keeps the starting entries in the enums in sync with what's in gcc and in review D35214 for compiler-rt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307757
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:56 +0000 (06:49 +0000)]
[X86] Cleanup the switches in getHostCPUName to remove impossible combinations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307756
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:55 +0000 (06:49 +0000)]
[X86] Remove 'barcelona' string from getHostCPUName. Use 'amdfam10' instead. The x86 backend doesn't distinguish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307755
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Wed, 12 Jul 2017 06:19:10 +0000 (06:19 +0000)]
[MemoryBuiltins] Allow truncation in visitAllocaInst()
Summary:
Solves PR33689.
If the pointer size is less than the size of the type used for the array
size in an alloca (the <ty> type below) then we could trigger the assert in
the PR. In that example we have pointer size i16 and <ty> is i32.
<result> = alloca [inalloca] <type> [, <ty> <NumElements>] [, align <alignment>]
Handle the situation by allowing truncation as well as zero extension in
ObjectSizeOffsetVisitor::visitAllocaInst().
Also, we now detect overflow in visitAllocaInst(), similar to how it was
already done in visitCallSite().
Reviewers: craig.topper, rnk, george.burgess.iv
Reviewed By: george.burgess.iv
Subscribers: davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D35003
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307754
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 12 Jul 2017 01:16:50 +0000 (01:16 +0000)]
Specify complete target triple in test
This should fix the problems on the greendragon build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307747
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Wed, 12 Jul 2017 01:15:46 +0000 (01:15 +0000)]
Fix minor typo introduced in r276404
Summary:
A space was added between '-' and 'help' when emitting help output.
See https://reviews.llvm.org/D22621 for details.
Reviewers: MaggieYi, vsk
Reviewed By: vsk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307745
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 12 Jul 2017 00:39:12 +0000 (00:39 +0000)]
LowerTypeTests: When importing functions skip definitions where the summary contains a decl.
This normally indicates mixed CFI + non-CFI compilation, and will
result in us treating the function in the same way as a function
defined outside of the LTO unit.
Part of PR33752.
Differential Revision: https://reviews.llvm.org/D35281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307744
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Wed, 12 Jul 2017 00:29:16 +0000 (00:29 +0000)]
[Dominators][NFC] Remove extra semicolon...
to silence a gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307742
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 12 Jul 2017 00:24:54 +0000 (00:24 +0000)]
[WebAssembly] Expose the offset of each data segment
Summary:
This allows tools like lld that process relocations
to apply data relocation correctly. This information
is required because relocation are stored as section
offset.
Subscribers: jfb, dschuff, jgravelle-google, aheejin
Differential Revision: https://reviews.llvm.org/D35234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307741
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Wed, 12 Jul 2017 00:15:53 +0000 (00:15 +0000)]
Fix unused variable warnings
Differential Revision: https://reviews.llvm.org/D35280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307740
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 11 Jul 2017 23:56:10 +0000 (23:56 +0000)]
Simplify interface now that we don't need to pass IsPCRel. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307734
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Jul 2017 23:41:41 +0000 (23:41 +0000)]
[codeview] Change readobj symbol dumping format
Avoid duplicating DictScope with hand-written names everywhere. Print
the S_-prefixed symbol kind for every record. This should make it easier
to search for certain kinds of records when debugging PDB linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307732
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Tue, 11 Jul 2017 23:41:15 +0000 (23:41 +0000)]
[CMake] Support multi-target runtimes build
This changes adds support for building runtimes for multiple
different targets using LLVM runtimes directory.
The implementation follow the model used already by the builtins
build which already supports this option. To specify the runtimes
targets to be built, use the LLVM_RUNTIME_TARGETS variable, where
the valuae is the list of targets to build runtimes for. To pass
a per target variable to the runtimes build, you can set
RUNTIMES_<target>_<variable> where <variable> will be passed to the
runtimes build for <target>.
Each runtime target (except for the default one) will be installed
into lib/<target> subdirectory. Build targets will be suffixed with
the target name.
Differential Revision: https://reviews.llvm.org/D32816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307731
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 11 Jul 2017 23:18:25 +0000 (23:18 +0000)]
Fully fix the movw/movt addend.
The issue is not if the value is pcrel. It is whether we have a
relocation or not.
If we have a relocation, the static linker will select the upper
bits. If we don't have a relocation, we have to do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307730
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 11 Jul 2017 23:10:17 +0000 (23:10 +0000)]
[IPO] Temporarily rollback r307215.
[GlobalOpt] Remove unreachable blocks before optimizing a function.
While the change is presumably correct, it exposes a latent bug
in DI which breaks on of the CFI checks. I'll analyze it further
and try to understand what's going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307729
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Tue, 11 Jul 2017 22:55:04 +0000 (22:55 +0000)]
[Dominators] Use a custom DFS implementation
Summary:
Custom DFS implementation allows us to skip over certain nodes without adding them to the visited map, which is not easily doable with llvm's dfs iterators. What's more, caching predecessors becomes easy.
This patch implements a single DFS function (template) for both forward and reverse DFS, which should be easier to maintain then separate two ones.
Skipping over nodes based on a predicate will be necessary later to implement incremental updates.
There also seems to be a very slight performance improved when bootstrapping clang with this patch on my machine (3:28s -> 3:26s) .
Reviewers: dberlin, sanjoy, davide, grosser
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34651
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307727
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Jul 2017 22:37:25 +0000 (22:37 +0000)]
[codeview] Fix type index discovery for four symbol records
I encountered these when linking LLD, which uses atls.lib. Those objects
appear to use these uncommon symbol records:
0x115E S_HEAPALLOCSITE
0x113D S_ENVBLOCK
0x1113 S_GTHREAD32
0x1153 S_FILESTATIC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307725
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Tue, 11 Jul 2017 22:23:00 +0000 (22:23 +0000)]
Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to
global and local memory. These scopes restrict how synchronization is
achieved, which can result in improved performance.
This change extends existing notion of synchronization scopes in LLVM to
support arbitrary scopes expressed as target-specific strings, in addition to
the already defined scopes (single thread, system).
The LLVM IR and MIR syntax for expressing synchronization scopes has changed
to use *syncscope("<scope>")*, where <scope> can be "singlethread" (this
replaces *singlethread* keyword), or a target-specific name. As before, if
the scope is not specified, it defaults to CrossThread/System scope.
Implementation details:
- Mapping from synchronization scope name/string to synchronization scope id
is stored in LLVM context;
- CrossThread/System and SingleThread scopes are pre-defined to efficiently
check for known scopes without comparing strings;
- Synchronization scope names are stored in SYNC_SCOPE_NAMES_BLOCK in
the bitcode.
Differential Revision: https://reviews.llvm.org/D21723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307722
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 11 Jul 2017 22:08:28 +0000 (22:08 +0000)]
[CodeGen] Rename DEBUG_TYPE to match passnames
Rename missing DEBUG_TYPE "machine-scheduler" from backend files, which were
absent from https://reviews.llvm.org/rL303921.
Differential revision: https://reviews.llvm.org/D35231
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307719
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 11 Jul 2017 22:04:36 +0000 (22:04 +0000)]
[x86] auto-generate full checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307718
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 11 Jul 2017 21:36:58 +0000 (21:36 +0000)]
[mips][mt] Correct spelling error in comment. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307717
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 11 Jul 2017 21:28:36 +0000 (21:28 +0000)]
[mips][mt][2/7] Implement .module and .set directives for the MT ASE.
This patch implements the .module and .set directives for the MT ASE,
notably that .module sets the relevant flags in .MIPS.abiflags and .set
doesn't.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35249
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307716
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 11 Jul 2017 21:07:10 +0000 (21:07 +0000)]
[ARM, ELF] Don't shift movt relocation offsets
For ELF, a movw+movt pair is handled as two separate relocations.
If an offset should be applied to the symbol address, this offset is
stored as an immediate in the instruction (as opposed to stored as an
offset in the relocation itself).
Even though the actual value stored in the movt immediate after linking
is the top half of the value, we need to store the unshifted offset
prior to linking. When the relocation is made during linking, the offset
gets added to the target symbol value, and the upper half of the value
is stored in the instruction.
This makes sure that movw+movt with offset symbols get properly
handled, in case the offset addition in the lower half should be
carried over to the upper half.
This makes the output from the additions to the test case match
the output from GNU binutils.
For COFF and MachO, the movw/movt relocations are handled as a pair,
and the overflow from the lower half gets carried over to the movt,
so they should keep the shifted offset just as before.
Differential Revision: https://reviews.llvm.org/D35242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307713
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 11 Jul 2017 20:56:24 +0000 (20:56 +0000)]
[AArch64] Remove unused IsDarwin & IsNotDarwin predicates (NFCI).
Reviewers: t.p.northover, rengolin
Reviewed By: t.p.northover
Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D35266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307706
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 11 Jul 2017 20:44:37 +0000 (20:44 +0000)]
[LoopUnrollRuntime] NFC: Add some debugging trace messages for why loop wasn't unrolled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307705
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 11 Jul 2017 20:30:43 +0000 (20:30 +0000)]
[ProfileData] Add new option to dump topn hottest functions
Differential Revision: http://reviews.llvm.org/D35155
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307702
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 11 Jul 2017 19:49:12 +0000 (19:49 +0000)]
[NewGVN] Check for congruency of memory accesses.
This is fine as nothing in the code relies on leader and memory
leader being the same for a given congruency class. Ack'ed by
Dan.
Fixes PR33720.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307699
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 11 Jul 2017 19:46:11 +0000 (19:46 +0000)]
reverting 307677.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307698
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 11 Jul 2017 19:19:45 +0000 (19:19 +0000)]
[NewGVN] Fix an innocent typo I found while debugging PR33720.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307694
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 11 Jul 2017 19:15:36 +0000 (19:15 +0000)]
[NewGVN] Clarify the function invariants formatting them properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307692
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Tue, 11 Jul 2017 19:07:10 +0000 (19:07 +0000)]
[PPC] Fix one test case regression for patch https://reviews.llvm.org/D34337.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307691
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 11 Jul 2017 18:27:52 +0000 (18:27 +0000)]
[LibFuzzer] Fix `-Wcomment` warning emitted by GCC.
```
./FuzzerIOWindows.cpp:185:1: warning: multi-line comment [-Wcomment]
// Parse a directory ending in separator, like: SomeDir\
^
./FuzzerIOWindows.cpp:200:1: warning: multi-line comment [-Wcomment]
// Parse a servername and share, like: SomeServer\SomeShare\
^
```
Differential Revision: https://reviews.llvm.org/D35244
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307687
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 11 Jul 2017 18:27:48 +0000 (18:27 +0000)]
[LibFuzzer] Fix `-Wpedantic` warning reported by Eric Christopher.
The warning is reproducible with GCC 4.8. Thanks to David Blaikie for
the suggested fix.
The reported warning was
```
/usr/local/google/home/echristo/sources/llvm/lib/Fuzzer/FuzzerExtFunctions.def:29:10: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [-Wpedantic]
EXT_FUNC(__lsan_enable, void, (), false);
^
/usr/local/google/home/echristo/sources/llvm/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp:44:24: note: in definition of macro ‘EXT_FUNC’
CheckFnPtr((void *)::NAME, #NAME, WARN);
^
```
Differential Revision: https://reviews.llvm.org/D35243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307686
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 11 Jul 2017 18:13:52 +0000 (18:13 +0000)]
[msan] Only check shadow memory for operands that are sized.
Fixes PR33347: https://bugs.llvm.org/show_bug.cgi?id=33347.
Differential Revision: https://reviews.llvm.org/D35160
Patch by Matt Morehouse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307684
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 11 Jul 2017 18:03:20 +0000 (18:03 +0000)]
[mips][mt][1/7] Add the MT ASE as a subtarget feature.
Preparatory work for adding the MIPS MT (multi-threading) ASE instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35247
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307679
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Tue, 11 Jul 2017 17:57:41 +0000 (17:57 +0000)]
Revert "AMDGPU: Do not test for SI in getIsaVersion"
This reverts commit r307573.
This breaks downstream test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307678
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 11 Jul 2017 17:17:49 +0000 (17:17 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Base test for avx512
adding new base test to trunk befor commit change on the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307677
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 11 Jul 2017 17:16:33 +0000 (17:16 +0000)]
[LoopUnrollRuntime] Avoid multi-exit nested loop with epilog generation
The loop structure for the outer loop does not contain the epilog
preheader when we try to unroll inner loop with multiple exits and
epilog code is generated. For now, we just bail out in such cases.
Added a test case that shows the problem. Without this bailout, we would
trip on assert saying LCSSA form is incorrect for outer loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307676
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 11 Jul 2017 17:11:54 +0000 (17:11 +0000)]
[Hexagon] Do not rely on callee-saved info in hasFP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307675
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Jul 2017 16:45:30 +0000 (16:45 +0000)]
[Support] - Add bad alloc error handler for handling allocation malfunctions
Summary:
Patch by Klaus Kretzschmar
We would like to introduce a new type of llvm error handler for handling
bad alloc fault situations. LLVM already provides a fatal error handler
for serious non-recoverable error situations which by default writes
some error information to stderr and calls exit(1) at the end (functions
are marked as 'noreturn').
For long running processes (e.g. a server application), exiting the
process is not an acceptable option, especially not when the system is
in a temporary resource bottleneck with a good chance to recover from
this fault situation. In such a situation you would rather throw an
exception to stop the current compilation and try to overcome the
resource bottleneck. The user should be aware of the problem of throwing
an exception in bad alloc situations, e.g. you must not do any
allocations in the unwind chain. This is especially true when adding
exceptions in existing unfamiliar code (as already stated in the comment
of the current fatal error handler)
So the new handler can also be used to distinguish from general fatal
error situations where recovering is no option. It should be used in
cases where a clean unwind after the allocation is guaranteed.
This patch contains:
- A report_bad_alloc function which calls a user defined bad alloc
error handler. If no user handler is registered the
report_fatal_error function is called. This function is not marked as
'noreturn'.
- A install/restore_bad_alloc_error_handler to install/restore the bad
alloc handler.
- An example (in Mutex.cpp) where the report_bad_alloc function is
called in case of a malloc returns a nullptr.
If this patch gets accepted we would create similar patches to fix
corresponding malloc/calloc usages in the llvm code.
Reviewers: chandlerc, greened, baldrick, rnk
Reviewed By: rnk
Subscribers: llvm-commits, MatzeB
Differential Revision: https://reviews.llvm.org/D34753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307673
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Tue, 11 Jul 2017 16:42:20 +0000 (16:42 +0000)]
[PPC] Fix two bugs in frame lowering.
1. The available program storage region of the red zone to compilers is 288
bytes rather than 244 bytes.
2. The formula for negative number alignment calculation should be
y = x & ~(n-1) rather than y = (x + (n-1)) & ~(n-1).
Differential Revision: https://reviews.llvm.org/D34337
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307672
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 11 Jul 2017 16:39:33 +0000 (16:39 +0000)]
[Hexagon] Add support for nontemporal loads and stores on HVX
Patch by Michael Wu.
Differential Revision: https://reviews.llvm.org/D35104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307671
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Jul 2017 16:12:53 +0000 (16:12 +0000)]
[lit] Fix import StringIO errors in Python 3
Remove the cStringIO micro-optimization, as it isn't portable to Python
3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307669
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 11 Jul 2017 16:05:50 +0000 (16:05 +0000)]
[lit] Implement non-pipelined echo commands internally
Summary:
This speeds up the LLD test suite on Windows by 3x. Most of the time is
spent on lld/test/ELF/linkerscript/diagnostics.s, which repeatedly
constructs linker scripts with appending echo commands.
Reviewers: dlj, zturner, modocache
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307668
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinar Temirbulatov [Tue, 11 Jul 2017 15:54:50 +0000 (15:54 +0000)]
[SLPVectorizer] Revert change in cancelScheduling with referencing to FirstInBundle, NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307667
91177308-0d34-0410-b5e6-
96231b3b80d8