oota-llvm.git
11 years agoRevert "More Intel syntax alias fixes."
Tim Northover [Mon, 22 Jul 2013 11:02:32 +0000 (11:02 +0000)]
Revert "More Intel syntax alias fixes."

This reverts commit r186813, which broke the bots.

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

11 years agoFix typo. Change %cl to CL in Intel pattern.
Craig Topper [Mon, 22 Jul 2013 10:07:26 +0000 (10:07 +0000)]
Fix typo. Change %cl to CL in Intel pattern.

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

11 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:58:07 +0000 (09:58 +0000)]
More Intel syntax alias fixes.

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

11 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:42:31 +0000 (09:42 +0000)]
More Intel syntax alias fixes.

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

11 years agoChange %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.
Craig Topper [Mon, 22 Jul 2013 09:22:49 +0000 (09:22 +0000)]
Change %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.

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

11 years agoAdd Intel variants to aliases for some FP instructions.
Craig Topper [Mon, 22 Jul 2013 09:18:43 +0000 (09:18 +0000)]
Add Intel variants to aliases for some FP instructions.

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

11 years agoARM: remove now unneeded custom Asm converters
Tim Northover [Mon, 22 Jul 2013 09:06:12 +0000 (09:06 +0000)]
ARM: remove now unneeded custom Asm converters

After Ulrich's r180677 (thanks!) TableGen is intelligent enough to
handle tied constraints involving complex operands properly, so
virtually all of the ARM custom converters are now unnecessary.

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

11 years agoReverse operands for Intel syntax form of 'bt' alias.
Craig Topper [Mon, 22 Jul 2013 07:47:51 +0000 (07:47 +0000)]
Reverse operands for Intel syntax form of 'bt' alias.

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

11 years agoDelete unused helper functions.
Nadav Rotem [Mon, 22 Jul 2013 05:19:22 +0000 (05:19 +0000)]
Delete unused helper functions.

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

11 years agoAdded missing - in the header of PrologEpilogInserter.h so that editors properly...
Michael Gottesman [Mon, 22 Jul 2013 00:52:55 +0000 (00:52 +0000)]
Added missing - in the header of PrologEpilogInserter.h so that editors properly realize it is a c++ header and not a c header.

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

11 years agoTreat nothrow forms of ::operator delete and ::operator delete[] as
Richard Smith [Sun, 21 Jul 2013 23:11:42 +0000 (23:11 +0000)]
Treat nothrow forms of ::operator delete and ::operator delete[] as
deallocation functions.

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

11 years agoHandle replacement into a position past the original member.
Rafael Espindola [Sun, 21 Jul 2013 12:58:07 +0000 (12:58 +0000)]
Handle replacement into a position past the original member.

We were incorrectly computing where to insert a member if it was replacing
a previous member that was before the insert point.

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

11 years agoRemove unused fields.
Rafael Espindola [Sun, 21 Jul 2013 12:42:16 +0000 (12:42 +0000)]
Remove unused fields.

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

11 years agomem2reg: Minor STL usage cleanup. No functionality change.
Benjamin Kramer [Sun, 21 Jul 2013 11:03:40 +0000 (11:03 +0000)]
mem2reg: Minor STL usage cleanup. No functionality change.

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

11 years agoMake the mem2reg interface use an ArrayRef as it keeps a copy of these
Chandler Carruth [Sun, 21 Jul 2013 08:37:58 +0000 (08:37 +0000)]
Make the mem2reg interface use an ArrayRef as it keeps a copy of these
to iterate over.

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

11 years agoMark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.
Craig Topper [Sun, 21 Jul 2013 07:28:13 +0000 (07:28 +0000)]
Mark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.

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

11 years agoRevert a part of r186420. Don't forbid multiple store chains that merge.
Nadav Rotem [Sun, 21 Jul 2013 06:12:57 +0000 (06:12 +0000)]
Revert a part of r186420. Don't forbid multiple store chains that merge.

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

11 years agoFix exception demo: Add mcjit to link component.
Logan Chien [Sun, 21 Jul 2013 03:46:55 +0000 (03:46 +0000)]
Fix exception demo: Add mcjit to link component.

Fix exception demo when we are building the examples with configure/make.
This commit updates the link components in the Makefile.

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

11 years agoHoist the rest of the logic for promoting single-store allocas into the
Chandler Carruth [Sun, 21 Jul 2013 01:52:33 +0000 (01:52 +0000)]
Hoist the rest of the logic for promoting single-store allocas into the
helper function. This leaves both trivial cases handled entirely in
helper functions and merely manages the list of allocas to process in
the run method.

The next step will be to handle all of the trivial promotion work prior
to even creating the core class and the subsequent simplifications that
enables.

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

11 years agoHoist the rest of the logic for fully promoting allocas with all uses in
Chandler Carruth [Sun, 21 Jul 2013 01:44:07 +0000 (01:44 +0000)]
Hoist the rest of the logic for fully promoting allocas with all uses in
a single block into the helper routine. This takes advantage of the fact
that we can directly replace uses prior to any store with undef to
simplify matters and unconditionally promote allocas only used within
one block.

I've removed the special handling for the case of no stores existing.
This has no semantic effect but might slow things down. I'll fix that in
a later patch when I refactor this entire thing to be easier to manage
the different cases.

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

11 years agoRemove a method made dead by the prior refactoring.
Chandler Carruth [Sun, 21 Jul 2013 00:01:34 +0000 (00:01 +0000)]
Remove a method made dead by the prior refactoring.

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

11 years agoHoist the two trivial promotion routines out of the big class that
Chandler Carruth [Sat, 20 Jul 2013 23:59:51 +0000 (23:59 +0000)]
Hoist the two trivial promotion routines out of the big class that
handles the general cases.

The hope is to refactor this so that we don't end up building the entire
class for the trivial cases. I also want to lift a lot of the early
pre-processing in the initial segment of run() into a separate routine,
and really none of it needs to happen inside the primary promotion
class.

These routines in particular used none of the actual state in the
promotion class, so they don't really make sense as members.

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

11 years agoHoist the AllocaInfo struct to the top of the file.
Chandler Carruth [Sat, 20 Jul 2013 23:39:26 +0000 (23:39 +0000)]
Hoist the AllocaInfo struct to the top of the file.

This struct is nicely independent of everything else, and we already
needed a foward declaration here. It's simpler to just define it
immediately.

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

11 years agoSink a typedef and comparator down to the function that actually uses them.
Chandler Carruth [Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)]
Sink a typedef and comparator down to the function that actually uses them.

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

11 years agoDon't crash when llvm.compiler.used becomes empty.
Rafael Espindola [Sat, 20 Jul 2013 23:33:15 +0000 (23:33 +0000)]
Don't crash when llvm.compiler.used becomes empty.

GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.

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

11 years agoDon't allocate the DIBuilder on the heap and remove all the complexity
Chandler Carruth [Sat, 20 Jul 2013 23:33:06 +0000 (23:33 +0000)]
Don't allocate the DIBuilder on the heap and remove all the complexity
that ensued from that.

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

11 years agoRename constructor parameters to follow the common member-shadowing
Chandler Carruth [Sat, 20 Jul 2013 23:23:47 +0000 (23:23 +0000)]
Rename constructor parameters to follow the common member-shadowing
pattern and conform to the naming conventions.

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

11 years agoReformat the implementation of mem2reg with clang-format so that my
Chandler Carruth [Sat, 20 Jul 2013 23:20:08 +0000 (23:20 +0000)]
Reformat the implementation of mem2reg with clang-format so that my
subsequent changes don't introduce inconsistencies.

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

11 years agoComment: try to clarify loop iteration order.
Andrew Trick [Sat, 20 Jul 2013 23:10:31 +0000 (23:10 +0000)]
Comment: try to clarify loop iteration order.

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

11 years agoRemove a DenseMapInfo specialization for std::pair -- we have one of
Chandler Carruth [Sat, 20 Jul 2013 23:09:05 +0000 (23:09 +0000)]
Remove a DenseMapInfo specialization for std::pair -- we have one of
those baked into DenseMap now.

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

11 years agoUpdate mem2reg's comments to conform to the new doxygen standards. No
Chandler Carruth [Sat, 20 Jul 2013 22:20:05 +0000 (22:20 +0000)]
Update mem2reg's comments to conform to the new doxygen standards. No
functionality changed.

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

11 years agoDisallow global aliases to bitcast between address spaces
Matt Arsenault [Sat, 20 Jul 2013 17:46:05 +0000 (17:46 +0000)]
Disallow global aliases to bitcast between address spaces

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

11 years agoRemove trailing whitespace, fix file path in comment
Matt Arsenault [Sat, 20 Jul 2013 17:46:00 +0000 (17:46 +0000)]
Remove trailing whitespace, fix file path in comment

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

11 years agoSROA: Microoptimization: Remove dead entries first, then sort.
Benjamin Kramer [Sat, 20 Jul 2013 08:38:34 +0000 (08:38 +0000)]
SROA: Microoptimization: Remove dead entries first, then sort.

While there replace an explicit struct with std::mem_fun.

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

11 years agoInstCombine: call FoldOpIntoSelect for all floating binops, not just fmul
Stephen Lin [Sat, 20 Jul 2013 07:13:13 +0000 (07:13 +0000)]
InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul

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

11 years agoHave InlineCost check constant fcmps
Matt Arsenault [Sat, 20 Jul 2013 04:09:00 +0000 (04:09 +0000)]
Have InlineCost check constant fcmps

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

11 years agoAdd Option unit tests to the make build
Hans Wennborg [Sat, 20 Jul 2013 03:04:36 +0000 (03:04 +0000)]
Add Option unit tests to the make build

Previously, they were only built and run in the CMake build.

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

11 years agoDebug Info Verifier: simplify DIxxx::Verify
Manman Ren [Sat, 20 Jul 2013 00:38:46 +0000 (00:38 +0000)]
Debug Info Verifier: simplify DIxxx::Verify

Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

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

11 years agoFix size_t -> uint warnings with MSVC 64-bit build
Matt Arsenault [Sat, 20 Jul 2013 00:20:10 +0000 (00:20 +0000)]
Fix size_t -> uint warnings with MSVC 64-bit build

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

11 years agoRefactor AnalyzeBranch on ARM. The previous version did not always analyze
Lang Hames [Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)]
Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll).

<rdar://problem/14464830>

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

11 years agoRetry submitting r186623: COFFDumper: Dump data directory entries.
Rui Ueyama [Fri, 19 Jul 2013 23:23:29 +0000 (23:23 +0000)]
Retry submitting r186623: COFFDumper: Dump data directory entries.

The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.

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

11 years agofix an 80-col line.
Nadav Rotem [Fri, 19 Jul 2013 23:14:01 +0000 (23:14 +0000)]
fix an 80-col line.

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

11 years agoUse LLVMs ADTs that improve the compile time of this pass.
Nadav Rotem [Fri, 19 Jul 2013 23:12:19 +0000 (23:12 +0000)]
Use LLVMs ADTs that improve the compile time of this pass.

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

11 years agoSLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions...
Nadav Rotem [Fri, 19 Jul 2013 23:11:15 +0000 (23:11 +0000)]
SLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions that check GEPs and eliminate two of the calls to accumulateConstantOffset.

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

11 years agoR600: Don't emit empty then clause and use alu_pop_after
Vincent Lejeune [Fri, 19 Jul 2013 21:45:15 +0000 (21:45 +0000)]
R600: Don't emit empty then clause and use alu_pop_after

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

11 years agoR600: Simplify AMDILCFGStructurize by removing templates and assuming single exit
Vincent Lejeune [Fri, 19 Jul 2013 21:45:06 +0000 (21:45 +0000)]
R600: Simplify AMDILCFGStructurize by removing templates and assuming single exit

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

11 years agoR600: Replace legacy debug code in AMDILCFGStructurizer.cpp
Vincent Lejeune [Fri, 19 Jul 2013 21:44:56 +0000 (21:44 +0000)]
R600: Replace legacy debug code in AMDILCFGStructurizer.cpp

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

11 years agoFix inserting new elements in a specified location.
Rafael Espindola [Fri, 19 Jul 2013 21:23:28 +0000 (21:23 +0000)]
Fix inserting new elements in a specified location.

We were only handling the 'a' and 'b' options during moves before.

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

11 years agos/compiler_used/compiler.used/.
Rafael Espindola [Fri, 19 Jul 2013 18:44:51 +0000 (18:44 +0000)]
s/compiler_used/compiler.used/.

We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

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

11 years agoAdd some flag exclusion tests.
Reid Kleckner [Fri, 19 Jul 2013 18:05:13 +0000 (18:05 +0000)]
Add some flag exclusion tests.

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

11 years ago[Option] Add inclusion and exclusion flags to option parsing
Reid Kleckner [Fri, 19 Jul 2013 18:04:57 +0000 (18:04 +0000)]
[Option] Add inclusion and exclusion flags to option parsing

Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1049

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

11 years agolit: Support cancellation on Windows
Nico Rieck [Fri, 19 Jul 2013 17:08:08 +0000 (17:08 +0000)]
lit: Support cancellation on Windows

The current machinery using KeyboardInterrupt for canceling doesn't work
with multiple threads on Windows as it just cancels the currently run tests
but the runners continue.

We install a handler for Ctrl-C which stops the provider from providing any
more tests to the runners. Together with aborting all currently running
tests, this brings lit to a halt.

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

11 years agoAdd a line that got missed off somehow. Sorry about that!
Joey Gouly [Fri, 19 Jul 2013 16:45:16 +0000 (16:45 +0000)]
Add a line that got missed off somehow. Sorry about that!

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

11 years ago[SystemZ] Add tests for ALHSIK and ALGHSIK
Richard Sandiford [Fri, 19 Jul 2013 16:44:32 +0000 (16:44 +0000)]
[SystemZ] Add tests for ALHSIK and ALGHSIK

The insn definitions themselves crept into r186689, sorry.
This should be the last of the distinct-ops instructions.

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

11 years ago[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK
Richard Sandiford [Fri, 19 Jul 2013 16:37:00 +0000 (16:37 +0000)]
[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK

Follows the same lines as r186686, but much more limited, since we only
use ADD LOGICAL for multi-i64 additions.

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

11 years ago[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.
Joey Gouly [Fri, 19 Jul 2013 16:34:16 +0000 (16:34 +0000)]
[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.

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

11 years ago[SystemZ] Add AHIK and AGHIK
Richard Sandiford [Fri, 19 Jul 2013 16:32:12 +0000 (16:32 +0000)]
[SystemZ] Add AHIK and AGHIK

I did these as a separate patch because it uses a slightly different
form of RIE layout.

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

11 years ago[SystemZ] Add ARK, AGRK, SRK and SGRK
Richard Sandiford [Fri, 19 Jul 2013 16:26:39 +0000 (16:26 +0000)]
[SystemZ] Add ARK, AGRK, SRK and SGRK

The testsuite changes follow the same lines as for r186683.

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

11 years ago[SystemZ] Add NGRK, OGRK and XGRK
Richard Sandiford [Fri, 19 Jul 2013 16:24:22 +0000 (16:24 +0000)]
[SystemZ] Add NGRK, OGRK and XGRK

Like r186683, but for 64 bits.

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

11 years agoInitialize TempFileHandle.
Serge Pavlov [Fri, 19 Jul 2013 16:23:54 +0000 (16:23 +0000)]
Initialize TempFileHandle.

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

11 years ago[SystemZ] Add NRK, ORK and XRK
Richard Sandiford [Fri, 19 Jul 2013 16:21:55 +0000 (16:21 +0000)]
[SystemZ] Add NRK, ORK and XRK

The atomic tests assume the two-operand forms, so I've restricted them to z10.

Running and-01.ll, or-01.ll and xor-01.ll for z196 as well as z10 shows why
using convertToThreeAddress() is better than exposing the three-operand forms
first and then converting back to two operands where possible (which is what
I'd originally tried).  Using the three-operand form first stops us from
taking advantage of NG, OG and XG for spills.

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

11 years agoARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.
Tilmann Scheller [Fri, 19 Jul 2013 16:18:56 +0000 (16:18 +0000)]
ARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.

See A8.8.127 in ARM DDI 0406C.b.

Related to <rdar://problem/14403733>.

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

11 years ago[SystemZ] Use SLLK, SRLK and SRAK for codegen
Richard Sandiford [Fri, 19 Jul 2013 16:12:08 +0000 (16:12 +0000)]
[SystemZ] Use SLLK, SRLK and SRAK for codegen

This patch uses the instructions added in r186680 for codegen.

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

11 years ago[SystemZ] Start adding z196 and zEC12 support
Richard Sandiford [Fri, 19 Jul 2013 16:09:03 +0000 (16:09 +0000)]
[SystemZ] Start adding z196 and zEC12 support

This first step just adds definitions for SLLK, SRLK and SRAK.
The next patch will actually make use of them during codegen.

insn-bad.s tests that some form of error is reported when using these
instructions on z10.  More work is needed to get the "instruction requires:
distinct-ops" that we'd ideally like, so I've stubbed that part out for now.
I'll come back and make it mandatory once the necessary changes are in.

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

11 years agoSplit openFileForWrite into windows and unix versions.
Rafael Espindola [Fri, 19 Jul 2013 15:02:03 +0000 (15:02 +0000)]
Split openFileForWrite into windows and unix versions.

It is similar to 186511, but for creating files for writing.

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

11 years agoAdd a unit test for checking that we respect the F_Binary flag.
Rafael Espindola [Fri, 19 Jul 2013 14:41:25 +0000 (14:41 +0000)]
Add a unit test for checking that we respect the F_Binary flag.

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

11 years agoCleanup the stats counters for the new implementation. These actually
Chandler Carruth [Fri, 19 Jul 2013 10:57:36 +0000 (10:57 +0000)]
Cleanup the stats counters for the new implementation. These actually
count the right things and have the right names.

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

11 years agoFix another assert failure very similar to PR16651's test case. This
Chandler Carruth [Fri, 19 Jul 2013 10:57:32 +0000 (10:57 +0000)]
Fix another assert failure very similar to PR16651's test case. This
test case came from Benjamin and found the parallel bug in the vector
promotion code.

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

11 years agoARM: delete two tests now integrated into the larger files
Tim Northover [Fri, 19 Jul 2013 10:23:15 +0000 (10:23 +0000)]
ARM: delete two tests now integrated into the larger files

Somehow forgot to git rm these two files. I believe I left the remaining
invalid* tests intentionally, though whether my reasons were sound is a
different matter.

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

11 years agoARM: remove invalid invalid tests
Tim Northover [Fri, 19 Jul 2013 10:19:56 +0000 (10:19 +0000)]
ARM: remove invalid invalid tests

The tests were checking for barriers which the ARM ARM says they must execute
as a full system DMB/DSB, rather than that they're UNDEFINED and LLVM does in
fact represent them.

The tests happened to be passing because they were using a non-versioned ARM
triple which didn't have *any* DMB/DSB instructions.

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

11 years agoImprove llvm-mc disassembler mode and refactor ARM tests to use it
Tim Northover [Fri, 19 Jul 2013 10:05:04 +0000 (10:05 +0000)]
Improve llvm-mc disassembler mode and refactor ARM tests to use it

This allows "llvm-mc -disassemble" to accept two new features:
  + Using comma as a byte separator
  + Grouping bytes with '[' and ']' pairs.

The behaviour outside a [...] group is unchanged. But within the group once
llvm-mc encounters a true error, it stops rather than trying to resynchronise
the stream at the next byte. This is more useful for disassembly tests, where
we have an almost-instruction in mind and don't care what the misaligned
interpretation would be. Particularly if it means llvm-mc won't actually see
the next intended almost-instruction.

As a side effect, this means llvm-mc can disassemble its own -show-encoding
output if copy-pasted.

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

11 years agoTry to move to a more reasonable set of naming conventions given the new
Chandler Carruth [Fri, 19 Jul 2013 09:13:58 +0000 (09:13 +0000)]
Try to move to a more reasonable set of naming conventions given the new
implementation of the SROA algorithm. We were using the term 'partition'
in many places that no longer ever represented an actual partition, but
rather just an arbitrary slice of an alloca.

No functionality change intended here. Mostly just renaming of types,
functions, variables, and rewording of comments. Several comments were
rewritten to make a lot more sense in the new structure of things.

The stats are still weird and not reflective of how this really works.
I'll fix those up in a separate patch as it is a touch more semantic of
a change...

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

11 years agoFix uninitialized memory read found by MemorySanitizer: always set output parameter...
Alexey Samsonov [Fri, 19 Jul 2013 08:55:18 +0000 (08:55 +0000)]
Fix uninitialized memory read found by MemorySanitizer: always set output parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount

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

11 years agoA long overdue cleanup in SROA to use 'DL' instead of 'TD' for the
Chandler Carruth [Fri, 19 Jul 2013 07:21:28 +0000 (07:21 +0000)]
A long overdue cleanup in SROA to use 'DL' instead of 'TD' for the
DataLayout variables.

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

11 years agoFix PR16651, an assert introduced in my recent re-work of the innards of
Chandler Carruth [Fri, 19 Jul 2013 07:12:23 +0000 (07:12 +0000)]
Fix PR16651, an assert introduced in my recent re-work of the innards of
SROA.

The crux of the issue is that now we track uses of a partition of the
alloca in two places: the iterators over the partitioning uses and the
previously collected split uses vector. We weren't accounting for the
fact that the split uses might invalidate integer widening in ways other
than due to their width (in this case due to being volatile).

Further reduced testcase added to the tests.

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

11 years agoTry to appease the bots.
Manman Ren [Fri, 19 Jul 2013 04:56:51 +0000 (04:56 +0000)]
Try to appease the bots.

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

11 years agollvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 can be...
NAKAMURA Takumi [Fri, 19 Jul 2013 01:26:08 +0000 (01:26 +0000)]
llvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 can be reverted.

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

11 years ago[mips] Delete MFC1_FT_CCR, MTC1_FT_CCR and MOVCCRToCCR.
Akira Hatanaka [Fri, 19 Jul 2013 01:19:52 +0000 (01:19 +0000)]
[mips] Delete MFC1_FT_CCR, MTC1_FT_CCR and MOVCCRToCCR.

No functionality change.

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

11 years agoRemove DIBuilder cache of variable TheCU and change the few
Eric Christopher [Fri, 19 Jul 2013 00:51:47 +0000 (00:51 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

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

11 years agoClarify comment for extension().
Rui Ueyama [Fri, 19 Jul 2013 00:51:17 +0000 (00:51 +0000)]
Clarify comment for extension().

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

11 years agoMI Sched: test case fix for previous checkin.
Andrew Trick [Fri, 19 Jul 2013 00:31:31 +0000 (00:31 +0000)]
MI Sched: test case fix for previous checkin.

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

11 years agoDebug Info: enable verifying by default and disable testing cases that fail.
Manman Ren [Fri, 19 Jul 2013 00:31:03 +0000 (00:31 +0000)]
Debug Info: enable verifying by default and disable testing cases that fail.

1> Use DebugInfoFinder to find debug info MDNodes.
2> Add disable-debug-info-verifier to disable verifying debug info.
3> Disable verifying for testing cases that fail (will update the testing cases
   later on).
4> MDNodes generated by clang can have empty filename for TAG_inheritance and
   TAG_friend, so DIType::Verify is modified accordingly.

Note that DebugInfoFinder does not list all debug info MDNode.
For example, clang can generate:
metadata !{i32 786468}, which will fail to verify.
This MDNode is used by debug info but not included in DebugInfoFinder.
This MDNode is generated as a temporary node in DIBuilder::createFunction
  Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
  MDNode::getTemporary(VMContext, TElts)

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

11 years agoMI Sched: Update the way resources are tracked so the current heuristics make more...
Andrew Trick [Fri, 19 Jul 2013 00:20:07 +0000 (00:20 +0000)]
MI Sched: Update the way resources are tracked so the current heuristics make more sense.

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

11 years agoFix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows...
Stephen Lin [Thu, 18 Jul 2013 23:26:58 +0000 (23:26 +0000)]
Fix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows error recovery.

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

11 years agoRevert "COFFDumper: Dump data directory entries."
Rui Ueyama [Thu, 18 Jul 2013 23:15:50 +0000 (23:15 +0000)]
Revert "COFFDumper: Dump data directory entries."

Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623.

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

11 years agoUpdate to more CodeGen tests to use CHECK-LABEL for labels corresponding to function...
Stephen Lin [Thu, 18 Jul 2013 22:47:09 +0000 (22:47 +0000)]
Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error  messages. No functionality change.

All changes were made by the following bash script:

  find test/CodeGen -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    grep -q "^; *RUN: *llc.*debug" $NAME && continue
    grep -q "^; *RUN:.*llvm-objdump" $NAME && continue
    grep -q "^; *RUN: *opt.*" $NAME && continue
    TEMP=`mktemp -t temp`
    cp $NAME $TEMP
    sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
    while read FUNC; do
      sed -i '' "s/;\([A-Za-z0-9_-]*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC[:]* *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP
    done
    sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
    sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
    sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
    sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
    mv $TEMP $NAME
  done

This script catches a superset of the cases caught by the script associated with commit r186280. It initially found some false positives due to unusual constructs in a minority of tests; all such cases were disambiguated first in commit r186621.

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

11 years agoCOFFDumper: Dump data directory entries.
Rui Ueyama [Thu, 18 Jul 2013 22:44:20 +0000 (22:44 +0000)]
COFFDumper: Dump data directory entries.

Summary:
Dump optional data directory entries in the PE/COFF header, so that
we can test the output of LLD linker. This patch updates the test binary
file, but the source of the binary is the same. I just re-linked the file.
I don't know how the previous file was linked, but the previous file did
not have any data directory entries for some reason.

Reviewers: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1148

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

11 years agoClean up some of this code a tiny bit, no functionality change.
Nick Lewycky [Thu, 18 Jul 2013 22:32:32 +0000 (22:32 +0000)]
Clean up some of this code a tiny bit, no functionality change.

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

11 years agoDisambiguate function names in some CodeGen tests. (Some tests were using function...
Stephen Lin [Thu, 18 Jul 2013 22:29:15 +0000 (22:29 +0000)]
Disambiguate function names in some CodeGen tests. (Some tests were using function names that also were names of instructions and/or doing other unusual things that were making the test not amenable to otherwise scriptable pattern matching.) No functionality change.

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

11 years agoARM: Make sure the instruction alias for PLI uses the right subtarget features.
Tilmann Scheller [Thu, 18 Jul 2013 22:19:59 +0000 (22:19 +0000)]
ARM: Make sure the instruction alias for PLI uses the right subtarget features.

PLI requires both the Thumb2 and the ARMv7 feature.

Related to <rdar://problem/14403733>.

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

11 years agoR600/SI: Fix crash with VSELECT
Tom Stellard [Thu, 18 Jul 2013 21:43:53 +0000 (21:43 +0000)]
R600/SI: Fix crash with VSELECT

https://bugs.freedesktop.org/show_bug.cgi?id=66175

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

11 years agoR600/SI: Add support for v2f32 loads
Tom Stellard [Thu, 18 Jul 2013 21:43:48 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 loads

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

11 years agoR600/SI: Add support for v2f32 stores
Tom Stellard [Thu, 18 Jul 2013 21:43:42 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 stores

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

11 years agoR600: Expand VSELECT for all types
Tom Stellard [Thu, 18 Jul 2013 21:43:35 +0000 (21:43 +0000)]
R600: Expand VSELECT for all types

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

11 years agotest/MC/AsmParser/secure_log_unique.s requires shell
Hans Wennborg [Thu, 18 Jul 2013 21:34:13 +0000 (21:34 +0000)]
test/MC/AsmParser/secure_log_unique.s requires shell

This should fix the chapuni bots.

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

11 years agoFix -Wdocumentation warning
Hans Wennborg [Thu, 18 Jul 2013 21:00:12 +0000 (21:00 +0000)]
Fix -Wdocumentation warning

s/Tokenize/Tokenizer/ to make the comment correspond to the
parameter name

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

11 years agoAdd a test for .secure_log_unique.
Rafael Espindola [Thu, 18 Jul 2013 20:34:26 +0000 (20:34 +0000)]
Add a test for .secure_log_unique.

It also doubles a test that F_Append works.

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

11 years agoRevert "Remove DIBuilder cache of variable TheCU and change the few"
Eric Christopher [Thu, 18 Jul 2013 19:13:06 +0000 (19:13 +0000)]
Revert "Remove DIBuilder cache of variable TheCU and change the few"

This reverts commit r186599 as I didn't want to commit this yet.

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

11 years agoEqual means ==, not !=. Thanks to Benjamin for catching.
Eric Christopher [Thu, 18 Jul 2013 19:11:41 +0000 (19:11 +0000)]
Equal means ==, not !=. Thanks to Benjamin for catching.

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

11 years agoRemove DIBuilder cache of variable TheCU and change the few
Eric Christopher [Thu, 18 Jul 2013 19:11:29 +0000 (19:11 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

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