Commit Graph

117095 Commits

Author SHA1 Message Date
John Brawn
e38f45effc [ARM] Use AEABI aligned function variants
AEABI defines aligned variants of memcpy etc. that can be faster than
the default version due to not having to do alignment checks. When
emitting target code for these functions make use of these aligned
variants if possible. Also convert memset to memclr if possible.

Differential Revision: http://reviews.llvm.org/D8060


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237127 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 13:13:38 +00:00
Igor Laevsky
00666a17ff Reverse ordering of base and derived pointer during safepoint lowering.
According to the documentation in StackMap section for the safepoint we should have:
"The first Location in each pair describes the base pointer for the object. The second is the derived pointer actually being relocated."
But before this change we emitted them in reverse order - derived pointer first, base pointer second.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 13:12:14 +00:00
Andrea Di Biagio
bc20d3b64c [X86] Remove useless target specific combine on TRUNCATE dag nodes.
Before revision 171146, function 'PerformTruncateCombine' used to perform
a premature lowering of TRUNCATE dag nodes.
Revision 171146 then moved all the logic implemented by PerformTruncateCombine
to a custom lowering hook. However, that revision forgot to delete
function PerformTruncateCombine from the code.

This patch removes function 'PerformTruncateCombine' since it has no effect
on the SelectionDAG. No functional change intended.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 12:34:22 +00:00
Vasileios Kalintiris
98ed1175d9 [mips][FastISel] Handle calls with non legal types i8 and i16.
Summary: Allow calls with non legal integer types based on i8 and i16 to be processed by mips fast-isel.

Based on a patch by Reed Kotler.

Test Plan:
"Make check" test forthcoming.
Test-suite passes at O0/O2 and with mips32 r1/r2

Reviewers: rkotler, dsanders

Subscribers: llvm-commits, rfuhler

Differential Revision: http://reviews.llvm.org/D6770

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 12:29:17 +00:00
Vasileios Kalintiris
d8b1e16033 [mips][FastISel] Simplify callabi.ll by using multiple check prefixes.
Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9635

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 12:17:11 +00:00
Vasileios Kalintiris
4ffee4b853 [mips][FastISel] Allow computation of addresses from constant expressions.
Summary:
Try to compute addresses when the offset from a memory location is a constant
expression.

Based on a patch by Reed Kotler.

Test Plan:
Passes test-suite for -O0/O2 and mips 32 r1/r2

Reviewers: rkotler, dsanders

Subscribers: llvm-commits, aemerson, rfuhler

Differential Revision: http://reviews.llvm.org/D6767

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 12:08:31 +00:00
Renato Golin
ed73167673 Change TargetParser enum names to avoid macro conflicts (llvm)
sys/time.h on Solaris (and possibly other systems) defines "SEC" as "1"
using a cpp macro.  The result is that this fails to compile.

Fixes https://llvm.org/PR23482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 10:33:58 +00:00
Elena Demikhovsky
3bf2f23adb AVX-512: asm parser errors check
I reverted the error check that was removed in 236416.
I put the it in a separate file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 09:47:23 +00:00
Elena Demikhovsky
cfff317af7 AVX-512: select operation for i1 vectors
like: select i1 %cond, <16 x i1> %a, <16 x i1> %b.
I added pseudo-CMOV patterns to resolve the "select".
Added tests for KNL and SKX.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237106 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 09:36:52 +00:00
Michael Kuperstein
9cf6c24660 [X86] DAGCombine should not assume arbitrary vector types are simple
The X86-specific DAGCombine for stores should not assume vector types are always simple.
This fixes PR23476.

Differential Revision: http://reviews.llvm.org/D9659

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 07:33:07 +00:00
Craig Topper
a4d6a35bf8 Remove unnecessary forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 06:09:57 +00:00
Craig Topper
ee686477ac Remove unnecessary variables by folding calls into for loop header. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 05:25:10 +00:00
Kostya Serebryany
de65922947 [lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 01:58:34 +00:00
Kostya Serebryany
772410aef6 [lib/Fuzzer] detach the pulse thread instad of joining it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 01:43:20 +00:00
Eric Christopher
0552d51c45 Migrate existing backends that care about software floating point
to use the information in the module rather than TargetOptions.

We've had and clang has used the use-soft-float attribute for some
time now so have the backends set a subtarget feature based on
a particular function now that subtargets are created based on
functions and function attributes.

For the one middle end soft float check go ahead and create
an overloadable TargetLowering::useSoftFloat function that
just checks the TargetSubtargetInfo in all cases.

Also remove the command line option that hard codes whether or
not soft-float is set by using the attribute for all of the
target specific test cases - for the generic just go ahead and
add the attribute in the one case that showed up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237079 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 01:26:05 +00:00
Andrew Kaylor
d1074b0e7f Fixing memory leak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 00:13:51 +00:00
Sanjoy Das
23ac4f1856 Refactoring gc_relocate related code in CodeGenPrepare.cpp
Summary:
The original code inserted new instructions by following a
Create->Remove->ReInsert flow. This patch removes the unnecessary
Remove->ReInsert part by setting up the InsertPoint correctly at the
very beginning. This change does not introduce any functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9687

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237070 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:47:30 +00:00
Sanjoy Das
aa1c57e324 Rename variables in gc_relocate related functions to follow LLVM's naming conventions.
Summary:
This patch is to rename some variables to CamelCase in gc_relocate
related functions. There is no functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9681

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:47:27 +00:00
Kostya Serebryany
66c6a4c240 [lib/Fuzzer] don't record traces when trace collection is off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237067 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:25:28 +00:00
Ahmed Bougacha
6eb095d7ae [MemCpyOpt] Look at any dependency -not just source- for memset+memcpy.
This fixes another miscompile introduced by r235232: when there was a
dependency on the memcpy destination other than the memset, we would
ignore it, because we only looked at the source dependency.

It was a mistake to use SrcDepInfo.  Instead, just use DepInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237066 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:09:46 +00:00
David Blaikie
12a7fbc55c Simplify a return expression and an access to an alloca's allocated type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:09:25 +00:00
Andrew Kaylor
e04fe6c135 [WinEH] Handle nested landing pads that return directly to the parent function.
Differential Revision: http://reviews.llvm.org/D9684



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 23:06:02 +00:00
Richard Smith
96086ad501 Add more missing #includes, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 22:41:07 +00:00
Richard Smith
310d031235 Add missing #include, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 22:32:06 +00:00
Richard Smith
9fa8698925 Add missing #includes, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237060 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 22:31:40 +00:00
David Blaikie
bbd301d97a Readdress r236990, use of static members on a non-static variable.
The TargetRegistry is just a namespace-like class, instantiated in one
place to use a range-based for loop. Instead, expose access to the
registry via a range-based 'targets()' function instead. This makes most
uses a bit awkward/more verbose - but eventually we should just add a
range-based find_if function which will streamline these functions. I'm
happy to mkae them a bit awkward in the interim as encouragement to
improve the algorithms in time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 22:20:48 +00:00
James Y Knight
aeda490976 Fix tablegen's PrintFatalError function to run registered file
cleanups.

Also, change code in tablegen which printed a message and then called
"exit(1)" to use PrintFatalError, instead.

This fixes instances where an empty output file was left behind after
a failed tablegen invocation, which would confuse subsequent ninja
runs into not attempting to rebuild.

Differential Revision: http://reviews.llvm.org/D9608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 22:17:13 +00:00
Kostya Serebryany
1d4481df82 [lib/Fuzzer] when running multiple fuzzing processes, print something every 10 minutes to avoid buildbot timeouts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237054 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 21:31:51 +00:00
Alexey Samsonov
4e5be5af59 Fix input validation issues in llvm-as/llvm-dis
Summary:
1. llvm-as/llvm-dis tools do not check for input filename length.
2. llvm-dis does not verify the `Streamer` variable against `nullptr` properly, so the `M` variable could be uninitialized (e.g. if the input file does not exist) leading to null dref.

Patch by Lenar Safin!

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: samsonov, llvm-commits

Differential Revision: http://reviews.llvm.org/D9584

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 21:20:20 +00:00
Kostya Serebryany
051ef86497 [lib/Fuzzer] rename FuzzerDFSan.cpp to FuzzerTraceState.cpp; update comments. NFC expected
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 21:16:27 +00:00
Sanjay Patel
f6548b86b6 propagate IR-level fast-math-flags to DAG nodes; 2nd try; NFC
This is a less ambitious version of:
http://reviews.llvm.org/rL236546

because that was reverted in:
http://reviews.llvm.org/rL236600

because it caused memory corruption that wasn't related to FMF
but was actually due to making nodes with 2 operands derive from a
plain SDNode rather than a BinarySDNode. 

This patch adds the minimum plumbing necessary to use IR-level
fast-math-flags (FMF) in the backend without actually using
them for anything yet. This is a follow-on to:
http://reviews.llvm.org/rL235997

...which split the existing nsw / nuw / exact flags and FMF
into their own struct.
 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237046 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 21:07:09 +00:00
Davide Italiano
383c55870e [LoopIdiomRecognize] Transform backedge-taken count check into an assertion.
runOnCountable() allowed the caller to call on a loop without a
predictable backedge-taken count. Change the code so that only loops
with computable backdge-count can call this function, in order to catch
abuses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237044 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 21:02:34 +00:00
Kostya Serebryany
0cdb698aae [lib/Fuzzer] add a trace-based mutatation logic. Same idea as with DFSan-based mutator, but instead of relying on taint tracking, try to find the data directly in the input. More (logic and comments) to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237043 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 20:51:19 +00:00
Andrew Kaylor
a1945939bd Fixing build warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237042 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 20:45:11 +00:00
Andrew Kaylor
aeeca679f7 [WinEH] Update exception numbering to give handlers their own base state.
Differential Revision: http://reviews.llvm.org/D9512



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237014 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 19:41:19 +00:00
Sanjay Patel
da4dc2dadc group getNode() variants by purpose and add comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237013 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 19:34:10 +00:00
Sanjoy Das
5b5782c20e [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers
Summary:
In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for
each relocated pointer, and the gc_relocate has the same type with the
pointer. During the creation of gc_relocate intrinsic, llvm requires to
mangle its type. However, llvm does not support mangling of all possible
types. RewriteStatepointsForGC will hit an assertion failure when it
tries to create a gc_relocate for pointer to vector of pointers because
mangling for vector of pointers is not supported.

This patch changes the way RewriteStatepointsForGC pass creates
gc_relocate. For each relocated pointer, we erase the type of pointers
and create an unified gc_relocate of type i8 addrspace(1)*. Then a
bitcast is inserted to convert the gc_relocate to the correct type. In
this way, gc_relocate does not need to deal with different types of
pointers and the unsupported type mangling is no longer a problem. This
change would also ease further merge when LLVM erases types of pointers
and introduces an unified pointer type.

Some minor changes are also introduced to gc_relocate related part in
InstCombineCalls, CodeGenPrepare, and Verifier accordingly.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9592

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237009 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 18:49:34 +00:00
Matthias Braun
948b20ecb3 LiveRangeCalc: Improve error messages on malformed IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237008 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 18:47:47 +00:00
Tom Stellard
37848f1ada CodeGen: Make MachineInstr::untieRegOperand() a public function
This makes it easier to update in place instructions with tied operands.

Differential Revision: http://reviews.llvm.org/D9231

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237005 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 17:40:54 +00:00
Pirama Arumuga Nainar
c9f2596abc [X86] Updates to X86 backend for f16 promotion
Summary:
r235215 adds support for f16 to be considered as a load/store type and
promote f16 operations to f32.

This patch has miscellaneous fixes for the X86 backend so all f16
operations are handled:
1. Set loadextaction for f16 vectors to expand.
2. Handle FP_EXTEND in a switch statement when handling v2f32
3. Do not fold (FP_TO_SINT (load f16)) into FP_TO_INT*_IN_MEM or
(store (SINT_TO_FP )) to a FILD.

Tests included.

Reviewers: ab, srhines, delena

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9092

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 17:14:39 +00:00
James Molloy
2605531fe8 Rip min/max pattern matching out of InstCombine and into
ValueTracking.

This matching functionality is useful in more than just InstCombine, so
make it available in ValueTracking.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236998 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 14:42:20 +00:00
Aaron Ballman
0a62359646 Amends r236990, because I failed at hitting "save" before commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236991 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 13:11:38 +00:00
Aaron Ballman
9ffcd1bdbd Replacing a range-based for loop with an old-style for loop. This code was previously causing a warning with MSVC about a compiler-generated local variable because TargetRegistry::begin() and end() are static member functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236990 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 13:10:17 +00:00
Aaron Ballman
fe78d295da Silencing an MSVC warning: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236987 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 12:45:53 +00:00
Adam Nemet
beb74d3cf7 [Testsuite] Renumber metadata in ScopedNoAliasAA test to match CHECK lines
Summary:
Now it's much easier to follow what's happening in this test.

Also removed some unused metadata entries.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9601

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236981 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 09:10:14 +00:00
Elena Demikhovsky
63df7cd4ea AVX-512: Changed CC parameter in "cmp" intrinsic
from i8 to i32 according to the Intel Spec

by Igor Breger (igor.breger@intel.com)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236979 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 09:03:14 +00:00
Adam Nemet
d6a9af6fd3 [Docs] Fix scoped noalias example
Summary:
As far as I understand the entire point of this example is to show that
if noalias is not a superset/equal to the alias.scope list on a scope
domain then load could reference locations that the store is not known
to not-alias i.e may alias.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9598

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236977 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 08:30:28 +00:00
Hal Finkel
cdd4737be8 [InstCombine/PowerPC] Fix single-precision QPX load/store replacement
The QPX single-precision load/store intrinsics have implied
truncation/extension from/to the declared value type of <4 x double> to the
memory type of <4 x float>. When we can prove the alignment of the pointer
argument, and thus replace the intrinsic with a regular load or store, we need
to load or store the correct data type (<4 x float>) instead of (<4 x double>).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236973 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 06:37:03 +00:00
Elena Demikhovsky
a08590e2dc Fixed compilation warning, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236972 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 06:23:41 +00:00
Elena Demikhovsky
8189eb4d7e AVX-512: Added SKX instructions and intrinsics:
{add/sub/mul/div/} x {ps/pd} x {128/256} 2. max/min with sae

By Asaf Badouh (asaf.badouh@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236971 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 06:05:05 +00:00