Commit Graph

103392 Commits

Author SHA1 Message Date
David Blaikie
ccad744d4a Revert "Try simplifying LexicalScopes ownership again."
Speculatively reverting due to a suspicious failure on a Windows
buildbot.

This reverts commit 10c37a012e.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208131 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 21:07:17 +00:00
Eric Christopher
d2ba53bdaa Fix odd formatting that snuck into last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208130 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 21:04:27 +00:00
Joerg Sonnenberger
b84f890bc3 If a function needs a frame pointer, but r11 (aka fp) has not been used,
remove it from the list of unspilled registers. Otherwise the following
attempt to keep the stack aligned by picking an extra GPR register to
spill will not work as it picks up r11.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 20:43:01 +00:00
Eric Christopher
d474181920 ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.
This removes arguments passed everywhere and allows the use of
standard iteration over lists.
Should be no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208127 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 20:23:04 +00:00
Reid Kleckner
3949749701 Copy the full TailCallKind in CallInst::clone_impl
Split from the musttail inliner change.  This will be covered by an opt
test when the inliner change lands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208126 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 20:08:20 +00:00
Diego Novillo
e3e870face Do not make -pass-remarks additive.
Summary:
When I initially introduced -pass-remarks, I thought it would be a
neat idea to make it additive. So, if one used it as:

$ llc -pass-remarks=inliner --pass-remarks=loop.*

the compiler would build the regular expression '(inliner)|(loop.*)'.

The more I think about it, the more I regret it. This is not how
other flags work. The standard semantics are right-to-left overrides.

This is how clang interprets -Rpass. And I think the two should be
compatible in this respect.

Reviewers: qcolombet

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208122 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 19:14:00 +00:00
Benjamin Kramer
2c06cd8612 TTI: Estimate @llvm.fmuladd cost as fmul + fadd when FMA's aren't legal on the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 18:36:23 +00:00
Andrea Di Biagio
8a712ba229 [X86] Improve the lowering of BITCAST dag nodes from type f64 to type v2i32 (and vice versa).
Before this patch, the backend always emitted a store+load sequence to
bitconvert from f64 to i64 the input operand of a ISD::BITCAST dag node that
performed a bitconvert from type MVT::f64 to type MVT::v2i32. The resulting
i64 node was then used to build a v2i32 vector.

With this patch, the backend now produces a cheaper SCALAR_TO_VECTOR from
MVT::f64 to MVT::v2f64. That SCALAR_TO_VECTOR is then followed by a "free"
bitcast to type MVT::v4i32. The elements of the resulting
v4i32 are then extracted to build a v2i32 vector (which is illegal and
therefore promoted to MVT::v2i64).

This is in general cheaper than emitting a stack store+load sequence
to bitconvert the operand from type f64 to type i64.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208107 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 17:09:03 +00:00
Renato Golin
22f779d1fd Implememting named register intrinsics
This patch implements the infrastructure to use named register constructs in
programs that need access to specific registers (bare metal, kernels, etc).

So far, only the stack pointer is supported as a technology preview, but as it
is, the intrinsic can already support all non-allocatable registers from any
architecture.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 16:51:25 +00:00
Rafael Espindola
b889448841 Special case aliases in GlobalValue::getAlignment.
An alias has the address of what it points to, so it also has the same
alignment.

This allows a few optimizations to see past aliases for free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208103 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 16:48:58 +00:00
Eric Christopher
bfc3f301b6 Have the SubtargetFeature help routine just not return a number and
fall back to the normal path without a cpu. While doing this fix
llc to just exit when we don't have a module to process instead of
asserting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208102 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 16:29:50 +00:00
Bob Wilson
534ec26d07 Add some details to the llvm-cov documentation. <rdar://problem/15819496>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208098 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 15:58:06 +00:00
Rafael Espindola
4f1723522e Be more strict about not allowing setSection on aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208095 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 14:59:14 +00:00
Rafael Espindola
55ba6a126f Be more strict about not calling setAlignment on global aliases.
The fact that GlobalAlias::setAlignment exists at all is a side effect of
how the classes are organized, it should never be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208094 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 14:51:36 +00:00
Tim Northover
3524723195 AArch64/ARM64: implement diagnosis of unpredictable loads & stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208091 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 14:15:14 +00:00
Tim Northover
4d28f030f7 AArch64/ARM64: add two more MC tests to ARM64 set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208085 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 12:50:58 +00:00
Tim Northover
c08733f867 AArch64/ARM64: enable MC-level diagnostic tests for NEON insts.
Obviously we can't expect the two backends to produce identical diagnostics,
since what's possible depends quite a bit on how the .td files are structured.
I think the ARM64 diagnostics are basically of the same quality in all the
changed cases, so I've split the CHECK lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208084 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 12:50:55 +00:00
Tim Northover
09b3bd8ca3 AArch64/ARM64: make NEON vector list parsing a bit more robust
It doesn't change the results, but it seems silly not to diagnose obvious
problems early on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 12:50:51 +00:00
Tim Northover
d58350d789 AArch64/ARM64: add more specific diagnostic for floating imm 0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208082 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 12:50:47 +00:00
Tim Northover
c5f9aff43e AArch64/ARM64: add more specific diagnostic for invalid vector lanes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208081 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 12:50:44 +00:00
Tim Northover
6e64f90dc5 AArch64/ARM64: produce more informative diagnostic assembling some immediates
No tests here, they'll be added when the entire neon-diagnostics.s test from
AArch64 is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208079 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 11:18:53 +00:00
Christian Pirker
80fd09110d ARM: For thumb fixups store halfwords high first and low second
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208076 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 10:05:11 +00:00
Kevin Qin
03145ebd88 [ARM64] Enable alignment control option in front-end for ARM64.
This is the modification in llvm part.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208074 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 09:48:52 +00:00
Evgeniy Stepanov
0e8c40d643 Disable -Wcomment when building with GCC.
GCC version of -Wcomment is not compatible with ascii art graph diagrams.

Reverts r207629.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208073 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 09:46:06 +00:00
Richard Smith
64cd55a126 Update programmers manual to cover llvm::function_ref, and add a note to the
coding standard suggesting using it instead of the (unavailable) std::function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208067 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 07:45:39 +00:00
Craig Topper
b0eeb124b2 Use X86 memory operand enums instead of hardcoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208064 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 07:04:32 +00:00
Owen Anderson
b184a37074 Fix some obvious Doxygen comment bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208059 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 05:05:59 +00:00
David Blaikie
3e889f7041 Update comment from a recent commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208057 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 03:53:10 +00:00
Adam Nemet
f0e7f76933 [Build] Add rule to generate fully-expanded .td file
I found it useful in the past and now again to have a version of the .td file
where all the records are expanded.  This adds a makefile rule to generate
this on demand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208056 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 03:49:45 +00:00
David Blaikie
40a1b74db6 PR19598: Provide the ability to RAUW a declaration with itself, creating a non-temporary copy and using that to RAUW.
Also, provide the ability to create temporary and non-temporary
declarations, as not all declarations may be replaced by definitions
later on.

This provides the necessary infrastructure for Clang to fix PR19598,
leaking temporary MDNodes in Clang's debug info generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208054 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 03:41:57 +00:00
Eric Christopher
5c34f99911 Revert "Walk back commits for unused function parameters - they're still being"
this reapplies 208012 and 208002.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 02:37:26 +00:00
Duncan P. N. Exon Smith
cca77fc0d6 blockfreq: Move include to .cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208035 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:57:42 +00:00
Richard Smith
2efa833c4e Revert accidentally-committed files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:46:26 +00:00
Richard Smith
36ecb2ee9d Re-commit r208025, reverted in r208030, with a fix for a conformance issue
which GCC detects and Clang does not!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208033 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:44:26 +00:00
Richard Smith
f3a199b2ae Revert r208025, which made buildbots unhappy for unknown reasons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208030 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:26:00 +00:00
Reid Kleckner
9ad48c11b1 Fix i128 div/mod on mingw64
The Win64 docs are very clear that anything larger than 8 bytes is
passed by reference, and GCC MinGW64 honors that for __modti3 and
friends.

Patch by Jameson Nash!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208029 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:20:42 +00:00
Argyrios Kyrtzidis
10222d2959 [Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment about the use case for the new parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208026 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:03:52 +00:00
Richard Smith
245e8bdfba Add llvm::function_ref (and a couple of uses of it), representing a type-erased reference to a callable object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208025 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:01:29 +00:00
Reid Kleckner
9331beb910 Include intrin.h before windows.h as a workaround for the x64 self-host
On x64, windows.h doesn't include intrin.h for intrinsics.  It just
declares them in the global namespace and uses them, expecting the
compiler to lower it as a builtin.  We basically need to do this in
clang, eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208023 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 00:57:33 +00:00
Argyrios Kyrtzidis
6a914399c9 [Support/MemoryBuffer] Move the IsVolatile check inside shouldUseMmap() and make sure to zero-initialize the rest
of the buffer if we unexpectedly reach end-of-file while reading.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 00:51:45 +00:00
Nick Lewycky
096d8411b3 Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208019 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 00:46:20 +00:00
Nick Lewycky
05da4dd998 Improve 'tail' call marking in TRE. A bootstrap of clang goes from 375k calls marked tail in the IR to 470k, however this improvement does not carry into an improvement of the call/jmp ratio on x86. The most common pattern is a tail call + br to a block with nothing but a 'ret'.
The number of tail call to loop conversions remains the same (1618 by my count).

The new algorithm does a local scan over the use-def chains to identify local "alloca-derived" values, as well as points where the alloca could escape. Then, a visit over the CFG marks blocks as being before or after the allocas have escaped, and annotates the calls accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208017 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 23:59:03 +00:00
Eric Christopher
59c397de1a Walk back commits for unused function parameters - they're still being
used via dragonegg for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208016 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 23:26:59 +00:00
Yi Jiang
e3b906eb39 Reapply: Add slp vectorization to LTO passes. The bug it exposed has been fixed by r207983. <radar://16641956>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208013 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 23:14:46 +00:00
Eric Christopher
bb95032999 Remove a now unnecessary function since all calls have one version
and inline it into its caller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208012 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 22:36:07 +00:00
Eric Christopher
9edfca83f4 Remove a call to std::exit in a library. Make "Help" return
a 0 as a default answer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208009 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 22:01:47 +00:00
Argyrios Kyrtzidis
32b6099a77 [Support/MemoryBuffer] Introduce a boolean parameter (false by default) 'IsVolatile' for the open file functions.
This provides a hint that the file may be changing often so mmap is avoided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208007 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 21:55:51 +00:00
Eric Christopher
73ebb5abaf Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208006 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 21:50:57 +00:00
Tom Stellard
4b84b524e5 R600: Expand i64 ISD:SUB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208005 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 21:47:15 +00:00
Eric Christopher
33a4854fcb Remove unused argument from AddFeature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208002 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 21:40:44 +00:00