oota-llvm.git
10 years agoDebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type registration.
David Blaikie [Tue, 26 Nov 2013 00:15:27 +0000 (00:15 +0000)]
DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type registration.

It might be possible to eventually use one data structure, but I haven't
looked at the exact criteria used for accelerator tables and pubtypes to
see if there's good reason for the differences between the two or not.

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

10 years agoAdd the test case that I missed when committing r195528. Doh!
Chandler Carruth [Mon, 25 Nov 2013 22:24:27 +0000 (22:24 +0000)]
Add the test case that I missed when committing r195528. Doh!

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

10 years agoDo the string comparison in the constructor instead of once per nop.
Rafael Espindola [Mon, 25 Nov 2013 20:50:03 +0000 (20:50 +0000)]
Do the string comparison in the constructor instead of once per nop.

Thanks to Roman Divacky for the suggestion.

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

10 years agoUse -triple to fix the test on non-ELF hosts.
Rafael Espindola [Mon, 25 Nov 2013 20:46:18 +0000 (20:46 +0000)]
Use -triple to fix the test on non-ELF hosts.

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

10 years agoDon't use nopl in cpus that don't support it.
Rafael Espindola [Mon, 25 Nov 2013 20:15:14 +0000 (20:15 +0000)]
Don't use nopl in cpus that don't support it.

Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
gas knows about, it also doesn't generate nopl.

The modified cpus:
i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
        Crusoe, Microsoft VirtualBox - see
        https://bbs.archlinux.org/viewtopic.php?pid=775414
k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
        Via c3 and c3-Nehemiah don't have nopl

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

10 years agoARM integrated assembler generates incorrect nop opcode
David Peixotto [Mon, 25 Nov 2013 19:11:13 +0000 (19:11 +0000)]
ARM integrated assembler generates incorrect nop opcode

This patch fixes a bug in the assembler that was causing bad code to
be emitted.  When switching modes in an assembly file (e.g. arm to
thumb mode) we would always emit the opcode from the original mode.

Consider this small example:

$ cat align.s
.code 16
foo:
  add r0, r0
.align 3
  add r0, r0

$ llvm-mc -triple armv7-none-linux align.s -filetype=obj -o t.o
$ llvm-objdump -triple thumbv7 -d t.o
Disassembly of section .text:
foo:
       0:       00 44         add     r0, r0
       2:       00 f0 20 e3   blx #4195904
       6:       00 00         movs    r0, r0
       8:       00 44         add     r0, r0

This shows that we have actually emitted an arm nop (e320f000)
instead of a thumb nop. Unfortunately, this encodes to a thumb
branch which causes bad things to happen when compiling assembly
code with align directives.

The fix is to notify the ARMAsmBackend when we switch mode. The
MCMachOStreamer was already doing this correctly. This patch makes
the same change for the MCElfStreamer.

There is still a bug in the way nops are emitted for alignment
because the MCAlignment fragment does not store the correct mode.
The ARMAsmBackend will emit nops for the last mode it knew about. In
the example above, we still generate an arm nop if we add a `.code
32` to the end of the file.

PR18019

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

10 years agoUnrevert r195599 with testcase fix.
Bill Wendling [Mon, 25 Nov 2013 18:05:22 +0000 (18:05 +0000)]
Unrevert r195599 with testcase fix.

I'm not sure how it was checking for the wrong values...
PR18023.

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

10 years agoFix indentation typo
Tim Northover [Mon, 25 Nov 2013 17:04:35 +0000 (17:04 +0000)]
Fix indentation typo

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

10 years agoARM: remove special cases for Darwin dynamic-no-pic mode.
Tim Northover [Mon, 25 Nov 2013 16:24:52 +0000 (16:24 +0000)]
ARM: remove special cases for Darwin dynamic-no-pic mode.

These are handled almost identically to static mode (and ELF's global address
materialisation), except that a symbol may have "$non_lazy_ptr" appended. This
can be handled by passing appropriate flags along with the instruction instead
of using entirely separate pseudo-instructions.

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

10 years agoFix .comm and .lcomm on COFF.
Rafael Espindola [Mon, 25 Nov 2013 16:06:04 +0000 (16:06 +0000)]
Fix .comm and .lcomm on COFF.

These should not use COMDATs. GNU as uses .bss for .lcomm and section 0 for
.comm.

Given

static int a;
int b;

MSVC puts both in .bss. This patch then puts both .comm and .lcomm on .bss. With
this change we agree with gas on .lcomm, are much closer on .comm and clang-cl
matches msvc on the above example.

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

10 years agoRefactor to make the .bss, .data and .text sections available for other uses.
Rafael Espindola [Mon, 25 Nov 2013 16:00:32 +0000 (16:00 +0000)]
Refactor to make the .bss, .data and .text sections available for other uses.

No functionality change.

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

10 years agoMake helper function static.
Benjamin Kramer [Mon, 25 Nov 2013 15:40:24 +0000 (15:40 +0000)]
Make helper function static.

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

10 years agoARM: remove unused patterns.
Tim Northover [Mon, 25 Nov 2013 14:40:57 +0000 (14:40 +0000)]
ARM: remove unused patterns.

There is no sane way for an LEApcrel (= single ADR) instruction to generate a
global address on any ARM target I know of. Fortunately, no-one was trying to
any more, but there were vestigial patterns.

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

10 years ago[ARM] Enable FeatureMP for Cortex-A5 by default.
Amara Emerson [Mon, 25 Nov 2013 13:17:15 +0000 (13:17 +0000)]
[ARM] Enable FeatureMP for Cortex-A5 by default.

Patch by Oliver Stannard.

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

10 years agoRevert r195599 as it broke the builds.
Amara Emerson [Mon, 25 Nov 2013 11:24:18 +0000 (11:24 +0000)]
Revert r195599 as it broke the builds.

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

10 years agoFixed tryFoldToZero() for vector types that need expansion.
Daniel Sanders [Mon, 25 Nov 2013 11:14:43 +0000 (11:14 +0000)]
Fixed tryFoldToZero() for vector types that need expansion.

Summary:
Moved the requirement for SelectionDAG::getConstant() to return legally
typed nodes slightly earlier. There were two optional DAGCombine passes
that were missed out and were required to produce type-legal DAGs.

Simplified a code-path in tryFoldToZero() to use SelectionDAG::getConstant().
This provides support for both promoted and expanded vector types whereas the
previous code only supported promoted vector types.

Fixes a "Type for zero vector elements is not legal" assertion detected by
an llvm-stress generated test.

Reviewers: resistor

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

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

10 years agoX86: enable AVX2 under Haswell native compilation
Tim Northover [Mon, 25 Nov 2013 09:52:59 +0000 (09:52 +0000)]
X86: enable AVX2 under Haswell native compilation

Patch by Adam Strzelecki

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

10 years agoDon't look past volatile loads.
Bill Wendling [Mon, 25 Nov 2013 05:01:21 +0000 (05:01 +0000)]
Don't look past volatile loads.

A volatile load should block us from trying to coalesce stores.
PR18023

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

10 years agoFixed a bug about disassembling AArch64 post-index load/store single element instruct...
Hao Liu [Mon, 25 Nov 2013 01:53:26 +0000 (01:53 +0000)]
Fixed a bug about disassembling AArch64 post-index load/store single element instructions.
ie. echo "0x00 0x04 0x80 0x0d" | ../bin/llvm-mc -triple=aarch64 -mattr=+neon -disassemble
    echo "0x00 0x00 0x80 0x0d" | ../bin/llvm-mc -triple=aarch64 -mattr=+neon -disassemble
will be disassembled into the same instruction st1 {v0b}[0], [x0], x0.

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

10 years agoSparcFrameLowering.cpp: Prune 'DL' [-Wunused-variable]
NAKAMURA Takumi [Mon, 25 Nov 2013 00:52:46 +0000 (00:52 +0000)]
SparcFrameLowering.cpp: Prune 'DL' [-Wunused-variable]

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

10 years agoOutput a bit more information in the debug printing for MBP. This was
Chandler Carruth [Mon, 25 Nov 2013 00:43:41 +0000 (00:43 +0000)]
Output a bit more information in the debug printing for MBP. This was
useful when analyzing parts of zlib's behavior here.

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

10 years ago[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi...
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:23:25 +0000 (20:23 +0000)]
[Sparc] Emit large negative adjustments to SP/FP with sethi+xor instead of sethi+or. This generates correct code for both sparc32 and sparc64.

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

10 years ago[Sparc]: Implement LEA pattern for sparcv9.
Venkatraman Govindaraju [Sun, 24 Nov 2013 20:07:35 +0000 (20:07 +0000)]
[Sparc]: Implement LEA pattern for sparcv9.

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

10 years ago[SparcV9]: Do not emit .register directives for global registers that are clobbered...
Venkatraman Govindaraju [Sun, 24 Nov 2013 18:41:49 +0000 (18:41 +0000)]
[SparcV9]: Do not emit .register directives for global registers that are clobbered by calls but not used in the function itself.

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

10 years ago[SparcV9] Enable custom lowering of DYNAMIC_STACKALLOC in sparc64.
Venkatraman Govindaraju [Sun, 24 Nov 2013 17:41:41 +0000 (17:41 +0000)]
[SparcV9] Enable custom lowering of DYNAMIC_STACKALLOC in sparc64.

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

10 years agoMake sure that for C++ emitting LwConstant32 pseudos, that it corresponds
Reed Kotler [Sun, 24 Nov 2013 06:18:50 +0000 (06:18 +0000)]
Make sure that for C++ emitting LwConstant32 pseudos, that it corresponds
to what is needed for constant islands. The prescan method for Mips16 constant
islands will eventually go away. It is only temporary and should be done
earlier when the instructions are first created or from the DAG. If we keep
it here we need to handle better the situation where constant islands
is called multiple times since don't want to prescan more than once.

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

10 years agoDefault to a better compression algorithm.
Bill Wendling [Sun, 24 Nov 2013 05:29:35 +0000 (05:29 +0000)]
Default to a better compression algorithm.

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

10 years agoUpdate older test cases for latest patch.
Reed Kotler [Sun, 24 Nov 2013 03:37:56 +0000 (03:37 +0000)]
Update older test cases for latest patch.

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

10 years agoFix a funny bug I introduced during conversion of ARM constant islands to Mips.
Reed Kotler [Sun, 24 Nov 2013 02:53:09 +0000 (02:53 +0000)]
Fix a funny bug I introduced during conversion of ARM constant islands to Mips.
I had to move some code and I moved a declaration forward past it's first use
in the function but by nutty coincidence there was another variable of the same
name and type and  with completely unrelated function that was declared globally
in the class so no compilation error ensued.
It required some unusual conditions for it to even matter. Caused test
case casts.c in test-suite to fail during compilation with a duplicate
symbol error. I would have noticed it during final code review for this port.

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

10 years agoPut an unused result attribute on SmallSet::empty()
Alp Toker [Sat, 23 Nov 2013 23:06:20 +0000 (23:06 +0000)]
Put an unused result attribute on SmallSet::empty()

This matches other empty() container functions in LLVM.

No actual usage problems discovered in this instance.

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

10 years ago[PM] Complete the cross-layer interfaces with a Module-to-Function
Chandler Carruth [Sat, 23 Nov 2013 01:25:07 +0000 (01:25 +0000)]
[PM] Complete the cross-layer interfaces with a Module-to-Function
proxy. This lets a function pass query a module analysis manager.
However, the interface is const to indicate that only cached results can
be safely queried.

With this, I think the new pass manager is largely functionally complete
for modules and analyses. Still lots to test, and need to generalize to
SCCs and Loops, and need to build an adaptor layer to support the use of
existing Pass objects in the new managers.

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

10 years ago[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
Chandler Carruth [Sat, 23 Nov 2013 01:25:02 +0000 (01:25 +0000)]
[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
for a TestModuleAnalysis.

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

10 years agoDwarfDebug: Move ownership of CompileUnits into DwarfUnits
David Blaikie [Sat, 23 Nov 2013 01:17:34 +0000 (01:17 +0000)]
DwarfDebug: Move ownership of CompileUnits into DwarfUnits

This avoids the need for an extra list of SkeletonCUs and associated
cleanup while staging things to be cleaner for further type unit
improvements.

Also hopefully fixes a memory leak introduced in r195166.

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

10 years agoDebug Info: update testing cases to specify the debug info version number.
Manman Ren [Sat, 23 Nov 2013 01:16:29 +0000 (01:16 +0000)]
Debug Info: update testing cases to specify the debug info version number.

We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.

Make tests more robust by removing hard-coded metadata numbers in CHECK lines.

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

10 years agoMigrate metadata information from scalar to vector instructions during
Chandler Carruth [Sat, 23 Nov 2013 00:48:34 +0000 (00:48 +0000)]
Migrate metadata information from scalar to vector instructions during
SLP vectorization. Based on the code in BBVectorizer.

Fixes PR17741.

Patch by Raul Silvera, reviewed by Hal and Nadav. Reformatted by my
driving of clang-format. =]

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

10 years ago[PM] Add support to the analysis managers to query explicitly for cached
Chandler Carruth [Sat, 23 Nov 2013 00:38:42 +0000 (00:38 +0000)]
[PM] Add support to the analysis managers to query explicitly for cached
results.

This is the last piece of infrastructure needed to effectively support
querying *up* the analysis layers. The next step will be to introduce
a proxy which provides access to those layers with appropriate use of
const to direct queries to the safe interface.

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

10 years agoRefactor DW_AT_ranges handling to use labels for ranges rather than
Eric Christopher [Sat, 23 Nov 2013 00:05:29 +0000 (00:05 +0000)]
Refactor DW_AT_ranges handling to use labels for ranges rather than
a non-relocatable number offset.

One fixme to make the ranges as discrete data structures and
have range lists explicitly represented rather than as a list of symbols.

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

10 years agoReformat const for readability.
Eric Christopher [Sat, 23 Nov 2013 00:05:06 +0000 (00:05 +0000)]
Reformat const for readability.

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

10 years ago[PM] Switch the downward invalidation to be incremental where only the
Chandler Carruth [Fri, 22 Nov 2013 23:38:07 +0000 (23:38 +0000)]
[PM] Switch the downward invalidation to be incremental where only the
one function's analyses are invalidated at a time. Also switch the
preservation of the proxy to *fully* preserve the lower (function)
analyses.

Combined, this gets both upward and downward analysis invalidation to
a point I'm happy with:

- A function pass invalidates its function analyses, and its parent's
  module analyses.
- A module pass invalidates all of its functions' analyses including the
  set of which functions are in the module.
- A function pass can preserve a module analysis pass.
- If all function passes preserve a module analysis pass, that
  preservation persists. If any doesn't the module analysis is
  invalidated.
- A module pass can opt into managing *all* function analysis
  invalidation itself or *none*.
- The conservative default is none, and the proxy takes the maximally
  conservative approach that works even if the set of functions has
  changed.
- If a module pass opts into managing function analysis invalidation it
  has to propagate the invalidation itself, the proxy just does nothing.

The only thing really missing is a way to query for a cached analysis or
nothing at all. With this, function passes can more safely request
a cached module analysis pass without fear of it accidentally running
part way through.

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

10 years ago[PM] Remove a FIXME comment that was fixed by my recent refactorings:
Chandler Carruth [Fri, 22 Nov 2013 23:37:54 +0000 (23:37 +0000)]
[PM] Remove a FIXME comment that was fixed by my recent refactorings:
now the access to the manager is via the proxy that ensures it behaves
correctly.

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

10 years agoR600/SI: Fixing handling of condition codes
Tom Stellard [Fri, 22 Nov 2013 23:07:58 +0000 (23:07 +0000)]
R600/SI: Fixing handling of condition codes

We were ignoring the ordered/onordered bits and also the signed/unsigned
bits of condition codes when lowering the DAG to MachineInstrs.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agollvm-cov: Split entry blocks in GCNOProfiling.cpp.
Yuchen Wu [Fri, 22 Nov 2013 23:07:45 +0000 (23:07 +0000)]
llvm-cov: Split entry blocks in GCNOProfiling.cpp.

gcov expects every function to contain an entry block that
unconditionally branches into the next block. clang does not implement
basic blocks in this manner, so gcov did not output correct branch info
if the entry block branched to multiple blocks.

This change splits every function's entry block into an empty block and
a block with the rest of the instructions. The instrumentation code will
take care of the rest.

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

10 years agoDebug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.
Manman Ren [Fri, 22 Nov 2013 22:06:31 +0000 (22:06 +0000)]
Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp.

We can share the implementation between StripSymbols and dropping debug info
for metadata versions that do not match.

Also update the comments to match the implementation. A follow-on patch will
drop the "Debug Info Version" module flag in StripDebugInfo.

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

10 years agoDebug Info: update testing cases to specify the debug info version number.
Manman Ren [Fri, 22 Nov 2013 21:49:45 +0000 (21:49 +0000)]
Debug Info: update testing cases to specify the debug info version number.

We are going to drop debug info without a version number or with a different
version number, to make sure we don't crash when we see bitcode files with
different debug info metadata format.

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

10 years agoX86: Perform integer comparisons at i32 or larger.
Jim Grosbach [Fri, 22 Nov 2013 19:57:47 +0000 (19:57 +0000)]
X86: Perform integer comparisons at i32 or larger.

Utilizing the 8 and 16 bit comparison instructions, even when an input can
be folded into the comparison instruction itself, is typically not worth it.
There are too many partial register stalls as a result, leading to significant
slowdowns. By always performing comparisons on at least 32-bit
registers, performance of the calculation chain leading to the
comparison improves. Continue to use the smaller comparisons when
minimizing size, as that allows better folding of loads into the
comparison instructions.

rdar://15386341

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

10 years agoDebug Info: add a constant for debug info version number.
Manman Ren [Fri, 22 Nov 2013 19:41:59 +0000 (19:41 +0000)]
Debug Info: add a constant for debug info version number.

This will be used to output the debug info version number as a module flag.

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

10 years agoStructurizeCFG: Fix verification failure with some loops.
Matt Arsenault [Fri, 22 Nov 2013 19:24:39 +0000 (19:24 +0000)]
StructurizeCFG: Fix verification failure with some loops.

If the beginning of the loop was also the entry block
of the function, branches were inserted to the entry block
which isn't allowed. If this occurs, create a new dummy
function entry block that branches to the start of the loop.

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

10 years agoStructurizeCFG: Fix inverting a branch on an argument
Matt Arsenault [Fri, 22 Nov 2013 19:24:37 +0000 (19:24 +0000)]
StructurizeCFG: Fix inverting a branch on an argument

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

10 years agoTeach ISel not to optimize 'optnone' functions (revised).
Paul Robinson [Fri, 22 Nov 2013 19:11:24 +0000 (19:11 +0000)]
Teach ISel not to optimize 'optnone' functions (revised).

Improvements over r195317:
- Set/restore EnableFastISel flag instead of just running FastISel within
  SelectAllBasicBlocks; the flag is checked in various places, and
  FastISel won't run properly if those places don't do the right thing.
- Test looks for normal ISel versus FastISel behavior, and not
  something more subtle that doesn't work everywhere.

Based on work by Andrea Di Biagio.

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

10 years agoDEBUG shouldEvict decisions
Andrew Trick [Fri, 22 Nov 2013 19:07:42 +0000 (19:07 +0000)]
DEBUG shouldEvict decisions

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

10 years agoMinor cleanup. EvictionCost ctor was confusing relative to the other costs floating...
Andrew Trick [Fri, 22 Nov 2013 19:07:38 +0000 (19:07 +0000)]
Minor cleanup. EvictionCost ctor was confusing relative to the other costs floating around in the code.

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

10 years agopatchpoint: factor SD builder code for live vars. Plain stackmap also optimizes Const...
Andrew Trick [Fri, 22 Nov 2013 19:07:36 +0000 (19:07 +0000)]
patchpoint: factor SD builder code for live vars. Plain stackmap also optimizes Constant values now.

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

10 years agopatchpoint: eliminate hard coded operand indices.
Andrew Trick [Fri, 22 Nov 2013 19:07:33 +0000 (19:07 +0000)]
patchpoint: eliminate hard coded operand indices.

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

10 years agoVS integration: use the correct registry key after r195379
Hans Wennborg [Fri, 22 Nov 2013 18:25:43 +0000 (18:25 +0000)]
VS integration: use the correct registry key after r195379

I changed the registry key in that commit, but forgot to update
the integration files. This change makes them use the same variable.

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

10 years agoAdd a fixed version of r195470 back.
Rafael Espindola [Fri, 22 Nov 2013 17:58:12 +0000 (17:58 +0000)]
Add a fixed version of r195470 back.

The fix is simply to use CurI instead of I when handling aliases to
avoid accessing a invalid iterator.

original message:

Convert linkonce* to weak* instead of strong.

Also refactor the logic into a helper function. This is an important improve
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.

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

10 years agoFix PR18014
Michael Liao [Fri, 22 Nov 2013 17:56:57 +0000 (17:56 +0000)]
Fix PR18014

- When simplifying the mask generation for BLEND, check whether that mask is
  also consumed by other non-BLEND insns. If true, skip that simplification.

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

10 years ago[SystemZ] Fix TMHH and TMHL usage for z10 with -O0
Richard Sandiford [Fri, 22 Nov 2013 17:28:28 +0000 (17:28 +0000)]
[SystemZ] Fix TMHH and TMHL usage for z10 with -O0

I've no idea why I decided to handle TMxx differently from all the other
high/low logic operations, but it was a stupid thing to do.  The high
registers aren't available as separate 32-bit registers on z10,
so subreg_h32 can't be used on a GR64 there.

I've normally been testing with z196 and with -O3 and so hadn't noticed
this until now.

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

10 years agoRevert "Convert linkonce* to weak* instead of strong."
Rafael Espindola [Fri, 22 Nov 2013 17:09:34 +0000 (17:09 +0000)]
Revert "Convert linkonce* to weak* instead of strong."

This reverts commit r195470.
Debugging failure in some bots.

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

10 years agoAdd a Scalarizer pass.
Richard Sandiford [Fri, 22 Nov 2013 16:58:05 +0000 (16:58 +0000)]
Add a Scalarizer pass.

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

10 years agoConvert linkonce* to weak* instead of strong.
Rafael Espindola [Fri, 22 Nov 2013 16:14:30 +0000 (16:14 +0000)]
Convert linkonce* to weak* instead of strong.

Also refactor the logic into a helper function. This is an important improvement
on mingw where the linker complains about mixed weak and strong symbols.
Converting to weak ensures that the symbol is not dropped, but keeps in a
comdat, making the linker happy.

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

10 years ago[mips][msa] Add test case that should have been added in r195456.
Daniel Sanders [Fri, 22 Nov 2013 15:47:18 +0000 (15:47 +0000)]
[mips][msa] Add test case that should have been added in r195456.

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

10 years agoSLPVectorizer: Fix whitespace errors.
Arnold Schwaighofer [Fri, 22 Nov 2013 15:47:17 +0000 (15:47 +0000)]
SLPVectorizer: Fix whitespace errors.

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

10 years agoDon't produce tail calls when the caller is x86_thiscallcc.
Rafael Espindola [Fri, 22 Nov 2013 15:18:28 +0000 (15:18 +0000)]
Don't produce tail calls when the caller is x86_thiscallcc.

The callee will not pop the stack for us.

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

10 years agoARM: use CHECK-LABEL on a test.
Tim Northover [Fri, 22 Nov 2013 13:25:07 +0000 (13:25 +0000)]
ARM: use CHECK-LABEL on a test.

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

10 years agoFix typo in a comment added in r195455.
Daniel Sanders [Fri, 22 Nov 2013 13:22:52 +0000 (13:22 +0000)]
Fix typo in a comment added in r195455.

Credit to Matheus Almeida for spotting it.

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

10 years ago[mips][msa] Fix corner case for integer constant splats with undef values.
Daniel Sanders [Fri, 22 Nov 2013 13:14:06 +0000 (13:14 +0000)]
[mips][msa] Fix corner case for integer constant splats with undef values.

lowerBUILD_VECTOR() was treating integer constant splats as being legal
regardless of whether they had undef values. This caused instruction
selection failures when the undefs were legalized to zero, making the
constant non-splat.

Fixed this by requiring HasAnyUndef to be false for a integer constant
splat to be legal. If it is true, a new node is generated with the undefs
replaced with the necessary values to remain a splat.

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

10 years ago[PM] Remove extraneous space that I left in there.
Chandler Carruth [Fri, 22 Nov 2013 12:26:40 +0000 (12:26 +0000)]
[PM] Remove extraneous space that I left in there.

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

10 years ago[PM] Teach the analysis managers to pass themselves as arguments to the
Chandler Carruth [Fri, 22 Nov 2013 12:11:02 +0000 (12:11 +0000)]
[PM] Teach the analysis managers to pass themselves as arguments to the
run methods of the analysis passes.

Also generalizes and re-uses the SFINAE for transformation passes so
that users can write an analysis pass and only accept an analysis
manager if that is useful to their pass.

This completes the plumbing to make an analysis manager available
through every pass's run method if desired so that passes no longer need
to be constructed around them.

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

10 years ago[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
Chandler Carruth [Fri, 22 Nov 2013 11:55:38 +0000 (11:55 +0000)]
[PM] Reverse the template arguments 'PassT' and 'AnalysisManagerT' in
several templates. The previous order didn't make any sense as it
separated 'IRUnitT' and 'AnalysisManagerT', the types which are
essentially paired and passed along together throughout the layers.

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

10 years agoAdd support for Cortex-A12.
Richard Barton [Fri, 22 Nov 2013 11:53:16 +0000 (11:53 +0000)]
Add support for Cortex-A12.

Patch by Oliver Stannard!

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

10 years ago[PM] Remove the IRUnitT typedef requirement for analysis passes.
Chandler Carruth [Fri, 22 Nov 2013 11:46:33 +0000 (11:46 +0000)]
[PM] Remove the IRUnitT typedef requirement for analysis passes.

Since the analysis managers were split into explicit function and module
analysis managers, it is now completely trivial to specify this when
building up the concept and model types explicitly, and it is impossible
to end up with a type error at run time. We instantiate a template when
registering a pass that will enforce the requirement at a type-system
level, and we produce a dynamic error on all the other query paths to
the analysis manager if the pass in question isn't registered.

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

10 years ago[PM] Fix the analysis templates' usage of IRUnitT.
Chandler Carruth [Fri, 22 Nov 2013 11:34:43 +0000 (11:34 +0000)]
[PM] Fix the analysis templates' usage of IRUnitT.

This is supposed to be the whole type of the IR unit, and so we
shouldn't pass a pointer to it but rather the value itself. In turn, we
need to provide a 'Module *' as that type argument (for example). This
will become more relevant with SCCs or other units which may not be
passed as a pointer type, but also brings consistency with the
transformation pass templates.

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

10 years ago[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the...
Daniel Sanders [Fri, 22 Nov 2013 11:24:50 +0000 (11:24 +0000)]
[mips][msa] Float vector constants cannot use ldi.[wd] directly. Bitcast from the appropriate integer vector type.

Fixes an instruction selection failure detected by llvm-stress.

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

10 years agoRevert r195318 as it causes miscompilation (PR18029)
Kostya Serebryany [Fri, 22 Nov 2013 10:30:39 +0000 (10:30 +0000)]
Revert r195318 as it causes miscompilation (PR18029)

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 09:24:41 +0000 (09:24 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This patch only renames variables, no functional change.

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

10 years agoFix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector...
Hao Liu [Fri, 22 Nov 2013 08:47:22 +0000 (08:47 +0000)]
Fix the bugs about AArch64 Load/Store vector types and bitcast between i64 and vector types.
e.g. "%tmp = load <2 x i64>* %ptr" can't be selected.
     "%tmp = bitcast i64 %in to <2 x i32>" can't be selected.

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

10 years agoRevert last change by haoliu because of buildbot failure.
Hao Liu [Fri, 22 Nov 2013 08:34:54 +0000 (08:34 +0000)]
Revert last change by haoliu because of buildbot failure.

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

10 years agoFix a Cygwin build failure caused by enum values starting with '_', which is conflict...
Hao Liu [Fri, 22 Nov 2013 08:17:16 +0000 (08:17 +0000)]
Fix a Cygwin build failure caused by enum values starting with '_', which is conflicted with some platform macros.
This solution only renames variables, no functional change.

NOTE: This is a candidate for the 3.4 branch.

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

10 years ago[block-freq] Update data in test case to be unsigned long long to fix mingw build.
Michael Gottesman [Fri, 22 Nov 2013 05:00:51 +0000 (05:00 +0000)]
[block-freq] Update data in test case to be unsigned long long to fix mingw build.

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

10 years ago[block-freq] Add a method to loop info for returning all loop latches for a specific...
Michael Gottesman [Fri, 22 Nov 2013 05:00:48 +0000 (05:00 +0000)]
[block-freq] Add a method to loop info for returning all loop latches for a specific loop.

We already have a method for returning one loop latch but for some
reason no one has committed one for returning loop latches in the case
where there are multiple latches.

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

10 years agoFor AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.
Jiangning Liu [Fri, 22 Nov 2013 02:45:13 +0000 (02:45 +0000)]
For AArch64 back-end instruction selection, lower Neon_Lowxxx with EXTRCT_SUBREG.

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

10 years agoTweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.
NAKAMURA Takumi [Fri, 22 Nov 2013 02:28:04 +0000 (02:28 +0000)]
Tweak 3 tests in llvm/test/CodeGen/X86 to add -mcpu=generic since r195383.

They failed on bdver2 buildslave.

FIXME: FileCheck-ize them.

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

10 years agoSLP Vectorizer: Extract cost will only be added once even if the scalar has multiple...
Yi Jiang [Fri, 22 Nov 2013 01:57:02 +0000 (01:57 +0000)]
SLP Vectorizer: Extract cost will only be added once even if the scalar has multiple external uses.

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

10 years ago[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
Chandler Carruth [Fri, 22 Nov 2013 00:48:49 +0000 (00:48 +0000)]
[PM] Simplify how the SFINAE for AnalysisResultModel is applied by
factoring it out into the default template argument so clients don't
have to even think about it.

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

10 years agoFix a typo where we were creating <def,kill> operands instead of
Lang Hames [Fri, 22 Nov 2013 00:46:32 +0000 (00:46 +0000)]
Fix a typo where we were creating <def,kill> operands instead of
<def,dead> ones.

Add an assertion to make sure we catch this in the future.

Fixes <rdar://problem/15464559>.

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

10 years ago[PM] Switch analysis managers to be threaded through the run methods
Chandler Carruth [Fri, 22 Nov 2013 00:43:29 +0000 (00:43 +0000)]
[PM] Switch analysis managers to be threaded through the run methods
rather than the constructors of passes.

This simplifies the APIs of passes significantly and removes an error
prone pattern where the *same* manager had to be given to every
different layer. With the new API the analysis managers themselves will
have to be cross connected with proxy analyses that allow a pass at one
layer to query for the analysis manager of another layer. The proxy will
both expose a handle to the other layer's manager and it will provide
the invalidation hooks to ensure things remain consistent across layers.
Finally, the outer-most analysis manager has to be passed to the run
method of the outer-most pass manager. The rest of the propagation is
automatic.

I've used SFINAE again to allow passes to completely disregard the
analysis manager if they don't need or want to care. This helps keep
simple things simple for users of the new pass manager.

Also, the system specifically supports passing a null pointer into the
outer-most run method if your pass pipeline neither needs nor wants to
deal with analyses. I find this of dubious utility as while some
*passes* don't care about analysis, I'm not sure there are any
real-world users of the pass manager itself that need to avoid even
creating an analysis manager. But it is easy to support, so there we go.

Finally I renamed the module proxy for the function analysis manager to
the more verbose but less confusing name of
FunctionAnalysisManagerModuleProxy. I hate this name, but I have no idea
what else to name these things. I'm expecting in the fullness of time to
potentially have the complete cross product of types at the proxy layer:

{Module,SCC,Function,Loop,Region}AnalysisManager{Module,SCC,Function,Loop,Region}Proxy

(except for XAnalysisManagerXProxy which doesn't make any sense)

This should make it somewhat easier to do the next phases which is to
build the upward proxy and get its invalidation correct, as well as to
make the invalidation within the Module -> Function mapping pass be more
fine grained so as to invalidate fewer fuction analyses.

After all of the proxy analyses are done and the invalidation working,
I'll finally be able to start working on the next two fun fronts: how to
adapt an existing pass to work in both the legacy pass world and the new
one, and building the SCC, Loop, and Region counterparts. Fun times!

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

10 years agoR600: Implement TargetInstrInfo::isLegalToSplitMBBAt()
Tom Stellard [Fri, 22 Nov 2013 00:41:08 +0000 (00:41 +0000)]
R600: Implement TargetInstrInfo::isLegalToSplitMBBAt()

Splitting a basic block will create a new ALU clause, so we need to make
sure we aren't moving uses of registers that are local to their
current clause into a new one.

I had a test case for this, but unfortunately unrelated schedule changes
invalidated it, and I wasn't been able to come up with another one.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type
Tom Stellard [Fri, 22 Nov 2013 00:41:05 +0000 (00:41 +0000)]
SelectionDAG: Optimize expansion of vec_type = BITCAST scalar_type

The legalizer can now do this type of expansion for more
type combinations without loading and storing to and
from the stack.

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoSplit SETCC if VSELECT requires splitting too.
Tom Stellard [Fri, 22 Nov 2013 00:39:23 +0000 (00:39 +0000)]
Split SETCC if VSELECT requires splitting too.

This patch is a rewrite of the original patch commited in r194542. Instead of
relying on the type legalizer to do the splitting for us, we now peform the
splitting ourselves in the DAG combiner. This is necessary for the case where
the vector mask is a legal type after promotion and still wouldn't require
splitting.

Patch by: Juergen Ributzka

NOTE: This is a candidate for the 3.4 branch.

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

10 years agoIn Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
Eric Christopher [Thu, 21 Nov 2013 23:46:41 +0000 (23:46 +0000)]
In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
section use the form DW_FORM_data4 whilst in Dwarf 4 and later they
use the form DW_FORM_sec_offset.

This patch updates the places where such attributes are generated to
use the appropriate form depending on the Dwarf version. The DIE entries
affected have the following tags:
DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,
DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base

It also adds a hidden command line option "--dwarf-version=<uint>"
to llc which allows the version of Dwarf to be generated to override
what is specified in the metadata; this makes it possible to update
existing tests to check the debugging information generated for both
Dwarf 4 (the default) and Dwarf 3 using the same metadata.

Patch (slightly modified) by Keith Walker!

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

10 years agoSHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certa...
Ekaterina Romanova [Thu, 21 Nov 2013 23:21:26 +0000 (23:21 +0000)]
SHLD/SHRD are VectorPath (microcode) instructions known to have poor latency on certain architectures. While generating SHLD/SHRD instructions is acceptable when optimizing for size, optimizing for speed on these platforms should be implemented using alternative sequences of instructions composed of add, adc, shr, shl, or and lea which are directPath instructions. These alternative instructions not only have a lower latency but they also increase the decode bandwidth by allowing simultaneous decoding of a third directPath instruction.

AMD's processors family K7, K8, K10, K12, K15 and K16 are known to have SHLD/SHRD instructions with very poor latency. Optimization guides for these processors recommend using an alternative sequence of instructions. For these AMD's processors, I disabled folding (or (x << c) | (y >> (64 - c))) when we are not optimizing for size.

It might be beneficial to disable this folding for some of the Intel's processors. However, since I couldn't find specific recommendations regarding using SHLD/SHRD instructions on Intel's processors, I haven't disabled this peephole for Intel.

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

10 years agoIntroduce two command-line flags for the instrumentation pass to control whether...
Peter Collingbourne [Thu, 21 Nov 2013 23:20:54 +0000 (23:20 +0000)]
Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions

The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme.

Additionally, the function __dfsan_union_load is marked as readonly.

Patch by Lorenzo Martignoni!

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

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

10 years agoMove member variable up to where the rest of non-DWARF5 variables reside.
Eric Christopher [Thu, 21 Nov 2013 22:56:11 +0000 (22:56 +0000)]
Move member variable up to where the rest of non-DWARF5 variables reside.

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

10 years agoCMake: Some changes to package version names:
Hans Wennborg [Thu, 21 Nov 2013 22:47:21 +0000 (22:47 +0000)]
CMake: Some changes to package version names:

- Allow overriding PACKAGE_VERSION from the command-line
- Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer)
- Don't include the version number in the CPack install dir or registry key.

Differential revision: http://llvm-reviews.chandlerc.com/D2245

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

10 years agoRemove dangling documentation. llvm-prof was deleted a while ago.
Benjamin Kramer [Thu, 21 Nov 2013 19:32:37 +0000 (19:32 +0000)]
Remove dangling documentation. llvm-prof was deleted a while ago.

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

10 years ago[ARM] add the overlooked tests for Cortex-A7 build attributes
Artyom Skrobov [Thu, 21 Nov 2013 16:22:39 +0000 (16:22 +0000)]
[ARM] add the overlooked tests for Cortex-A7 build attributes

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

10 years ago[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.
Daniel Sanders [Thu, 21 Nov 2013 16:11:31 +0000 (16:11 +0000)]
[mips][msa] Fix a corner case in performORCombine() when combining nodes into VSELECT.

Mask == ~InvMask asserts if the width of Mask and InvMask differ.
The combine isn't valid (with two exceptions, see below) if the widths differ
so test for this before testing Mask == ~InvMask.

In the specific cases of Mask=~0 and InvMask=0, as well as Mask=0 and
InvMask=~0, the combine is still valid. However, there are more appropriate
combines that could be used in these cases such as folding x & 0 to 0, or
x & ~0 to x.

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

10 years ago[ARM] add basic Cortex-A7 support to LLVM backend
Artyom Skrobov [Thu, 21 Nov 2013 14:03:21 +0000 (14:03 +0000)]
[ARM] add basic Cortex-A7 support to LLVM backend

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

10 years agoAdd support for legalizing SETNE/SETEQ by inverting the condition code and the result...
Daniel Sanders [Thu, 21 Nov 2013 13:24:49 +0000 (13:24 +0000)]
Add support for legalizing SETNE/SETEQ by inverting the condition code and the result of the comparison.

Summary:
LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse
condition and requesting that the caller invert the result of the condition.

The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do
so as follows:
  SETCC, BR_CC:
    Invert the result of the SETCC with SelectionDAG::getNOT()
  SELECT_CC:
    Swap the true/false operands.

This is necessary for MSA which lacks an integer SETNE instruction.

Reviewers: resistor

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

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

10 years ago[msan] Propagate condition origin in select instruction.
Evgeniy Stepanov [Thu, 21 Nov 2013 12:00:24 +0000 (12:00 +0000)]
[msan] Propagate condition origin in select instruction.

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