oota-llvm.git
10 years agodos2unix on quoted-names.ll
Hans Wennborg [Wed, 16 Oct 2013 01:22:07 +0000 (01:22 +0000)]
dos2unix on quoted-names.ll

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

10 years agoMC: Better handling of tricky symbol and section names
Hans Wennborg [Wed, 16 Oct 2013 01:20:40 +0000 (01:20 +0000)]
MC: Better handling of tricky symbol and section names

Because of win32 mangling, we produce symbol and section names with
funny characters in them, most notably @ characters.

MC would choke on trying to parse its own assembly output. This patch addresses
that by:

- Making @ trigger quoting of symbol names
- Also quote section names in the same way
- Just parse section names like other identifiers (to allow for quotes)
- Don't assume @ signifies a symbol variant if it is in a string.

Differential Revision: http://llvm-reviews.chandlerc.com/D1945

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

10 years agoMove .ident handling to MCStreamer.
Rafael Espindola [Wed, 16 Oct 2013 01:05:45 +0000 (01:05 +0000)]
Move .ident handling to MCStreamer.

No functionality change, but exposes the API so that codegen can use it too.

Patch by Katya Romanova.

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

10 years agoFixing build warning/error
Andrew Kaylor [Wed, 16 Oct 2013 01:01:15 +0000 (01:01 +0000)]
Fixing build warning/error

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

10 years agoSimplify zero initialization of DIEAttrs variable.
David Blaikie [Wed, 16 Oct 2013 00:47:21 +0000 (00:47 +0000)]
Simplify zero initialization of DIEAttrs variable.

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

10 years agoAdding padding to the .eh_frame section in RuntimeDyld
Andrew Kaylor [Wed, 16 Oct 2013 00:32:24 +0000 (00:32 +0000)]
Adding padding to the .eh_frame section in RuntimeDyld

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

10 years agoAdding support for deregistering EH frames with MCJIT.
Andrew Kaylor [Wed, 16 Oct 2013 00:14:21 +0000 (00:14 +0000)]
Adding support for deregistering EH frames with MCJIT.

Patch by Yaron Keren

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

10 years agoFix typo
Matt Arsenault [Tue, 15 Oct 2013 23:44:48 +0000 (23:44 +0000)]
Fix typo

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

10 years agoFix missing C++ mode thing in header
Matt Arsenault [Tue, 15 Oct 2013 23:44:45 +0000 (23:44 +0000)]
Fix missing C++ mode thing in header

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

10 years agoEnable MI Sched for x86.
Andrew Trick [Tue, 15 Oct 2013 23:33:07 +0000 (23:33 +0000)]
Enable MI Sched for x86.

This changes the SelectionDAG scheduling preference to source
order. Soon, the SelectionDAG scheduler can be bypassed saving
a nice chunk of compile time.

Performance differences that result from this change are often a
consequence of register coalescing. The register coalescer is far from
perfect. Bugs can be filed for deficiencies.

On x86 SandyBridge/Haswell, the source order schedule is often
preserved, particularly for small blocks.

Register pressure is generally improved over the SD scheduler's ILP
mode. However, we are still able to handle large blocks that require
latency hiding, unlike the SD scheduler's BURR mode. MI scheduler also
attempts to discover the critical path in single-block loops and
adjust heuristics accordingly.

The MI scheduler relies on the new machine model. This is currently
unimplemented for AVX, so we may not be generating the best code yet.

Unit tests are updated so they don't depend on SD scheduling heuristics.

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

10 years agoMake sure we're not attempting to construct a subprogram DIE
Eric Christopher [Tue, 15 Oct 2013 23:31:38 +0000 (23:31 +0000)]
Make sure we're not attempting to construct a subprogram DIE
twice and just look up the value. Fix the one case where
we were trying to create a subprogram DIE and we should already
have had one. Reflow formatting in collectDeadVariables while fixing.

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

10 years agoAdd an assert that we have a scope that matters for methods
Eric Christopher [Tue, 15 Oct 2013 23:31:36 +0000 (23:31 +0000)]
Add an assert that we have a scope that matters for methods
and remove a call to getNonCompileUnitScope as a method
shouldn't be in the compile unit scope.

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

10 years agoClean up, formatting, comments. No functional change.
Eric Christopher [Tue, 15 Oct 2013 23:31:31 +0000 (23:31 +0000)]
Clean up, formatting, comments. No functional change.

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

10 years agoSupport/FileSystem.h: Remove a trailing comma in enum file_magic::Impl.
NAKAMURA Takumi [Tue, 15 Oct 2013 23:01:44 +0000 (23:01 +0000)]
Support/FileSystem.h: Remove a trailing comma in enum file_magic::Impl.

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

10 years agoUse ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
David Blaikie [Tue, 15 Oct 2013 23:00:17 +0000 (23:00 +0000)]
Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.

Also minor using namespace move so it's not hard-up against the function
definition and outside the namespace as is usual.

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

10 years agoR600/SI: Remove some leftover MI dump call
Vincent Lejeune [Tue, 15 Oct 2013 22:48:51 +0000 (22:48 +0000)]
R600/SI: Remove some leftover MI dump call

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

10 years agoPath: Recognize Windows compiled resource file.
Rui Ueyama [Tue, 15 Oct 2013 22:45:38 +0000 (22:45 +0000)]
Path: Recognize Windows compiled resource file.

Some background: One can pass compiled resource files (.res files) directly
to the linker on Windows. If a resource file is given, the linker will run
"cvtres" command in background to convert the resource file to a COFF file
to link it.

What I'm trying to do with this patch is to make the linker to recognize
the resource file by file magic, so that it can run cvtres command.

Differential Revision: http://llvm-reviews.chandlerc.com/D1943

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

10 years agoSeparating ELF and MachO stub info functions for RuntimeDyld
Andrew Kaylor [Tue, 15 Oct 2013 21:32:56 +0000 (21:32 +0000)]
Separating ELF and MachO stub info functions for RuntimeDyld

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

10 years agoReformat.
Eric Christopher [Tue, 15 Oct 2013 21:22:12 +0000 (21:22 +0000)]
Reformat.

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

10 years ago[AArch64] Add support for NEON scalar signed saturating absolute value and
Chad Rosier [Tue, 15 Oct 2013 21:18:44 +0000 (21:18 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

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

10 years agoFixing some host==target assumptions in RuntimeDyld
Andrew Kaylor [Tue, 15 Oct 2013 20:44:55 +0000 (20:44 +0000)]
Fixing some host==target assumptions in RuntimeDyld

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

10 years agoRemove some dead code. (DarwinGDBCompat was retired in r189903).
Adrian Prantl [Tue, 15 Oct 2013 20:26:37 +0000 (20:26 +0000)]
Remove some dead code. (DarwinGDBCompat was retired in r189903).

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

10 years agoStruct byval: fix a copy-paste error for thumb2.
Manman Ren [Tue, 15 Oct 2013 19:42:32 +0000 (19:42 +0000)]
Struct byval: fix a copy-paste error for thumb2.

PR17309

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

10 years agoFix PR17546
Michael Liao [Tue, 15 Oct 2013 17:51:58 +0000 (17:51 +0000)]
Fix PR17546

- Type of index used in extract_vector_elt or insert_vector_elt supposes
  to be TLI.getVectorIdxTy() which is pointer type on most targets. It'd
  better to truncate (or zero-extend in case it's changed later) it to
  mask element type to guarantee they are matching instead of asserting
  that.

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

10 years agoFix PR16807
Michael Liao [Tue, 15 Oct 2013 17:51:02 +0000 (17:51 +0000)]
Fix PR16807

- Lower signed division by constant powers-of-2 to target-independent
  DAG operators instead of target-dependent ones to support them better
  on targets where vector types are legal but shift operators on that
  types are illegal. E.g., on AVX, PSRAW is only available on <8 x i16>
  though <16 x i16> is a legal type.

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

10 years agoLoopVectorize: Properly reflect PODness in comments.
Benjamin Kramer [Tue, 15 Oct 2013 16:19:54 +0000 (16:19 +0000)]
LoopVectorize: Properly reflect PODness in comments.

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

10 years agoGuard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.
Pekka Jaaskelainen [Tue, 15 Oct 2013 14:40:46 +0000 (14:40 +0000)]
Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.

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

10 years agoDo not assert when trying to add a meta data operand with
Pekka Jaaskelainen [Tue, 15 Oct 2013 14:18:10 +0000 (14:18 +0000)]
Do not assert when trying to add a meta data operand with
MachineInstr::addOperand().

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

10 years ago[mips][msa] Added support for build_vector for v4f32 and v2f64.
Daniel Sanders [Tue, 15 Oct 2013 13:14:41 +0000 (13:14 +0000)]
[mips][msa] Added support for build_vector for v4f32 and v2f64.

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

10 years agoRevert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast)...
Anders Waldenborg [Tue, 15 Oct 2013 13:04:27 +0000 (13:04 +0000)]
Revert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast) windows and darwin.

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

10 years agoAdd AllTargetsBindings sublibrary instead of having static inlines in the llvm-c...
Anders Waldenborg [Tue, 15 Oct 2013 12:08:59 +0000 (12:08 +0000)]
Add AllTargetsBindings sublibrary instead of having static inlines in the llvm-c headers.

This new library will be linked in when using the "all-targets"
component and contains the LLVMInitializeAll* functions.

This means that those functions will exist as real symbols in
the shared library, and can therefore can be called from
bindings that are using ffi the shared library.

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

10 years ago[SystemZ] Use A(G)SI when spilling the target of a constant addition
Richard Sandiford [Tue, 15 Oct 2013 08:42:59 +0000 (08:42 +0000)]
[SystemZ] Use A(G)SI when spilling the target of a constant addition

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

10 years agodocs: Remove incompatibility with Solaris shell
David Majnemer [Tue, 15 Oct 2013 08:30:07 +0000 (08:30 +0000)]
docs: Remove incompatibility with Solaris shell

There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does.  Instead, just blindly
try to delete it.

This fixes PR17541.

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

10 years agoFix MSP430 calling convention to match MSPGCC
Job Noorman [Tue, 15 Oct 2013 08:19:39 +0000 (08:19 +0000)]
Fix MSP430 calling convention to match MSPGCC

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

10 years agollvm/test/CodeGen/X86/break-avx-dep.ll: Relax an expression to be matched to also...
NAKAMURA Takumi [Tue, 15 Oct 2013 06:36:36 +0000 (06:36 +0000)]
llvm/test/CodeGen/X86/break-avx-dep.ll: Relax an expression to be matched to also r[89], not only rXX.

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

10 years agoRemove x86_sse42_crc32_64_8 intrinsic. It has no functional difference from x86_sse42...
Craig Topper [Tue, 15 Oct 2013 05:20:47 +0000 (05:20 +0000)]
Remove x86_sse42_crc32_64_8 intrinsic. It has no functional difference from x86_sse42_crc32_32_8 and was not mapped to a clang builtin. I'm not even sure why this form of the instruction is even called out explicitly in the docs. Also add AutoUpgrade support to convert it into the other intrinsic with appropriate trunc and zext.

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

10 years agoImprove on r192635, ExeDepsFix for avx, and add a test case.
Andrew Trick [Tue, 15 Oct 2013 03:39:43 +0000 (03:39 +0000)]
Improve on r192635, ExeDepsFix for avx, and add a test case.

rdar:15221834 False AVX register dependencies cause 5x slowdown on
flops-5/6 and significant slowdown on several others.

This was blocking the switch to MI-Sched.

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

10 years agoSimplify formatting and sort these. No functionality changed.
Chandler Carruth [Tue, 15 Oct 2013 02:03:44 +0000 (02:03 +0000)]
Simplify formatting and sort these. No functionality changed.

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

10 years ago[mips] Define a pseudo instruction which writes to both the lower and higher
Akira Hatanaka [Tue, 15 Oct 2013 01:48:30 +0000 (01:48 +0000)]
[mips] Define a pseudo instruction which writes to both the lower and higher
parts of the accumulators and gets expanded post-RA.

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

10 years ago[mips] Use predicates to guard instructions using accumulator registers instead
Akira Hatanaka [Tue, 15 Oct 2013 01:21:37 +0000 (01:21 +0000)]
[mips] Use predicates to guard instructions using accumulator registers instead
of relying on AddedComplexity.

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

10 years ago[mips] Rename isel nodes.
Akira Hatanaka [Tue, 15 Oct 2013 01:12:50 +0000 (01:12 +0000)]
[mips] Rename isel nodes.

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

10 years ago[mips] Transfer kill flag to the newly created operand.
Akira Hatanaka [Tue, 15 Oct 2013 01:06:30 +0000 (01:06 +0000)]
[mips] Transfer kill flag to the newly created operand.

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

10 years ago[mips] Set HI/LO registers' HWEncoding field.
Akira Hatanaka [Tue, 15 Oct 2013 01:00:00 +0000 (01:00 +0000)]
[mips] Set HI/LO registers' HWEncoding field.

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

10 years ago[mips] Delete unnecessary code.
Akira Hatanaka [Tue, 15 Oct 2013 00:48:42 +0000 (00:48 +0000)]
[mips] Delete unnecessary code.

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

10 years agoRemove dead code.
Rafael Espindola [Mon, 14 Oct 2013 23:40:11 +0000 (23:40 +0000)]
Remove dead code.

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

10 years agoUpdate comment list of GLOBALVAR modifiers in BitcodeWriter to include externally_ini...
Michael Gottesman [Mon, 14 Oct 2013 22:36:51 +0000 (22:36 +0000)]
Update comment list of GLOBALVAR modifiers in BitcodeWriter to include externally_initialized.

Thanks to Shuxin Yang for catching this.

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

10 years ago[X86][FastISel] During X86 fastisel, the address of indirect call was resolved
Quentin Colombet [Mon, 14 Oct 2013 22:32:09 +0000 (22:32 +0000)]
[X86][FastISel] During X86 fastisel, the address of indirect call was resolved
through bitcast, ptrtoint, and inttoptr instructions. This is valid
only if the related instructions are in that same basic block, otherwise
we may reference variables that were not live accross basic blocks
resulting in undefined virtual registers.

The bug was exposed when both SDISel and FastISel were used within the same
function, i.e., one basic block is issued with FastISel and another with SDISel,
as demonstrated with the testcase.

<rdar://problem/15192473>

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

10 years agoFix the ExecutionDepsFix pass to handle AVX instructions.
Andrew Trick [Mon, 14 Oct 2013 22:19:03 +0000 (22:19 +0000)]
Fix the ExecutionDepsFix pass to handle AVX instructions.

This pass is needed to break false dependencies. Without it, unlucky
register assignment can result in wild (5x) swings in
performance. This pass was trying to handle AVX but not getting it
right. AVX doesn't have partial register defs, it has unused register
reads in which the high bits of a source operand are copied into the
unused bits of the dest.

Fixing this requires conservative liveness analysis. This is awkard
because the pass already has its own pseudo-liveness. However, proper
liveness is expensive, and we would like to use a generic utility to
compute it. The fix only invokes liveness on-demand. It is rare to
detect a case that needs undef-read dependence breaking, but when it
happens, it can be needed many times within a very large block.

I think the existing heuristic which uses a register window of 16 is
too conservative for loop-carried false dependencies. If the loop is a
reduction. The out-of-order engine may be able to execute several loop
iterations in parallel. However, I'll leave this tuning exercise for
next time.

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

10 years agoLiveRegUnits: Use *MBB for consistency and convenience.
Andrew Trick [Mon, 14 Oct 2013 22:18:59 +0000 (22:18 +0000)]
LiveRegUnits: Use *MBB for consistency and convenience.

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

10 years agowhitespace
Andrew Trick [Mon, 14 Oct 2013 22:18:56 +0000 (22:18 +0000)]
whitespace

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

10 years agoFix a typo, in a comment, in a test.
Nick Lewycky [Mon, 14 Oct 2013 22:02:53 +0000 (22:02 +0000)]
Fix a typo, in a comment, in a test.

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

10 years agoRevert part of a fix from 2010, changes since then:
Eric Christopher [Mon, 14 Oct 2013 21:52:26 +0000 (21:52 +0000)]
Revert part of a fix from 2010, changes since then:

a) x86-64 TLS has been documented
b) the code path should use movq for the correct relocation
   to be generated.

I've also added a fixme for the test case that we should improve
the code generated, it should look something like is documented
in the tls abi document.

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

10 years agoReformat this routine slightly.
Eric Christopher [Mon, 14 Oct 2013 21:52:23 +0000 (21:52 +0000)]
Reformat this routine slightly.

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

10 years agoRemove some extraneous whitespace.
Eric Christopher [Mon, 14 Oct 2013 21:52:18 +0000 (21:52 +0000)]
Remove some extraneous whitespace.

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

10 years agoLiveRegUnits::removeRegsInMask safety.
Andrew Trick [Mon, 14 Oct 2013 20:45:19 +0000 (20:45 +0000)]
LiveRegUnits::removeRegsInMask safety.

Clobbering is exclusive not inclusive on register units.
For liveness, we need to consider all the preserved registers.
e.g. A regmask that clobbers YMM0 may preserve XMM0.
Units are only clobbered when all super-registers are clobbered.

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

10 years agoUse a SparseSet in LiveRegUnits.
Andrew Trick [Mon, 14 Oct 2013 20:45:17 +0000 (20:45 +0000)]
Use a SparseSet in LiveRegUnits.

Some clients may add block live ins and may track liveness over a
large scope. This guarantees an efficient implementation in all cases
with no memory allocation/deallocation, independent of the number of
target registers. It could be slightly less convenient but is fine in
the expected case.

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

10 years agoMove LiveRegUnits implementation into .cpp. Comment and format.
Andrew Trick [Mon, 14 Oct 2013 20:45:14 +0000 (20:45 +0000)]
Move LiveRegUnits implementation into .cpp. Comment and format.

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

10 years agoRemove extra indentation in LiveRegUnits.
Andrew Trick [Mon, 14 Oct 2013 20:45:11 +0000 (20:45 +0000)]
Remove extra indentation in LiveRegUnits.

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

10 years agoConvert LiveRegUnits methods to the current convention (it's new code).
Andrew Trick [Mon, 14 Oct 2013 20:45:09 +0000 (20:45 +0000)]
Convert LiveRegUnits methods to the current convention (it's new code).

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

10 years agoDebug Info: static member DIE creation.
Manman Ren [Mon, 14 Oct 2013 20:33:57 +0000 (20:33 +0000)]
Debug Info: static member DIE creation.

Clean up creation of static member DIEs. We can create static member DIEs from
two places, so we call getOrCreateStaticMemberDIE from the two places.

getOrCreateStaticMemberDIE will get or create the context DIE first, then it
will check if the DIE already exists, if not, we create the static member DIE
and add it to the context.

Creation of static member DIEs are handled in a similar way as subprogram DIEs.

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

10 years agoFix indenting.
David Blaikie [Mon, 14 Oct 2013 20:15:04 +0000 (20:15 +0000)]
Fix indenting.

That wasn't confusing /at all/...

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

10 years agovs2013 msbuild integration: add missing .target files, fix typo in CMakeLists
Hans Wennborg [Mon, 14 Oct 2013 18:16:37 +0000 (18:16 +0000)]
vs2013 msbuild integration: add missing .target files, fix typo in CMakeLists

This should fix PR17568.

Patch by Josh Samuel!

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

10 years agoMachineSink: Fix and tweak critical-edge breaking heuristic.
Will Dietz [Mon, 14 Oct 2013 16:57:17 +0000 (16:57 +0000)]
MachineSink: Fix and tweak critical-edge breaking heuristic.

Per original comment, the intention of this loop
is to go ahead and break the critical edge
(in order to sink this instruction) if there's
reason to believe doing so might "unblock" the
sinking of additional instructions that define
registers used by this one.  The idea is that if
we have a few instructions to sink "together"
breaking the edge might be worthwhile.

This commit makes a few small changes
to help better realize this goal:

First, modify the loop to ignore registers
defined by this instruction.  We don't
sink definitions of physical registers,
and sinking an SSA definition isn't
going to unblock an upstream instruction.

Second, ignore uses of physical registers.
Instructions that define physical registers are
rejected for sinking, and so moving this one
won't enable moving any defining instructions.
As an added bonus, while virtual register
use-def chains are generally small due
to SSA goodness, iteration over the uses
and definitions (used by hasOneNonDBGUse)
for physical registers like EFLAGS
can be rather expensive in practice.
(This is the original reason for looking at this)

Finally, to keep things simple continue
to only consider this trick for registers that
have a single use (via hasOneNonDBGUse),
but to avoid spuriously breaking critical edges
only do so if the definition resides
in the same MBB and therefore this one directly
blocks it from being sunk as well.
If sinking them together is meant to be,
let the iterative nature of this pass
sink the definition into this block first.

Update tests to accomodate this change,
add new testcase where sinking avoids pipeline stalls.

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

10 years agoRemove utils/profile.pl.
Rafael Espindola [Mon, 14 Oct 2013 16:48:32 +0000 (16:48 +0000)]
Remove utils/profile.pl.

It uses now removed opt options.

Patch by Alastair Murray!

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

10 years agoRemove lib/Transforms/Instrumentation/ProfilingUtils.*
Rafael Espindola [Mon, 14 Oct 2013 16:46:46 +0000 (16:46 +0000)]
Remove lib/Transforms/Instrumentation/ProfilingUtils.*

They were leftover from the old profiling support.

Patch by Alastair Murray.

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

10 years agoRemove the now unused strong phi elimination pass.
Rafael Espindola [Mon, 14 Oct 2013 16:39:04 +0000 (16:39 +0000)]
Remove the now unused strong phi elimination pass.

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

10 years agoBasic blocks typically have few predecessors. Use a SmallDenseMap to
Chris Lattner [Mon, 14 Oct 2013 16:05:55 +0000 (16:05 +0000)]
Basic blocks typically have few predecessors.  Use a SmallDenseMap to
avoid a heap allocation when this is the case.

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

10 years ago[msan] Instrument x86.*_cvt* intrinsics.
Evgeniy Stepanov [Mon, 14 Oct 2013 15:16:25 +0000 (15:16 +0000)]
[msan] Instrument x86.*_cvt* intrinsics.

Currently MSan checks that arguments of *cvt* intrinsics are fully initialized.
That's too much to ask: some of them only operate on lower half, or even
quarter, of the input register.

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

10 years ago[AArch64] Add support for NEON scalar integer compare instructions.
Chad Rosier [Mon, 14 Oct 2013 14:37:20 +0000 (14:37 +0000)]
[AArch64] Add support for NEON scalar integer compare instructions.

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

10 years agoAdd Cortex-A57 support
Bernard Ogden [Mon, 14 Oct 2013 13:17:07 +0000 (13:17 +0000)]
Add Cortex-A57 support

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

10 years agoAdd subtarget feature support for Cortex-A53
Bernard Ogden [Mon, 14 Oct 2013 13:16:57 +0000 (13:16 +0000)]
Add subtarget feature support for Cortex-A53

Some previous implicit defaults have changed, for example FP and NEON
are now on by default.

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

10 years ago[mips][msa] Direct Object Emission support for BIT instructions.
Matheus Almeida [Mon, 14 Oct 2013 13:07:39 +0000 (13:07 +0000)]
[mips][msa] Direct Object Emission support for BIT instructions.

List of instructions:
bclri.{b,h,w,d}
binsli.{b,h,w,d}
binsri.{b,h,w,d}
bnegi.{b,h,w,d}
bseti.{b,h,w,d}
sat_s.{b,h,w,d}
sat_u.{b,h,w,d}
slli.{b,h,w,d}
srai.{b,h,w,d}
srari.{b,h,w,d}
srli.{b,h,w,d}
srlri.{b,h,w,d}

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

10 years ago[mips][msa] Direct Object Emission support for VEC instructions.
Matheus Almeida [Mon, 14 Oct 2013 12:57:18 +0000 (12:57 +0000)]
[mips][msa] Direct Object Emission support for VEC instructions.

List of instructions:
and.v, bmnz.v, bmz.v, bsel.v, nor.v, or.v, xor.v.

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

10 years ago[mips][msa] Direct Object Emission of INSVE.{b,h,w,d}.
Matheus Almeida [Mon, 14 Oct 2013 12:38:17 +0000 (12:38 +0000)]
[mips][msa] Direct Object Emission of INSVE.{b,h,w,d}.

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

10 years ago[mips][msa] Direct Object Emission for the majority of the ELM instructions.
Matheus Almeida [Mon, 14 Oct 2013 12:22:43 +0000 (12:22 +0000)]
[mips][msa] Direct Object Emission for the majority of the ELM instructions.

List of instructions:
copy_s.{b,h,w}
copy_u.{b,h,w}
sldi.{b,h,w,d}
splati.{b,h,w,d}

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

10 years ago[mips][msa] Direct Object Emission of INSERT.{B,H,W} instruction.
Matheus Almeida [Mon, 14 Oct 2013 11:49:30 +0000 (11:49 +0000)]
[mips][msa] Direct Object Emission of INSERT.{B,H,W} instruction.

INSERT is the first type of MSA instruction that requires a change to the way
MSA registers are parsed. This happens because MSA registers may be suffixed by
an index in the form of an immediate or a general purpose register. The changes
to parseMSARegs reflect that requirement.

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

10 years ago[msan] Fix handling of scalar select of vectors.
Evgeniy Stepanov [Mon, 14 Oct 2013 09:52:09 +0000 (09:52 +0000)]
[msan] Fix handling of scalar select of vectors.

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

10 years agoFixed a bug in dynamic allocation memory on stack.
Elena Demikhovsky [Mon, 14 Oct 2013 07:26:51 +0000 (07:26 +0000)]
Fixed a bug in dynamic allocation memory on stack.
The alignment of allocated space was wrong, see Bugzila 17345.

Done by Zvi Rackover <zvi.rackover@intel.com>.

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

10 years agoCreate classes to reduce the size of the tablegen entries for the CRC32 instructions.
Craig Topper [Mon, 14 Oct 2013 05:19:58 +0000 (05:19 +0000)]
Create classes to reduce the size of the tablegen entries for the CRC32 instructions.

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

10 years agoAllow pinsrw/pinsrb/pextrb/pextrw/movmskps/movmskpd/pmovmskb/extractps instructions...
Craig Topper [Mon, 14 Oct 2013 04:55:01 +0000 (04:55 +0000)]
Allow pinsrw/pinsrb/pextrb/pextrw/movmskps/movmskpd/pmovmskb/extractps instructions to parse either GR32 or GR64 without resorting to duplicating instructions.

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

10 years agoAdd disassembler support for SSE4.1 register/register form of PEXTRW. There is a...
Craig Topper [Mon, 14 Oct 2013 01:42:32 +0000 (01:42 +0000)]
Add disassembler support for SSE4.1 register/register form of PEXTRW. There is a shorter encoding that was part of SSE2, but a memory form was added in SSE4.1. This is the register form of that encoding.

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

10 years agoMark MOVMSKPS/MOVMSKPD/VPINSRWrr64i as AsmParserOnly to remove them from the disassem...
Craig Topper [Mon, 14 Oct 2013 01:21:22 +0000 (01:21 +0000)]
Mark MOVMSKPS/MOVMSKPD/VPINSRWrr64i as AsmParserOnly to remove them from the disassembler tables. Add PINSRWrr64i to complement the AVX version.

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

10 years agoWindows: Fix a typo in an assert
David Majnemer [Mon, 14 Oct 2013 01:17:32 +0000 (01:17 +0000)]
Windows: Fix a typo in an assert

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

10 years agoDon't use 64-bit versions of MOVMSKPD in CodeGen. The instructions only produce a...
Craig Topper [Mon, 14 Oct 2013 00:24:33 +0000 (00:24 +0000)]
Don't use 64-bit versions of MOVMSKPD in CodeGen. The instructions only produce a 1-bit result so we can just use SUBREG_TO_REG to extend the 32-bit versions.

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

10 years agoWindows: Don't bother with pinning Kernel32.dll
David Majnemer [Mon, 14 Oct 2013 00:06:58 +0000 (00:06 +0000)]
Windows: Don't bother with pinning Kernel32.dll

We don't delay load it so it shouldn't be going anywhere.

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

10 years agoMC: Don't assume incoming StringRef's are null terminated.
Will Dietz [Sun, 13 Oct 2013 22:09:26 +0000 (22:09 +0000)]
MC: Don't assume incoming StringRef's are null terminated.

This can happen when processing command line arguments, which
are often stored as std::string's and later turned into
StringRef's via std::string::data().  Unfortunately this
is not guaranteed to return a null-terminated string
until C++11, causing breakage on platforms that don't do this.

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

10 years agoR600: improve dump of S_WAITCNT
Vincent Lejeune [Sun, 13 Oct 2013 17:56:28 +0000 (17:56 +0000)]
R600: improve dump of S_WAITCNT

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

10 years agoR600/SI: Add SinkingPass before ISel
Vincent Lejeune [Sun, 13 Oct 2013 17:56:21 +0000 (17:56 +0000)]
R600/SI: Add SinkingPass before ISel

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

10 years agoR600/SI: Support byval arguments
Vincent Lejeune [Sun, 13 Oct 2013 17:56:16 +0000 (17:56 +0000)]
R600/SI: Support byval arguments

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

10 years agoR600: Use masked read sel for texture instructions
Vincent Lejeune [Sun, 13 Oct 2013 17:56:10 +0000 (17:56 +0000)]
R600: Use masked read sel for texture instructions

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

10 years agoR600: fix swizzle export
Vincent Lejeune [Sun, 13 Oct 2013 17:56:04 +0000 (17:56 +0000)]
R600: fix swizzle export

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

10 years agoR600: Clear the VPM bit of export instructions.
Vincent Lejeune [Sun, 13 Oct 2013 17:55:57 +0000 (17:55 +0000)]
R600: Clear the VPM bit of export instructions.

It makes apparently no change it to set this bit or not but the
docs recommand to left it cleared.

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

10 years agoWindows: Use GetModuleHandleEx instead of LoadLibrary
David Majnemer [Sun, 13 Oct 2013 10:34:21 +0000 (10:34 +0000)]
Windows: Use GetModuleHandleEx instead of LoadLibrary

We were using an anti-pattern of:
 - LoadLibrary
 - GetProcAddress
 - FreeLibrary

This is problematic because of several reasons:
 - We are holding on to pointers into a library we just unloaded.
 - Calling LoadLibrary results in an increase in the reference count of
   the library in question and any libraries that it depends on and
   so-on and so-forth.  This is none too quick.

Instead, use GetModuleHandleEx with GET_MODULE_HANDLE_EX_FLAG_PIN.  This
is done because because we didn't bring the reference for the library
into existence and therefor shouldn't count on it being around later.

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

10 years agoTargetLowering: Don't index into empty string.
Will Dietz [Sun, 13 Oct 2013 03:08:49 +0000 (03:08 +0000)]
TargetLowering: Don't index into empty string.

(This is triggered by current lit tests)

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

10 years agoyaml2coff/elf: Touchup for compatibility.
Will Dietz [Sat, 12 Oct 2013 21:29:16 +0000 (21:29 +0000)]
yaml2coff/elf: Touchup for compatibility.

* std::string::append(int, int) can be ambiguous.
* std::vector<>::data() is a C++11 feature, use ArrayRef abstraction.

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

10 years agoSLPVectorizer: Sort PHINodes based on their opcode
Arnold Schwaighofer [Sat, 12 Oct 2013 18:56:27 +0000 (18:56 +0000)]
SLPVectorizer: Sort PHINodes based on their opcode

Before this patch we relied on the order of phi nodes when we looked for phi
nodes of the same type. This could prevent vectorization of cases where there
was a phi node of a second type in between phi nodes of some type.

This is important for vectorization of an internal graphics kernel. On the test
suite + external on x86_64 (and on a run on armv7s) it showed no impact on
either performance or compile time.

radar://15024459

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

10 years agoLoopVectorize: Add missing INITIALIZE_PASS_DEPENDENCY macros
Tobias Grosser [Sat, 12 Oct 2013 18:29:15 +0000 (18:29 +0000)]
LoopVectorize: Add missing INITIALIZE_PASS_DEPENDENCY macros

Contributed-by: Peter Zotov <whitequark@whitequark.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192536 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoForce a CPU on test so it doesn't depend on microarchitectural scheduling decisions.
Benjamin Kramer [Sat, 12 Oct 2013 11:17:12 +0000 (11:17 +0000)]
Force a CPU on test so it doesn't depend on microarchitectural scheduling decisions.

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

10 years agoUpdate so that it uses the `-V' command line option and supports Python 3.x.
Bill Wendling [Sat, 12 Oct 2013 08:42:59 +0000 (08:42 +0000)]
Update so that it uses the `-V' command line option and supports Python 3.x.

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

10 years agoRemove more filters from the disassembler. Mark some AVX512 instructions as CodeGenOnly.
Craig Topper [Sat, 12 Oct 2013 05:41:08 +0000 (05:41 +0000)]
Remove more filters from the disassembler. Mark some AVX512 instructions as CodeGenOnly.

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