Chad Rosier [Wed, 5 Aug 2015 14:48:44 +0000 (14:48 +0000)]
Make this less error prone by using a #define. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Aug 2015 14:22:53 +0000 (14:22 +0000)]
[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244046
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 5 Aug 2015 14:16:44 +0000 (14:16 +0000)]
[AA] Use CallSite cast idiom. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244045
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 5 Aug 2015 14:16:38 +0000 (14:16 +0000)]
[YAMLTraits] Use StringRef::copy. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244044
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 5 Aug 2015 14:16:28 +0000 (14:16 +0000)]
[IR] Simplify code with ArrayRef::copy. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Aug 2015 13:44:51 +0000 (13:44 +0000)]
[AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
This is the AArch64 version of r243052.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Aug 2015 12:40:13 +0000 (12:40 +0000)]
Update comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244038
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 5 Aug 2015 11:53:59 +0000 (11:53 +0000)]
Drop unnecessary static_cast.
ELFT::TargetEndianness already has the correct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244032
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Wed, 5 Aug 2015 11:02:14 +0000 (11:02 +0000)]
ARMISelDAGToDAG.cpp had this self-contradictory code:
return StringSwitch<int>(Flags)
.Case("g", 0x1)
.Case("nzcvq", 0x2)
.Case("nzcvqg", 0x3)
.Default(-1);
...
// The _g and _nzcvqg versions are only valid if the DSP extension is
// available.
if (!Subtarget->hasThumb2DSP() && (Mask & 0x2))
return -1;
ARMARM confirms that the comment is right, and the code was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244029
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 5 Aug 2015 09:39:41 +0000 (09:39 +0000)]
[ArrayRefTest] Work around a GCC 4.8 internal compiler error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244023
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Aug 2015 08:21:38 +0000 (08:21 +0000)]
[InstCombine] Added more specific SSE2/AVX2 vector shift tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244022
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Aug 2015 08:18:00 +0000 (08:18 +0000)]
Fixed line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244021
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 5 Aug 2015 07:45:28 +0000 (07:45 +0000)]
[MachineCombiner] Don't use the opcode-only form of computeInstrLatency
In r242277, I updated the MachineCombiner to work with itineraries, but I
missed a call that is scheduling-model-only (the opcode-only form of
computeInstrLatency). Using the form that takes an MI* allows this to work with
itineraries (and should be NFC for subtargets with scheduling models).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244020
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 5 Aug 2015 07:18:31 +0000 (07:18 +0000)]
[llvm-objdump] Call exit(1) on error, i.e. fail early.
Previously we kept going on partly corrupted input, which might result
in garbage being printed, or even worse, random crashes.
Rafael mentioned that this is the GNU behavior as well, but after some
discussion we both agreed it's probably better to emit a reasonable
error message and exit. As a side-effect of this commit, now we don't
rely on global state for error codes anymore. objdump was the last tool
in the toolchain which needed to be converted. Hopefully the old behavior
won't sneak into the tree again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244019
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:23 +0000 (06:11 +0000)]
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
For example of mingw-w64-g++-4.8.1,
llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()':
llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523
} Array3Src[] = {{"hello"}, {"world"}};
^
Please submit a full bug report,
with preprocessed source if appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244017
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:08 +0000 (06:11 +0000)]
Windows/COM.inc: Fix emacs mode in the first line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244016
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Aug 2015 05:32:22 +0000 (05:32 +0000)]
Temporarily revert r244012 while we see if it's really necessary.
Add a comment explaining the current theory as to why we'd need
the -lole32 on the link line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244015
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Aug 2015 04:50:46 +0000 (04:50 +0000)]
Remove autoconf checks for sigsetjmp and siglongjmp as they appear to
be unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244014
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Aug 2015 04:50:43 +0000 (04:50 +0000)]
Remove the apparently unused rand48 configure checks and associated m4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244013
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Aug 2015 04:50:40 +0000 (04:50 +0000)]
Remove obsolete configure check for libole32 as we don't appear to use
it anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244012
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Aug 2015 04:50:37 +0000 (04:50 +0000)]
Remove the unused header check for utime.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244011
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 5 Aug 2015 03:51:17 +0000 (03:51 +0000)]
Rename all references to old mailing lists to new lists.llvm.org address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243999
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 4 Aug 2015 15:57:04 +0000 (15:57 +0000)]
Avoid passing nullptr to std::equal.
As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts
on this in Debug mode. This happens when building clang with Visual C++ and
-triple i686-pc-windows-gnu on these clang regression tests:
clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c
clang/test/CodeGen/empty-union-init.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243996
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 4 Aug 2015 15:52:56 +0000 (15:52 +0000)]
[ArrayRef] Make copy use std::uninitialized_copy.
std::copy does not work for non-trivially copyable classes when we're
copying into uninitialized memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243995
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 4 Aug 2015 15:49:57 +0000 (15:49 +0000)]
wrap OptSize and MinSize attributes for easier and consistent access (NFCI)
Create wrapper methods in the Function class for the OptimizeForSize and MinSize
attributes. We want to hide the logic of "or'ing" them together when optimizing
just for size (-Os).
Currently, we are not consistent about this and rely on a front-end to always set
OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here
that should be added as follow-on patches with regression tests.
This patch is NFC-intended: it just replaces existing direct accesses of the attributes
by the equivalent wrapper call.
Differential Revision: http://reviews.llvm.org/D11734
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243994
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 4 Aug 2015 15:29:00 +0000 (15:29 +0000)]
[RuntimeDyld] Adapt PPC64 relocations to PPC32
Begin adapting some of the implemented PPC64 relocations for PPC32 (with a
test case).
Patch by Pierre-Andre Saulais!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243991
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 4 Aug 2015 15:21:56 +0000 (15:21 +0000)]
[x86] machine combiner reassociation: mark EFLAGS operand as 'dead'
In the commentary for D11660, I wasn't sure if it was alright to create new
integer machine instructions without also creating the implicit EFLAGS operand.
From what I can see, the implicit operand is always created by the MachineInstrBuilder
based on the instruction type, so we don't have to do that explicitly. However, in
reviewing the debug output, I noticed that the operand was not marked as 'dead'.
The machine combiner should do that to preserve future optimization opportunities
that may be checking for that dead EFLAGS operand themselves.
Differential Revision: http://reviews.llvm.org/D11696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243990
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 4 Aug 2015 14:35:50 +0000 (14:35 +0000)]
[mips][FastISel] Disable code generation for unsupported targets through FastISel.
Summary:
Previously, we would check whether the target is supported or not, only in
fastSelectInstruction(). This means that 64-bit targets could use FastISel too.
We fix this by checking every overridden method of the FastISel class and
by falling back to SelectionDAG if the target isn't supported. This change
should have been committed along with r243638, but somehow I missed it.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11755
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243986
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 4 Aug 2015 14:26:35 +0000 (14:26 +0000)]
Revert r229675 - [mips] Avoid redundant sign extension of the result of binary bitwise instructions.
It introduced two regressions on 64-bit big-endian targets running under N32
(MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4, and
MultiSource/Applications/kimwitu++/kc) The issue is that on 64-bit targets
comparisons such as BEQ compare the whole GPR64 but incorrectly tell the
instruction selector that they operate on GPR32's. This leads to the
elimination of i32->i64 extensions that are actually required by
comparisons to work correctly.
There's currently a patch under review that fixes this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243984
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 4 Aug 2015 13:24:26 +0000 (13:24 +0000)]
Fix 80-column
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243977
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 4 Aug 2015 13:23:30 +0000 (13:23 +0000)]
Linker: Fix ASan failure from r243961
r243883 and r243961 made a use-after-free far more likely:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/6041/steps/check-llvm%20asan/logs/stdio
Unresolved nodes get inserted into the `Cycles` array. If they later
get resolved through RAUW, we need to update the reference. It's
interesting that this never hit before (maybe an asan-ified clang
bootstrap with `-flto -g` would have hit it, but I admit I haven't tried
anything quite that crazy).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243976
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Aug 2015 08:21:40 +0000 (08:21 +0000)]
Drive-by fixes for LandingPad -> EHPad
This change was done as an audit and is by inspection. The new EH
system is still very much a work in progress. NFC for the landingpad
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243965
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 4 Aug 2015 08:05:27 +0000 (08:05 +0000)]
[InstCombine] Split off SSE2/AVX2 vector shift tests.
These aren't vector demanded bits tests. More tests to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243963
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 4 Aug 2015 07:49:58 +0000 (07:49 +0000)]
[InstCombine] Moved SSE vector shift constant folding into its own helper function. NFCI.
This will make some upcoming bugfixes + improvements easier to manage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243962
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 4 Aug 2015 06:42:31 +0000 (06:42 +0000)]
Linker: Fix references to uniqued nodes after r243883
r243883 started moving 'distinct' nodes instead of duplicated them in
lib/Linker. This had the side-effect of sometimes not cloning uniqued
nodes that reference them. I missed a corner case:
!named = !{!0}
!0 = !{!1}
!1 = distinct !{!0}
!0 is the entry point for "remapping", and a temporary clone (say,
!0-temp) is created and mapped in case we need to model a uniquing
cycle.
Recursive descent into !1. !1 is distinct, so we leave it alone,
but update its operand to !0-temp.
Pop back out to !0. Its only operand, !1, hasn't changed, so we don't
need to use !0-temp. !0-temp goes out of scope, and we're finished
remapping, but we're left with:
!named = !{!0}
!0 = !{!1}
!1 = distinct !{null} ; uh oh...
Previously, if !0 and !0-temp ended up with identical operands, then
!0-temp couldn't have been referenced at all. Now that distinct nodes
don't get duplicated, that assumption is invalid. We need to
!0-temp->replaceAllUsesWith(!0) before freeing !0-temp.
I found this while running an internal `-flto -g` bootstrap. Strangely,
there was no case of this in the open source bootstrap I'd done before
commit...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243961
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Aug 2015 06:32:54 +0000 (06:32 +0000)]
Update test suite to make "ninja check" succeed without native backend builtin
Requires "native" feature in most places that were failing.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243960
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Aug 2015 06:32:45 +0000 (06:32 +0000)]
Move generic MIR tests in their own subdir, requires "native" as well
These tests rely on the native backend to be built-in.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243959
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Aug 2015 06:32:31 +0000 (06:32 +0000)]
Improve lit "native" feature to check if the native backend is builtin
The goal is to have 'ninja check' passing even if the X86 backend is
not built.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243958
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 4 Aug 2015 06:29:58 +0000 (06:29 +0000)]
Remove the configure and cmake checks for sys/wait.h
If we don't have sys/wait.h and we're on a unix system there's no way
that several of the llvm tools work at all. This includes clang.
Just remove the configure and cmake checks entirely - we'll get a
build error instead of building something broken now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243957
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 4 Aug 2015 06:29:12 +0000 (06:29 +0000)]
[SDAG] Fix a result chain in ExpandUnalignedLoad
On the code path in ExpandUnalignedLoad which expands an unaligned vector/fp
value in terms of a legal integer load of the same size, the ChainResult needs
to be the chain result of the integer load.
No in-tree test case is currently available.
Patch by Jan Hranac!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243956
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 4 Aug 2015 05:16:20 +0000 (05:16 +0000)]
[LAA] Remove unused pointer partition argument from addRuntimeCheck, NFC
This variant of addRuntimeCheck is only used now from the LoopVectorizer
which does not use this parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243955
91177308-0d34-0410-b5e6-
96231b3b80d8
Chen Li [Tue, 4 Aug 2015 04:41:34 +0000 (04:41 +0000)]
Introduce enum value for previously defined metadata -- make.implicit
Summary: This patch adds enum value for an existing metadata type -- make.implicit. Using preassigned enum will be helpful to get compile time type checking and avoid string construction and comparison. The patch also changes uses of make.implicit from string metadata to enum metadata. There is no functionality change.
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243954
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 4 Aug 2015 03:57:56 +0000 (03:57 +0000)]
ARM: support windows division routines
This adds the software division routines for the Windows RTABI. These are not
expected to be used often though as most modern Windows ARM capable targets
support hardware division. In the case that the target CPU doesnt support
hardware division, this will be the fallback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243952
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 4 Aug 2015 03:57:52 +0000 (03:57 +0000)]
ARM: make Darwin libcall registration table driven (NFC)
Make the libcall updating table driven similar to the approach that the Linux
and Windows codepath does below. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243951
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Aug 2015 03:48:26 +0000 (03:48 +0000)]
[UB] Don't allocate space for contained types and then try to copy the
contained types into the space when we have no contained types. This
fixes the UB stemming from a call to memcpy with a null pointer. This
also reduces the calls to allocate because this actually happens in
a notable client - Clang.
Found by UBSan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243944
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 4 Aug 2015 03:12:33 +0000 (03:12 +0000)]
[GettingStarted.rst] Commit the right patch.
Looks like the rebased version that Mehdi committed didn't incorporate
the latest changes.
Patch by Erik de Castro Lopo <erikd@mega-nerd.com>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243942
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 4 Aug 2015 01:52:05 +0000 (01:52 +0000)]
Revert "[LSR] Generate and use zero extends"
This reverts commit r243348 and r243357. They caused PR24347.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243939
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 01:38:08 +0000 (01:38 +0000)]
[AArch64] Rename FP formats to be more consistent. NFC.
Some are named "FP", others "SD", others still "FP*SD".
Rename all this to just use "FP", which, except for conversions
(which don't use this format naming scheme), implies "SD" anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243936
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 01:29:38 +0000 (01:29 +0000)]
[AArch64] Add isel support for f16 indexed LD/ST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243935
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Aug 2015 01:00:56 +0000 (01:00 +0000)]
[UB] Fix yet another use of memcpy with a null pointer argument. I think
this is the last of them in my build of LLVM. Haven't tried Clang yet.
Found via UBSan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243934
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 00:55:11 +0000 (00:55 +0000)]
[AArch64][v8.1a] The "pan" sysreg isn't MSR-specific. NFCI.
It's already in SysRegMappings, no need to also have it in MSRMappings:
the latter is only used if we didn't find a match in the former.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243933
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Aug 2015 00:53:01 +0000 (00:53 +0000)]
[UB] Fix another place where we would pass a null pointer to memcpy.
This too was found by UBSan. Down to 35 failures for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243932
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 00:49:08 +0000 (00:49 +0000)]
[AArch64] Remove unnecessary "break". NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243931
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 00:48:02 +0000 (00:48 +0000)]
[AArch64] Use SDValue bool operator. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243930
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 4 Aug 2015 00:47:58 +0000 (00:47 +0000)]
Add a -revert option to utils/release/merge.sh
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243929
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Aug 2015 00:44:07 +0000 (00:44 +0000)]
[UB] Fix a nasty place where we would pass null pointers to memcpy.
This happens to work, but is not guaranteed to work. Indeed, most memcpy
interfaces in Linux-land annotate these arguments as nonnull, and GCC
and LLVM both can and do optimized based upon that. When they do so,
they might legitimately have miscompiled code calling this routine with
two valid iterators, 'nullptr' and 'nullptr'. There was even code doing
precisely this because StringRef().begin() and StringRef().end() both
produce null pointers.
This was found by UBSan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243927
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 00:42:34 +0000 (00:42 +0000)]
[AArch64] Vector FCOPYSIGN supports Custom-lowering: mark it as such.
There's a bunch of code in LowerFCOPYSIGN that does smart lowering, and
is actually already vector-aware; let's use it instead of scalarizing!
The only interesting change is that for v2f32, we previously always used
use v4i32 as the integer vector type.
Use v2i32 instead, and mark FCOPYSIGN as Custom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243926
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 4 Aug 2015 00:32:55 +0000 (00:32 +0000)]
[CodeGen] Fix FCOPYSIGN legalization to account for mismatched types.
We used to legalize it like it's any other binary operations. It's not,
because it accepts mismatched operand types. Because of that, we used
to hit various asserts and miscompiles.
Specialize vector legalizations to, in the worst case, unroll, or, when
possible, to just legalize the operand that needs legalization.
Scalarization isn't covered, because I can't think of a target where
some but not all of the 1-element vector types are to be scalarized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243924
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 4 Aug 2015 00:24:45 +0000 (00:24 +0000)]
MIR Serialization: Serialize the 'volatile' machine memory operand flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243923
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 3 Aug 2015 23:33:03 +0000 (23:33 +0000)]
[LAA] Remove unused needsAnyChecking(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243921
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 3 Aug 2015 23:32:57 +0000 (23:32 +0000)]
[LoopVer] Remove unused needsRuntimeChecks(), NFC
The previous commits moved this functionality into the client.
Also remove the now unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243920
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 3 Aug 2015 23:25:46 +0000 (23:25 +0000)]
Docs: s/Sanitiser/Sanitizer/ for consistency
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243918
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 3 Aug 2015 23:17:47 +0000 (23:17 +0000)]
GettingStarted.rst: Add info about building sanitizers
From: Erik de Castro Lopo <erikd@qti.qualcomm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243917
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 3 Aug 2015 23:17:44 +0000 (23:17 +0000)]
docs/GettingStarted.rst: Whitespace only
From: Erik de Castro Lopo <erikd@qti.qualcomm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243916
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 3 Aug 2015 23:08:19 +0000 (23:08 +0000)]
MIR Serialization: Initial serialization of the machine memory operands.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243915
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 3 Aug 2015 22:43:14 +0000 (22:43 +0000)]
lto: Avoid relying on the environment for this test
It's better to pass libLTO to ld64 via the command line flag than rely
on setting DYLD_LIBRARY_PATH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243911
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 22:33:50 +0000 (22:33 +0000)]
Update/correct comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243910
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 22:30:24 +0000 (22:30 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
Various value handles needed to be copy constructible and copy
assignable (mostly for their use in DenseMap). But to avoid an API that
might allow accidental slicing, make these members protected in the base
class and make derived classes final (the special members become
implicitly public there - but disallowing further derived classes that
might be sliced to the intermediate type).
Might be worth having a warning a bit like -Wnon-virtual-dtor that
catches public move/copy assign/ctors in classes with virtual functions.
(suppressable in the same way - by making them protected in the base,
and making the derived classes final) Could be fancier and only diagnose
them when they're actually called, potentially.
Also allow a few default implementations where custom implementations
(especially with non-standard return types) were implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243909
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 3 Aug 2015 22:19:08 +0000 (22:19 +0000)]
ARM: remove horrible printf left over from debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243907
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 3 Aug 2015 21:46:32 +0000 (21:46 +0000)]
[llvm-objdump] Range-loopify. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243905
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Mon, 3 Aug 2015 21:23:51 +0000 (21:23 +0000)]
Fix memory leak in unit test of Bitcode/BitReaderTest.cpp
Fixes obvious memory leak in test
TestForEofAfterReadFailureOnDataStreamer. Also removes constexpr use
from same test.
Patch by Karl Schimpf.
Differential Revision: http://reviews.llvm.org/D11735
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243904
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 20:55:00 +0000 (20:55 +0000)]
Fix with a bit more care. (but only a bit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243903
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 3 Aug 2015 20:32:27 +0000 (20:32 +0000)]
[Unroll] Improve the brute force loop unroll estimate by propagating
through PHI nodes across iterations.
This patch teaches the new advanced loop unrolling heuristics to propagate
constants into the loop from the preheader and around the backedge after
simulating each iteration. This lets us brute force solve simple recurrances
that aren't modeled effectively by SCEV. It also makes it more clear why we
need to process the loop in-order rather than bottom-up which might otherwise
make much more sense (for example, for DCE).
This came out of an attempt I'm making to develop a principled way to account
for dead code in the unroll estimation. When I implemented
a forward-propagating version of that it produced incorrect results due to
failing to propagate *cost* between loop iterations through the PHI nodes, and
it occured to me we really should at least propagate simplifications across
those edges, and it is quite easy thanks to the loop being in canonical and
LCSSA form.
Differential Revision: http://reviews.llvm.org/D11706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243900
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 20:30:53 +0000 (20:30 +0000)]
Try to fix the build for C++ standard libraries missing std::map::emplace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243899
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 3 Aug 2015 20:19:35 +0000 (20:19 +0000)]
[Release Script] Check for correct symlink name
While checking for the existence of the clang-tools-extra directory,
the script was not checking for its destination name, "extra", and
the script was failing when re-running without checking out new
sources.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243898
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 20:12:58 +0000 (20:12 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
Some functions return concrete ByteStreamers by value - explicitly
support that in the base class. (dtor can be virtual, no one seems to be
polymorphically owning/destroying them)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243897
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Aug 2015 20:08:41 +0000 (20:08 +0000)]
Recommit r243824: -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
This reverts commit r243888, recommitting r243824.
This broke the Windows build due to a difference in the C++ standard
library implementation. Using emplace/forward_as_tuple should ensure
there's no need to copy ValIDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243896
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 3 Aug 2015 19:04:32 +0000 (19:04 +0000)]
Convert some AArch64 code to foreach loops. NFC.
Also converted a cast<> to dyn_cast while i was working on the same
line of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243894
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 3 Aug 2015 18:03:40 +0000 (18:03 +0000)]
[MCJIT] Fix a cast warning in the unit-test introduced in r243589.
Thanks to Aaron Ballman for spotting this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243891
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Mon, 3 Aug 2015 18:01:50 +0000 (18:01 +0000)]
Fix testing for end of stream in bitstream reader.
This fixes a bug found while working on the bitcode reader. In
particular, the method BitstreamReader::AtEndOfStream doesn't always
behave correctly when processing a data streamer. The method
fillCurWord doesn't properly set CurWord/BitsInCurWord if the data
streamer was already at eof, but GetBytes had not yet set the
ObjectSize field of the streaming memory object.
This patch fixes this problem, and provides a test to show that
this problem has been fixed.
Patch by Karl Schimpf.
Differential Revision: http://reviews.llvm.org/D11391
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243890
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Aug 2015 17:36:22 +0000 (17:36 +0000)]
Revert "-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11"
This reverts commit r243824.
It broke the build on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243888
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Aug 2015 17:26:41 +0000 (17:26 +0000)]
DI: Disallow uniquable DICompileUnits
Since r241097, `DIBuilder` has only created distinct `DICompileUnit`s.
The backend is liable to start relying on that (if it hasn't already),
so make uniquable `DICompileUnit`s illegal and automatically upgrade old
bitcode. This is a nice cleanup, since we can remove an unnecessary
`DenseSet` (and the associated uniquing info) from `LLVMContextImpl`.
Almost all the testcases were updated with this script:
git grep -e '= !DICompileUnit' -l -- test |
grep -v test/Bitcode |
xargs sed -i '' -e 's,= !DICompileUnit,= distinct !DICompileUnit,'
I imagine something similar should work for out-of-tree testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243885
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 3 Aug 2015 17:20:10 +0000 (17:20 +0000)]
ARM: prefer allocating VFP regs at stride 4 on Darwin.
This is necessary for WatchOS support, where the compact unwind format assumes
this kind of layout. For now we only want this on Swift-like CPUs though, where
it's been the Xcode behaviour for ages. Also, since it can expand the prologue
we don't want it at -Oz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243884
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Aug 2015 17:09:38 +0000 (17:09 +0000)]
Linker: Move distinct MDNodes instead of cloning
Instead of cloning distinct `MDNode`s when linking in a module, just
move them over. The module linker destroys the source module, so the
old node would otherwise just be leaked on the context. Create the new
node in place. This also reduces the number of cloned uniqued nodes
(since it's less likely their operands have changed).
This mapping strategy is only correct when we're discarding the source,
so the linker turns it on via a ValueMapper flag, `RF_MoveDistinctMDs`.
There's nothing observable in terms of `llvm-link` output here: the
linked module should be semantically identical.
I'll be adding more 'distinct' nodes to the debug info metadata graph in
order to break uniquing cycles, so the benefits of this will partly come
in future commits. However, we should get some gains immediately, since
we have a fair number of 'distinct' `DILocation`s being linked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243883
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 3 Aug 2015 16:37:12 +0000 (16:37 +0000)]
Allow derived DOTViewers to choose the functions to illustrate
Instead of always showing/printing all functions, a class derived from
the DOTViewer class can overwrite the set of functions that will be
processed.
This will be used (and tested) by Polly's scop viewers, but other users
can be imagined as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243881
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Mon, 3 Aug 2015 15:29:47 +0000 (15:29 +0000)]
Refactor AtomicExpand::expandAtomicRMWToCmpXchg into a standalone function.
Summary:
This is useful for PNaCl's `RewriteAtomics` pass. NaCl intrinsics don't exist for some of the more exotic RMW instructions, so by refactoring this function into its own, `RewriteAtomics` can share code rewriting those atomics with `AtomicExpand` while additionally saving a few cycles by generating the `cmpxchg` NaCl-specific intrinsic with the callback. Without this patch, `RewriteAtomics` would require two extra passes over functions, by first requiring use of the full `AtomicExpand` pass to just expand the leftover exotic RMWs and then running itself again to expand resulting `cmpxchg`s.
NFC
Reviewers: jfb
Subscribers: jfb, llvm-commits
Differential Revision: http://reviews.llvm.org/D11422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243880
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 3 Aug 2015 14:31:49 +0000 (14:31 +0000)]
Currently string attributes on function arguments/return values can be generated using LLVM API. However they are not supported in parser. So, the following scenario will fail:
* generate function with string attribute using API,
* dump it in LL format,
* try to parse.
Add parser support for string attributes to fix the issue.
Reviewed By: reames, hfinkel
Differential Revision: http://reviews.llvm.org/D11058
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243877
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 3 Aug 2015 14:00:58 +0000 (14:00 +0000)]
[TTI] Fix default costs for interleaved accesses
Summary:
Modify the cost calculation function for interleaved accesses
to use the target-specific costs for insert/extract element and
memory operations.
This better models the case where the backend can't match
the interleaved group, and we are forced to use a wide load
and shuffle vectors.
Interleaved accesses are not enabled by default, so this shouldn't
cause a performance change.
Reviewers: jmolloy
Subscribers: jmolloy, llvm-commits
Differential Revision: http://reviews.llvm.org/D11718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243875
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Mon, 3 Aug 2015 12:13:33 +0000 (12:13 +0000)]
[ARM] Make GlobalMerge merge extern globals by default
Enabling merging of extern globals appears to be generally either beneficial or
harmless. On some benchmarks suites (on Cortex-M4F, Cortex-A9, and Cortex-A57)
it gives improvements in the 1-5% range, but in the rest the overall effect is
zero.
Differential Revision: http://reviews.llvm.org/D10966
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243874
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Mon, 3 Aug 2015 12:08:41 +0000 (12:08 +0000)]
[GlobalMerge] Allow targets to enable merging of extern variables, NFC.
Adjust the GlobalMergeOnExternal option so that the default behaviour is to
do whatever the Target thinks is best. Explicitly enabled or disabling the
option will override this default.
Differential Revision: http://reviews.llvm.org/D10965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243873
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 3 Aug 2015 11:59:45 +0000 (11:59 +0000)]
Don't use test inputs from other directories.
The test/DebugInfo/dwarfdump-macho-universal.test test added in r243862 uses
an input from another test's directory (test/tools/dsymutil/Inputs/fat-test.o)
which breaks our test setup.
Copying the required test input to the test's Input directory to fix the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243872
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 3 Aug 2015 09:24:48 +0000 (09:24 +0000)]
Be less conservative about forming IT blocks.
In http://reviews.llvm.org/rL215382, IT forming was made more conservative under
the belief that a flag-setting instruction was unpredictable inside an IT block on ARMv6M.
But actually, ARMv6M doesn't even support IT blocks so that's impossible. In the ARMARM for
v7M, v7AR and v8AR it states that the semantics of such an instruction changes inside an
IT block - it doesn't set the flags. So actually it is fine to use one inside an IT block
as long as the flags register is dead afterwards.
This gives significant performance improvements in a variety of MPEG based workloads.
Differential revision: http://reviews.llvm.org/D11680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243869
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 3 Aug 2015 09:13:19 +0000 (09:13 +0000)]
Fix the test added at r243777.
When RUN: lines are split into multiple lines, each one must be prefixed with
RUN:.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243868
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Aug 2015 03:45:32 +0000 (03:45 +0000)]
ValueMapper: Only check for cycles if operands change
This is a minor optimization to only check for unresolved operands
inside `mapDistinctNode()` if the operands have actually changed. This
shouldn't really cause any change in behaviour. I didn't actually see a
slowdown in a profile, I was just poking around nearby and saw the
opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243866
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Aug 2015 03:27:12 +0000 (03:27 +0000)]
ValueMapper: Use a range-based for, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243865
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Aug 2015 03:24:28 +0000 (03:24 +0000)]
ValueMapper: Reuse local variable, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243864
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Mon, 3 Aug 2015 00:10:33 +0000 (00:10 +0000)]
Use early return NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243863
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Mon, 3 Aug 2015 00:10:31 +0000 (00:10 +0000)]
[dwarfdump] Add support for dumping mach-o universal objectfiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243862
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Mon, 3 Aug 2015 00:10:25 +0000 (00:10 +0000)]
[dwarfdump] Move dumping to a helper function NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243861
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Mon, 3 Aug 2015 00:00:11 +0000 (00:00 +0000)]
WebAssembly: implement getScalarShiftAmountTy so we can shift by amount, with type
Summary: This currently sets the shift amount RHS to the same type as the LHS, and assumes that the LHS is a simple type. This isn't currently the case e.g. with weird integers sizes, but will eventually be true and will assert if not. That's what you get for having an experimental backend: break it and you get to keep both pieces. Most backends either set the RHS to MVT::i32 or MVT::i64, but WebAssembly is a virtual ISA and tries to have regular-looking binary operations where both operands are the same type (even if a 64-bit RHS shifter is slightly silly, hey it's free!).
Subscribers: llvm-commits, sunfish, jfb
Differential Revision: http://reviews.llvm.org/D11715
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243860
91177308-0d34-0410-b5e6-
96231b3b80d8