Rafael Espindola [Tue, 14 Jul 2015 01:06:16 +0000 (01:06 +0000)]
Add a herper function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242100
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 14 Jul 2015 00:26:26 +0000 (00:26 +0000)]
MIR Serialization: Serialize the variable sized stack objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242095
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 14 Jul 2015 00:11:08 +0000 (00:11 +0000)]
Update enforceKnownAlignment after the isWeakForLinker semantic change
Previously we would refrain from attempting to increase the linkage of
available_externally globals because they were considered weak for the
linker. Now they are treated more like a declaration instead of a weak
definition.
This was causing SSE alignment faults in Chromuim, when some code
assumed it could increase the alignment of a dllimported global that it
didn't control. http://crbug.com/509256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242091
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 13 Jul 2015 23:24:34 +0000 (23:24 +0000)]
MIR Serialization: Serialize the sub register indices.
This commit serializes the sub register indices from the register machine
operands.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242084
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 23:14:26 +0000 (23:14 +0000)]
Add missing file.
Sorry about that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242083
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 23:07:05 +0000 (23:07 +0000)]
Fix reading archive members with / in the name.
This is important for thin archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242082
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 13 Jul 2015 22:58:19 +0000 (22:58 +0000)]
[PPC64LE] More improvements to VSX swap optimization
This patch allows VSX swap optimization to succeed more frequently.
Specifically, it is concerned with common code sequences that occur
when copying a scalar floating-point value to a vector register. This
patch currently handles cases where the floating-point value is
already in a register, but does not yet handle loads (such as via an
LXSDX scalar floating-point VSX load). That will be dealt with later.
A typical case is when a scalar value comes in as a floating-point
parameter. The value is copied into a virtual VSFRC register, and
then a sequence of SUBREG_TO_REG and/or COPY operations will convert
it to a full vector register of the class required by the context. If
this vector register is then used as part of a lane-permuted
computation, the original scalar value will be in the wrong lane. We
can fix this by adding a swap operation following any widening
SUBREG_TO_REG operation. Additional COPY operations may be needed
around the swap operation in order to keep register assignment happy,
but these are pro forma operations that will be removed by coalescing.
If a scalar value is otherwise directly referenced in a computation
(such as by one of the many XS* vector-scalar operations), we
currently disable swap optimization. These operations are
lane-sensitive by definition. A MentionsPartialVR flag is added for
use in each swap table entry that mentions a scalar floating-point
register without having special handling defined.
A common idiom for PPC64LE is to convert a double-precision scalar to
a vector by performing a splat operation. This ensures that the value
can be referenced as V[0], as it would be for big endian, whereas just
converting the scalar to a vector with a SUBREG_TO_REG operation
leaves this value only in V[1]. A doubleword splat operation is one
form of an XXPERMDI instruction, which takes one doubleword from a
first operand and another doubleword from a second operand, with a
two-bit selector operand indicating which doublewords are chosen. In
the general case, an XXPERMDI can be permitted in a lane-swapped
region provided that it is properly transformed to select the
corresponding swapped values. This transformation is to reverse the
order of the two input operands, and to reverse and complement the
bits of the selector operand (derivation left as an exercise to the
reader ;).
A new test case that exercises the scalar-to-vector and generalized
XXPERMDI transformations is added as CodeGen/PowerPC/swaps-le-5.ll.
The patch also requires a change to CodeGen/PowerPC/swaps-le-3.ll to
use CHECK-DAG instead of CHECK for two independent instructions that
now appear in reverse order.
There are two small unrelated changes that are added with this patch.
First, the XXSLDWI instruction was incorrectly omitted from the list
of lane-sensitive instructions; this is now fixed. Second, I observed
that the same webs were being rejected over and over again for
different reasons. Since it's sufficient to reject a web only once, I
added a check for this to speed up the compilation time slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242081
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 22:01:02 +0000 (22:01 +0000)]
Use std::make_tuple to reduce code duplication.
Thanks to David Blaikie for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242074
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 13 Jul 2015 21:50:35 +0000 (21:50 +0000)]
Remove unnecessary lines from the test in r242068.
This test case was breaking the hexagon elf bot. The failing lines
were actually unnecessary as checking that the store still reads the
correct value demonstrates that everything is working fine now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242073
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 13 Jul 2015 21:33:21 +0000 (21:33 +0000)]
Reduce memory usage of ComputeEditDistance() by (almost) 50%
ComputeEditDistance() currently keeps two rows of the edit distance matrix in
memory. That's unnecessary, one row plus one additional element are sufficient.
With this change, strings up to 64 chars can be processed without going to the
heap, compared to 32 chars previously. (But the main motivation is that the
code gets a bit simpler.)
No intended behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242069
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 13 Jul 2015 21:25:33 +0000 (21:25 +0000)]
Loop idiom recognizer was replacing too many uses of popcount.
When spotting that a loop can use ctpop, we were incorrectly replacing all uses of a value with a value derived from ctpop.
The bug here was exposed because we were replacing a use prior to the ctpop with the ctpop value and so we have a use before def, i.e., we changed
%tobool.5 = icmp ne i32 %num, 0
store i1 %tobool.5, i1* %ptr
br i1 %tobool.5, label %for.body.lr.ph, label %for.end
to
store i1 %1, i1* %ptr
%0 = call i32 @llvm.ctpop.i32(i32 %num)
%1 = icmp ne i32 %0, 0
br i1 %1, label %for.body.lr.ph, label %for.end
Even if we inserted the ctpop so that it dominates the store here, that would still be incorrect. The store doesn’t want the result of ctpop.
The fix is very simple, and involves replacing only the branch condition with the ctpop instead of all uses.
Reviewed by Hal Finkel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242068
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 13 Jul 2015 20:41:46 +0000 (20:41 +0000)]
[WinEH] Emit the LSDA even if no lpads remain but outlining occurred
The outlined funclets call intrinsics which reference labels from the
LSDA. This situation can easily arise in small functions with a single
cleanup at -O0, where Clang marks a definition as nounwind, and then
WinEHPrepare "discovers" that the landingpad is dead by accident and
deletes it.
We now need to ask the LLVM IR Function for it's personality directly,
rather than going through MachineModuleInfo.
Fixes PR23892.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242063
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 13 Jul 2015 20:38:16 +0000 (20:38 +0000)]
[Hexagon] Move BitTracker into the llvm namespace and remove redundant qualifications
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242062
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 20:38:09 +0000 (20:38 +0000)]
Add support deterministic output in llvm-ar and make it the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 13 Jul 2015 20:30:58 +0000 (20:30 +0000)]
Revert "[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working."
Reverting r242059 because it broke some bots. I'm attempting to reproduce the failures now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 13 Jul 2015 20:23:15 +0000 (20:23 +0000)]
[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working.
Summary:
This change re-lands r241621, with an additional fix that was required to allow tool sources to live outside the llvm checkout. It also no longer renames LLVM_EXTERNAL_*_SOURCE_DIR. This change was reverted in r241663, because it renamed several variables of the format LLVM_EXTERNAL_*_* to LLVM_TOOL_*_*.
Original Summary:
The tools CMakeLists file already had implicit tool registration, but there were a few things off about it that needed to be altered to make it work. This change addresses all that. The changes in this patch are:
* factored out canonicalizing tool names from paths to CMake variables * removed the LLVM_IMPLICIT_PROJECT_IGNORE mechanism in favor of LLVM_EXTERNAL_${nameUPPER}_BUILD which I renamed to LLVM_TOOL_${nameUPPER}_BUILD because it applies to internal and external tools
* removed ignore_llvm_tool_subdirectory() in favor of just setting LLVM_TOOL_${nameUPPER}_BUILD to Off
* Added create_llvm_tool_options() to resolve a bug in add_llvm_external_project() - the old LLVM_EXTERNAL_${nameUPPER}_BUILD would not work on a clean CMake directory because the option could be created after it was set in code.
* Removed all but the minimum required calls to add_llvm_external_project from tools/CMakeLists.txt
Differential Revision: http://reviews.llvm.org/D10665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242059
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Mon, 13 Jul 2015 19:41:51 +0000 (19:41 +0000)]
[CMake] Add missing DebugInfo libraries to llvm-shlib
Reviewers: beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242054
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 13 Jul 2015 19:08:36 +0000 (19:08 +0000)]
AMDGPU: Minor cleanups to always inline pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242053
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 13 Jul 2015 18:51:15 +0000 (18:51 +0000)]
[MC] Correctly escape .safeseh's symbol
This fixes PR24107.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242050
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Mon, 13 Jul 2015 18:33:21 +0000 (18:33 +0000)]
Enable partial and runtime loop unrolling for NVPTX.
Enable partial and runtime loop unrolling for NVPTX backend via
TTI::UnrollingPreferences with a small threshold. This partially unrolls
small loops which are often unrolled by the PTX to SASS compiler
and unrolling earlier can be beneficial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242049
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Mon, 13 Jul 2015 18:26:27 +0000 (18:26 +0000)]
Enable runtime unrolling with unroll pragma metadata
Enable runtime unrolling for loops with unroll count metadata ("#pragma unroll N")
and a runtime trip count. Also, do not unroll loops with unroll full metadata if the
loop has a runtime loop count. Previously, such loops would be unrolled with a
very large threshold (pragma-unroll-threshold) if runtime unrolled happened to be
enabled resulting in a very large (and likely unwise) unroll factor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242047
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 13 Jul 2015 18:25:29 +0000 (18:25 +0000)]
Service the doxygen comments in DwarfUnit and DwarfDebug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242046
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 13 Jul 2015 18:07:26 +0000 (18:07 +0000)]
MIR Serialization: Serialize the fixed stack objects.
This commit serializes the fixed stack objects, including fixed spill slots.
The fixed stack objects are serialized using a YAML sequence of YAML inline
mappings. Each mapping has the object's ID, type, size, offset, and alignment.
The objects that aren't spill slots also serialize the isImmutable and isAliased
flags.
The fixed stack objects are a part of the machine function's YAML mapping.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242045
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 13 Jul 2015 17:55:14 +0000 (17:55 +0000)]
[WinEH] Strip the \01 character from the __CxxFrameHandler3 thunk name
Add another C++ 32-bit EH table test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242044
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 13 Jul 2015 17:21:31 +0000 (17:21 +0000)]
Remove macro guards for extern template instantiations.
This is a C++11 feature that both GCC and MSVC have supported as ane extension
long before C++11 was approved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242042
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 13 Jul 2015 17:21:14 +0000 (17:21 +0000)]
Avoid using Loop::getSubLoopsVector.
Passes should never modify it, just use the const version. While there
reduce copying in LoopInterchange. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242041
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Mon, 13 Jul 2015 16:36:22 +0000 (16:36 +0000)]
Fix handling of the 'n' asm constraint with invalid operands.
It had accidently accepted a symbol+offset value (and emitted
incorrect code for it, keeping only the offset part) instead of
properly reporting the constraint as invalid.
Differential Revision: http://reviews.llvm.org/D11039
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242040
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 13 Jul 2015 15:47:57 +0000 (15:47 +0000)]
AMDGPU/SI: Select mad patterns to v_mac_f32
The two-address instruction pass will convert these back to v_mad_f32
if necessary.
Differential Revision: http://reviews.llvm.org/D11060
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242038
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Mon, 13 Jul 2015 15:37:30 +0000 (15:37 +0000)]
ARM: Fix cttz expansion on vector types.
The 64/128-bit vector types are legal if NEON instructions are
available. However, there was no matching patterns for @llvm.cttz.*()
intrinsics and result in fatal error.
This commit fixes the problem by lowering cttz to:
a. ctpop((x & -x) - 1)
b. width - ctlz(x & -x) - 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242037
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Douglass [Mon, 13 Jul 2015 15:31:48 +0000 (15:31 +0000)]
[ARM] Handle commutativity when converting to tADDhirr in Thumb2
Also, run thumb_rewrite.s tests in Thumb2 now that they pass.
Differential Revision: http://reviews.llvm.org/D11132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242036
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Douglass [Mon, 13 Jul 2015 15:31:40 +0000 (15:31 +0000)]
[ARM] Add Thumb2 ADD with SP narrowing from 3 operand to 2
Differential Revision: http://reviews.llvm.org/D11131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242035
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Douglass [Mon, 13 Jul 2015 15:31:33 +0000 (15:31 +0000)]
[ARM] Small refactor of tryConvertingToTwoOperandForm (nfc)
Also, add more Thumb2 ADD tests requested during review of
http://reviews.llvm.org/D11053.
Differential Revision: http://reviews.llvm.org/D11130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242034
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 13 Jul 2015 14:48:24 +0000 (14:48 +0000)]
Cleanup after r241809 - remove uncessary call to std::sort
Summary:
The iteration order within a member of DepCands is deterministic
and therefore we don't have to sort the accesses within a member.
We also don't have to copy the indices of the pointers into a
vector, since we can iterate over the members of the class.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11145
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242033
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 14:43:33 +0000 (14:43 +0000)]
Remove unused variable.
Sorry I missed it in the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242032
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 14:39:02 +0000 (14:39 +0000)]
Aliases don't have available_externally linkage.
Allowing that is probably a good idea, but currently we don't, so
this is dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242031
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 14:18:22 +0000 (14:18 +0000)]
Don't change the visibility when converting a definition to a declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242030
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 13 Jul 2015 14:04:30 +0000 (14:04 +0000)]
Removing several -Wunused-but-set-variable warnings; NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242028
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 13 Jul 2015 13:55:18 +0000 (13:55 +0000)]
Print the visibility of available_externally functions.
We were already printing it for declarations, but not available_externally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242027
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 13 Jul 2015 13:50:55 +0000 (13:50 +0000)]
Revert r241981 "Revert "Revert r236894 "[BasicAA] Fix zext & sext handling"""
The repros from PR23626 still fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242025
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 13 Jul 2015 13:26:20 +0000 (13:26 +0000)]
AVX-512: Added all AVX-512 forms of Vector Convert for Float/Double/Int/Long types.
In this patch I have only encoding. Intrinsics and DAG lowering will be in the next patch.
I temporary removed the old intrinsics test (just to split this patch).
Half types are not covered here.
Differential Revision: http://reviews.llvm.org/D11134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242023
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Mon, 13 Jul 2015 11:25:56 +0000 (11:25 +0000)]
[llvm-stress] Remove unneeded llvm:: prefix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242020
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 13 Jul 2015 09:24:21 +0000 (09:24 +0000)]
[mips] Explained the 'w' modifier in the Inline Assembler documentation.
It exists for compatibility with GCC which requires it to print MSA registers
for the 'f' constraint. Although LLVM doesn't need it, the 'w' modifier should
still be used for portability between the two compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242015
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Mon, 13 Jul 2015 03:28:53 +0000 (03:28 +0000)]
[LSR] don't attempt to promote ephemeral values to indvars
Summary:
This at least saves compile time. I also encountered a case where
ephemeral values affect whether other variables are promoted, causing
performance issues. It may be a bug in LSR, but I didn't manage to
reduce it yet. Anyhow, I believe it's in general not worth considering
ephemeral values in LSR.
Reviewers: atrick, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242011
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 13 Jul 2015 01:15:53 +0000 (01:15 +0000)]
[InstSimplify] Teach InstSimplify how to simplify extractelement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242008
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 13 Jul 2015 01:15:46 +0000 (01:15 +0000)]
[InstSimplify] Teach InstSimplify how to simplify extractvalue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242007
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sun, 12 Jul 2015 20:40:41 +0000 (20:40 +0000)]
Fix PR24099 reported by Tomas Brukner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241997
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sun, 12 Jul 2015 18:16:40 +0000 (18:16 +0000)]
[ARM] Add support for nest attribute using r12
Register r12 ('ip') is used by GCC for this purpose
and hence is used here. As discussed on the GCC mailing
list, the register choice is an ABI issue and so
choosing the same register as GCC means
__builtin_call_with_static_chain is compatible.
A similar patch has just gone in the AArch64 backend,
so this is just the ARM counterpart, following the same
discussion.
Patch by Stephen Cross.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241996
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 12 Jul 2015 17:40:49 +0000 (17:40 +0000)]
[X86][SSE] Tidied up vector extend/truncation tests. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241995
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 12 Jul 2015 16:44:11 +0000 (16:44 +0000)]
[X86][SSE] (V)PMINSB is commutable.
(V)PMINSB is no different to the other (V)PMIN/(V)PMAX B/D/W instructions - it is fully commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241994
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 12 Jul 2015 11:17:33 +0000 (11:17 +0000)]
Trim trailing whitespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241990
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 12 Jul 2015 11:15:19 +0000 (11:15 +0000)]
[X86][SSE] Vectorized v4i32 non-uniform shifts.
While the v4i32 shl operation is already vectorized using a cvttps2dq/pmulld pattern, the lshr/ashr opeations are still scalarized.
This patch adds vectorization support for non-uniform v4i32 shift operations - it splats constant shift amounts to allow them to use the immediate sse shift instructions, or extracts/zero-extends non-constant shift amounts. The individual results are then blended together.
Differential Revision: http://reviews.llvm.org/D11063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241989
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 12 Jul 2015 03:53:05 +0000 (03:53 +0000)]
[LICM] Don't try to sink values out of loops without any exits
There is no suitable basic block to sink instructions in loops without
exits. The only way an instruction in a loop without exits can be used
is as an incoming value to a PHI. In such cases, the incoming block for
the corresponding value is unreachable.
This fixes PR24013.
Differential Revision: http://reviews.llvm.org/D10903
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241987
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 12 Jul 2015 02:33:57 +0000 (02:33 +0000)]
[PowerPC] Make use of the TargetRecip system
r238842 added the TargetRecip system for controlling use of reciprocal
estimates for sqrt and division using a set of parameters that can be set by
the frontend. Clang now supports a sophisticated -mrecip option, and this will
allow that option to effectively control the relevant code-generation
functionality of the PPC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241985
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 12 Jul 2015 00:37:44 +0000 (00:37 +0000)]
[PowerPC] Support the nest parameter attribute
This adds support for the 'nest' attribute, which allows the static chain
register to be set for functions calls under non-Darwin PPC/PPC64 targets. r11
is the chain register (which the PPC64 ELF ABI calls the "environment
pointer"). For indirect calls under PPC64 ELFv1, this would normally be loaded
from the function descriptor, but providing an explicit 'nest' parameter will
override that process and use the value provided.
This allows __builtin_call_with_static_chain to work as expected on PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241984
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 11 Jul 2015 13:42:48 +0000 (13:42 +0000)]
Revert "[ExecutionEngine] Use std::function rather than a function pointer for the LazyFunctionCreator."
This reverts commit r241962, as it was breaking all ARM buildbots.
It also reverts the two subsequent related commits:
r241974: "[ExecutionEngine] Add a static cast to the unittest for r241962 to suppress a warning."
r241973: "[ExecutionEngine] Remove cruft and fix a couple of warnings in the test case for r241962."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241983
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 11 Jul 2015 11:04:54 +0000 (11:04 +0000)]
Revert "Revert r236894 "[BasicAA] Fix zext & sext handling""
r236894 caused PR23626 (Clang miscompiles webkit's base64 decoder), and was
reverted in r237984. This reapplies the patch with an additional test case for
PR23626 and the associated fix (both scales and offsets in the
BasicAliasAnalysis::constantOffsetHeuristic should initially be zero).
Patch by Nick White, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241981
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 11 Jul 2015 10:52:42 +0000 (10:52 +0000)]
Move getStrideFromPointer and friends from LoopVectorize to VectorUtils
The following functions are moved from the LoopVectorizer to VectorUtils:
- getGEPInductionOperand
- stripGetElementPtr
- getUniqueCastUse
- getStrideFromPointer
These used to be static functions in LoopVectorize, but will also be used by
the upcoming loop versioning LICM transformation.
Patch by Ashutosh Nema!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241980
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Sat, 11 Jul 2015 10:30:36 +0000 (10:30 +0000)]
Add argmemonly attribute.
This change adds new attribute called "argmemonly". Function marked with this attribute can only access memory through it's argument pointers. This attribute directly corresponds to the "OnlyAccessesArgumentPointees" ModRef behaviour in alias analysis.
Differential Revision: http://reviews.llvm.org/D10398
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241979
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 11 Jul 2015 09:40:28 +0000 (09:40 +0000)]
Fix include guard typo introduced in r239315.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241978
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 11 Jul 2015 07:01:27 +0000 (07:01 +0000)]
Define a new intrinsic @llvm.canonicalize.
This is used the canonicalize floating point values, which is useful for
implementing certain numeric primitives. See the LangRef changes for
the full details of its semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241977
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 11 Jul 2015 04:39:00 +0000 (04:39 +0000)]
[PM/AA] Completely remove the AliasAnalysis::copyValue interface.
No in-tree alias analysis used this facility, and it was not called in
any particularly rigorous way, so it seems unlikely to be correct.
Note that one of the only stateful AA implementations in-tree,
GlobalsModRef is completely broken currently (and any AA passes like it
are equally broken) because Module AA passes are not effectively
invalidated when a function pass that fails to update the AA stack runs.
Ultimately, it doesn't seem like we know how we want to build stateful
AA, and until then trying to support and maintain correctness for an
untested API is essentially impossible. To that end, I'm planning to rip
out all of the update API. It can return if and when we need it and know
how to build it on top of the new pass manager and as part of *tested*
stateful AA implementations in the tree.
Differential Revision: http://reviews.llvm.org/D10889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241975
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 11 Jul 2015 02:07:28 +0000 (02:07 +0000)]
[ExecutionEngine] Add a static cast to the unittest for r241962 to suppress a
warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241974
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 11 Jul 2015 01:59:04 +0000 (01:59 +0000)]
[ExecutionEngine] Remove cruft and fix a couple of warnings in the test case for
r241962.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241973
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Sat, 11 Jul 2015 00:31:11 +0000 (00:31 +0000)]
Renamed some uses of unroll to interleave in the vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241971
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 23:55:34 +0000 (23:55 +0000)]
MC: Shrink MCDwarfLoc/MCLineEntry
Drop 8 bytes off of `MCDwarfLoc` by restricting the `Isa`, `Column`, and
`Flags` members to appropriate sizes (from `DWARFDebugLine::Row`).
Saves a little over 0.5% off the heap of llc with no real functionality
change.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241970
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 10 Jul 2015 23:31:08 +0000 (23:31 +0000)]
Clean up the comments in DIBuilder.h to adhere to the coding standards
a little more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241969
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 10 Jul 2015 23:31:05 +0000 (23:31 +0000)]
Revert "Clean up the comments in DIBuilder.h to adhere to the coding standards"
This reverts commit 241965. (I accidentally committed too much).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241968
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 10 Jul 2015 23:26:02 +0000 (23:26 +0000)]
Cleanup a couple of comments in DIBuilder.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241966
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 10 Jul 2015 23:25:54 +0000 (23:25 +0000)]
Clean up the comments in DIBuilder.h to adhere to the coding standards
a little more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241965
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 10 Jul 2015 22:56:47 +0000 (22:56 +0000)]
[ExecutionEngine] Use std::function rather than a function pointer for the
LazyFunctionCreator.
Patch by Pierre-Andre Saulais. Thanks Pierre!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241962
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 22:52:15 +0000 (22:52 +0000)]
MC: Only allow changing feature bits in MCSubtargetInfo
Disallow all mutation of `MCSubtargetInfo` expect the feature bits.
Besides deleting the assignment operators -- which were dead "code" --
this restricts `InitMCProcessorInfo()` to subclass initialization
sequences, and exposes a new more limited function called
`setDefaultFeatures()` for use by the ARMAsmParser `.cpu` directive.
There's a small functional change here: ARMAsmParser used to adjust
`MCSubtargetInfo::CPUSchedModel` as a side effect of calling
`InitMCProcessorInfo()`, but I've removed that suspicious behaviour.
Since the AsmParser shouldn't be doing any scheduling, there shouldn't
be any observable change...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241961
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 10 Jul 2015 22:51:36 +0000 (22:51 +0000)]
AMDGPU: Fix chains for memory ops dependent on argument loads
Most loads and stores are derived from pointers derived from
a kernel argument load inserted during argument lowering.
This was just using the EntryToken chain for the argument loads,
and any users of these loads were also on the EntryToken chain.
Return the chain of the lowered argument load so that dependent loads
end up on the correct chain.
No test since I'm not aware of any case where this actually
broke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241960
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Fri, 10 Jul 2015 22:51:20 +0000 (22:51 +0000)]
MIR Serialization: Serialize the virtual register operands.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D11005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241959
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 10 Jul 2015 22:46:02 +0000 (22:46 +0000)]
[IR] Switch static const to an enum to silence MSVC linker warnings
Integral class statics are handled oddly in MSVC, we don't need them
in this case, use an enum instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241958
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 22:43:42 +0000 (22:43 +0000)]
MC: Remove MCSubtargetInfo() default constructor
Force all creators of `MCSubtargetInfo` to immediately initialize it,
merging the default constructor and the initializer into an initializing
constructor. Besides cleaning up the code a little, this makes it clear
that the initializer is never called again later.
Out-of-tree backends need a trivial change: instead of calling:
auto *X = new MCSubtargetInfo();
InitXYZMCSubtargetInfo(X, ...);
return X;
they should call:
return createXYZMCSubtargetInfoImpl(...);
There's no real functionality change here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241957
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 22:33:01 +0000 (22:33 +0000)]
MC: Remove MCSubtargetInfo::InitCPUSched()
Remove all calls to `MCSubtargetInfo::InitCPUSched()` and merge its body
into the only relevant caller, `MCSubtargetInfo::InitMCProcessorInfo()`.
We were only calling the former after explicitly calling the latter with
the same CPU; it's confusing to have both methods exposed.
Besides a minor (surely unmeasurable) speedup in ARM and X86 from
avoiding running the logic twice, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241956
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Fri, 10 Jul 2015 22:30:17 +0000 (22:30 +0000)]
[InstCombine] Actually combine AA metadata when replacing one load with another
Fixes PR24083
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241955
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 10 Jul 2015 22:28:41 +0000 (22:28 +0000)]
AMDGPU: Use requested chain when lowering arguments
No test since I'm not aware of any case where this will
end up being a different chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241954
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Jul 2015 22:23:57 +0000 (22:23 +0000)]
ARM: Use SpecificBumpPtrAllocator to fix leak introduced in r241920
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241951
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 10 Jul 2015 22:21:54 +0000 (22:21 +0000)]
[SEH] Push reloads of the SEH code past phi nodes
This in turn would sometimes introduce new cleanupblocks that didn't
previously exist. The uses were being introduced by SSA value demotion.
We actually want to *promote* uses of EH pointers and selectors, so I
added some spcecial casing to avoid demoting such instructions. This is
getting overly complicated, but hopefully we'll come along and delete it
in the new representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241950
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 22:17:49 +0000 (22:17 +0000)]
Add <type_traits> for is_pod, fixing r241947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241949
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 10 Jul 2015 22:17:40 +0000 (22:17 +0000)]
DAGCombiner: Assume invariant load cannot alias a store
The motivation is to allow GatherAllAliases / FindBetterChain
to not give up on dependent loads of a pointer from constant memory.
This is important for AMDGPU, because most loads are pointers
derived from a load of a kernel argument from constant memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241948
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jul 2015 22:13:43 +0000 (22:13 +0000)]
MC: Remove the copy of MCSchedModel in MCSubtargetInfo
`MCSchedModel` is large. Make `MCSchedModel::GetDefaultSchedModel()`
return by-reference instead of by-value, so we can store a pointer in
`MCSubtargetInfo::CPUSchedModel` instead of a copy.
Note: since `MCSchedModel` is POD, this doesn't create a static
constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241947
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 10 Jul 2015 22:09:55 +0000 (22:09 +0000)]
[ShrinkWrap][PEI] Do not insert epilogue for unreachable blocks.
Although this is not incorrect to insert such code, it is useless
and it hurts the binary size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241946
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 10 Jul 2015 21:50:04 +0000 (21:50 +0000)]
[MC] Switch static const to an enum to silence MSVC linker warnings
Integral class statics are handled oddly in MSVC, we don't need them in
this case, use an enum instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241945
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 10 Jul 2015 21:24:07 +0000 (21:24 +0000)]
Fix AArch64 prologue for empty frame with dynamic allocas.
Fixes PR23804: assertion failure in emitPrologue in the case of a
function with an empty frame and a dynamic alloca that needs stack
realignment. This is a typical case for AddressSanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241943
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Fri, 10 Jul 2015 21:14:54 +0000 (21:14 +0000)]
[TTI] BasicTTIImpl assumes no vector registers
Summary:
Following the discussion on r241884, it's more reasonable to assume that a
target has no vector registers by default instead of letting every such
target overrides getNumberOfRegisters.
Therefore, this patch modifies BasicTTIImpl::getNumberOfRegisters to
return 0 when Vector is true, and partially reverts r241884 which
modifies NVPTXTTIImpl::getNumberOfRegisters.
It also fixes a performance bug in LoopVectorizer. Even if a target has
no vector registers, vectorization may still help ILP. So, we need both
checks to be false before disabling loop vectorization all together.
Reviewers: hfinkel
Subscribers: llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D11108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241942
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 10 Jul 2015 20:24:17 +0000 (20:24 +0000)]
Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components.
Summary:
This fixes `llvm-config` instead of fixing the makefiles because, AIUI, LLVM's autoconfig/make build system is on the way out anyway.
This change only affects builds that use autoconfig/make.
Reviewers: jfb
Subscribers: echristo, dschuff, llvm-commits
Differential Revision: http://reviews.llvm.org/D10716
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241938
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 10 Jul 2015 20:11:57 +0000 (20:11 +0000)]
[Object][ELF] Handle the dynamic string table in files without a section table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241937
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Fri, 10 Jul 2015 19:46:16 +0000 (19:46 +0000)]
Fix enum BitcodeError to not define a zero-valued error code.
Summary:
std::error_code assumes it isn't an error if the error code is zero.
Patch by Karl Schimpf
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10815
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241933
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 10 Jul 2015 18:55:13 +0000 (18:55 +0000)]
[LoopDist/LoopVer] Move LoopVersioning to a new module, NFC
Summary:
The class will obviously need improvement down the road. For one, there
is no reason that addPHINodes would have to be exposed like that. I
will make this and other improvements in follow-up patches.
The main goal is to be able to share this functionality. The
LoopLoadElimination pass I am working on needs it too. Later we can
move other clients as well (LV and Ashutosh's LICMVer).
Reviewers: hfinkel, ashutosh.nema
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241932
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 10 Jul 2015 18:55:09 +0000 (18:55 +0000)]
[LoopDist] Move loop-versioning helper functions to Cloning, NFC
Summary:
This makes them available to the LoopVersioning class as that is moved
to its own module in the next patch.
Reviewers: ashutosh.nema, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10576
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241931
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Jul 2015 18:37:33 +0000 (18:37 +0000)]
ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code
This commit factors out common code from MergeBaseUpdateLoadStore() and
MergeBaseUpdateLSMultiple() and introduces a new function
MergeBaseUpdateLSDouble() which merges adds/subs preceding/following a
strd/ldrd instruction into an strd/ldrd instruction with writeback where
possible.
Differential Revision: http://reviews.llvm.org/D10676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241928
91177308-0d34-0410-b5e6-
96231b3b80d8
Fiona Glaser [Fri, 10 Jul 2015 18:29:02 +0000 (18:29 +0000)]
ComputeKnownBits: be a bit smarter about ADDs
If our two inputs have known top-zero bit counts M and N, we trivially
know that the output cannot have any bits set in the top (min(M, N)-1)
bits, since nothing could carry past that point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241927
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Jul 2015 18:28:49 +0000 (18:28 +0000)]
ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2
Differential Revision: http://reviews.llvm.org/D10623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241926
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 10 Jul 2015 18:23:10 +0000 (18:23 +0000)]
WebAssembly: basic instructions todo, and basic register info.
Summary:
This code is based on AArch64 for modern backend good practice, and NVPTX for
virtual ISA concerns.
Reviewers: sunfish
Subscribers: aemerson, llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D11070
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241923
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Fri, 10 Jul 2015 18:13:57 +0000 (18:13 +0000)]
MIR Serialization: Initial serialization of stack objects.
This commit implements the initial serialization of stack objects from the
MachineFrameInfo class. It can only serialize the ordinary stack objects
(including ordinary spill slots), but it doesn't serialize variable sized or
fixed stack objects yet.
The stack objects are serialized using a YAML sequence of YAML inline mappings.
Each mapping has the object's ID, type, size, offset and alignment. The stack
objects are a part of machine function's YAML mapping.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241922
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 10 Jul 2015 18:13:17 +0000 (18:13 +0000)]
Target RegisterInfo: devirtualize TargetFrameLowering
Summary:
The target frame lowering's concrete type is always known in RegisterInfo, yet it's only sometimes devirtualized through a static_cast. This change adds an auto-generated static function <Target>GenRegisterInfo::getFrameLowering(const MachineFunction &MF) which does this devirtualization, and uses this function in all targets which can.
This change was suggested by sunfish in D11070 for WebAssembly, I figure that I may as well improve the other targets while I'm here.
Subscribers: sunfish, ted, llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D11093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241921
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Jul 2015 18:08:49 +0000 (18:08 +0000)]
ARMLoadStoreOptimizer: Rewrite LDM/STM matching logic.
This improves the logic in several ways and is a preparation for
followup patches:
- First perform an analysis and create a list of merge candidates, then
transform. This simplifies the code in that you have don't have to
care to much anymore that you may be holding iterators to
MachineInstrs that get removed.
- Analyze/Transform basic blocks in reverse order. This allows to use
LivePhysRegs to find free registers instead of the RegisterScavenger.
The RegisterScavenger will become less precise in the future as it
relies on the deprecated kill-flags.
- Return the newly created node in MergeOps so there's no need to look
around in the schedule to find it.
- Rename some MBBI iterators to InsertBefore to make their role clear.
- General code cleanup.
Differential Revision: http://reviews.llvm.org/D10140
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241920
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 10 Jul 2015 15:40:33 +0000 (15:40 +0000)]
Actually support volatile memcpys in NVPTX lowering
Differential Revision: http://reviews.llvm.org/D11091
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241914
91177308-0d34-0410-b5e6-
96231b3b80d8