oota-llvm.git
12 years agoARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when promoting...
Nadav Rotem [Sat, 15 Oct 2011 20:03:12 +0000 (20:03 +0000)]
ARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when promoting elements.

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

12 years agoFix extra whitespace in comment.
Nick Lewycky [Sat, 15 Oct 2011 19:36:45 +0000 (19:36 +0000)]
Fix extra whitespace in comment.

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

12 years agoLet this test pass even if 'int' is somewhere in its directory path.
Nico Weber [Sat, 15 Oct 2011 18:07:16 +0000 (18:07 +0000)]
Let this test pass even if 'int' is somewhere in its directory path.

On my machine, grep matched:

  ; ModuleID = '/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/test/Linker/2011-08-18-unique-debug-type.ll'
  !9 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]

Explicitly filter out the ModuleID line.

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

12 years agoSmallVector -> array
Benjamin Kramer [Sat, 15 Oct 2011 13:28:31 +0000 (13:28 +0000)]
SmallVector -> array

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

12 years agoDon't replace all dominated uses if there is only one use, since that
Duncan Sands [Sat, 15 Oct 2011 11:13:42 +0000 (11:13 +0000)]
Don't replace all dominated uses if there is only one use, since that
use can't be dominated, saving one domtree lookup.

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

12 years agoAdd a bad char heuristic to StringRef::find.
Benjamin Kramer [Sat, 15 Oct 2011 10:08:31 +0000 (10:08 +0000)]
Add a bad char heuristic to StringRef::find.

Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of
uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways.

The worst case is still O(n*m) but we do a lot better on the average case now.

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

12 years agoMove the legalization of vector loads and stores into LegalizeVectorOps. In some
Nadav Rotem [Sat, 15 Oct 2011 07:41:10 +0000 (07:41 +0000)]
Move the legalization of vector loads and stores into LegalizeVectorOps. In some
cases we need the second type-legalization pass in order to support all cases.

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

12 years agoFix SCEVExpander assert during LSR: "argument of incompatible type".
Andrew Trick [Sat, 15 Oct 2011 06:19:55 +0000 (06:19 +0000)]
Fix SCEVExpander assert during LSR: "argument of incompatible type".

Just because we're dealing with a GEP doesn't mean we can assert the
SCEV has a pointer type. The fix is simply to ignore the SCEV pointer
type, which we really didn't need.
Fixes PR11138 webkit crash.

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

12 years agoRevert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying...
NAKAMURA Takumi [Sat, 15 Oct 2011 04:29:36 +0000 (04:29 +0000)]
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows.  Instead of relying on the triple"

It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects.

By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-".

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

12 years agoFix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
Chad Rosier [Sat, 15 Oct 2011 02:10:06 +0000 (02:10 +0000)]
Fix for llvm::sys::getHostTriple on Windows.  Instead of relying on the triple
from config.h, it discovers the triple based on the execution environment.

Patch by Aaron Ballman <aaron@aaronballman.com>

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

12 years agoToT is now for 3.1.
Bill Wendling [Sat, 15 Oct 2011 02:09:17 +0000 (02:09 +0000)]
ToT is now for 3.1.

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

12 years agoWindows/Memory.inc: Support the ability to allocate memory "near" another block of...
NAKAMURA Takumi [Sat, 15 Oct 2011 01:58:16 +0000 (01:58 +0000)]
Windows/Memory.inc: Support the ability to allocate memory "near" another block of memory on Win32. It has fixed FIXME.

Thanks to Aaron Ballman!

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

12 years agoFix indvars randomness by removing iteration over a map.
Andrew Trick [Sat, 15 Oct 2011 01:38:14 +0000 (01:38 +0000)]
Fix indvars randomness by removing iteration over a map.

I rewrote the algorithm a while back so it doesn't require map lookup,
but neglected to change the data structure. This was caught by
llvm-gcc self host, not because there's anything special about
llvm-gcc, but because it is the only test for nondeterminism we
currently have. Unit tests don't work well for everything; we should
always try to have a nondeterminism stress test running.

Fixes PR11133: llvm-gcc self host .o mismatch after enable-iv-rewrite=false

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

12 years agoClear out the landing pad to call site map for each function.
Bill Wendling [Sat, 15 Oct 2011 01:00:26 +0000 (01:00 +0000)]
Clear out the landing pad to call site map for each function.

This isn't put into the 'clear()' method because the information needs to stick
around (at least for a little bit) after the selection DAG is built.

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

12 years agoMark tADDrSPi as having side effects again.
Jakob Stoklund Olesen [Sat, 15 Oct 2011 00:57:13 +0000 (00:57 +0000)]
Mark tADDrSPi as having side effects again.

It really doesn't, but when r141929 removed the hasSideEffects flag from
this instruction, it caused miscompilations.  I am guessing that it got
moved across a stack pointer update.

Also clear isRematerializable after checking that this instruction is
in fact never rematerialized in the nightly test suite.

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

12 years agoMention some of the improvements in Clang 3.0 over 2.9.
Douglas Gregor [Sat, 15 Oct 2011 00:48:01 +0000 (00:48 +0000)]
Mention some of the improvements in Clang 3.0 over 2.9.

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

12 years agoThumb1 does not support dynamic stack realignment.
Chad Rosier [Sat, 15 Oct 2011 00:28:24 +0000 (00:28 +0000)]
Thumb1 does not support dynamic stack realignment.
rdar://10288916 is tracking this fix.

In the past, instcombine and other passes were promoting alloca alignment past
the natural alignment, resulting in dynamic stack realignment.  Lang's work now
prevents this from happening (LLVM commit r141599).  Now that this really
shouldn't happen report a fatal error rather than silently generate bad code.

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

12 years agoMark registers as DEAD because they're really just clobbers.
Bill Wendling [Sat, 15 Oct 2011 00:27:44 +0000 (00:27 +0000)]
Mark registers as DEAD because they're really just clobbers.

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

12 years agoAdd missing correctness check to ARMTargetLowering::ReconstructShuffle. Fixes PR11129.
Eli Friedman [Fri, 14 Oct 2011 23:58:49 +0000 (23:58 +0000)]
Add missing correctness check to ARMTargetLowering::ReconstructShuffle.  Fixes PR11129.

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

12 years agoMake sure that the register is in the register class before adding it as a machine op.
Bill Wendling [Fri, 14 Oct 2011 23:55:44 +0000 (23:55 +0000)]
Make sure that the register is in the register class before adding it as a machine op.

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

12 years agoMark the invoke call instruction as implicitly defining the callee-saved registers.
Bill Wendling [Fri, 14 Oct 2011 23:34:37 +0000 (23:34 +0000)]
Mark the invoke call instruction as implicitly defining the callee-saved registers.

The callee-saved registers cannot be live across an invoke call because the
control flow may continue along the exceptional edge. When this happens, all of
the callee-saved registers are no longer valid.

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

12 years agoconstify array itself, don't iterate multiple times.
Chris Lattner [Fri, 14 Oct 2011 22:50:21 +0000 (22:50 +0000)]
constify array itself, don't iterate multiple times.

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

12 years agoAllow the source module to be materialized during the linking process.
Tanya Lattner [Fri, 14 Oct 2011 22:17:46 +0000 (22:17 +0000)]
Allow the source module to be materialized during the linking process.

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

12 years agoUpdate test for disabling of code/data marker labels in ELF.
Owen Anderson [Fri, 14 Oct 2011 21:12:55 +0000 (21:12 +0000)]
Update test for disabling of code/data marker labels in ELF.

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

12 years agoFix a non-firing assert. Change:
Richard Trieu [Fri, 14 Oct 2011 20:50:26 +0000 (20:50 +0000)]
Fix a non-firing assert.  Change:
    assert("bad SymbolicOp.VariantKind");
To:
    assert(0 && "bad SymbolicOp.VariantKind");

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

12 years agoOCaml bindings: add some missing functions and testcases.
Torok Edwin [Fri, 14 Oct 2011 20:38:33 +0000 (20:38 +0000)]
OCaml bindings: add some missing functions and testcases.

The C bindings exposed some APIs that weren't covered by the OCaml bindings

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

12 years agoOCaml bindings: fix attributes to use all 32 bits
Torok Edwin [Fri, 14 Oct 2011 20:38:24 +0000 (20:38 +0000)]
OCaml bindings: fix attributes to use all 32 bits

OCaml's int is limited to 31 bits on 32-bit architectures, so use Int32
explicitly.
Also add an unpack_attr, and {function,param,instr}_attr functions to read
the attributes.

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

12 years agoOCaml bindings: add icmp_predicate
Torok Edwin [Fri, 14 Oct 2011 20:38:19 +0000 (20:38 +0000)]
OCaml bindings: add icmp_predicate

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

12 years agoOCaml bindings: fix infinite recursion on string_of_lltype
Torok Edwin [Fri, 14 Oct 2011 20:38:14 +0000 (20:38 +0000)]
OCaml bindings: fix infinite recursion on string_of_lltype

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

12 years agobindings: named struct support
Torok Edwin [Fri, 14 Oct 2011 20:38:08 +0000 (20:38 +0000)]
bindings: named struct support

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

12 years agoocaml bindings: add findlib META support
Torok Edwin [Fri, 14 Oct 2011 20:38:02 +0000 (20:38 +0000)]
ocaml bindings: add findlib META support

This makes it easier to link against LLVM libs, especially if you are using
_oasis.

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

12 years agoocaml bindings: introduce classify_value
Torok Edwin [Fri, 14 Oct 2011 20:37:56 +0000 (20:37 +0000)]
ocaml bindings: introduce classify_value

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

12 years agoocaml bindings: add getopcode for constant and instruction, and int64_of_const.
Torok Edwin [Fri, 14 Oct 2011 20:37:49 +0000 (20:37 +0000)]
ocaml bindings: add getopcode for constant and instruction, and int64_of_const.

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

12 years agobindings: tab and indentation fixes of my previous commits
Torok Edwin [Fri, 14 Oct 2011 20:37:42 +0000 (20:37 +0000)]
bindings: tab and indentation fixes of my previous commits

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

12 years agoA few 80-col violations.
Evan Cheng [Fri, 14 Oct 2011 20:36:23 +0000 (20:36 +0000)]
A few 80-col violations.

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

12 years agoDisable code/data region symbols on ELF targets, where different mapping symbols...
Owen Anderson [Fri, 14 Oct 2011 20:28:57 +0000 (20:28 +0000)]
Disable code/data region symbols on ELF targets, where different mapping symbols are used for ARM/Thumb mode code. This should only be re-enabled once we have a solution to properly distinguish these.

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

12 years agoAdd an implementation of the CanLowerReturn function to the PPC backend
Hal Finkel [Fri, 14 Oct 2011 19:51:36 +0000 (19:51 +0000)]
Add an implementation of the CanLowerReturn function to the PPC backend

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

12 years agoAdd f128 to datalayout string.
Akira Hatanaka [Fri, 14 Oct 2011 19:14:50 +0000 (19:14 +0000)]
Add f128 to datalayout string.

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

12 years agoFix threads/jobs Calculation
David Greene [Fri, 14 Oct 2011 19:12:37 +0000 (19:12 +0000)]
Fix threads/jobs Calculation

Pass the correct jobs and threads information to the builder.
We were underutilizing the number of jobs and threads specified
by the user.

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

12 years agoAdd Helpful Messages
David Greene [Fri, 14 Oct 2011 19:12:35 +0000 (19:12 +0000)]
Add Helpful Messages

Bit just a bit more verbose about what's going on.  Print options
to make to aid debugging.

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

12 years agoAdd Option to Skip Install
David Greene [Fri, 14 Oct 2011 19:12:34 +0000 (19:12 +0000)]
Add Option to Skip Install

Add a --no-install option to skip installing components.  This
speeds up the develop/test cycle.

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

12 years agoAdd Option to Skip gcc Build
David Greene [Fri, 14 Oct 2011 19:12:33 +0000 (19:12 +0000)]
Add Option to Skip gcc Build

And a --no-gcc option to skip dragonegg and gcc builds.
This greatly speeds up the develop/test cycle.

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

12 years agoinitial test commit (remove whitespace)
Hal Finkel [Fri, 14 Oct 2011 18:54:13 +0000 (18:54 +0000)]
initial test commit (remove whitespace)

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

12 years agoUpdate live-in lists when splitting critical edges.
Jakob Stoklund Olesen [Fri, 14 Oct 2011 17:25:46 +0000 (17:25 +0000)]
Update live-in lists when splitting critical edges.

Fixes PR10814. Patch by Jan Sjödin!

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

12 years agoRevert r141932, r141936 and r141937.
Akira Hatanaka [Fri, 14 Oct 2011 17:16:39 +0000 (17:16 +0000)]
Revert r141932, r141936 and r141937.

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

12 years agoFix typo. "__sync_fetch_and-xor_4" should be "__sync_fetch_and_xor_4".
Jim Grosbach [Fri, 14 Oct 2011 15:53:48 +0000 (15:53 +0000)]
Fix typo. "__sync_fetch_and-xor_4" should be "__sync_fetch_and_xor_4".

Pointed out by George Russell.

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

12 years agoAn instruction's operands aren't necessarily instructions or constants. They
Nick Lewycky [Fri, 14 Oct 2011 09:38:46 +0000 (09:38 +0000)]
An instruction's operands aren't necessarily instructions or constants. They
could be arguments, for example.

No testcase because this is a bug-fix broken out of a larger optimization patch.

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

12 years agoAdd X86 ANDN instruction. Including instruction selection.
Craig Topper [Fri, 14 Oct 2011 07:06:56 +0000 (07:06 +0000)]
Add X86 ANDN instruction. Including instruction selection.

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

12 years agoAdd X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor...
Craig Topper [Fri, 14 Oct 2011 03:21:46 +0000 (03:21 +0000)]
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.

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

12 years agoDefinition of function getMipsRegisterNumbering.
Akira Hatanaka [Fri, 14 Oct 2011 03:04:24 +0000 (03:04 +0000)]
Definition of function getMipsRegisterNumbering.

Patch by Jack Carter and Reed Kotler at Mips.

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

12 years agoAdd definition of class MipsELFWriterInfo.
Akira Hatanaka [Fri, 14 Oct 2011 02:55:47 +0000 (02:55 +0000)]
Add definition of class MipsELFWriterInfo.

Patch by Jack Carter and Reed Kotler at Mips.

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

12 years agoAdd missing relocation types.
Akira Hatanaka [Fri, 14 Oct 2011 02:47:50 +0000 (02:47 +0000)]
Add missing relocation types.

Patch by Jack Carter and Reed Kotler at Mips.

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

12 years agoAdd ELF relocation types for Mips.
Akira Hatanaka [Fri, 14 Oct 2011 02:43:18 +0000 (02:43 +0000)]
Add ELF relocation types for Mips.

Patch by Jack Carter and Reed Kotler at Mips.

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

12 years agoFixup enumerations.
Akira Hatanaka [Fri, 14 Oct 2011 02:38:56 +0000 (02:38 +0000)]
Fixup enumerations.

Patch by Jack Carter at Mips.

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

12 years agoAdd more Mips relocation types.
Akira Hatanaka [Fri, 14 Oct 2011 02:17:30 +0000 (02:17 +0000)]
Add more Mips relocation types.

Patch by Jack Carter at Mips.

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

12 years agoBan rematerializable instructions with side effects.
Jakob Stoklund Olesen [Fri, 14 Oct 2011 01:00:49 +0000 (01:00 +0000)]
Ban rematerializable instructions with side effects.

TableGen infers unmodeled side effects on instructions without a
pattern.  Fix some instruction definitions where that was overlooked.

Also raise an error if a rematerializable instruction has unmodeled side
effects. That doen't make any sense.

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

12 years agoV_SET0 has no side effects.
Jakob Stoklund Olesen [Fri, 14 Oct 2011 00:39:50 +0000 (00:39 +0000)]
V_SET0 has no side effects.

TableGen will mark any pattern-less instruction as having unmodeled side
effects. This is extra bad for V_SET0 which gets rematerialized a lot.

This was part of the cause for PR11125, but the real bug was fixed
in r141923.

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

12 years agoAdd value numbers when spilling dead defs.
Jakob Stoklund Olesen [Fri, 14 Oct 2011 00:34:31 +0000 (00:34 +0000)]
Add value numbers when spilling dead defs.

When spilling around an instruction with a dead def, remember to add a
value number for the def.

The missing value number wouldn't normally create problems since there
would be an incoming live range as well.  However, due to another bug
we could spill a dead V_SET0 instruction which doesn't read any values.

The missing value number caused an empty live range to be created which
is dangerous since it doesn't interfere with anything.

This fixes part of PR11125.

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

12 years agoAvoid undefined behavior in negation in LSR. Patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 23:48:33 +0000 (23:48 +0000)]
Avoid undefined behavior in negation in LSR.  Patch by Ahmed Charles.

Someone more familiar with LSR should double-check that the extra cast is actually doing the right thing in the overflow cases; I'm not completely confident that's that case.

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

12 years agoFix undefined shift. Patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 23:36:06 +0000 (23:36 +0000)]
Fix undefined shift.  Patch by Ahmed Charles.

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

12 years agoSimplify assertion, and avoid undefined shift. Based on patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 23:27:48 +0000 (23:27 +0000)]
Simplify assertion, and avoid undefined shift.  Based on patch by Ahmed Charles.

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

12 years agoSupport/Windows: Add support modifying memory permissions on Windows. Patch by Aaron...
Michael J. Spencer [Thu, 13 Oct 2011 23:16:01 +0000 (23:16 +0000)]
Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!

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

12 years agoFix undefined shifts and abs in Alpha backend. Based on patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 23:13:35 +0000 (23:13 +0000)]
Fix undefined shifts and abs in Alpha backend.  Based on patch by Ahmed Charles.

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

12 years agoSupport/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
Michael J. Spencer [Thu, 13 Oct 2011 23:10:56 +0000 (23:10 +0000)]
Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!

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

12 years agoFixed typo.
Lang Hames [Thu, 13 Oct 2011 23:04:49 +0000 (23:04 +0000)]
Fixed typo.

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

12 years agoAvoid undefined behavior in signed integer negation. Patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 22:49:56 +0000 (22:49 +0000)]
Avoid undefined behavior in signed integer negation.  Patch by Ahmed Charles.

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

12 years agoSimplify and avoid undefined shift. Based on patch by Ahmed Charles.
Eli Friedman [Thu, 13 Oct 2011 22:40:23 +0000 (22:40 +0000)]
Simplify and avoid undefined shift.  Based on patch by Ahmed Charles.

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

12 years agoELF: Fix the section that relocations apply to. Add test to verify. Patch by Danil...
Michael J. Spencer [Thu, 13 Oct 2011 22:30:10 +0000 (22:30 +0000)]
ELF: Fix the section that relocations apply to. Add test to verify. Patch by Danil Malyshev!

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

12 years agollvm-object: Add inline relocation information to disassembly.
Michael J. Spencer [Thu, 13 Oct 2011 22:17:18 +0000 (22:17 +0000)]
llvm-object: Add inline relocation information to disassembly.

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

12 years agoEnhance the memdep interface so that users can tell the difference between a dependen...
Eli Friedman [Thu, 13 Oct 2011 22:14:57 +0000 (22:14 +0000)]
Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.

Patch by Xiaoyi Guo.

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

12 years agoReapply r141870, SCEV expansion of post-inc.
Andrew Trick [Thu, 13 Oct 2011 21:55:29 +0000 (21:55 +0000)]
Reapply r141870, SCEV expansion of post-inc.

Speculatively reapply to see if this test case still crashes on
linux. I may have fixed it in my last checkin.

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

12 years agoDon't forget to reconstruct D after changing the scope that we're
Eric Christopher [Thu, 13 Oct 2011 21:43:44 +0000 (21:43 +0000)]
Don't forget to reconstruct D after changing the scope that we're
looking at.

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

12 years agoUpdate IntrinsicsXCore.td with the normal LLVM notice at the top of the file.
Richard Osborne [Thu, 13 Oct 2011 21:08:11 +0000 (21:08 +0000)]
Update IntrinsicsXCore.td with the normal LLVM notice at the top of the file.

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

12 years agollvm-objdump: Fix whitespace.
Michael J. Spencer [Thu, 13 Oct 2011 20:37:20 +0000 (20:37 +0000)]
llvm-objdump: Fix whitespace.

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

12 years agollvm-objdump: Fix dumping of multiple symbols with the same address.
Michael J. Spencer [Thu, 13 Oct 2011 20:37:08 +0000 (20:37 +0000)]
llvm-objdump: Fix dumping of multiple symbols with the same address.

This happens in COFF because there is a symbol for the beginning of each
section.

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

12 years agoCOFF: Implement sectionContainsSymbol for relocatable files only.
Michael J. Spencer [Thu, 13 Oct 2011 20:36:54 +0000 (20:36 +0000)]
COFF: Implement sectionContainsSymbol for relocatable files only.

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

12 years agoFix memory corruption I introduced a few checkins ago.
Andrew Trick [Thu, 13 Oct 2011 18:49:23 +0000 (18:49 +0000)]
Fix memory corruption I introduced a few checkins ago.

Self-review easily caught this obvious bug.

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

12 years agoconfigure: [cygming] Set --disable-embed-stdcxx by default on --enable-shared.
NAKAMURA Takumi [Thu, 13 Oct 2011 18:04:52 +0000 (18:04 +0000)]
configure: [cygming] Set --disable-embed-stdcxx by default on --enable-shared.

Many distros provide stdc++.dll recently. --enable-embed-stdcxx might confuse people.

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

12 years agoSETEND is not allowed in an IT block.
Owen Anderson [Thu, 13 Oct 2011 17:58:39 +0000 (17:58 +0000)]
SETEND is not allowed in an IT block.

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

12 years agoRevert r141870. The test case crashes on linux with data corruption. A deeper issue...
Andrew Trick [Thu, 13 Oct 2011 17:58:24 +0000 (17:58 +0000)]
Revert r141870. The test case crashes on linux with data corruption. A deeper issue was exposed.

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

12 years agodocs/CMake.html: Clarify LLVM_LIT_TOOLS_DIR as :PATH.
NAKAMURA Takumi [Thu, 13 Oct 2011 17:36:02 +0000 (17:36 +0000)]
docs/CMake.html: Clarify LLVM_LIT_TOOLS_DIR as :PATH.

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

12 years agoFix incorrect ELF typedefs.
Michael J. Spencer [Thu, 13 Oct 2011 17:33:52 +0000 (17:33 +0000)]
Fix incorrect ELF typedefs.

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

12 years agoLSR: Reuse the post-inc expansion of expressions.
Andrew Trick [Thu, 13 Oct 2011 17:31:47 +0000 (17:31 +0000)]
LSR: Reuse the post-inc expansion of expressions.

This avoids unnecessary expansion of expressions and allows the SCEV
expander to work on expression DAGs, not just trees.
Fixes PR11090.

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

12 years agobuild: Remove some stray LLVMC configure variables.
Daniel Dunbar [Thu, 13 Oct 2011 17:27:34 +0000 (17:27 +0000)]
build: Remove some stray LLVMC configure variables.

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

12 years agoSCEV: Rewrite TrandformForPostIncUse to handle expression DAGs, not
Andrew Trick [Thu, 13 Oct 2011 17:21:09 +0000 (17:21 +0000)]
SCEV: Rewrite TrandformForPostIncUse to handle expression DAGs, not
just expression trees.

Partially fixes PR11090. Test case will be with the full fix.

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

12 years agoSlightly more useful tracing.
Andrew Trick [Thu, 13 Oct 2011 17:06:38 +0000 (17:06 +0000)]
Slightly more useful tracing.

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

12 years agoForce CPU type on test so it doesn't accidentally emit movbe instead of bswap on...
Benjamin Kramer [Thu, 13 Oct 2011 14:27:54 +0000 (14:27 +0000)]
Force CPU type on test so it doesn't accidentally emit movbe instead of bswap on Intel Atom CPUs.

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

12 years agoMark 'branch indirect' instruction as an indirect branch.
Kalle Raiskila [Thu, 13 Oct 2011 11:40:03 +0000 (11:40 +0000)]
Mark 'branch indirect' instruction as an indirect branch.
Not having it confused assembly printing of jumptables.

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

12 years agoMore closely follow libgcc, which has code after the `ret' instruction to
Bill Wendling [Thu, 13 Oct 2011 08:24:19 +0000 (08:24 +0000)]
More closely follow libgcc, which has code after the `ret' instruction to
release the stack segment and reset the stack pointer. Place the code in its own
MBB to make the verifier happy.

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

12 years agoRevert r141854 because it was causing failures:
Bill Wendling [Thu, 13 Oct 2011 07:48:07 +0000 (07:48 +0000)]
Revert r141854 because it was causing failures:

http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/101

--- Reverse-merging r141854 into '.':
U    test/MC/Disassembler/X86/x86-32.txt
U    test/MC/Disassembler/X86/simple-tests.txt
D    test/CodeGen/X86/bmi.ll
U    lib/Target/X86/X86InstrInfo.td
U    lib/Target/X86/X86ISelLowering.cpp
U    lib/Target/X86/X86.td
U    lib/Target/X86/X86Subtarget.h

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

12 years agoShould not add instructions to a BB after a return instruction. The machine instructi...
Bill Wendling [Thu, 13 Oct 2011 07:42:32 +0000 (07:42 +0000)]
Should not add instructions to a BB after a return instruction. The machine instruction verifier doesn't like this, nor do I.

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

12 years agoUse an existing method.
Cameron Zwarich [Thu, 13 Oct 2011 07:36:41 +0000 (07:36 +0000)]
Use an existing method.

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

12 years agoAdd X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor...
Craig Topper [Thu, 13 Oct 2011 07:09:14 +0000 (07:09 +0000)]
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.

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

12 years agoAdd 'implicit EFLAGS' to patterns for popcnt and lzcnt
Craig Topper [Thu, 13 Oct 2011 06:18:52 +0000 (06:18 +0000)]
Add 'implicit EFLAGS' to patterns for popcnt and lzcnt

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

12 years agoElf_Word is not POD! Stop using it in a DenseMap.
Nick Lewycky [Thu, 13 Oct 2011 03:30:21 +0000 (03:30 +0000)]
Elf_Word is not POD! Stop using it in a DenseMap.

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

12 years agoIf MI is deleted then remove it from the set. If a new MI is created, it could
Nick Lewycky [Thu, 13 Oct 2011 02:16:18 +0000 (02:16 +0000)]
If MI is deleted then remove it from the set. If a new MI is created, it could
have the same address as the one we deleted, and we don't want that in the set
yet. Noticed by inspection.

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

12 years agoTabs to spaces.
Nick Lewycky [Thu, 13 Oct 2011 01:09:50 +0000 (01:09 +0000)]
Tabs to spaces.

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

12 years agoAdd missing braces to pacify GCC's -Wparentheses.
Nick Lewycky [Thu, 13 Oct 2011 00:54:59 +0000 (00:54 +0000)]
Add missing braces to pacify GCC's -Wparentheses.

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

12 years agoAdd missing ELF constants.
Michael J. Spencer [Thu, 13 Oct 2011 00:16:25 +0000 (00:16 +0000)]
Add missing ELF constants.

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

12 years agoAlso inflate register classes around inline asm.
Jakob Stoklund Olesen [Wed, 12 Oct 2011 23:37:40 +0000 (23:37 +0000)]
Also inflate register classes around inline asm.

Now that MI->getRegClassConstraint() can also handle inline assembly,
don't bail when recomputing the register class of a virtual register
used by inline asm.

This fixes PR11078.

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