Commit Graph

126317 Commits

Author SHA1 Message Date
Sanjay Patel
961c852618 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:08:10 +00:00
Weiming Zhao
8f43bb43cc Fix AArch64ConditionOptimizer
Summary:
This pass may modify the Cmp operands. However, the flag reg may be used by both the branch and CSEL.
Modifying CMP will have side effect on CSEL.

Reviewers: t.p.northover

Subscribers: llvm-commits, aemerson, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:06:58 +00:00
Philip Reames
112e094b77 [docs] Update Statepoint docs to clarify format for recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:58:18 +00:00
David Blaikie
1215450590 Orc: Simplify some things with NSDMIs and some braced init.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:33:43 +00:00
Sanjay Patel
c66c94a7f2 remove duplicate documentation comments (already in the header file) ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:23:04 +00:00
Easwaran Raman
ec8106478b Refactor threshold computation for inline cost analysis
Differential Revision: http://reviews.llvm.org/D15401



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257832 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:16:29 +00:00
Chris Bieneman
92f6aec271 [CMake] Add support for populating LLVM_REPOSITORY from CMake.
Autoconf does this in the GetRepositoryPath script, CMake's VersionFromVCS does grab the SVN_REVISION, but doesn't populate the repository URL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:44:29 +00:00
Keno Fischer
508bcbefca [Verifier] Check parentage of GVs in dbg metadata
Summary:
Before this the Verifier didn't complain if the GlobalVariable
referenced from a DIGlobalVariable was not in fact in the correct
module (it would crash while writing bitcode though). Fix this by
always checking parantage of GlobalValues while walking constant
expressions and changing the DIGlobalVariable visitor to also
visit the constant it contains.

Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D16059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:42:02 +00:00
Mike Aizatsky
a8f3371a07 [sancov] html report
Differential Revision: http://reviews.llvm.org/D16161

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257824 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:34:11 +00:00
Keno Fischer
14d9bbfba1 [Verifier] Verify that a GlobalValue is only used in this Module
Summary:
We already have the inverse verification that we only use globals
that are defined in this module. This essentially catches the
same mistake, but when verifying the module that contains the
definition.

Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D15272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:20:56 +00:00
Xinliang David Li
fc8577b821 [PGO] Move profile summary interface/impl into InstrProf.[*] /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257819 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:10:49 +00:00
Lang Hames
f881fc9fb9 [Orc] Add support for EH-frame registration to the Orc Remote Target utility
classes.

OrcRemoteTargetClient::RCMemoryManager will now register EH frames with the
server automatically. This allows remote-execution of code that uses exceptions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:02:03 +00:00
Krzysztof Parzyszek
002f6273d6 [Hexagon] Use S2_lsr_i_r instead of S2_extractu to obtain upper halfword
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:59:22 +00:00
Reid Kleckner
f94debb504 [codeview] Dump function callees and add more labels to inlinee info
I kept forgetting which number is the line delta and which is the code
delta.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:50:05 +00:00
Krzysztof Parzyszek
3461e21098 [Hexagon] Handle HVX registers in bit simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:45:43 +00:00
Krzysztof Parzyszek
d3b460f139 [Packetizer] Code cleanup, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:17:04 +00:00
Rui Ueyama
3edb0ec229 Update to use new name alignTo().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:06:47 +00:00
Rafael Espindola
7d8f94eea1 Handle offsets larger than 32 bits.
David Majnemer noticed that it was not obvious what the behavior would
be if B.Offset - A.Offset could not fit in an int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:03:06 +00:00
Matthew Simpson
bdd1452784 [SLP] Vectorize the index computations of getelementptr instructions.
This patch seeds the SLP vectorizer with getelementptr indices. The primary
motivation in doing so is to vectorize gather-like idioms beginning with
consecutive loads (e.g., g[a[0] - b[0]] + g[a[1] - b[1]] + ...). While these
cases could be vectorized with a top-down phase, seeding the existing bottom-up
phase with the index computations avoids the complexity, compile-time, and
phase ordering issues associated with a full top-down pass. Only bundles of
single-index getelementptrs with non-constant differences are considered for
vectorization.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257800 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 20:46:27 +00:00
Rui Ueyama
04fa9a7185 [Support] Rename RoundUpToAlignment -> alignTo.
Rounding up an integer m to a nearest multiple of n where n is a power
of 2 is used very often if you are writing code to emit binary files.
RoundUpToAlignment is a small function to do that. But we found that the
function has a small but annoying issue; the name is a bit too long.
Because it is used quite often, that hurts readability.

This patch is to rename the function. The original name is kept as a
forwarder, so that submitting this patch won't immediately break Clang
and other LLVM projects. Once I update all occurrences of RoundUpToAlignment,
I'll remove the old name entirely.

http://reviews.llvm.org/D16162

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 20:43:11 +00:00
Rafael Espindola
1cdacfc696 Assert that a cmp function defines a total order.
Thanks to David Blaikie for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 20:28:25 +00:00
Keno Fischer
62b1bde078 [SROA] Also insert a bit piece expression if only one piece is needed
Summary: If SROA creates only one piece (e.g. because the other is not needed),
it still needs to create a bit_piece expression if that bit piece is smaller
than the original size of the alloca.

Reviewers: aprantl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257795 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 20:06:34 +00:00
Ahmed Bougacha
51eefd689e [CodeGen] Don't assume fp_to_fp16 produces i16 when legalizing it.
Since r230276, we support an improved legalization for f64->f16,
which goes through a temporary f32, improving codegen when
f32->f16 is legal but not f64->f16. This requires unsafe-fp-math.

However, that legalization assumed that the second step, producing
a pseudo-softened f16, had type i16. That's not true on targets
with illegal i16, such as ARM.

Use the initial f64->f16 result type instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:45:36 +00:00
Reid Kleckner
5100764a56 Include TypeIndex. Again, the "check" target is not enough to catch this currently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:40:27 +00:00
Reid Kleckner
102504fc00 Rename WinCodeViewLineTables to CodeViewDebug, similar to DwarfDebug
Soon it will be responsible for more than line tables.

Reviewers: majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:25:04 +00:00
Hans Wennborg
faaa9dde56 Exclude test-suite from CMake builds in test-release.sh
It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
so we're not losing something we had before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:21:14 +00:00
Reid Kleckner
c2046c01da [codeview] Dump CodeView inlinee lines subsection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:20:17 +00:00
Keno Fischer
4d6ccf4c99 [Utils] Fix incorrect dbg.declare store conversion
Summary: The dbg.declare -> dbg.value conversion did not check which operand of
the store instruction the alloca was passed to. As a result code that stored the
address of an alloca, rather than storing to the alloca, would still trigger
the conversion routine, leading to the insertion of an incorrect dbg.value
intrinsic.

Reviewers: aprantl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:12:27 +00:00
Adrian Prantl
b363d33293 dsymutil: Provide better warnings when clang modules cannot be found.
rdar://problem/22823264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:31:07 +00:00
Xinliang David Li
c4dee26e9f [PGO] [Coverage] put covmap into note section with no 'alloc flag' (Linux)
Coverage mapping data is not referenced by runtime, and they won't be dumped
into profile data. There is no need to allocate memory for covmap sections.
A good side effect of this change is that the coverage map data won't be mistakenly
 garbage collected by the linker (for Gold linker only, BFD linker has an issue where the a bug is filed).
Tested with clang build with instrumentation and -fcoverage-mapping and linker GC. The size of
 covmap section is ~17.6M so the text segment size will be reduced by this amount with this change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:09:45 +00:00
Reid Kleckner
cffba721f4 Use std::map::insert instead of emplace for libstdc++ 4.7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:03:29 +00:00
Reid Kleckner
f0480876f0 Print function names when they are referenced via TypeIndex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:52:01 +00:00
Reid Kleckner
a9d04d084c [readobj] Add functionality to dump relocations inside of binary blobs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:51:57 +00:00
Reid Kleckner
51bb529b5b [codeview] Print relocations against code and data offset fields
These fields are almost always zero. However, there are relocations
against them, and we should print the relocation symbol with it as
SYM+0xNN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:51:54 +00:00
James Y Knight
ee7d060ab8 Revert "Stop increasing alignment of externally-visible globals on ELF platforms."
This reverts commit r257719, due to PR26144.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257775 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 16:33:21 +00:00
James Molloy
def08208bf Revert "[ValueTracking] Understand more select patterns in ComputeKnownBits"
This reverts commit r257769. Backing this out because of stage2 failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:49:32 +00:00
Krzysztof Parzyszek
edec0136f0 [Hexagon] Expand pseudo instruction Insert4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:37:16 +00:00
Krzysztof Parzyszek
cc26b12e85 Unxfail passing testcase on Hexagon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:24:15 +00:00
James Molloy
f59da46fd7 [ValueTracking] Understand more select patterns in ComputeKnownBits
Some patterns of select+compare allow us to know exactly the value of the uppermost bits in the select result. For example:

  %b = icmp ugt i32 %a, 5
  %c = select i1 %b, i32 2, i32 %a

Here we know that %c is bounded by 5, and therefore KnownZero = ~APInt(5).getActiveBits() = ~7.

There are several such patterns, and this patch attempts to understand a reasonable subset of them - namely when the base values are the same (as above), and when they are related by a simple (add nsw), for example (add nsw %a, 4) and %a.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:23:19 +00:00
Krzysztof Parzyszek
ba4dbafbf9 [Hexagon] Handle branches with non-mbb operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:05:27 +00:00
James Molloy
994f24a703 [LTO] Add a run of LoopUnroll
Loop trip counts can often be resolved during LTO. We should obviously be unrolling small loops once those trip counts have been resolved, but we weren't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:00:09 +00:00
Benjamin Kramer
5f2bc6c766 [ARM] Use the efficient version of BitVector::set and a static_assert.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 14:33:04 +00:00
Dan Liew
10387d22ff [docs] Improve the documentation on committing code reviewed on
Phabricator to trunk.

The previous documentation had a few issues:

* It did not make it explicit that code could be
committed without using the Arcanist tool and how this should be done.

* There was also an implicit assumption on using Subversion
rather than git-svn in the example using Arcanist. The documentation now
explicitly mentions both cases and details how to commit to trunk in
each case.

Reviewers: klimek, probinson

Subscribers: probinson, nwilson, reames, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 13:39:29 +00:00
NAKAMURA Takumi
92d091bf6f InstructionsTest.cpp: Fix a warning. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 09:21:49 +00:00
Michael Zolotukhin
af6e8973aa Revert "Assert that we have all use/users in the getters."
This reverts commit fdb838f3f8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 09:02:45 +00:00
Vaivaswatha Nagaraj
741199b113 [GlobalsAA] Relax condition in checking globals as args to functions
Summary:
Since globals may escape as function arguments (even when they have been 
found to be non-escaping, because of optimizations such as memcpyoptimizer
that replaces stores with memcpy), all arguments to a function are checked
during query to make sure they are identifiable. At that time, also ensure
we return a conservative result only if the arguments don't alias to our global.

Reviewers: hfinkel, jmolloy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 08:46:45 +00:00
Igor Breger
f8ccddcb89 AVX512: VMOVDQA32/64 (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16142

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 07:56:04 +00:00
Xinliang David Li
183e87ecde Rename local variable to avoid conflict
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:38:52 +00:00
Joseph Tremoulet
6f91687d11 [UnitTest] Fix warning, NFC.
Use an unsigned literal to avoid signedness mismatch in the compare.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:30:19 +00:00
Joseph Tremoulet
0d05e6c90c [OperandBundles] Copy DebugLoc with calls/invokes
Summary:
The overloads of CallInst::Create and InvokeInst::Create that are used to
adjust operand bundles purport to create a new instruction "identical in
every way except [for] the operand bundles", so copy the DebugLoc along
with everything else.


Reviewers: sanjoy, majnemer

Subscribers: majnemer, dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257745 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:21:42 +00:00