oota-llvm.git
13 years agoDuring local stack slot allocation, the materializeFrameBaseRegister function
Bill Wendling [Fri, 17 Dec 2010 23:09:14 +0000 (23:09 +0000)]
During local stack slot allocation, the materializeFrameBaseRegister function
may be called. If the entry block is empty, the insertion point iterator will be
the "end()" value. Calling ->getParent() on it (among others) causes problems.

Modify materializeFrameBaseRegister to take the machine basic block and insert
the frame base register at the beginning of that block. (It's very similar to
what the code does all ready. The only difference is that it will always insert
at the beginning of the entry block instead of after a previous materialization
of the frame base register. I doubt that that matters here.)

<rdar://problem/8782198>

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

13 years agoFix a DAGCombiner crash when folding binary vector operations with constant
Bob Wilson [Fri, 17 Dec 2010 23:06:49 +0000 (23:06 +0000)]
Fix a DAGCombiner crash when folding binary vector operations with constant
BUILD_VECTOR operands where the element type is not legal.  I had previously
changed this code to insert TRUNCATE operations, but that was just wrong.

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

13 years agoCombine several vector-related DAGCombiner tests.
Bob Wilson [Fri, 17 Dec 2010 23:06:46 +0000 (23:06 +0000)]
Combine several vector-related DAGCombiner tests.

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

13 years agoAvoid report_fatal_error in ARM's PrintAsmOperand method.
Bob Wilson [Fri, 17 Dec 2010 23:06:42 +0000 (23:06 +0000)]
Avoid report_fatal_error in ARM's PrintAsmOperand method.
The standard error handling in AsmPrinter::EmitInlineAsm handles this much
better, so just use it.

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

13 years agoRemove trailing whitespace.
Bob Wilson [Fri, 17 Dec 2010 23:06:32 +0000 (23:06 +0000)]
Remove trailing whitespace.

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

13 years agoAdd support for matching psign & plendvb to the x86 target
Nate Begeman [Fri, 17 Dec 2010 22:55:37 +0000 (22:55 +0000)]
Add support for matching psign & plendvb to the x86 target
Remove unnecessary pandn patterns, 'vnot' patfrag looks through bitcasts

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

13 years agoAdd more checks to IntervalMapOverlaps::advance() to ensure that advanceTo sees
Jakob Stoklund Olesen [Fri, 17 Dec 2010 22:07:54 +0000 (22:07 +0000)]
Add more checks to IntervalMapOverlaps::advance() to ensure that advanceTo sees
monotonic keys.

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

13 years agoIt is allowed to call IntervalMap::const_iterator::advanceTo() with a key that
Jakob Stoklund Olesen [Fri, 17 Dec 2010 22:07:51 +0000 (22:07 +0000)]
It is allowed to call IntervalMap::const_iterator::advanceTo() with a key that
moves the iterator to end(), and it is valid to call it on end().

That means it is valid to call advanceTo() with any monotonic key sequence.

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

13 years agoThumb's forced-PC-alignment requirement applies to the _total_ displacement, not...
Owen Anderson [Fri, 17 Dec 2010 21:49:48 +0000 (21:49 +0000)]
Thumb's forced-PC-alignment requirement applies to the _total_ displacement, not just to the fragment relative
portion.  While the fragment boundary is usually already aligned, it is possible for it not to be, which
would lead to a non-aligned final displacement.

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

13 years agoAdd a transform to DAG Combiner. This improves the
Dale Johannesen [Fri, 17 Dec 2010 21:45:49 +0000 (21:45 +0000)]
Add a transform to DAG Combiner.  This improves the
code for the case where 32-bit divide by constant is
turned into 64-bit multiply by constant.  8771012.

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

13 years agoFix 80 col.
Michael J. Spencer [Fri, 17 Dec 2010 21:32:47 +0000 (21:32 +0000)]
Fix 80 col.

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

13 years agoSupport/Path: Deprecate PathV1::isAbsolute.
Michael J. Spencer [Fri, 17 Dec 2010 21:21:31 +0000 (21:21 +0000)]
Support/Path: Deprecate PathV1::isAbsolute.

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

13 years agoPathV2: Use StringRef::substr to simplify substring creation.
Benjamin Kramer [Fri, 17 Dec 2010 20:27:37 +0000 (20:27 +0000)]
PathV2: Use StringRef::substr to simplify substring creation.

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

13 years agoAllow missing kill flags on an untied operand of a two-address instruction when
Jakob Stoklund Olesen [Fri, 17 Dec 2010 19:18:41 +0000 (19:18 +0000)]
Allow missing kill flags on an untied operand of a two-address instruction when
the operand uses the same register as a tied operand:

  %r1 = add %r1, %r1

If add were a three-address instruction, kill flags would be required on at
least one of the uses. Since it is a two-address instruction, the tied use
operand must not have a kill flag.

This change makes the kill flag on the untied use operand optional.

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

13 years agoFix crash when IntervalMapOverlaps::advanceTo moves past the last overlap.
Jakob Stoklund Olesen [Fri, 17 Dec 2010 19:18:38 +0000 (19:18 +0000)]
Fix crash when IntervalMapOverlaps::advanceTo moves past the last overlap.

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

13 years agoIf The ARM WriteNopData() gets an unaligned byte count to pad out, fill in with
Jim Grosbach [Fri, 17 Dec 2010 19:03:02 +0000 (19:03 +0000)]
If The ARM WriteNopData() gets an unaligned byte count to pad out, fill in with
a partial value. rdar://8782954

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

13 years agoMissed some StringRefRefs.
Benjamin Kramer [Fri, 17 Dec 2010 18:59:09 +0000 (18:59 +0000)]
Missed some StringRefRefs.

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

13 years agoAdd bits 31-28 to the Thumb2 encoding of TBB/TBH.
Jim Grosbach [Fri, 17 Dec 2010 18:42:56 +0000 (18:42 +0000)]
Add bits 31-28 to the Thumb2 encoding of TBB/TBH.

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

13 years agoHandle 2 and 4 byte data blob fixup values for ARM.
Jim Grosbach [Fri, 17 Dec 2010 18:39:10 +0000 (18:39 +0000)]
Handle 2 and 4 byte data blob fixup values for ARM.

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

13 years agoPass StringRefs by value, for consistency.
Benjamin Kramer [Fri, 17 Dec 2010 18:19:06 +0000 (18:19 +0000)]
Pass StringRefs by value, for consistency.

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

13 years agoAdd MachineLoopRange comparators for sorting loop lists by number and by area.
Jakob Stoklund Olesen [Fri, 17 Dec 2010 18:13:52 +0000 (18:13 +0000)]
Add MachineLoopRange comparators for sorting loop lists by number and by area.

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

13 years agoReapply r121905 (automatic synthesis of @llvm.sadd.with.overflow) with a fix for...
Owen Anderson [Fri, 17 Dec 2010 18:08:00 +0000 (18:08 +0000)]
Reapply r121905 (automatic synthesis of @llvm.sadd.with.overflow) with a fix for a bug that manifested itself
on the DragonEgg self-host bot.  Unfortunately, the testcase is pretty messy and doesn't reduce well due to
interactions with other parts of InstCombine.

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

13 years agoStore and free the TargetObjectWriter.
Rafael Espindola [Fri, 17 Dec 2010 18:01:31 +0000 (18:01 +0000)]
Store and free the TargetObjectWriter.

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

13 years agoStub out explicit MCELFObjectTargetWriter interface.
Rafael Espindola [Fri, 17 Dec 2010 17:45:22 +0000 (17:45 +0000)]
Stub out explicit MCELFObjectTargetWriter interface.

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

13 years agoCleanup and document .gitignore.
Michael J. Spencer [Fri, 17 Dec 2010 17:22:50 +0000 (17:22 +0000)]
Cleanup and document .gitignore.

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

13 years agoSupport: Rename Path.h to PathV1.h and add a new Path.h that includes both V1 and V2.
Michael J. Spencer [Fri, 17 Dec 2010 17:22:36 +0000 (17:22 +0000)]
Support: Rename Path.h to PathV1.h and add a new Path.h that includes both V1 and V2.

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

13 years agoMove createELFObjectWriter to its own header.
Rafael Espindola [Fri, 17 Dec 2010 16:59:53 +0000 (16:59 +0000)]
Move createELFObjectWriter to its own header.

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

13 years agoSimplifyCFG: Ranges can be larger than 64 bits. Fixes Release-selfhost build.
Benjamin Kramer [Fri, 17 Dec 2010 10:48:14 +0000 (10:48 +0000)]
SimplifyCFG: Ranges can be larger than 64 bits. Fixes Release-selfhost build.

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

13 years agoFix mismatched new[]/delete.
Benjamin Kramer [Fri, 17 Dec 2010 09:56:50 +0000 (09:56 +0000)]
Fix mismatched new[]/delete.

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

13 years agoDon't feed 19 bit immediates to ILA.
Kalle Raiskila [Fri, 17 Dec 2010 09:36:09 +0000 (09:36 +0000)]
Don't feed 19 bit immediates to ILA.

Patch (slightly modified) by Visa Putkinen.

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

13 years agoUse getFixupKindInfo to implement isFixupKindPCRel, ELF version.
Rafael Espindola [Fri, 17 Dec 2010 07:28:17 +0000 (07:28 +0000)]
Use getFixupKindInfo to implement isFixupKindPCRel, ELF version.

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

13 years agoimprove switch formation to handle small range
Chris Lattner [Fri, 17 Dec 2010 06:20:15 +0000 (06:20 +0000)]
improve switch formation to handle small range
comparisons formed by comparisons.  For example,
this:

void foo(unsigned x) {
  if (x == 0 || x == 1 || x == 3 || x == 4 || x == 6)
    bar();
}

compiles into:

_foo:                                   ## @foo
## BB#0:                                ## %entry
cmpl $6, %edi
ja LBB0_2
## BB#1:                                ## %entry
movl %edi, %eax
movl $91, %ecx
btq %rax, %rcx
jb LBB0_3

instead of:

_foo:                                   ## @foo
## BB#0:                                ## %entry
cmpl $2, %edi
jb LBB0_4
## BB#1:                                ## %switch.early.test
cmpl $6, %edi
ja LBB0_3
## BB#2:                                ## %switch.early.test
movl %edi, %eax
movl $88, %ecx
btq %rax, %rcx
jb LBB0_4

This catches a bunch of cases in GCC, which look like this:

 %804 = load i32* @which_alternative, align 4, !tbaa !0
 %805 = icmp ult i32 %804, 2
 %806 = icmp eq i32 %804, 3
 %or.cond121 = or i1 %805, %806
 %807 = icmp eq i32 %804, 4
 %or.cond124 = or i1 %or.cond121, %807
 br i1 %or.cond124, label %.thread, label %808

turning this into a range comparison.

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

13 years agoMC/ARM: Use aggressive symbol folding (important for jump tables, for example).
Daniel Dunbar [Fri, 17 Dec 2010 06:00:24 +0000 (06:00 +0000)]
MC/ARM: Use aggressive symbol folding (important for jump tables, for example).

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

13 years agoMC/Expr: Implemnt more aggressive folding during symbol evaluation using
Daniel Dunbar [Fri, 17 Dec 2010 05:50:33 +0000 (05:50 +0000)]
MC/Expr: Implemnt more aggressive folding during symbol evaluation using
IsSymbolRefDifferenceFullyResolved(). For example, we will now fold away
something like:
--
_a:
...
L0:
...
L1:
...
.long (L1 - L0) / 2
--

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

13 years agoMC/Mach-O: On second thought, use a custom hook for enabling aggressive
Daniel Dunbar [Fri, 17 Dec 2010 05:50:29 +0000 (05:50 +0000)]
MC/Mach-O: On second thought, use a custom hook for enabling aggressive
IsSymbolRefDifferenceFullyResolved, it turns out this does change behavior on
enough cases for x86-32 that I would rather wait a bit on it.
 - In practice, we will want to change this eventually because it only means we
   generate less relocations (it also eliminates the need for the horrible
   '.set' hack that Darwin requires in some places).

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

13 years agoMC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.
Daniel Dunbar [Fri, 17 Dec 2010 04:54:58 +0000 (04:54 +0000)]
MC/Mach-O: Implement IsSymbolRefDifferenceFullyResolved.
 - Unlike for fixups, we always do the "reliable" thing (not just for x86_64).
 - Since Darwin 'as' would typically reject things that using this will allow,
   we don't need to worry about compatibility.

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

13 years agoMC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format specific...
Daniel Dunbar [Fri, 17 Dec 2010 04:54:54 +0000 (04:54 +0000)]
MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format specific hook.
 - Currently just has stub implementations for Mach-O, ELF, and COFF.

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

13 years agoProvide LiveIntervalUnion::Query::checkLoopInterference.
Jakob Stoklund Olesen [Fri, 17 Dec 2010 04:09:47 +0000 (04:09 +0000)]
Provide LiveIntervalUnion::Query::checkLoopInterference.

This is a three-way interval list intersection between a virtual register, a
live interval union, and a loop. It will be used to identify interference-free
loops for live range splitting.

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

13 years agoMC/Assembler: Strip out object writer arguments, now that it is always available
Daniel Dunbar [Fri, 17 Dec 2010 02:45:59 +0000 (02:45 +0000)]
MC/Assembler: Strip out object writer arguments, now that it is always available
-- and remove FIXME asking for the same!

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

13 years agoMC/Assembler: Make the MCObjectWriter available through the lifetime of the
Daniel Dunbar [Fri, 17 Dec 2010 02:45:41 +0000 (02:45 +0000)]
MC/Assembler: Make the MCObjectWriter available through the lifetime of the
assembler.

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

13 years agoTrailing whitespace and 80 column fixups.
Jim Grosbach [Fri, 17 Dec 2010 02:10:59 +0000 (02:10 +0000)]
Trailing whitespace and 80 column fixups.

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

13 years agoMC/Target: Remove HasScatteredSymbols target hook variable, which has been
Daniel Dunbar [Fri, 17 Dec 2010 02:06:08 +0000 (02:06 +0000)]
MC/Target: Remove HasScatteredSymbols target hook variable, which has been
superceded and was effectively dead.

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

13 years agoMC/Expr: Simplify.
Daniel Dunbar [Fri, 17 Dec 2010 02:05:45 +0000 (02:05 +0000)]
MC/Expr: Simplify.

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

13 years agoComplete tests for IntervalMapOverlaps.
Jakob Stoklund Olesen [Fri, 17 Dec 2010 01:31:49 +0000 (01:31 +0000)]
Complete tests for IntervalMapOverlaps.

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

13 years agoFix crash compiling a QQQQ REG_SEQUENCE for a Neon vld3_lane operation.
Bob Wilson [Fri, 17 Dec 2010 01:21:12 +0000 (01:21 +0000)]
Fix crash compiling a QQQQ REG_SEQUENCE for a Neon vld3_lane operation.
Radar 8776599

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

13 years agoUse PairDRegs to implement ConcatVectors. No functionality change.
Bob Wilson [Fri, 17 Dec 2010 01:21:08 +0000 (01:21 +0000)]
Use PairDRegs to implement ConcatVectors.  No functionality change.

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

13 years agoFix a comment typo.
Bob Wilson [Fri, 17 Dec 2010 01:21:05 +0000 (01:21 +0000)]
Fix a comment typo.

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

13 years agoNeon intrinsic tests need to be compiled for Cortex-A9 for f16 support.
Bob Wilson [Fri, 17 Dec 2010 01:21:03 +0000 (01:21 +0000)]
Neon intrinsic tests need to be compiled for Cortex-A9 for f16 support.

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

13 years agoRevert r64460. strtol and friends cannot be marked readonly, even with
Dan Gohman [Fri, 17 Dec 2010 01:09:43 +0000 (01:09 +0000)]
Revert r64460. strtol and friends cannot be marked readonly, even with
a null endptr argument, because they may write to errno.

This fixes a seflhost miscompile observed on Linux targets when TBAA
was enabled.

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

13 years agoMC: Remove another dead MCAssembler argument, and update clients.
Daniel Dunbar [Fri, 17 Dec 2010 01:07:35 +0000 (01:07 +0000)]
MC: Remove another dead MCAssembler argument, and update clients.

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

13 years agoMC: Remove dead MCAssembler argument -- Rafael, can you check the FIXME I added
Daniel Dunbar [Fri, 17 Dec 2010 01:07:31 +0000 (01:07 +0000)]
MC: Remove dead MCAssembler argument -- Rafael, can you check the FIXME I added
here?

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

13 years agoMC: Simplify (remove unnecessary MCAssembler argument, obsoleted by containment
Daniel Dunbar [Fri, 17 Dec 2010 01:07:28 +0000 (01:07 +0000)]
MC: Simplify (remove unnecessary MCAssembler argument, obsoleted by containment
in MCAsmLayout).

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

13 years agoFix 80-col viola.
Daniel Dunbar [Fri, 17 Dec 2010 01:07:25 +0000 (01:07 +0000)]
Fix 80-col viola.

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

13 years agoWrite => in a more normal form.
Daniel Dunbar [Fri, 17 Dec 2010 01:07:22 +0000 (01:07 +0000)]
Write => in a more normal form.

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

13 years agoMC/Expr: Simplify (and add a FIXME).
Daniel Dunbar [Fri, 17 Dec 2010 01:07:20 +0000 (01:07 +0000)]
MC/Expr: Simplify (and add a FIXME).

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

13 years ago"Fix" FDE alignment to match what gas does.
Rafael Espindola [Fri, 17 Dec 2010 00:28:02 +0000 (00:28 +0000)]
"Fix" FDE alignment to match what gas does.

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

13 years agoMake pushq produce signed relocations.
Rafael Espindola [Thu, 16 Dec 2010 22:50:01 +0000 (22:50 +0000)]
Make pushq produce signed relocations.

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

13 years agollvm-dis: Fix memory leak. ParseBitcodeFile should be taking ownership of
Michael J. Spencer [Thu, 16 Dec 2010 22:37:52 +0000 (22:37 +0000)]
llvm-dis: Fix memory leak. ParseBitcodeFile should be taking ownership of
the MemoryBuffer*, however, it doesn't seem to delete it.

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

13 years agoAdd basic test exposing many bugs.
Jakob Stoklund Olesen [Thu, 16 Dec 2010 19:46:09 +0000 (19:46 +0000)]
Add basic test exposing many bugs.

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

13 years agoFix MBlaze backend call instructions so that arguments passed through registers
Wesley Peck [Thu, 16 Dec 2010 19:41:31 +0000 (19:41 +0000)]
Fix MBlaze backend call instructions so that arguments passed through registers
are correctly marked as used. This removes a hack where the call instructions
marked all possible argument registers as used in the tablegen description.

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

13 years agoPseudo-ize the Thumb1 tBfar pattern. rdar://8777974
Jim Grosbach [Thu, 16 Dec 2010 19:11:16 +0000 (19:11 +0000)]
Pseudo-ize the Thumb1 tBfar pattern. rdar://8777974

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

13 years agoMC/Expr: Add a doxyment.
Daniel Dunbar [Thu, 16 Dec 2010 18:36:25 +0000 (18:36 +0000)]
MC/Expr: Add a doxyment.

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

13 years agoOops, didn't mean to ignore .gitignore.
Daniel Dunbar [Thu, 16 Dec 2010 17:51:14 +0000 (17:51 +0000)]
Oops, didn't mean to ignore .gitignore.

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

13 years agoMC/Mach-O: Lift some MachObjectWriter arguments into the target specific
Daniel Dunbar [Thu, 16 Dec 2010 17:21:02 +0000 (17:21 +0000)]
MC/Mach-O: Lift some MachObjectWriter arguments into the target specific

interface.

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

13 years agollvm-dis: Simplify MemoryBuffer usage.
Michael J. Spencer [Thu, 16 Dec 2010 16:23:38 +0000 (16:23 +0000)]
llvm-dis: Simplify MemoryBuffer usage.

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

13 years agoFix whitespace.
Michael J. Spencer [Thu, 16 Dec 2010 16:23:30 +0000 (16:23 +0000)]
Fix whitespace.

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

13 years agoMC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.
Daniel Dunbar [Thu, 16 Dec 2010 16:09:19 +0000 (16:09 +0000)]
MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.

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

13 years agoFix indentation (per style guide).
Daniel Dunbar [Thu, 16 Dec 2010 16:08:43 +0000 (16:08 +0000)]
Fix indentation (per style guide).

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

13 years agoMC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.
Daniel Dunbar [Thu, 16 Dec 2010 16:08:33 +0000 (16:08 +0000)]
MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.

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

13 years agoMC/Mach-O: Use fixup info instead of hard coded list.
Daniel Dunbar [Thu, 16 Dec 2010 15:42:31 +0000 (15:42 +0000)]
MC/Mach-O: Use fixup info instead of hard coded list.

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

13 years agobuild: Fix ONLY_TOOLS to not build lto etc. unless specified.
Daniel Dunbar [Thu, 16 Dec 2010 15:42:26 +0000 (15:42 +0000)]
build: Fix ONLY_TOOLS to not build lto etc. unless specified.

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

13 years agoAdd some more .gitignore entries.
Daniel Dunbar [Thu, 16 Dec 2010 15:42:18 +0000 (15:42 +0000)]
Add some more .gitignore entries.

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

13 years agoFix a bug in the loop in JumpThreading::ProcessThreadableEdges() where it could false...
Frits van Bommel [Thu, 16 Dec 2010 12:16:00 +0000 (12:16 +0000)]
Fix a bug in the loop in JumpThreading::ProcessThreadableEdges() where it could falsely produce a MultipleDestSentinel value if the first predecessor ended with an 'indirectbr'. If that happened, it caused an unnecessary FindMostPopularDest() call.
This wasn't a correctness problem, but it broke the fast path for single-predecessor blocks.

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

13 years agoSpeculatively revert commit 121905 since it looks like it might have broken the
Duncan Sands [Thu, 16 Dec 2010 09:40:54 +0000 (09:40 +0000)]
Speculatively revert commit 121905 since it looks like it might have broken the
dragonegg self-host buildbot.  Original commit message:

Add an InstCombine transform to recognize instances of manual overflow-safe addition
(performing the addition in a wider type and explicitly checking for overflow), and
fold them down to intrinsics.  This currently only supports signed-addition, but could
be generalized if someone works out the magic constant formulas for other operations.

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

13 years agoFix some compiler warnings.
Daniel Dunbar [Thu, 16 Dec 2010 04:36:42 +0000 (04:36 +0000)]
Fix some compiler warnings.

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

13 years agoMemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an...
Michael J. Spencer [Thu, 16 Dec 2010 03:29:14 +0000 (03:29 +0000)]
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.

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

13 years agoAdd .gitignore. I chose not to dump the svn ignore list into this because most
Michael J. Spencer [Thu, 16 Dec 2010 03:25:38 +0000 (03:25 +0000)]
Add .gitignore. I chose not to dump the svn ignore list into this because most
of the entries there are useless for out of source builds.

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

13 years agoMC: Move target specific fixup info descriptors to TargetAsmBackend instead of
Daniel Dunbar [Thu, 16 Dec 2010 03:20:06 +0000 (03:20 +0000)]
MC: Move target specific fixup info descriptors to TargetAsmBackend instead of
the MCCodeEmitter, which seems like a better organization.
 - Also, cleaned up some magic constants while in the area.

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

13 years ago1. ARM/MC/ELF: A few more ELF relocs for .o
Jason W Kim [Thu, 16 Dec 2010 03:12:17 +0000 (03:12 +0000)]
1. ARM/MC/ELF: A few more ELF relocs for .o
2. Fixed EmitLocalCommonSymbol for ELF (Yes, they exist. :)
   Test added.

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

13 years agoMC: Make TargetAsmBackend available to the AsmStreamer.
Daniel Dunbar [Thu, 16 Dec 2010 03:05:59 +0000 (03:05 +0000)]
MC: Make TargetAsmBackend available to the AsmStreamer.
 - Treaty talks on the non-proliferation of MC objects broke down.

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

13 years agoMC: Split MCFixupKindInfo out into its own header.
Daniel Dunbar [Thu, 16 Dec 2010 03:05:53 +0000 (03:05 +0000)]
MC: Split MCFixupKindInfo out into its own header.

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

13 years agoMC: Remove a FIXME I no longer agree with.
Daniel Dunbar [Thu, 16 Dec 2010 03:05:46 +0000 (03:05 +0000)]
MC: Remove a FIXME I no longer agree with.

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

13 years agoUpdate a comment.
Dan Gohman [Thu, 16 Dec 2010 02:55:10 +0000 (02:55 +0000)]
Update a comment.

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

13 years ago-enable-tbaa is on by default now.
Dan Gohman [Thu, 16 Dec 2010 02:53:48 +0000 (02:53 +0000)]
-enable-tbaa is on by default now.

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

13 years agoMake memcpyopt TBAA-aware.
Dan Gohman [Thu, 16 Dec 2010 02:51:19 +0000 (02:51 +0000)]
Make memcpyopt TBAA-aware.

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

13 years agolib/Support/regexec.c: Let Regex LLP64-aware.
NAKAMURA Takumi [Thu, 16 Dec 2010 01:48:15 +0000 (01:48 +0000)]
lib/Support/regexec.c: Let Regex LLP64-aware.

On LLP64 Win64, 'states1' (for small version) was expanded to 'char *' for large version. Thus small version would be mischosen when nstates > 32 regardless of sizeof(long) on Win64.

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

13 years agoDelete an extra "Imm5 = ", caught by GCC's -Wsequence-point but not by Clang
Matt Beaumont-Gay [Thu, 16 Dec 2010 01:34:26 +0000 (01:34 +0000)]
Delete an extra "Imm5 = ", caught by GCC's -Wsequence-point but not by Clang
(see PR4579).

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

13 years agoAdd IntervalMapOverlaps - An iterator for overlapping intervals in two
Jakob Stoklund Olesen [Thu, 16 Dec 2010 01:18:29 +0000 (01:18 +0000)]
Add IntervalMapOverlaps - An iterator for overlapping intervals in two
IntervalMaps.

The IntervalMaps can have different template parameters, but the KeyT and Traits
types must be the same.

Tests are forthcoming.

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

13 years agoRemove fixup_arm_thumb_ldst. The code was never calling the "fixup" stuff for
Bill Wendling [Thu, 16 Dec 2010 00:50:33 +0000 (00:50 +0000)]
Remove fixup_arm_thumb_ldst. The code was never calling the "fixup" stuff for
it. I.e., it was always an immediate value.

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

13 years agoAdd tSpill and tRestore to the opcodes to replace with tSTRi and tLDRi
Bill Wendling [Thu, 16 Dec 2010 00:49:54 +0000 (00:49 +0000)]
Add tSpill and tRestore to the opcodes to replace with tSTRi and tLDRi
respectively.

It may be a bug that these opcodes are getting this far into machine code
generation.

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

13 years agoAdd encodings for Thumb1 Spill and Restore pseudos.
Bill Wendling [Thu, 16 Dec 2010 00:38:41 +0000 (00:38 +0000)]
Add encodings for Thumb1 Spill and Restore pseudos.

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

13 years agoFix elf-dump --dump-section-data for .bss section
Jason W Kim [Thu, 16 Dec 2010 00:15:10 +0000 (00:15 +0000)]
Fix elf-dump --dump-section-data for .bss section

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

13 years agoEnable TBAA by default.
Dan Gohman [Wed, 15 Dec 2010 23:58:44 +0000 (23:58 +0000)]
Enable TBAA by default.

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

13 years agoPreserve TBAA tags when doing load PRE.
Dan Gohman [Wed, 15 Dec 2010 23:53:55 +0000 (23:53 +0000)]
Preserve TBAA tags when doing load PRE.

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

13 years agoThumb1 had two patterns for the same load-from-constant-pool instruction.
Jim Grosbach [Wed, 15 Dec 2010 23:52:36 +0000 (23:52 +0000)]
Thumb1 had two patterns for the same load-from-constant-pool instruction.
Canonicalize on tLDRpci and remove tLDRcp.

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

13 years agoDon't handle -arm-long-calls in fast isel for now.
Eric Christopher [Wed, 15 Dec 2010 23:47:29 +0000 (23:47 +0000)]
Don't handle -arm-long-calls in fast isel for now.

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

13 years agoStart using SplitKit and MachineLoopRanges in RegAllocGreedy in preparation of
Jakob Stoklund Olesen [Wed, 15 Dec 2010 23:46:13 +0000 (23:46 +0000)]
Start using SplitKit and MachineLoopRanges in RegAllocGreedy in preparation of
live range splitting around loops guided by register pressure.

So far, trySplit() simply prints a lot of debug output.

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

13 years agoAdd MachineLoopRanges analysis.
Jakob Stoklund Olesen [Wed, 15 Dec 2010 23:41:23 +0000 (23:41 +0000)]
Add MachineLoopRanges analysis.

A MachineLoopRange contains the intervals of slot indexes covered by the blocks
in a loop. This representation of the loop blocks is more efficient to compare
against interfering registers during register coalescing.

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

13 years agoIf we're changing the frame register to a physical register other than SP, we
Bill Wendling [Wed, 15 Dec 2010 23:32:27 +0000 (23:32 +0000)]
If we're changing the frame register to a physical register other than SP, we
need to use tLDRi and tSTRi instead of tLDRspi and tSTRspi respectively.

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

13 years agoWhitespace cleanups.
Bill Wendling [Wed, 15 Dec 2010 23:31:24 +0000 (23:31 +0000)]
Whitespace cleanups.

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