Oliver Stannard [Mon, 8 Aug 2016 15:28:31 +0000 (15:28 +0000)]
[ARM] Add support for embedded position-independent code
This patch adds support for some new relocation models to the ARM
backend:
* Read-only position independence (ROPI): Code and read-only data is accessed
PC-relative. The offsets between all code and RO data sections are known at
static link time. This does not affect read-write data.
* Read-write position independence (RWPI): Read-write data is accessed relative
to the static base register (r9). The offsets between all writeable data
sections are known at static link time. This does not affect read-only data.
These two modes are independent (they specify how different objects
should be addressed), so they can be used individually or together. They
are otherwise the same as the "static" relocation model, and are not
compatible with SysV-style PIC using a global offset table.
These modes are normally used by bare-metal systems or systems with
small real-time operating systems. They are designed to avoid the need
for a dynamic linker, the only initialisation required is setting r9 to
an appropriate value for RWPI code.
I have only added support to SelectionDAG, not FastISel, because
FastISel is currently disabled for bare-metal targets where these modes
would be used.
Differential Revision: https://reviews.llvm.org/D23195
llvm-svn: 278015
Tobias Grosser [Mon, 8 Aug 2016 15:25:50 +0000 (15:25 +0000)]
[CodeGeneration] Do not set insert position redundantly
There is no need to reset the position of the builder, as we can just continue
to insert code at the current position of the IRBuilder, which happens to
be precisely the location we reset the builder to.
llvm-svn: 278014
Tobias Grosser [Mon, 8 Aug 2016 15:25:46 +0000 (15:25 +0000)]
[IslNodeBuilder] Directly use the insert location of our Builder
... instead of adding instructions at the end of the basic block the builder
is currently at. This makes it easier to reason about where IR is generated,
as with the IRBuilder there is just a single location that specificies where
IR is generated.
llvm-svn: 278013
Zhan Jun Liau [Mon, 8 Aug 2016 15:13:08 +0000 (15:13 +0000)]
[SystemZ] Add support for the .insn directive
Summary:
Add support for the .insn directive.
.insn is an s390 specific directive that allows encoding of an instruction
instead of using a mnemonic. The motivating case is some code in node.js that
requires support for the .insn directive.
Reviewers: koriakin, uweigand
Subscribers: koriakin, llvm-commits
Differential Revision: https://reviews.llvm.org/D21809
llvm-svn: 278012
Nico Weber [Mon, 8 Aug 2016 14:51:53 +0000 (14:51 +0000)]
Revert r2277979.
For some reason, MSVC2013's cl.exe crashes with
fatal error C1001: An internal error has occurred in the compiler
with this when compiling e.g. LoopDistribute.cpp.
llvm-svn: 278011
Sebastian Pop [Mon, 8 Aug 2016 14:46:15 +0000 (14:46 +0000)]
GVN-hoist: enable by default
llvm-svn: 278010
Artur Pilipenko [Mon, 8 Aug 2016 14:33:11 +0000 (14:33 +0000)]
[LVI] NFC. On the fast dest path use inverse predicate instead of inverse range result
Gathering constantins from a condition on the false path ask makeAllowedICmpRegion about inverse predicate instead of inversing the resulting range.
This change was separated from the review "[LVI] Make LVI smarter about comparisons with non-constants" (https://reviews.llvm.org/D23205#inline-198361)
llvm-svn: 278009
Artur Pilipenko [Mon, 8 Aug 2016 14:13:56 +0000 (14:13 +0000)]
[LVI] NFC. Rename confusing local NegOffset to Offset
NegOffset is not necessarily negative
llvm-svn: 278008
Artur Pilipenko [Mon, 8 Aug 2016 14:08:37 +0000 (14:08 +0000)]
[LVI] NFC. Extract LHS, RHS, Predicate locals in getValueFromCondition
llvm-svn: 278007
Gabor Horvath [Mon, 8 Aug 2016 13:41:04 +0000 (13:41 +0000)]
[analyzer] Command line option to show enabled checker list.
This patch adds a command line option to list the checkers that were enabled
by analyzer-checker and not disabled by -analyzer-disable-checker.
It can be very useful to debug long command lines when it is not immediately
apparent which checkers are turned on and which checkers are turned off.
Differential Revision: https://reviews.llvm.org/D23060
llvm-svn: 278006
Pavel Labath [Mon, 8 Aug 2016 13:38:33 +0000 (13:38 +0000)]
Fix uninitialized field warnings in GDBRemoteRegisterContext
also take the opportunity to replace NULL with nullptr and add clang-format guards to prevent it
from messing up the nice table there.
llvm-svn: 278005
Eric Liu [Mon, 8 Aug 2016 13:37:39 +0000 (13:37 +0000)]
Fixes calculateRangesAfterReplacements crash when Replacements is empty.
Reviewers: klimek, djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D23264
llvm-svn: 278004
Jonas Hahnfeld [Mon, 8 Aug 2016 13:23:08 +0000 (13:23 +0000)]
kmp_gsupport: Fix library initialization with taskgroup
Differential Revision: https://reviews.llvm.org/D23259
llvm-svn: 278003
Silviu Baranga [Mon, 8 Aug 2016 13:13:57 +0000 (13:13 +0000)]
[AArch64] PR28877: Don't assume we're running after legalization when creating vcvtfp2fxs
Summary:
The DAG combine transformation that was generating the
aarch64_neon_vcvtfp2fxs node was assuming that all
inputs where legal and wasn't accounting that the input
could be a v4f64 if we're trying to do the transformation
before legalization. We now bail out in this case.
All illegal types besides v4f64 were already rejected.
Fixes https://llvm.org/bugs/show_bug.cgi?id=28877.
Reviewers: jmolloy
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23261
llvm-svn: 278002
Pavel Labath [Mon, 8 Aug 2016 13:13:03 +0000 (13:13 +0000)]
Clean up linux/Ptrace.h
This removes references to PT_XXX macros from the file, as they were not used anyway. It also
changes the macro used to check for the definition of __ptrace_request, as there are other C
libraries which do not define this type.
llvm-svn: 278001
Pavel Labath [Mon, 8 Aug 2016 12:54:36 +0000 (12:54 +0000)]
Remove Android.h
It only contained a reimplementation of std::to_string, which I have replaced with usages of
pre-existing llvm::to_string (also, injecting members into the std namespace is evil).
llvm-svn: 278000
Pavel Labath [Mon, 8 Aug 2016 12:40:11 +0000 (12:40 +0000)]
Remove SYS_tgkill from Android.h
instead, use __NR_tgkill directly, which seems to be the preferred form in the codebase anyway.
llvm-svn: 277999
Pavel Labath [Mon, 8 Aug 2016 12:26:57 +0000 (12:26 +0000)]
Remove _isatty from Android.h
it is just #defined to isatty anyway, which lldb already knows how to use.
llvm-svn: 277997
Jonas Hahnfeld [Mon, 8 Aug 2016 11:52:49 +0000 (11:52 +0000)]
Mark tests with task dependencies as unsupported with GCC
llvm-svn: 277996
Daniel Sanders [Mon, 8 Aug 2016 11:50:25 +0000 (11:50 +0000)]
Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Hopefully with the MSVC builds fixed. I've added a missing '#include <tuple>'
that gcc and clang don't seem to need.
llvm-svn: 277995
Simon Pilgrim [Mon, 8 Aug 2016 11:49:24 +0000 (11:49 +0000)]
Fix Wdocumentation unknown parameter warning
llvm-svn: 277994
Simon Pilgrim [Mon, 8 Aug 2016 11:07:34 +0000 (11:07 +0000)]
[X86][SSE] Assert if the shuffle mask indices are not -1 or within a valid input range
As discussed in post-review rL277959
llvm-svn: 277993
Jonas Hahnfeld [Mon, 8 Aug 2016 10:08:14 +0000 (10:08 +0000)]
Do not block on explicit task depending on proxy task
Consider the following code:
int dep;
#pragma omp target nowait depend(out: dep)
{
sleep(1);
}
#pragma omp task depend(in: dep)
{
printf("Task with dependency\n");
}
printf("Doing some work...\n");
In its current state the runtime will block on the second task and not
continue execution.
Differential Revision: https://reviews.llvm.org/D23116
llvm-svn: 277992
Jonas Hahnfeld [Mon, 8 Aug 2016 10:08:07 +0000 (10:08 +0000)]
__kmp_free_task: Fix for serial explicit tasks producing proxy tasks
Consider the following code which may be executed by a serial team:
int dep;
#pragma omp target nowait depend(out: dep)
{
sleep(1);
}
#pragma omp task depend(in: dep)
{
#pragma omp target nowait
{
sleep(1);
}
}
Here the explicit task may not be freed until the nested proxy task has
finished. The current code hasn't considered this and called __kmp_free_task
anyway which triggered an assert because of remaining incomplete children:
KMP_DEBUG_ASSERT( TCR_4(taskdata->td_incomplete_child_tasks) == 0 );
Differential Revision: https://reviews.llvm.org/D23115
llvm-svn: 277991
Daniel Sanders [Mon, 8 Aug 2016 09:33:14 +0000 (09:33 +0000)]
Revert r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
It seems that MSVC doesn't like std::tie().
llvm-svn: 277990
Gabor Horvath [Mon, 8 Aug 2016 09:22:59 +0000 (09:22 +0000)]
[analyzer] Model base to derived casts more precisely.
Dynamic casts are handled relatively well by the static analyzer.
BaseToDerived casts however are treated conservatively. This can cause some
false positives with the NewDeleteLeaks checker.
This patch alters the behavior of BaseToDerived casts. In case a dynamic cast
would succeed use the same semantics. Otherwise fall back to the conservative
approach.
Differential Revision: https://reviews.llvm.org/D23014
llvm-svn: 277989
Daniel Sanders [Mon, 8 Aug 2016 09:20:52 +0000 (09:20 +0000)]
[mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Summary:
They are now lexed as a single token on targets where
MCAsmInfo::HasMipsExpressions is true and then parsed in a similar way to
the '~' operator as part of MCExpr::parseExpression.
As a result:
* expressions and immediates no longer have different parsing rules. The
difference is now solely down to whether evaluateAsAbsolute() succeeds.
* %hi(%neg(%gp_rel(x))) are no longer parsed as a single operator and
decomposed into the three MipsMCExpr nodes. They are parsed directly as
three MipsMCExpr nodes.
* parseMemOperand no longer needs to eat all the surrounding parenthesis
to get at the outermost operator to make this work
* %hi(%neg(%gp_rel(x))) and %lo(%neg(%gp_rel(x))) are no longer the only
3-in-1 relocs that parse for N64. They're still the only combinations that
are permitted in relocatable expressions though. Fixing that should be a
later patch.
* We no longer need to list all the tokens that can occur as the first token of
an expression or immediate.
test/MC/Mips/expr1.s:
This change also prevents the incorrect lowering of %lo(2*4)+foo to
%lo(8+foo) which is not an equivalent expression (the difference is
whether foo is truncated to 16-bit or not) and the test has been
updated to account for the macro expansion the correct expression requires.
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D23110
llvm-svn: 277988
Diana Picus [Mon, 8 Aug 2016 08:54:39 +0000 (08:54 +0000)]
[SelectionDAG] Refactor visitInlineAsm a bit. NFCI.
This shaves off ~100 lines from visitInlineAsm.
llvm-svn: 277987
George Rimar [Mon, 8 Aug 2016 08:42:48 +0000 (08:42 +0000)]
[ELF] - Linkerscript: do not define _edata,_end,_etext if SECTIONS is used.
I faced that when tried to link FreeBSD kernel.
It was "duplicate symbol: _edata in (internal) and (internal)" error.
_data was a shared symbol that came from hack.so. At first it was replaced with DefinedRegular by the code
disabled in this patch and later when script tried to define the same symbol - the error was shown.
In the same situation (as given in testcase) ld defines them as UND. gold defines as ABS with zero value.
Patch just disables any operations of creating these symbols if script do layout.
Differential revision: https://reviews.llvm.org/D23206
llvm-svn: 277986
Diana Picus [Mon, 8 Aug 2016 08:27:36 +0000 (08:27 +0000)]
Fix two bugs for musl-libc on ARM
Bug 1: triples like armv7-pc-linux-musl use the wrong linker name
ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the
subarch field.
Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat"
linker, no matter whether the triple itself mentions "hardfloat".
Patch by Lei Zhang!
Differential Revision: https://reviews.llvm.org/D22904
llvm-svn: 277985
Sean Silva [Mon, 8 Aug 2016 07:03:49 +0000 (07:03 +0000)]
Add some comments linking back to PR28400.
Thanks to Mehdi for the suggestion!
llvm-svn: 277984
Dean Michael Berris [Mon, 8 Aug 2016 05:49:29 +0000 (05:49 +0000)]
[compiler-rt][XRay] Only add xray dependency if XRay is built and is available for the platform
llvm-svn: 277983
Sean Silva [Mon, 8 Aug 2016 05:38:06 +0000 (05:38 +0000)]
[PM] More workaround for PR28400
llvm-svn: 277982
Sean Silva [Mon, 8 Aug 2016 05:38:03 +0000 (05:38 +0000)]
[PM] BasicAA needs to be invalidated since it holds pointers to other stuff.
llvm-svn: 277981
Sean Silva [Mon, 8 Aug 2016 05:38:01 +0000 (05:38 +0000)]
[PM] Invalidate CallGraphAnalysis because it holds AssertingVH
This is essentially PR28400. The fix here is similar to that implemented
in r274656.
llvm-svn: 277980
Sean Silva [Mon, 8 Aug 2016 05:37:58 +0000 (05:37 +0000)]
[PM] Function-level TLI is also immutable.
llvm-svn: 277979
Daniel Berlin [Mon, 8 Aug 2016 04:44:53 +0000 (04:44 +0000)]
[MSSA] Fix PR28880 by fixing use optimizer's lower bound tracking behavior.
Summary:
In the use optimizer, we need to keep of whether the lower bound still
dominates us or else we may decide a lower bound is still valid when it
is not due to intervening pushes/pops. Fixes PR28880 (and probably a
bunch of other things).
Reviewers: george.burgess.iv
Subscribers: MatzeB, llvm-commits, sebpop
Differential Revision: https://reviews.llvm.org/D23237
llvm-svn: 277978
Eli Friedman [Mon, 8 Aug 2016 04:10:22 +0000 (04:10 +0000)]
[JumpThreading] Fix handling of aliasing metadata.
Summary:
The correctness fix here is that when we CSE a load with another load,
we need to combine the metadata on the two loads. This matches the
behavior of other passes, like instcombine and GVN.
There's also a minor optimization improvement here: for load PRE, the
aliasing metadata on the inserted load should be the same as the
metadata on the original load. Not sure why the old code was throwing
it away.
Issue found by inspection.
Differential Revision: http://reviews.llvm.org/D21460
llvm-svn: 277977
Serge Pavlov [Mon, 8 Aug 2016 04:02:15 +0000 (04:02 +0000)]
Pass information in a record instead of stack. NFC
Functions of Sema that work with building of nested name specifiers have too
many parameters (BuildCXXNestedNameSpecifier already expects 10 arguments).
With this change the information about identifier and its context is packed
into a structure, which is then passes to the semantic functions.
llvm-svn: 277976
Dean Michael Berris [Mon, 8 Aug 2016 03:58:57 +0000 (03:58 +0000)]
[compiler-rt][XRay] Default COMPILER_RT_BUILD_XRAY to ON
llvm-svn: 277975
Dean Michael Berris [Mon, 8 Aug 2016 03:42:11 +0000 (03:42 +0000)]
[compiler-rt][XRay] Fix XRay test build dependencies
llvm-svn: 277974
Davide Italiano [Mon, 8 Aug 2016 03:30:01 +0000 (03:30 +0000)]
[MC] Delete use of *structors_used.
Jim Grosbach and Kevin Enderby think those are not used anymore.
Originally submitted by: Rafael Espindola
llvm-svn: 277973
Davide Italiano [Mon, 8 Aug 2016 03:23:01 +0000 (03:23 +0000)]
[SimplifyLibCalls] Emit sqrt intrinsic instead of a libcall.
llvm-svn: 277972
Dean Michael Berris [Mon, 8 Aug 2016 03:10:22 +0000 (03:10 +0000)]
[compiler-rt][XRay] Implement __xray_unpatch() and __xray_remove_handler()
Summary:
We also add one test (and the XRay testing infrastructure) to exercise
the patching and unpatching code. This uses the XRay API exported
through the headers as well, installing a custom log handler.
Depends on D23101 for the updated emitted code alignment for the
return/entry sleds.
Reviewers: rSerge, echristo, rnk
Subscribers: tberghammer, danalbert, srhines, mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23154
llvm-svn: 277971
Eric Fiselier [Mon, 8 Aug 2016 02:22:41 +0000 (02:22 +0000)]
Fix copy/move constructor annotation for the uses-allocator test types.
Previously the copy/move constructors of the test types did not
properly set the arg_id to T const& or T&& respectivly.
llvm-svn: 277970
Eli Friedman [Mon, 8 Aug 2016 01:30:53 +0000 (01:30 +0000)]
[SROA] Fix crash with lifetime intrinsic partially covering alloca.
Summary:
PromoteMemToReg looks specifically for the pattern
bitcast+lifetime.start (or a bitcast-equivalent GEP); any offset
will lead to an assertion failure.
Fixes https://llvm.org/bugs/show_bug.cgi?id=27999 .
Differential Revision: https://reviews.llvm.org/D22737
llvm-svn: 277969
Hubert Tong [Sun, 7 Aug 2016 22:26:04 +0000 (22:26 +0000)]
[libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor
Summary:
The synopsis in C++11 subclause 28.8 [re.regex] has:
```
basic_regex(const charT* p, size_t len,
flag_type f = regex_constants::ECMAScript);
```
The default argument is added to libc++ by this change.
Reviewers: mclow.lists, rsmith, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22702
Reapplies r277966.
Patch by Jason Liu!
llvm-svn: 277968
Hubert Tong [Sun, 7 Aug 2016 22:23:24 +0000 (22:23 +0000)]
Revert r277966. Forgot patch attribution.
llvm-svn: 277967
Hubert Tong [Sun, 7 Aug 2016 22:18:33 +0000 (22:18 +0000)]
[libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor
Summary:
The synopsis in C++11 subclause 28.8 [re.regex] has:
```
basic_regex(const charT* p, size_t len,
flag_type f = regex_constants::ECMAScript);
```
The default argument is added to libc++ by this change.
Reviewers: mclow.lists, rsmith, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22702
llvm-svn: 277966
Craig Topper [Sun, 7 Aug 2016 21:52:59 +0000 (21:52 +0000)]
[AVX-512] Improve lowering of inserting a single element into lowest element of a 512-bit vector of zeroes by using vmovq/vmovd/vmovss/vmovsd.
llvm-svn: 277965
Eric Fiselier [Sun, 7 Aug 2016 21:47:06 +0000 (21:47 +0000)]
Mark LWG 2726 as complete. No code change needed.
llvm-svn: 277964
Davide Italiano [Sun, 7 Aug 2016 20:27:03 +0000 (20:27 +0000)]
[SLC] Emit an intrinsic instead of a libcall for pow.
Differential Revision: https://reviews.llvm.org/D22104
llvm-svn: 277963
Nico Weber [Sun, 7 Aug 2016 20:18:04 +0000 (20:18 +0000)]
Revert r277905, it caused PR28894
llvm-svn: 277962
Craig Topper [Sun, 7 Aug 2016 17:14:09 +0000 (17:14 +0000)]
[AVX-512] Add 512-bit logical operations to load folding tables. Add avx512f stack folding test and move some tests from the avx512vl test.
llvm-svn: 277961
Craig Topper [Sun, 7 Aug 2016 17:14:05 +0000 (17:14 +0000)]
[AVX-512] Add EVEX encoded floating point MAX/MIN instructions to the load folding tables.
llvm-svn: 277960
Simon Pilgrim [Sun, 7 Aug 2016 15:29:12 +0000 (15:29 +0000)]
[X86] lowerVectorShuffle - ensure that undefined mask elements only use SM_SentinelUndef
Help lowering and combining (which can specify SM_SentinelZero mask elements) share more shuffle matching code.
llvm-svn: 277959
Elena Demikhovsky [Sun, 7 Aug 2016 13:05:58 +0000 (13:05 +0000)]
AVX-512: Changed lowering of BITCAST between i1 vectors and i8/i16/i32 integer values
Optimized lowering of BITCAST node. The BITCAST node can be replaced with COPY_TO_REG instead of KMOV.
It allows to suppress two opposite BITCAST operations and avoid redundant "movs".
Differential Revision: https://reviews.llvm.org/D23247
llvm-svn: 277958
Simon Pilgrim [Sun, 7 Aug 2016 12:41:36 +0000 (12:41 +0000)]
[X86][AVX512BW] Add sext/zext AVX512BW 512-bit vector tests
llvm-svn: 277957
Simon Pilgrim [Sun, 7 Aug 2016 12:10:46 +0000 (12:10 +0000)]
[X86][AVX512] Add sext/zext to 512-bit vector tests
llvm-svn: 277956
Asaf Badouh [Sun, 7 Aug 2016 10:43:04 +0000 (10:43 +0000)]
[AVX512] integer comparisions enumeration.
fix Bug 28842 https://llvm.org/bugs/show_bug.cgi?id=28842
Differential Revision: https://reviews.llvm.org/D22212
llvm-svn: 277955
Elena Demikhovsky [Sun, 7 Aug 2016 09:29:34 +0000 (09:29 +0000)]
AVX-512: Added a test for cmp intrinsics
This is a new test that should explore a current suboptimal sequence in passing values between cmp and kor intrinsics.
The code will be optimized in an upcoming patch.
Submitted bug here:
https://llvm.org/bugs/show_bug.cgi?id=28839
llvm-svn: 277954
David Majnemer [Sun, 7 Aug 2016 08:28:58 +0000 (08:28 +0000)]
Update clang tests for LLVM r277950
We infer inbounds on GEPs of allocas leading to minor perturbations in
tests.
llvm-svn: 277953
David Majnemer [Sun, 7 Aug 2016 07:58:12 +0000 (07:58 +0000)]
[InstSimplify] Fold gep (gep V, C), (sub 0, V) to C
llvm-svn: 277952
David Majnemer [Sun, 7 Aug 2016 07:58:10 +0000 (07:58 +0000)]
[InstSimplify] Try hard to simplify pointer comparisons
Simplify ptrtoint comparisons involving operands with different source
types.
llvm-svn: 277951
David Majnemer [Sun, 7 Aug 2016 07:58:00 +0000 (07:58 +0000)]
[InstCombine] Infer inbounds on geps of allocas
llvm-svn: 277950
Craig Topper [Sun, 7 Aug 2016 05:39:51 +0000 (05:39 +0000)]
[X86] Add commutable floating point max/min instructions to the load folding tables.
llvm-svn: 277949
Craig Topper [Sun, 7 Aug 2016 05:39:48 +0000 (05:39 +0000)]
[AVX-512] Add andnps/andnpd to the avx512vl stack folding test.
llvm-svn: 277948
Craig Topper [Sun, 7 Aug 2016 05:39:46 +0000 (05:39 +0000)]
[X86] Simplify a shuffle mask copy. NFC
llvm-svn: 277947
Michael Zolotukhin [Sun, 7 Aug 2016 01:56:54 +0000 (01:56 +0000)]
Revert "Revert "[LoopSimplify] Fix updating LCSSA after separating nested loops.""
This reverts commit r277901. Reaaply the commit as it looks like it has
nothing to do with the bots failures.
llvm-svn: 277946
Lang Hames [Sun, 7 Aug 2016 01:19:37 +0000 (01:19 +0000)]
[ExecutionEngine][RuntimeDyld] Move JITSymbol from ExecutionEngine to RuntimeDyld.
JITSymbol really belongs in RuntimeDyld. This should fix the llvm-rtdyld link
failures caused by r277943.
llvm-svn: 277945
Lang Hames [Sun, 7 Aug 2016 01:12:44 +0000 (01:12 +0000)]
[RuntimeDyld] Remove symbol that is unused as of r277943.
llvm-svn: 277944
Lang Hames [Sun, 7 Aug 2016 00:18:14 +0000 (00:18 +0000)]
[RuntimeDyld] Replace manual flag checks with JITSymbolFlags::fromObjectSymbol.
llvm-svn: 277943
Lang Hames [Sat, 6 Aug 2016 22:36:26 +0000 (22:36 +0000)]
[ORC] Re-apply r277896, removing bogus triples and datalayouts that broke tests
on linux last time.
llvm-svn: 277942
Kostya Serebryany [Sat, 6 Aug 2016 21:28:56 +0000 (21:28 +0000)]
[libFuzzer] make libFuzzer work with a bit older clang versions
llvm-svn: 277941
Kostya Serebryany [Sat, 6 Aug 2016 21:23:29 +0000 (21:23 +0000)]
[libFuzzer] don't print bogus error message
llvm-svn: 277940
Simon Pilgrim [Sat, 6 Aug 2016 21:21:12 +0000 (21:21 +0000)]
[X86][AVX2] Improve sign/zero extension on AVX2 targets
Split extensions to large vectors into 256-bit chunks - the equivalent of what we do with pre-AVX2 into 128-bit chunks
llvm-svn: 277939
Gor Nishanov [Sat, 6 Aug 2016 21:11:10 +0000 (21:11 +0000)]
CoroSplit: Squash unused variable FnTrigger warning in NDEBUG
llvm-svn: 277938
Gor Nishanov [Sat, 6 Aug 2016 21:01:22 +0000 (21:01 +0000)]
[Coroutines] Passify the build bots. Remove restart-trigger.ll test for now
llvm-svn: 277937
Gor Nishanov [Sat, 6 Aug 2016 20:44:39 +0000 (20:44 +0000)]
[Coroutines] Part 5: Add CGSCC restart trigger
Summary:
CoroSplit pass processes the coroutine twice. First, it lets it go through
complete IPO optimization pipeline as a single function. It forces restart
of the pipeline by inserting an indirect call to an empty function "coro.devirt.trigger"
which is devirtualized by CoroElide pass that triggers a restart of the pipeline by CGPassManager.
(In later patches, when CoroSplit pass sees the same coroutine the second time, it splits it up,
adds coroutine subfunctions to the SCC to be processed by IPO pipeline.)
Documentation and overview is here: http://llvm.org/docs/Coroutines.html.
Upstreaming sequence (rough plan)
1.Add documentation. (https://reviews.llvm.org/D22603)
2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659)
3.Add empty coroutine passes. (https://reviews.llvm.org/D22847)
4.Add coroutine devirtualization + tests.
ab) Lower coro.resume and coro.destroy (https://reviews.llvm.org/D22998)
c) Do devirtualization (https://reviews.llvm.org/D23229)
5.Add CGSCC restart trigger + tests. <= we are here
6.Add coroutine heap elision + tests.
7.Add the rest of the logic (split into more patches)
Reviewers: mehdi_amini, majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23234
llvm-svn: 277936
Sylvestre Ledru [Sat, 6 Aug 2016 20:23:54 +0000 (20:23 +0000)]
Add the new scan-build option (--show-description) in the 4.0 release notes
llvm-svn: 277935
Craig Topper [Sat, 6 Aug 2016 19:31:52 +0000 (19:31 +0000)]
[AVX-512] Add SQRT/RCP14/RNDSCALE to hasUndefRegUpdate.
llvm-svn: 277934
Craig Topper [Sat, 6 Aug 2016 19:31:50 +0000 (19:31 +0000)]
[AVX-512] Add AVX-512 scalar CVT instructions to hasUndefRegUpdate.
llvm-svn: 277933
Craig Topper [Sat, 6 Aug 2016 19:31:47 +0000 (19:31 +0000)]
[AVX-512] Add AVX512 run line to a test and re-generate the checks. Future commits will refine some of the sequences.
llvm-svn: 277932
Craig Topper [Sat, 6 Aug 2016 19:31:44 +0000 (19:31 +0000)]
[X86] Add VRCPSSr_Int, VRSQRTSSr_Int, VSQRTSSr_Int, and VSQRTSDr_Int to hasUndefRegUpdate.
llvm-svn: 277931
Simon Pilgrim [Sat, 6 Aug 2016 18:40:28 +0000 (18:40 +0000)]
[X86][SSE] Enable commutation between MOVHLPS and UNPCKHPD
Assuming SSE2 is available then we can safely commute between these, removing some unnecessary register moves and improving memory folding opportunities.
VEX encoded versions don't benefit so I haven't added support to them.
llvm-svn: 277930
Saleem Abdulrasool [Sat, 6 Aug 2016 18:02:51 +0000 (18:02 +0000)]
COFF ARM: Fix typos in the relocation test
Fix comments. NFC.
Patch by Martin Storsjö!
llvm-svn: 277929
Saleem Abdulrasool [Sat, 6 Aug 2016 17:58:24 +0000 (17:58 +0000)]
Headers: Add ARM support to intrin.h for MSVC compatibility
This fixes compiling with headers from the Windows SDK for ARM, where the
YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST.
The actual MSVC armintr.h contains a lot more definitions, but this is enough to
build code that uses the Windows SDK but doesn't use ARM intrinsics directly.
An alternative would to just keep the addition to intrin.h (to include
armintr.h), but not actually ship armintr.h, instead having clang's intrin.h
include armintr.h from MSVC's include directory. (That one works fine with
clang, at least for building code that uses the Windows SDK.)
Patch by Martin Storsjö!
llvm-svn: 277928
Mike Aizatsky [Sat, 6 Aug 2016 17:03:22 +0000 (17:03 +0000)]
[libfuzzer] do not warn about missing pcbuffer functions: they are new.
llvm-svn: 277927
Benjamin Kramer [Sat, 6 Aug 2016 13:52:37 +0000 (13:52 +0000)]
Unpollute the global namespace. lld edition.
llvm-svn: 277926
Simon Pilgrim [Sat, 6 Aug 2016 13:46:09 +0000 (13:46 +0000)]
[X86][SSE] Regenerate SSE1 shuffle tests
llvm-svn: 277925
Benjamin Kramer [Sat, 6 Aug 2016 12:58:24 +0000 (12:58 +0000)]
[ARM] Don't copy MCInsts in loop. NFC.
llvm-svn: 277924
Benjamin Kramer [Sat, 6 Aug 2016 12:45:16 +0000 (12:45 +0000)]
[ASTReader] Use real move semantics instead of emulating them in the copy ctor.
No functionality change intended.
llvm-svn: 277923
Benjamin Kramer [Sat, 6 Aug 2016 12:33:46 +0000 (12:33 +0000)]
[Inliner] Use function_ref for functors which are never taken ownership of.
llvm-svn: 277922
Benjamin Kramer [Sat, 6 Aug 2016 12:11:11 +0000 (12:11 +0000)]
[LoadCombine] Simplify code with a brace init. NFC.
llvm-svn: 277921
Benjamin Kramer [Sat, 6 Aug 2016 11:28:20 +0000 (11:28 +0000)]
[Sema] Make switch fully covered again.
llvm-svn: 277920
Simon Pilgrim [Sat, 6 Aug 2016 11:22:39 +0000 (11:22 +0000)]
[X86][SSE] Add 2 input shuffle support to matchBinaryVectorShuffle
Not actually used yet...
llvm-svn: 277919
Benjamin Kramer [Sat, 6 Aug 2016 11:21:04 +0000 (11:21 +0000)]
Move helpers into anonymous namespaces. NFC.
llvm-svn: 277918
Benjamin Kramer [Sat, 6 Aug 2016 11:20:59 +0000 (11:20 +0000)]
[StaticAnalyzer] Remove dead code.
llvm-svn: 277917
Benjamin Kramer [Sat, 6 Aug 2016 11:13:10 +0000 (11:13 +0000)]
Move helpers into anonymous namespaces. NFC.
llvm-svn: 277916
David Majnemer [Sat, 6 Aug 2016 08:37:12 +0000 (08:37 +0000)]
[CodeGen] Fix a -Wdocumentation warning
A parameter was documented with the wrong name.
No functionality change is intended.
llvm-svn: 277915