oota-llvm.git
11 years agoAdd missing CHECK-LABEL
Matt Arsenault [Sat, 14 Sep 2013 02:44:06 +0000 (02:44 +0000)]
Add missing CHECK-LABEL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190740 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd test for untested path in SimplifyCFG
Matt Arsenault [Sat, 14 Sep 2013 02:44:02 +0000 (02:44 +0000)]
Add test for untested path in SimplifyCFG

This case wasn't checked with a pointer condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190739 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[lit] Add an --output option, for writing results in a machine readable form.
Daniel Dunbar [Sat, 14 Sep 2013 01:19:17 +0000 (01:19 +0000)]
[lit] Add an --output option, for writing results in a machine readable form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190738 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake PrettyStackTraceEntry use ManagedStatic for its ThreadLocal.
Filip Pizlo [Fri, 13 Sep 2013 22:59:47 +0000 (22:59 +0000)]
Make PrettyStackTraceEntry use ManagedStatic for its ThreadLocal.

This was somewhat tricky because ~PrettyStackTraceEntry() may run after
llvm_shutdown() has been called. This is rare and only happens for a common idiom
used in the main() functions of command-line tools. This works around the idiom by
skipping the stack clean-up if the PrettyStackTraceHead ManagedStatic is not
constructed (i.e. llvm_shutdown() has been called).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190730 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd missing break statement in PPCISelLowering
Hal Finkel [Fri, 13 Sep 2013 20:09:02 +0000 (20:09 +0000)]
Add missing break statement in PPCISelLowering

As it turns out, not a problem in practice, but it should be there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190720 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdds support for Atom Silvermont (SLM) - -march=slm
Preston Gurd [Fri, 13 Sep 2013 19:23:28 +0000 (19:23 +0000)]
Adds support for Atom Silvermont (SLM) - -march=slm

Implements Instruction scheduler latencies for Silvermont,
using latencies from the Intel Silvermont Optimization Guide.

Auto detects SLM.

Turns on post RA scheduler when generating code for SLM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190717 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Peephole] Rewrite copies to avoid cross register banks copies.
Quentin Colombet [Fri, 13 Sep 2013 18:26:31 +0000 (18:26 +0000)]
[Peephole] Rewrite copies to avoid cross register banks copies.

By definition copies across register banks are not coalescable. Still, it may be
possible to get rid of such a copy when the value is available in another
register of the same register file.
Consider the following example, where capital and lower letters denote different
register file:
b = copy A <-- cross-bank copy
...
C = copy b <-- cross-bank copy

This could have been optimized this way:
b = copy A  <-- cross-bank copy
...
C = copy A <-- same-bank copy

Note: b and C's definitions may be in different basic blocks.

This patch adds a peephole optimization that looks through a chain of copies
leading to a cross-bank copy and reuses a source that is on the same register
file if available.

This solution could also be used to get rid of some copies (e.g., A could have
been used instead of C). However, we do not do so because:
- It may over constrain the coloring of the source register for coalescing.
- The register allocator may not be able to find a nice split point for the
  longer live-range, leading to more spill.

<rdar://problem/14742333>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190713 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd warn_unused_result to empty() on various containers.
Benjamin Kramer [Fri, 13 Sep 2013 17:33:24 +0000 (17:33 +0000)]
Add warn_unused_result to empty() on various containers.

empty() doesn't actually empty out the container, making this a common typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190708 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agotypo fix: use BUILD_ARCHIVE to build .a libs and not ARCHIVE_LIBRARY
Nuno Lopes [Fri, 13 Sep 2013 15:01:54 +0000 (15:01 +0000)]
typo fix: use BUILD_ARCHIVE to build .a libs and not ARCHIVE_LIBRARY

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190696 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix tests for hasFPARMv8 name change (r190692)
Amaury de la Vieuville [Fri, 13 Sep 2013 14:37:52 +0000 (14:37 +0000)]
Fix tests for hasFPARMv8 name change (r190692)

Patch by Bradley Smith

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190694 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARMv8] Change hasV8Fp to hasFPARMv8, and other command line options
Joey Gouly [Fri, 13 Sep 2013 13:46:57 +0000 (13:46 +0000)]
[ARMv8] Change hasV8Fp to hasFPARMv8, and other command line options
to be more consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190692 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Add source file:line to stack origin reports.
Evgeniy Stepanov [Fri, 13 Sep 2013 12:54:49 +0000 (12:54 +0000)]
[msan] Add source file:line to stack origin reports.

Compiler part.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190689 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix build failure reported by Tobias Markmann in bug 17203.
Daniel Sanders [Fri, 13 Sep 2013 12:41:38 +0000 (12:41 +0000)]
Fix build failure reported by Tobias Markmann in bug 17203.

svn 1.8.0 emits an additional line matching 'URL:' in its 'svn info' command
('Relative URL:').
Changed the grep to match only the intended line so that a valid SVNVersion.inc
is generated.

The problem doesnt occur with the svn version I'm using (1.7.5) but Tobias has
confirmed that the change fixes the problem.

See http://llvm.org/bugs/show_bug.cgi?id=17203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190685 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARMv8] Emit the proper .fpu directive.
Joey Gouly [Fri, 13 Sep 2013 11:51:52 +0000 (11:51 +0000)]
[ARMv8] Emit the proper .fpu directive.

Patch by Bradley Smith!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190683 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd "native" to config.available_features, to make it easier to disable non-x-compile...
Amaury de la Vieuville [Fri, 13 Sep 2013 10:59:01 +0000 (10:59 +0000)]
Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests

Patch by Artyom Skrobov!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190679 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix for executing AutoRegen.sh. Revert a part of r187209.
Patrik Hagglund [Fri, 13 Sep 2013 10:29:42 +0000 (10:29 +0000)]
Fix for executing AutoRegen.sh. Revert a part of r187209.

Since r187209, which modified ltdl.m4, I was unable to execute
AutoRegen.sh, getting:

  ../configure:10779: error: possibly undefined macro: AC_LTDL_FUNC_ARGZ

This commit re-adds AC_LTDL_FUNC_ARGZ to ltdl.m4, as a quick fix. For me, this
corresponds to the configure file currently checked in.

(However, the ltdl library seems to be unused since r74924 in 2009,
except for the use of the LTDL_SHLIB_EXT macro in
bugpoint(?). Therefore, the right solution seems to try to get rid of
the local ltdl.m4 file, specified by autoconf/README.TXT.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190677 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTest commit to verify that commit access works.
Zoran Jovanovic [Fri, 13 Sep 2013 10:08:05 +0000 (10:08 +0000)]
Test commit to verify that commit access works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190676 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Use getTarget{Insert,Extract}Subreg rather than getMachineNode
Richard Sandiford [Fri, 13 Sep 2013 09:12:44 +0000 (09:12 +0000)]
[SystemZ] Use getTarget{Insert,Extract}Subreg rather than getMachineNode

Just a clean-up, no behavioral change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190673 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[SystemZ] Try to fold shifts into TMxx
Richard Sandiford [Fri, 13 Sep 2013 09:09:50 +0000 (09:09 +0000)]
[SystemZ] Try to fold shifts into TMxx

E.g. "SRL %r2, 2; TMLL %r2, 1" => "TMLL %r2, 4".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190672 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAvoid a compiler warning about Found not being used when assertions are
Duncan Sands [Fri, 13 Sep 2013 08:16:06 +0000 (08:16 +0000)]
Avoid a compiler warning about Found not being used when assertions are
disabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190668 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAArch64: use RegisterOperand for NEON registers.
Tim Northover [Fri, 13 Sep 2013 07:26:52 +0000 (07:26 +0000)]
AArch64: use RegisterOperand for NEON registers.

Previously we modelled VPR128 and VPR64 as essentially identical
register-classes containing V0-V31 (which had Q0-Q31 as "sub_alias"
sub-registers). This model is starting to cause significant problems
for code generation, particularly writing EXTRACT/INSERT_SUBREG
patterns for converting between the two.

The change here switches to classifying VPR64 & VPR128 as
RegisterOperands, which are essentially aliases for RegisterClasses
with different parsing and printing behaviour. This fits almost
exactly with their real status (VPR128 == FPR128 printed strangely,
VPR64 == FPR64 printed strangely).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190665 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove operator to end of previous line to match coding standards.
Craig Topper [Fri, 13 Sep 2013 04:41:06 +0000 (04:41 +0000)]
Move operator to end of previous line to match coding standards.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190659 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd initial support for handling gnu style pubnames accepted by some
Eric Christopher [Fri, 13 Sep 2013 00:35:05 +0000 (00:35 +0000)]
Add initial support for handling gnu style pubnames accepted by some
versions of gold. This support is designed to allow gold to produce
gdb_index sections similar to the accelerator tables and consumable
by gdb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190649 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReformat and hoist section grabbing to top level.
Eric Christopher [Fri, 13 Sep 2013 00:34:58 +0000 (00:34 +0000)]
Reformat and hoist section grabbing to top level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190648 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Move clamp handling code to R600IselLowering.cpp
Vincent Lejeune [Thu, 12 Sep 2013 23:45:00 +0000 (23:45 +0000)]
R600: Move clamp handling code to R600IselLowering.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190645 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Move code handling literal folding into R600ISelLowering.
Vincent Lejeune [Thu, 12 Sep 2013 23:44:53 +0000 (23:44 +0000)]
R600: Move code handling literal folding into R600ISelLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190644 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Move fabs/fneg/sel folding logic into PostProcessIsel
Vincent Lejeune [Thu, 12 Sep 2013 23:44:44 +0000 (23:44 +0000)]
R600: Move fabs/fneg/sel folding logic into PostProcessIsel

This move makes possible to correctly handle multiples instructions
from a single pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190643 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove an unused variable, fixing -Werror build with latest Clang.
Chandler Carruth [Thu, 12 Sep 2013 23:30:48 +0000 (23:30 +0000)]
Remove an unused variable, fixing -Werror build with latest Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190640 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unnecessary TBAA metadata from r190636's test case
Hal Finkel [Thu, 12 Sep 2013 23:23:12 +0000 (23:23 +0000)]
Remove unnecessary TBAA metadata from r190636's test case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190637 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PPC ABI for ByVal structs with vector members
Hal Finkel [Thu, 12 Sep 2013 23:20:06 +0000 (23:20 +0000)]
Fix PPC ABI for ByVal structs with vector members

When a structure is passed by value, and that structure contains a vector
member, according to the PPC ABI, the structure will receive enhanced alignment
(so that the vector within the structure will always be aligned).

This should resolve PR16641.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190636 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPatch provide by Tom Roeder!
Joe Abbey [Thu, 12 Sep 2013 22:02:31 +0000 (22:02 +0000)]
Patch provide by Tom Roeder!

Reviewed by Joe Abbey and Tobias Grosser

Here is a patch that fixes decoding of CE_SELECT in BitcodeReader,
along with a simple test case. The problem in the current code is that
it generates but doesn't accept bitcode that uses vectors for the
first element of a select in this context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190634 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIn AliasSetTracker, do not change the alias set to "mod/ref" when adding
Krzysztof Parzyszek [Thu, 12 Sep 2013 20:15:50 +0000 (20:15 +0000)]
In AliasSetTracker, do not change the alias set to "mod/ref" when adding
a volatile load, or a volatile store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190631 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake the PPC fast-math sqrt expansion safe at 0
Hal Finkel [Thu, 12 Sep 2013 19:04:12 +0000 (19:04 +0000)]
Make the PPC fast-math sqrt expansion safe at 0

In fast-math mode sqrt(x) is calculated using the fast expansion of the
reciprocal of the reciprocal sqrt expansion. The reciprocal and reciprocal
sqrt expansions use the associated estimate instructions along with some Newton
iterations. Unfortunately, as a result, sqrt(0) was being calculated as NaN,
which is not correct. Now we explicitly return a result of zero if the input is
zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190624 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplement asm support for a few PowerPC bookIII that are needed for assembling
Roman Divacky [Thu, 12 Sep 2013 17:50:54 +0000 (17:50 +0000)]
Implement asm support for a few PowerPC bookIII that are needed for assembling
FreeBSD kernel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190618 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis switches CrashRecoveryContext to using ManagedStatic for its global Mutex and
Filip Pizlo [Thu, 12 Sep 2013 17:46:57 +0000 (17:46 +0000)]
This switches CrashRecoveryContext to using ManagedStatic for its global Mutex and
global ThreadLocals, thereby getting rid of the load-time initialization of those
objects and also getting rid of their destruction unless the LLVM client calls
llvm_shutdown.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190617 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPartial support for Intel SHA Extensions (sha1rnds4)
Ben Langmuir [Thu, 12 Sep 2013 15:51:31 +0000 (15:51 +0000)]
Partial support for Intel SHA Extensions (sha1rnds4)

Add basic assembly/disassembly support for the first Intel SHA
instruction 'sha1rnds4'. Also includes feature flag, and test cases.

Support for the remaining instructions will follow in a separate patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190611 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMark PPC MFTB and DST (and friends) as deprecated
Hal Finkel [Thu, 12 Sep 2013 14:40:06 +0000 (14:40 +0000)]
Mark PPC MFTB and DST (and friends) as deprecated

Use the new instruction deprecation feature to mark mftb (now replaced with
mfspr) and dst (along with the other Altivec cache control instructions) as
deprecated when targeting cores supporting at least ISA v2.03.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190605 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSomehow this important part of the patch, where I actually check the Mask,
Joey Gouly [Thu, 12 Sep 2013 14:23:19 +0000 (14:23 +0000)]
Somehow this important part of the patch, where I actually check the Mask,
got lost during my iterations of review.

Thanks to Hal for spotting it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190604 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[LTO] Fix the LTO tool, after my API breakage.
Joey Gouly [Thu, 12 Sep 2013 12:55:29 +0000 (12:55 +0000)]
[LTO] Fix the LTO tool, after my API breakage.

Thanks to Zonr Chang!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190602 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLLVM interpreter: added a test for insert- extract- value
Elena Demikhovsky [Thu, 12 Sep 2013 10:52:03 +0000 (10:52 +0000)]
LLVM interpreter: added a test for insert- extract- value

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190600 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLLVM Interpreter: implementation of "insertvalue" and "extractvalue";
Elena Demikhovsky [Thu, 12 Sep 2013 10:48:23 +0000 (10:48 +0000)]
LLVM Interpreter: implementation of "insertvalue" and "extractvalue";
undef constatnt for structure and test for these functions.

done by Yuri Veselov (mailto:Yuri.Veselov@intel.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190599 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd an instruction deprecation feature to TableGen.
Joey Gouly [Thu, 12 Sep 2013 10:28:05 +0000 (10:28 +0000)]
Add an instruction deprecation feature to TableGen.

The 'Deprecated' class allows you to specify a SubtargetFeature that the
instruction is deprecated on.

The 'ComplexDeprecationPredicate' class allows you to define a custom
predicate that is called to check for deprecation.
For example:
  ComplexDeprecationPredicate<"MCR">

would mean you would have to define the following function:
  bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
                             std::string &Info)

Which returns 'false' for not deprecated, and 'true' for deprecated
and store the warning message in 'Info'.

The MCTargetAsmParser constructor was chaned to take an extra argument of
the MCInstrInfo class, so out-of-tree targets will need to be changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190598 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAVX-512: implemented extractelement with variable index.
Elena Demikhovsky [Thu, 12 Sep 2013 08:55:00 +0000 (08:55 +0000)]
AVX-512: implemented extractelement with variable index.
Added parsing of mask register and "zeroing" semantic, like {%k1} {z}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190595 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixup for r190409: add dep on LZMA only if CMake is cross-compiling
Alexey Samsonov [Thu, 12 Sep 2013 08:26:53 +0000 (08:26 +0000)]
Fixup for r190409: add dep on LZMA only if CMake is cross-compiling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190591 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPPC: Enable aggressive anti-dependency breaking
Hal Finkel [Thu, 12 Sep 2013 05:24:49 +0000 (05:24 +0000)]
PPC: Enable aggressive anti-dependency breaking

Aggressive anti-dependency breaking is enabled by default for all PPC cores.
This provides a general speedup on the P7 and other platforms (among other
factors, the instruction group formation for the non-embedded PPC cores is done
during post-RA scheduling). In order to do this safely, the incompatibility
between uses of the MFOCRF instruction and anti-dependency breaking are
resolved by marking MFOCRF with hasExtraSrcRegAllocReq. As noted in the removed
FIXME, the problem was that MFOCRF's output is sensitive to the identify of the
source register, and always paired with a shift to undo this effect. Because
anti-dependency breaking is unaware of this hidden dependency of the shift
amount on the source register of the MFOCRF instruction, changing that register
must be inhibited.

Two test cases were adjusted: The SjLj test was made more insensitive to
register choices and scheduling; the saveCR test disabled anti-dependency
breaking because part of what it is testing is proper register reuse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190587 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix crash in AggressiveAntiDepBreaker with empty CriticalPathSet
Hal Finkel [Thu, 12 Sep 2013 04:22:31 +0000 (04:22 +0000)]
Fix crash in AggressiveAntiDepBreaker with empty CriticalPathSet

If no register classes are added to CriticalPathRCs, then the CriticalPathSet
bitmask will be empty. In that case, ExcludeRegs must remain NULL or else this
line will cause a segfault:

  } else if ((ExcludeRegs != NULL) && ExcludeRegs->test(AntiDepReg)) {

I have no in-tree test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190584 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: expose TBUFFER_STORE_FORMAT_* for OpenGL transform feedback
Tom Stellard [Thu, 12 Sep 2013 02:55:14 +0000 (02:55 +0000)]
R600/SI: expose TBUFFER_STORE_FORMAT_* for OpenGL transform feedback

For _XYZ, the type of VDATA is v4i32, because v3i32 doesn't exist.

The ADDR64 bit is not exposed. A simpler intrinsic that doesn't take
a resource descriptor might be nicer.

The maximum number of input SGPRs is bumped to 17.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190575 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Don't use trans slot for instructions that read LDS source registers
Tom Stellard [Thu, 12 Sep 2013 02:55:06 +0000 (02:55 +0000)]
R600: Don't use trans slot for instructions that read LDS source registers

This fixes some regressions in the piglit local memory store tests
introduced by recent commits which made the scheduler aware of the trans
slot.

It's not possible to test this using lit, because there is no way to
determine from the assembly dumps whether or not an instruction is in
the trans slot.

Even if this were possible, the test would be highly sensitive to
changes in the scheduler and might generate confusing false negatives.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190574 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTypo fixes.
Rui Ueyama [Thu, 12 Sep 2013 01:43:21 +0000 (01:43 +0000)]
Typo fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190569 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove variable under condition where it is used
Matt Arsenault [Thu, 12 Sep 2013 01:07:58 +0000 (01:07 +0000)]
Move variable under condition where it is used

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190567 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix comment to match what the assert actually enforces
Matt Arsenault [Thu, 12 Sep 2013 01:07:54 +0000 (01:07 +0000)]
Fix comment to match what the assert actually enforces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190566 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove pointless assertion after r190376
Matt Arsenault [Thu, 12 Sep 2013 01:07:49 +0000 (01:07 +0000)]
Remove pointless assertion after r190376

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190565 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGreatly simplify the PPC A2 scheduling itinerary
Hal Finkel [Wed, 11 Sep 2013 23:25:21 +0000 (23:25 +0000)]
Greatly simplify the PPC A2 scheduling itinerary

As Andy pointed out to me a long time ago, there are no structural hazards in
the later pipeline stages of the A2, and so modeling them is useless. Also,
modeling the top pre-dispatch stages is deceiving because, when multiple
hardware threads are active, those resources are shared among the threads. The
bypass definitions were mostly wrong, and so those have been removed. The
resulting itinerary is much simpler, and more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190562 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEnable MI scheduling (and CodeGen AA) by default for embedded PPC cores
Hal Finkel [Wed, 11 Sep 2013 23:05:25 +0000 (23:05 +0000)]
Enable MI scheduling (and CodeGen AA) by default for embedded PPC cores

For embedded PPC cores (especially the A2 core), using the MI scheduler with AA
is far superior to the other scheduling options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190558 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[CMake] Update GetSVN.cmake to use LLVM version control helper scripts.
Jordan Rose [Wed, 11 Sep 2013 22:46:41 +0000 (22:46 +0000)]
[CMake] Update GetSVN.cmake to use LLVM version control helper scripts.

This allows the logic to work with Git, and also uses the variable names
to match what Clang is actually looking for.

This changes the interface of GetSVN.cmake. Clang change to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190556 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix anachronism/typo in syntax of declaration of llvm.va_start.
Nick Lewycky [Wed, 11 Sep 2013 22:04:52 +0000 (22:04 +0000)]
Fix anachronism/typo in syntax of declaration of llvm.va_start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190552 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the appropriate return type for the compact unwind encoding.
Bill Wendling [Wed, 11 Sep 2013 21:47:57 +0000 (21:47 +0000)]
Use the appropriate return type for the compact unwind encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190551 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImplement TTI getUnrollingPreferences for PowerPC
Hal Finkel [Wed, 11 Sep 2013 21:20:40 +0000 (21:20 +0000)]
Implement TTI getUnrollingPreferences for PowerPC

The PowerPC A2 core greatly benefits from aggressive concatenation unrolling;
use the new getUnrollingPreferences to enable this by default when targeting
the PPC A2 core.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190549 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove into an anonymous namespace and closer to where it's used.
Bill Wendling [Wed, 11 Sep 2013 20:38:09 +0000 (20:38 +0000)]
Move into an anonymous namespace and closer to where it's used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190547 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug info: add more comments.
Manman Ren [Wed, 11 Sep 2013 19:40:28 +0000 (19:40 +0000)]
Debug info: add more comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190544 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd getUnrollingPreferences to TTI
Hal Finkel [Wed, 11 Sep 2013 19:25:43 +0000 (19:25 +0000)]
Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190542 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTry to fix the atom buildbots by adding an explicit 'cpu' to the 'llc' command.
Bill Wendling [Wed, 11 Sep 2013 19:06:04 +0000 (19:06 +0000)]
Try to fix the atom buildbots by adding an explicit 'cpu' to the 'llc' command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190541 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: move class definition of DIRef.
Manman Ren [Wed, 11 Sep 2013 18:55:55 +0000 (18:55 +0000)]
Debug Info: move class definition of DIRef.

Definition of DIRef used to require the full definition of DIType because
of usage of DIType::isType in DIRef::resolve. We now use DIDescriptor::isType
instead to remove the requirement and move definition of DIRef before DIType.

With this, we can move the definition of DIType::getContext to the header
file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190540 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Give internal classes hidden visibility."
Benjamin Kramer [Wed, 11 Sep 2013 18:05:11 +0000 (18:05 +0000)]
Revert "Give internal classes hidden visibility."

It works with clang, but GCC has different rules so we can't make all of those
hidden. This reverts commit r190534.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190536 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[lit] Add support for attach arbitrary metrics to test results.
Daniel Dunbar [Wed, 11 Sep 2013 17:45:11 +0000 (17:45 +0000)]
[lit] Add support for attach arbitrary metrics to test results.

 - This is a work-in-progress and all details are subject to change, but I am
   trying to build up support for allowing lit to be used as a driver for
   performance tests (or other tests which might want to record information
   beyond simple PASS/FAIL).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190535 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGive internal classes hidden visibility.
Benjamin Kramer [Wed, 11 Sep 2013 17:42:27 +0000 (17:42 +0000)]
Give internal classes hidden visibility.

Worth 100k on a linux/x86_64 Release+Asserts clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190534 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm-tblgen: Mangle operand replacements into the strings in printAliasInstr.
Benjamin Kramer [Wed, 11 Sep 2013 15:42:16 +0000 (15:42 +0000)]
llvm-tblgen: Mangle operand replacements into the strings in printAliasInstr.

Cuts down the bloat in the AArch64 asm writer a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190527 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't expose symbols of lle_ functions.
Benjamin Kramer [Wed, 11 Sep 2013 12:42:39 +0000 (12:42 +0000)]
Don't expose symbols of lle_ functions.

+ formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190523 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added test cases that were supposed to be part of r190507, r190509, r1905...
Daniel Sanders [Wed, 11 Sep 2013 12:39:25 +0000 (12:39 +0000)]
[mips][msa] Added test cases that were supposed to be part of r190507, r190509, r190512, and r190518.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190522 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added support for matching mulv, nlzc, sll, sra, srl, and subv from norma...
Daniel Sanders [Wed, 11 Sep 2013 11:58:30 +0000 (11:58 +0000)]
[mips][msa] Added support for matching mulv, nlzc, sll, sra, srl, and subv from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190518 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm-tblgen: Stabilize subreg index tables.
Benjamin Kramer [Wed, 11 Sep 2013 11:22:26 +0000 (11:22 +0000)]
llvm-tblgen: Stabilize subreg index tables.

Otherwise SequenceToOffsetTable will sort by pointer and becomes non-deterministic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190514 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added support for matching fadd, fdiv, flog2, fmul, frint, fsqrt, and...
Daniel Sanders [Wed, 11 Sep 2013 10:51:30 +0000 (10:51 +0000)]
[mips][msa] Added support for matching fadd, fdiv, flog2, fmul, frint, fsqrt, and fsub from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190512 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPath: Add an in-place version of path::native.
Benjamin Kramer [Wed, 11 Sep 2013 10:45:21 +0000 (10:45 +0000)]
Path: Add an in-place version of path::native.

This reflects the common use case of nativizing a prepared path. The existing
version invokes undefined behavior if input = output, add an assert to catch
that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190510 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added support for matching div_[su] from normal IR (i.e. not intrinsics)
Daniel Sanders [Wed, 11 Sep 2013 10:38:58 +0000 (10:38 +0000)]
[mips][msa] Added support for matching div_[su] from normal IR (i.e. not intrinsics)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190509 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Added support for matching addv from normal IR (i.e. not intrinsics)
Daniel Sanders [Wed, 11 Sep 2013 10:28:16 +0000 (10:28 +0000)]
[mips][msa] Added support for matching addv from normal IR (i.e. not intrinsics)

The corresponding intrinsic is now lowered into equivalent IR (ISD::ADD) before instruction selection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190507 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Separate the configuration of int/float vector types since they will...
Daniel Sanders [Wed, 11 Sep 2013 10:15:48 +0000 (10:15 +0000)]
[mips][msa] Separate the configuration of int/float vector types since they will diverge soon

No functional change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190506 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics
Daniel Sanders [Wed, 11 Sep 2013 09:59:17 +0000 (09:59 +0000)]
[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics

The elements of the operands should be half the width of the elements of
the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190505 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoconfig-ix.cmake: Tweak stray endif(...) to suppress a warning in CMake.
NAKAMURA Takumi [Wed, 11 Sep 2013 09:42:03 +0000 (09:42 +0000)]
config-ix.cmake: Tweak stray endif(...) to suppress a warning in CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190502 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplify the checking of function attributes by using the simple methods.
Bill Wendling [Wed, 11 Sep 2013 08:35:09 +0000 (08:35 +0000)]
Simplify the checking of function attributes by using the simple methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190499 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse type form of getIntPtrType
Matt Arsenault [Wed, 11 Sep 2013 07:29:40 +0000 (07:29 +0000)]
Use type form of getIntPtrType

This doesn't change anything since malloc always returns
address space 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190498 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo
Rui Ueyama [Wed, 11 Sep 2013 05:22:01 +0000 (05:22 +0000)]
Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190492 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTeach loop-idiom about address space pointer sizes
Matt Arsenault [Wed, 11 Sep 2013 05:09:42 +0000 (05:09 +0000)]
Teach loop-idiom about address space pointer sizes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190491 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd braces
Matt Arsenault [Wed, 11 Sep 2013 05:09:35 +0000 (05:09 +0000)]
Add braces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190490 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRe-submit r190469: YAMLIO: Fix string quoting logic.
Rui Ueyama [Wed, 11 Sep 2013 04:00:08 +0000 (04:00 +0000)]
Re-submit r190469: YAMLIO: Fix string quoting logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190485 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "YAMLIO: Fix string quoting logic." (r190469)
Hans Wennborg [Wed, 11 Sep 2013 01:59:32 +0000 (01:59 +0000)]
Revert "YAMLIO: Fix string quoting logic." (r190469)

It was turning the buildbots red.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190480 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added support for getting/setting operands of values and getting...
Michael Gottesman [Wed, 11 Sep 2013 01:38:12 +0000 (01:38 +0000)]
[python-bindings] Added support for getting/setting operands of values and getting the number of operands of a value.

Also in the process did some cleanups for BasicBlock.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190477 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added support for iterating over a basic blocks instructions, getti...
Michael Gottesman [Wed, 11 Sep 2013 01:17:38 +0000 (01:17 +0000)]
[python-bindings] Added support for iterating over a basic blocks instructions, getting their name/dumping them, f/b iteration.

Tests are included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190475 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added support for iterating over a function's basic blocks, dumping...
Michael Gottesman [Wed, 11 Sep 2013 01:01:40 +0000 (01:01 +0000)]
[python-bindings] Added support for iterating over a function's basic blocks, dumping/getting names of those bb, f/w iteration.

Tests are included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190473 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove trailing whitespace
Rui Ueyama [Wed, 11 Sep 2013 00:53:07 +0000 (00:53 +0000)]
Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190472 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added support for getting a module's functions, iterating f/b over...
Michael Gottesman [Wed, 11 Sep 2013 00:52:47 +0000 (00:52 +0000)]
[python-bindings] Added support for getting a module's functions, iterating f/b over said functions, dumping/print name of functions.

Tests are included as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190471 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoYAMLIO: Fix string quoting logic.
Rui Ueyama [Wed, 11 Sep 2013 00:45:48 +0000 (00:45 +0000)]
YAMLIO: Fix string quoting logic.

YAMLIO printed a string as is without quotes unless it contains a newline
character. That did not suffice. We also need to quote a string if it starts
with a backquote, quote, double quote or atsign, or it's the empty string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190469 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Export OpCode from core.py.
Michael Gottesman [Wed, 11 Sep 2013 00:41:07 +0000 (00:41 +0000)]
[python-bindings] Export OpCode from core.py.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190468 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added test for reading a module from bitcode.
Michael Gottesman [Wed, 11 Sep 2013 00:41:05 +0000 (00:41 +0000)]
[python-bindings] Added test for reading a module from bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190467 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRename variables for consistency.
Eli Friedman [Wed, 11 Sep 2013 00:41:02 +0000 (00:41 +0000)]
Rename variables for consistency.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190466 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Fixed 3 test failures caused by typos.
Michael Gottesman [Wed, 11 Sep 2013 00:41:02 +0000 (00:41 +0000)]
[python-bindings] Fixed 3 test failures caused by typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190465 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGet rid of unused isPodLike definitions.
Eli Friedman [Wed, 11 Sep 2013 00:36:54 +0000 (00:36 +0000)]
Get rid of unused isPodLike definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190461 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSupport ANSI escape code on Windows
Nico Rieck [Wed, 11 Sep 2013 00:36:48 +0000 (00:36 +0000)]
Support ANSI escape code on Windows

In some cases (e.g. when a build system pipes stderr) the Windows console
API cannot be used to color output. For these, provide a way to switch to
ANSI escape codes. This is required for Clang's -fansi-escape-codes option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190460 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixed typo.
Michael Gottesman [Wed, 11 Sep 2013 00:27:23 +0000 (00:27 +0000)]
Fixed typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190459 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added code for loading a module from bitcode, getset its datalayout...
Michael Gottesman [Wed, 11 Sep 2013 00:23:14 +0000 (00:23 +0000)]
[python-bindings] Added code for loading a module from bitcode, getset its datalayout, getset its target, dump it, print it to a file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190458 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[python-bindings] Added bindings for LLVMContextRef and a test for creating a new...
Michael Gottesman [Wed, 11 Sep 2013 00:23:10 +0000 (00:23 +0000)]
[python-bindings] Added bindings for LLVMContextRef and a test for creating a new context or getting the global context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190457 91177308-0d34-0410-b5e6-96231b3b80d8