oota-llvm.git
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

13 years agoTeach the Neon intrinsic generator to widen half-precision float types.
Bob Wilson [Wed, 15 Dec 2010 23:16:25 +0000 (23:16 +0000)]
Teach the Neon intrinsic generator to widen half-precision float types.
This isn't currently used for anything but I ran into it when experimenting
with some changes, and it might be useful in the future.

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

13 years agoBetter fix for opt build
Matt Beaumont-Gay [Wed, 15 Dec 2010 23:14:45 +0000 (23:14 +0000)]
Better fix for opt build

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

13 years agoFix a typo that Bill spotted.
Dan Gohman [Wed, 15 Dec 2010 23:09:41 +0000 (23:09 +0000)]
Fix a typo that Bill spotted.

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

13 years agoOnly rr forms of ADD*_DB are commutable.
Evan Cheng [Wed, 15 Dec 2010 22:57:36 +0000 (22:57 +0000)]
Only rr forms of ADD*_DB are commutable.

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

13 years agoTypo.
Rafael Espindola [Wed, 15 Dec 2010 22:33:06 +0000 (22:33 +0000)]
Typo.

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

13 years agoAdd an InstCombine transform to recognize instances of manual overflow-safe addition
Owen Anderson [Wed, 15 Dec 2010 22:32:38 +0000 (22:32 +0000)]
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.

Fixes <rdar://problem/8558713>.

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

13 years agoFix opt -Werror build
Matt Beaumont-Gay [Wed, 15 Dec 2010 22:21:20 +0000 (22:21 +0000)]
Fix opt -Werror build

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

13 years agoTeach machine cse to commute instructions.
Evan Cheng [Wed, 15 Dec 2010 22:16:21 +0000 (22:16 +0000)]
Teach machine cse to commute instructions.

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

13 years agoAdd Neon VCVT instructions for f32 <-> f16 conversions.
Bob Wilson [Wed, 15 Dec 2010 22:14:12 +0000 (22:14 +0000)]
Add Neon VCVT instructions for f32 <-> f16 conversions.
Clang is now providing intrinsics for these and so we need to support them
in the backend.  Radar 8068427.

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

13 years agoFix misspelled target triples in MC/ARM test commands.
Bob Wilson [Wed, 15 Dec 2010 22:14:01 +0000 (22:14 +0000)]
Fix misspelled target triples in MC/ARM test commands.

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

13 years agoReapply r121886, and also update DecomposeGEPExpression to keep
Dan Gohman [Wed, 15 Dec 2010 20:49:55 +0000 (20:49 +0000)]
Reapply r121886, and also update DecomposeGEPExpression to keep
it in sync.

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

13 years agoAdd SlotIndexes::getMBBRange() to get the range of a basic block in a single
Jakob Stoklund Olesen [Wed, 15 Dec 2010 20:40:22 +0000 (20:40 +0000)]
Add SlotIndexes::getMBBRange() to get the range of a basic block in a single
lookup.

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

13 years agoRevert r121886. DecomposeGEPExpression needs to be kept
Dan Gohman [Wed, 15 Dec 2010 20:39:25 +0000 (20:39 +0000)]
Revert r121886. DecomposeGEPExpression needs to be kept
in sync.

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

13 years agoLower the MBlaze target specific calling conventions for "interrupt_handler"
Wesley Peck [Wed, 15 Dec 2010 20:27:28 +0000 (20:27 +0000)]
Lower the MBlaze target specific calling conventions for "interrupt_handler"
and "save_volatiles" correctly. This completes the custom calling convention
functionality changes for the MBlaze backend that were started in 121888.

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

13 years agoAdding target specific calling conventions to support the MBlaze GCC function
Wesley Peck [Wed, 15 Dec 2010 20:14:09 +0000 (20:14 +0000)]
Adding target specific calling conventions to support the MBlaze GCC function
attributes "interrupt_handle" and "save_volatiles". Support for lowering these
correctly will be in an upcoming commit.

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

13 years agoStrengthen GetUnderlyingObject using InstructionSimplify.
Dan Gohman [Wed, 15 Dec 2010 20:10:26 +0000 (20:10 +0000)]
Strengthen GetUnderlyingObject using InstructionSimplify.

While LLVM's main design is that analysis code shouldn't
go out of its way to understand code which hasn't been
InstCombined, analysis utility routines like this can
find themselves being called in the middle of transform
passes when instcombine hasn't had a chance to run.

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