oota-llvm.git
14 years agoadd some helpful comments to the emitter
Chris Lattner [Fri, 26 Feb 2010 08:15:02 +0000 (08:15 +0000)]
add some helpful comments to the emitter

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

14 years agoswitch from my nice hashtable based merging solution to a
Chris Lattner [Fri, 26 Feb 2010 08:08:41 +0000 (08:08 +0000)]
switch from my nice hashtable based merging solution to a
gross little neighbor merging implementation.  This one has
the benefit of not violating the ordering of patterns, so it
generates code that passes tests again.

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

14 years agofix same bug in CheckChainCompatibleMatcher::isEqualImpl
Chris Lattner [Fri, 26 Feb 2010 08:06:02 +0000 (08:06 +0000)]
fix same bug in CheckChainCompatibleMatcher::isEqualImpl

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

14 years agofix a nasty bug in CheckTypeMatcher::isEqualImpl
Chris Lattner [Fri, 26 Feb 2010 08:05:36 +0000 (08:05 +0000)]
fix a nasty bug in CheckTypeMatcher::isEqualImpl

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

14 years agofinish off the factoring optimization along the lines of the
Chris Lattner [Fri, 26 Feb 2010 07:36:37 +0000 (07:36 +0000)]
finish off the factoring optimization along the lines of the
current design.  This generates a matcher that successfully
runs, but it turns out that the factoring we're doing violates
the ordering of patterns, so we end up matching (e.g.) movups
where we want movaps.  This won't due, but I'll address this in
a follow on patch.  It's nice to not be on by default yet! :)

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

14 years agoadd a new setNumChildren method for resizing scopes. Tweak getHash() so
Chris Lattner [Fri, 26 Feb 2010 07:35:27 +0000 (07:35 +0000)]
add a new setNumChildren method for resizing scopes.  Tweak getHash() so
that we never return a tombstone value, which (thankfully) triggers an
assert in densemap.

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

14 years agoCurrently in LLVM, names of libcalls are assigned during TargetLowering
Sanjiv Gupta [Fri, 26 Feb 2010 07:31:15 +0000 (07:31 +0000)]
Currently in LLVM, names of libcalls are assigned during TargetLowering
object construction. There is no provision to change them when the
code for a function generated.
So we have to change these names while printing assembly.

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

14 years agofix the matcher in the presence of multiple scopes: we need to save
Chris Lattner [Fri, 26 Feb 2010 07:28:20 +0000 (07:28 +0000)]
fix the matcher in the presence of multiple scopes: we need to save
and restore the entire matcher stack by value.  This is because children
we're testing could do moveparent or other things besides just
scribbling on additions to the stack.

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

14 years agoBefore converting an operand to mem, check if it is legal to do so.
Sanjiv Gupta [Fri, 26 Feb 2010 07:27:35 +0000 (07:27 +0000)]
Before converting an operand to mem, check if it is legal to do so.

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

14 years agothis file lacks a run line!
Chris Lattner [Fri, 26 Feb 2010 02:40:57 +0000 (02:40 +0000)]
this file lacks a run line!

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

14 years agoFix a typo.
Dan Gohman [Fri, 26 Feb 2010 02:15:17 +0000 (02:15 +0000)]
Fix a typo.

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

14 years agoDelete a bunch of redundant predicates.
Dan Gohman [Fri, 26 Feb 2010 01:14:30 +0000 (01:14 +0000)]
Delete a bunch of redundant predicates.

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

14 years agoFix comments.
Bill Wendling [Fri, 26 Feb 2010 01:12:52 +0000 (01:12 +0000)]
Fix comments.

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

14 years agoGive packagers some advice about how to build LLVM so it's useful to
Jeffrey Yasskin [Fri, 26 Feb 2010 00:54:42 +0000 (00:54 +0000)]
Give packagers some advice about how to build LLVM so it's useful to
the most users.

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

14 years agoAdd another (and hopefully the last) exception case, where once we recalculate
Bill Wendling [Fri, 26 Feb 2010 00:43:54 +0000 (00:43 +0000)]
Add another (and hopefully the last) exception case, where once we recalculate
the alignment requirement, if it no longer makes the TType base offset overflow
into extra bytes, then we need to pad to those bytes ourselves.

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

14 years agoAnd should use the correct variable.
Bill Wendling [Fri, 26 Feb 2010 00:24:25 +0000 (00:24 +0000)]
And should use the correct variable.

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

14 years agoGot assertion check backwards.
Bill Wendling [Fri, 26 Feb 2010 00:22:42 +0000 (00:22 +0000)]
Got assertion check backwards.

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

14 years agoCatch a corner case where adding the padding to the "TType base offset" field
Bill Wendling [Thu, 25 Feb 2010 23:52:44 +0000 (23:52 +0000)]
Catch a corner case where adding the padding to the "TType base offset" field
will eliminate the need for padding in the "Call site table length". E.g., if
we have this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0x7f  ## @TType base offset
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

with padding of 1. We want to emit the padding like this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0xff  ## @TType base offset
        .space  1,0   ## Padding
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

and not with padding on the "Call site table length" entry.

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

14 years agoFix a few more typos.
Dan Gohman [Thu, 25 Feb 2010 23:51:27 +0000 (23:51 +0000)]
Fix a few more typos.

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

14 years agoFix a typo.
Dan Gohman [Thu, 25 Feb 2010 23:41:41 +0000 (23:41 +0000)]
Fix a typo.

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

14 years agoAdded SAFECode (safecode) to the list of projects to automatically configure.
John Criswell [Thu, 25 Feb 2010 22:57:19 +0000 (22:57 +0000)]
Added SAFECode (safecode) to the list of projects to automatically configure.

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

14 years agorewrite OptimizeGlobalAddressOfMalloc to fix PR6422, some bugs
Chris Lattner [Thu, 25 Feb 2010 22:33:52 +0000 (22:33 +0000)]
rewrite OptimizeGlobalAddressOfMalloc to fix PR6422, some bugs
introduced when mallocinst was eliminated.

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

14 years agotests: Propogate the HOME environment variable through to tests. I'm ambivalent
Daniel Dunbar [Thu, 25 Feb 2010 22:09:09 +0000 (22:09 +0000)]
tests: Propogate the HOME environment variable through to tests. I'm ambivalent
about this, but it can be useful for users who use ccache, since the LLVMC tests
are fond of calling gcc.

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

14 years agoFix HTML.
Bill Wendling [Thu, 25 Feb 2010 21:23:24 +0000 (21:23 +0000)]
Fix HTML.

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

14 years agoMake comment more meaningful.
Bill Wendling [Thu, 25 Feb 2010 21:19:47 +0000 (21:19 +0000)]
Make comment more meaningful.

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

14 years agoAdd svn:ignore.
Dan Gohman [Thu, 25 Feb 2010 20:56:25 +0000 (20:56 +0000)]
Add svn:ignore.

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

14 years agoFix ExpandVectorBuildThroughStack for the case where the
Dan Gohman [Thu, 25 Feb 2010 20:30:49 +0000 (20:30 +0000)]
Fix ExpandVectorBuildThroughStack for the case where the
operands are themselves vectors. Based on a patch by
Micah Villmow for PR6338.

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

14 years agoAdded the following 32-bit Thumb instructions for disassembly only: SMC, RFE,
Johnny Chen [Thu, 25 Feb 2010 20:25:24 +0000 (20:25 +0000)]
Added the following 32-bit Thumb instructions for disassembly only: SMC, RFE,
and SRS.

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

14 years agoAdded the 32-bit Thumb instructions (BXJ) for disassembly only.
Johnny Chen [Thu, 25 Feb 2010 19:05:29 +0000 (19:05 +0000)]
Added the 32-bit Thumb instructions (BXJ) for disassembly only.

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

14 years agochange the scope node to include a list of children to be checked
Chris Lattner [Thu, 25 Feb 2010 19:00:39 +0000 (19:00 +0000)]
change the scope node to include a list of children to be checked
instead of to have a chained series of scope nodes.  This makes
the generated table smaller, improves the efficiency of the
interpreter, and make the factoring optimization much more
reasonable to implement.

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

14 years agoAdded the 32-bit Thumb instructions (MRS and MSR) for disassembly only.
Johnny Chen [Thu, 25 Feb 2010 18:46:43 +0000 (18:46 +0000)]
Added the 32-bit Thumb instructions (MRS and MSR) for disassembly only.

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

14 years agoThis is a patch to the assembler frontend to detect when aligning a text
Kevin Enderby [Thu, 25 Feb 2010 18:46:04 +0000 (18:46 +0000)]
This is a patch to the assembler frontend to detect when aligning a text
section with TextAlignFillValue and calls EmitCodeAlignment() instead of
calling EmitValueToAlignment().  This allows x86 assembly code to be aligned
with optimal nops.

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

14 years agostkrc is gone.
Dan Gohman [Thu, 25 Feb 2010 18:18:49 +0000 (18:18 +0000)]
stkrc is gone.

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

14 years agoAdd the union keyword.
Dan Gohman [Thu, 25 Feb 2010 18:17:58 +0000 (18:17 +0000)]
Add the union keyword.

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

14 years agoMerge the advanced getelementptr FAQ into the regular
Dan Gohman [Thu, 25 Feb 2010 18:16:03 +0000 (18:16 +0000)]
Merge the advanced getelementptr FAQ into the regular
getelementptr FAQ.

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

14 years agoFix TextAlignFillValue in a few places
Daniel Dunbar [Thu, 25 Feb 2010 18:07:10 +0000 (18:07 +0000)]
Fix TextAlignFillValue in a few places

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

14 years agoAdd simple script for finding most-recent-rev-before-N in a git-svn repo; useful
Daniel Dunbar [Thu, 25 Feb 2010 18:07:07 +0000 (18:07 +0000)]
Add simple script for finding most-recent-rev-before-N in a git-svn repo; useful
when bisecting multiple repos in sync.

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

14 years agoAdded the following 16-bit Thumb instructions for disassembly only: YIELD, WFE,
Johnny Chen [Thu, 25 Feb 2010 17:51:03 +0000 (17:51 +0000)]
Added the following 16-bit Thumb instructions for disassembly only: YIELD, WFE,
WFI, SEV, SETEND.

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

14 years agoremove a dead PatLeaf, I previously changed all uses to use -1 instead.
Chris Lattner [Thu, 25 Feb 2010 17:39:34 +0000 (17:39 +0000)]
remove a dead PatLeaf, I previously changed all uses to use -1 instead.

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

14 years agoFix a typo.
Dan Gohman [Thu, 25 Feb 2010 16:51:31 +0000 (16:51 +0000)]
Fix a typo.

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

14 years agoClarify the description of pointer types, and move the
Dan Gohman [Thu, 25 Feb 2010 16:50:07 +0000 (16:50 +0000)]
Clarify the description of pointer types, and move the
address space content to its own paragraph.

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

14 years agoTeach the constant folder about union types.
Dan Gohman [Thu, 25 Feb 2010 16:45:19 +0000 (16:45 +0000)]
Teach the constant folder about union types.

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

14 years agoRemove code which assumes it knows how vectors are stored in memory.
Dan Gohman [Thu, 25 Feb 2010 16:05:33 +0000 (16:05 +0000)]
Remove code which assumes it knows how vectors are stored in memory.

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

14 years agoAdd more information to the getSizeOf comment.
Dan Gohman [Thu, 25 Feb 2010 15:55:28 +0000 (15:55 +0000)]
Add more information to the getSizeOf comment.

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

14 years agoRemove this paragraph. Vectors may not always have the same layout as
Dan Gohman [Thu, 25 Feb 2010 15:53:42 +0000 (15:53 +0000)]
Remove this paragraph. Vectors may not always have the same layout as
arrays now.

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

14 years agoRevert r97064. Duncan pointed out that bitcasts are defined in
Dan Gohman [Thu, 25 Feb 2010 15:20:39 +0000 (15:20 +0000)]
Revert r97064. Duncan pointed out that bitcasts are defined in
terms of store and load, which means bitcasting between scalar
integer and vector has endian-specific results, which undermines
this whole approach.

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

14 years agoMake the side-numbering of instructions used by metadata (which is needed to
Nick Lewycky [Thu, 25 Feb 2010 08:30:17 +0000 (08:30 +0000)]
Make the side-numbering of instructions used by metadata (which is needed to
keep track of instructions that return void) per-function. This fixes PR5278.

This breaks backwards compatibility with the metadata format. That's okay
because we haven't released the metadata bitcode yet.

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

14 years agoImplement the first half of redundancy factoring: efficiently
Chris Lattner [Thu, 25 Feb 2010 07:45:24 +0000 (07:45 +0000)]
Implement the first half of redundancy factoring: efficiently
splitting all the patterns under scope nodes into equality sets
based on their first node.  The second step is to rewrite the
graph info a form that exposes the sharing.  Before I do this,
I want to redesign the Scope node.

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

14 years agoMake LoopSimplify change conditional branches in loop exiting blocks
Dan Gohman [Thu, 25 Feb 2010 06:57:05 +0000 (06:57 +0000)]
Make LoopSimplify change conditional branches in loop exiting blocks
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.

Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.

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

14 years agofactor the print method better.
Chris Lattner [Thu, 25 Feb 2010 06:53:39 +0000 (06:53 +0000)]
factor the print method better.

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

14 years agoDump the presence of attached metadata even if we don't know what it is. This
Nick Lewycky [Thu, 25 Feb 2010 06:53:04 +0000 (06:53 +0000)]
Dump the presence of attached metadata even if we don't know what it is. This
format is not parsable, even if the module is legal. To get parsable output,
dump the module instead of the function or smaller, since metadata kind are
attached to the module (not the context).

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

14 years agoadd methods to do equality checks and get hashes of Matchers
Chris Lattner [Thu, 25 Feb 2010 06:49:58 +0000 (06:49 +0000)]
add methods to do equality checks and get hashes of Matchers

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

14 years agoModernize comment.
Nick Lewycky [Thu, 25 Feb 2010 06:39:10 +0000 (06:39 +0000)]
Modernize comment.

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

14 years agoCorrect whitespace.
Nick Lewycky [Thu, 25 Feb 2010 06:38:51 +0000 (06:38 +0000)]
Correct whitespace.

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

14 years agoTry r96559 for the third time. This time the shared library is only built if
Jeffrey Yasskin [Thu, 25 Feb 2010 06:34:33 +0000 (06:34 +0000)]
Try r96559 for the third time.  This time the shared library is only built if
--enable-shared is passed to configure.

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

14 years agoEach field of auxiliary debug entry is only 1 byte long.
Sanjiv Gupta [Thu, 25 Feb 2010 03:54:49 +0000 (03:54 +0000)]
Each field of auxiliary debug entry is only 1 byte long.

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

14 years agoAdded tNOP for disassembly only.
Johnny Chen [Thu, 25 Feb 2010 03:28:51 +0000 (03:28 +0000)]
Added tNOP for disassembly only.

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

14 years agoTruncate from i64 to i32 is "free" on x86-32, because it involves
Dan Gohman [Thu, 25 Feb 2010 03:04:36 +0000 (03:04 +0000)]
Truncate from i64 to i32 is "free" on x86-32, because it involves
just discarding one of the registers.

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

14 years agoRevert this patch for the time being. Needs more testing.
Scott Michel [Thu, 25 Feb 2010 02:32:54 +0000 (02:32 +0000)]
Revert this patch for the time being. Needs more testing.

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

14 years agoAdded tSVC and tTRAP for disassembly only.
Johnny Chen [Thu, 25 Feb 2010 02:21:11 +0000 (02:21 +0000)]
Added tSVC and tTRAP for disassembly only.

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

14 years agoformatting.
Chris Lattner [Thu, 25 Feb 2010 02:09:00 +0000 (02:09 +0000)]
formatting.

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

14 years agorename fooMatcherNode to fooMatcher.
Chris Lattner [Thu, 25 Feb 2010 02:04:40 +0000 (02:04 +0000)]
rename fooMatcherNode to fooMatcher.

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

14 years agoadd some noop code to push it out of my tree.
Chris Lattner [Thu, 25 Feb 2010 01:57:41 +0000 (01:57 +0000)]
add some noop code to push it out of my tree.

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

14 years agorename PushMatcherNode -> ScopeMatcherNode to more accurately
Chris Lattner [Thu, 25 Feb 2010 01:56:48 +0000 (01:56 +0000)]
rename PushMatcherNode -> ScopeMatcherNode to more accurately
reflect what it does.  Switch the sense of the Next and the Check
arms to be more logical.  No functionality change.

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

14 years agoLarge stack frame patch for the CellSPU: handle stack frames that exceed 8176
Scott Michel [Thu, 25 Feb 2010 01:53:17 +0000 (01:53 +0000)]
Large stack frame patch for the CellSPU: handle stack frames that exceed 8176
(511*16) bytes register displacement (D-form).

NOTE: This is a potential headache, given the SPU's local core limitations,
allowing the software developer to commit stack overrun suicide unknowingly.
Also, large SPU stack frames will cause code size explosion. But, one presumes
that the software developer knows what they're doing...

Contributed by Kalle.Raiskila@nokia.com, edited slightly before commit.

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

14 years agoFilter the future all-of-llvm shared library out of the llvm-config
Jeffrey Yasskin [Thu, 25 Feb 2010 01:21:38 +0000 (01:21 +0000)]
Filter the future all-of-llvm shared library out of the llvm-config
results.  I'm checking this in before the shared library so that I can
tell if it breaks anything on its own.

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

14 years agoMC'ize padding when padding the ULEB128 value.
Bill Wendling [Thu, 25 Feb 2010 00:24:52 +0000 (00:24 +0000)]
MC'ize padding when padding the ULEB128 value.

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

14 years agoadd a fixme for an experiment that defeated me for the time being.
Chris Lattner [Thu, 25 Feb 2010 00:03:03 +0000 (00:03 +0000)]
add a fixme for an experiment that defeated me for the time being.

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

14 years agoLLVM puts padding bytes in the __gcc_except_tab section after the
Bill Wendling [Wed, 24 Feb 2010 23:34:35 +0000 (23:34 +0000)]
LLVM puts padding bytes in the __gcc_except_tab section after the
GCC_except_table label but before the Lexception, which the FDE references.
This causes problems as the FDE does not point to the start of an LSDA chunk.

Use an unnormalized uleb128 for the call-site table length that includes the
padding.

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

14 years agofix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType
Chris Lattner [Wed, 24 Feb 2010 22:52:52 +0000 (22:52 +0000)]
fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType

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

14 years agoclean up various VT manipulations, patch by Micah Villmow! PR6337
Chris Lattner [Wed, 24 Feb 2010 22:44:06 +0000 (22:44 +0000)]
clean up various VT manipulations, patch by Micah Villmow! PR6337

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

14 years agoCreate a stack frame on ARM when
Jakob Stoklund Olesen [Wed, 24 Feb 2010 22:43:17 +0000 (22:43 +0000)]
Create a stack frame on ARM when

- Function uses all scratch registers AND
- Function does not use any callee saved registers AND
- Stack size is too big to address with immediate offsets.

In this case a register must be scavenged to calculate the address of a stack
object, and the scavenger needs a spare register or emergency spill slot.

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

14 years agofix PR5954, patch by Roman Divacky.
Chris Lattner [Wed, 24 Feb 2010 22:33:41 +0000 (22:33 +0000)]
fix PR5954, patch by Roman Divacky.

I don't have a great way to test this myself (it's linux/bsd only),
but Roman says it works. :)

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

14 years agoCheck for comparisons of +/- zero when optimizing less-than-or-equal and
Bob Wilson [Wed, 24 Feb 2010 22:15:53 +0000 (22:15 +0000)]
Check for comparisons of +/- zero when optimizing less-than-or-equal and
greater-than-or-equal SELECT_CCs to NEON vmin/vmax instructions.  This is
only allowed when UnsafeFPMath is set or when at least one of the operands
is known to be nonzero.

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

14 years agoMake getTypeSizeInBits work correctly for array types; it should return
Dan Gohman [Wed, 24 Feb 2010 22:05:23 +0000 (22:05 +0000)]
Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.

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

14 years agoconvert cycle checker to smallptrset, add comments and make it
Chris Lattner [Wed, 24 Feb 2010 21:34:04 +0000 (21:34 +0000)]
convert cycle checker to smallptrset, add comments and make it
more elegant.

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

14 years agorevert david's patch which does not even build.
Chris Lattner [Wed, 24 Feb 2010 21:25:08 +0000 (21:25 +0000)]
revert david's patch which does not even build.

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

14 years agoUse a SmallPtrSet as suggested by Chris.
David Greene [Wed, 24 Feb 2010 20:59:49 +0000 (20:59 +0000)]
Use a SmallPtrSet as suggested by Chris.

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

14 years agoAdding function "lookupGCCName" to MBlazeIntrinsicInfo
Wesley Peck [Wed, 24 Feb 2010 20:16:27 +0000 (20:16 +0000)]
Adding function "lookupGCCName" to MBlazeIntrinsicInfo

Adding the function "lookupGCCName" to the MBlazeIntrinsicInfo
class to support the Clang MicroBlaze target.

Additionally, minor fixes which remove some unused PIC code
(PIC is not supported yet in the MicroBlaze backend) and
removed some unused variables.

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

14 years agocontract movechild+checktype into a new checkchild node, shrinking the
Chris Lattner [Wed, 24 Feb 2010 20:15:25 +0000 (20:15 +0000)]
contract movechild+checktype into a new checkchild node, shrinking the
x86 table by 1200 bytes.

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

14 years agoAdded Vector Swap (VSWPd and VSWPq) instructions for disassembly only.
Johnny Chen [Wed, 24 Feb 2010 20:06:07 +0000 (20:06 +0000)]
Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only.

A8.6.405

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

14 years agosplit the movechild/record/moveparent -> recordchild optzn into a
Chris Lattner [Wed, 24 Feb 2010 19:52:48 +0000 (19:52 +0000)]
split the movechild/record/moveparent -> recordchild optzn into a
movechild/record -> recordchild/movechild and
movechild/moveparent -> noop xforms.  This slightly shrinks the tables
(x86 to 117454) and enables adding future improvements.

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

14 years agoConstantFoldInstOperands can theoretically return null if it
Dan Gohman [Wed, 24 Feb 2010 19:31:47 +0000 (19:31 +0000)]
ConstantFoldInstOperands can theoretically return null if it
didn't fold anything.

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

14 years agoSimplify this code; these casts aren't necessary.
Dan Gohman [Wed, 24 Feb 2010 19:31:06 +0000 (19:31 +0000)]
Simplify this code; these casts aren't necessary.

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

14 years agoemit a histogram of the opcodes in comments.
Chris Lattner [Wed, 24 Feb 2010 19:17:12 +0000 (19:17 +0000)]
emit a histogram of the opcodes in comments.

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

14 years agoStay away from str <undef> in ARMLoadStoreOpt. This pass does not understand
Jakob Stoklund Olesen [Wed, 24 Feb 2010 18:57:08 +0000 (18:57 +0000)]
Stay away from str <undef> in ARMLoadStoreOpt. This pass does not understand
<undef> operands, and can cause scavenger failures when it translates
<kill,undef> to <kill>.

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

14 years agoFixed typo of opcodestr, should be "vst1", not "vld1".
Johnny Chen [Wed, 24 Feb 2010 18:00:40 +0000 (18:00 +0000)]
Fixed typo of opcodestr, should be "vst1", not "vld1".

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

14 years agoConvert a few more backedge-taken count functions to use BackedgeTakenInfo.
Dan Gohman [Wed, 24 Feb 2010 17:31:30 +0000 (17:31 +0000)]
Convert a few more backedge-taken count functions to use BackedgeTakenInfo.

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

14 years agoSpeculatively revert r97011, "Re-apply 96540 and 96556 with fixes.", again in
Daniel Dunbar [Wed, 24 Feb 2010 17:05:47 +0000 (17:05 +0000)]
Speculatively revert r97011, "Re-apply 96540 and 96556 with fixes.", again in
the hopes of fixing PPC bootstrap.

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

14 years agoReapply r97010, the speculative revert failed.
Daniel Dunbar [Wed, 24 Feb 2010 08:48:04 +0000 (08:48 +0000)]
Reapply r97010, the speculative revert failed.

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

14 years agolets not break the old isel.
Chris Lattner [Wed, 24 Feb 2010 07:41:11 +0000 (07:41 +0000)]
lets not break the old isel.

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

14 years agoSince the new instruction selector now works, I don't need to keep
Chris Lattner [Wed, 24 Feb 2010 07:35:09 +0000 (07:35 +0000)]
Since the new instruction selector now works, I don't need to keep
the old one around for comparative purposes: have the
ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop
emitting the old isel at all, yay for build time win.

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

14 years agoimplement a simple proof-of-concept optimization for
Chris Lattner [Wed, 24 Feb 2010 07:31:45 +0000 (07:31 +0000)]
implement a simple proof-of-concept optimization for
the new isel: fold movechild+record+moveparent into a
single recordchild N node.  This shrinks the X86 table
from 125443 to 117502 bytes.

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

14 years agoThe new isel passes all tests, time to start making it go fast.
Chris Lattner [Wed, 24 Feb 2010 07:06:50 +0000 (07:06 +0000)]
The new isel passes all tests, time to start making it go fast.
Also add an easy macro at the top of DAGISelEmitter.cpp to enable
it.  Lets see if I can avoid accidentally turning it on :)

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

14 years agoAdd svn:ignore properties.
Dan Gohman [Wed, 24 Feb 2010 07:06:20 +0000 (07:06 +0000)]
Add svn:ignore properties.

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

14 years agoSpeculatively revert r97010, "Add an argument to PHITranslateValue to specify
Daniel Dunbar [Wed, 24 Feb 2010 06:55:22 +0000 (06:55 +0000)]
Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.

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

14 years agoWhen forming SSE min and max nodes for UGE and ULE comparisons, it's
Dan Gohman [Wed, 24 Feb 2010 06:52:40 +0000 (06:52 +0000)]
When forming SSE min and max nodes for UGE and ULE comparisons, it's
necessary to swap the operands to handle NaN and negative zero properly.

Also, reintroduce logic for checking for NaN conditions when forming
SSE min and max instructions, fixed to take into consideration NaNs and
negative zeros. This allows forming min and max instructions in more
cases.

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

14 years agoFix indentation.
Dan Gohman [Wed, 24 Feb 2010 06:46:09 +0000 (06:46 +0000)]
Fix indentation.

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

14 years agoChange the scheduler from adding nodes in allnodes order
Chris Lattner [Wed, 24 Feb 2010 06:11:37 +0000 (06:11 +0000)]
Change the scheduler from adding nodes in allnodes order
to adding them in a determinstic order (bottom up from
the root) based on the structure of the graph itself.

This updates tests for some random changes, interesting
bits: CodeGen/Blackfin/promote-logic.ll no longer crashes.
I have no idea why, but that's good right?

CodeGen/X86/2009-07-16-LoadFoldingBug.ll also fails, but
now compiles to have one fewer constant pool entry, making
the expected load that was being folded disappear.  Since it
is an unreduced mass of gnast, I just removed it.

This fixes PR6370

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

14 years agoRemove an unused variable. Was this intentional?
Chandler Carruth [Wed, 24 Feb 2010 06:09:03 +0000 (06:09 +0000)]
Remove an unused variable. Was this intentional?

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