oota-llvm.git
14 years agoModified the register matcher function in AsmMatcher to
Sean Callanan [Sat, 23 Jan 2010 00:40:33 +0000 (00:40 +0000)]
Modified the register matcher function in AsmMatcher to
be static.  Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.

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

14 years agoAvoid using "Type" as the variable name.
Devang Patel [Sat, 23 Jan 2010 00:26:28 +0000 (00:26 +0000)]
Avoid using "Type" as the variable name.

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

14 years agoAsmMatcher: Add a comment.
Daniel Dunbar [Sat, 23 Jan 2010 00:26:16 +0000 (00:26 +0000)]
AsmMatcher: Add a comment.

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

14 years agoIn mem2reg, for all alloca/stores that get promoted where the alloca has an associate...
Victor Hernandez [Sat, 23 Jan 2010 00:17:34 +0000 (00:17 +0000)]
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store

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

14 years agoteach MCAsmStreamer::EmitBytes to use .ascii and .asciz
Chris Lattner [Sat, 23 Jan 2010 00:15:00 +0000 (00:15 +0000)]
teach MCAsmStreamer::EmitBytes to use .ascii and .asciz

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

14 years agoMake sure ValueFn starts off empty
Victor Hernandez [Sat, 23 Jan 2010 00:03:28 +0000 (00:03 +0000)]
Make sure ValueFn starts off empty

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

14 years agoEnable pre-regalloc scheduling load clustering by default.
Evan Cheng [Fri, 22 Jan 2010 23:49:45 +0000 (23:49 +0000)]
Enable pre-regalloc scheduling load clustering by default.

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

14 years agoBe more conservative with clustering f32 / f64 loads.
Evan Cheng [Fri, 22 Jan 2010 23:49:11 +0000 (23:49 +0000)]
Be more conservative with clustering f32 / f64 loads.

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

14 years agomove "EOL" from asmprinter to dwarfprinter. It should eventually
Chris Lattner [Fri, 22 Jan 2010 23:47:11 +0000 (23:47 +0000)]
move "EOL" from asmprinter to dwarfprinter.  It should eventually
be completely eliminated, but today is not that day.

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

14 years agoremove uses of EOL.
Chris Lattner [Fri, 22 Jan 2010 23:43:14 +0000 (23:43 +0000)]
remove uses of EOL.

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

14 years agoadd a new EmitCFAByte method and use it.
Chris Lattner [Fri, 22 Jan 2010 23:40:08 +0000 (23:40 +0000)]
add a new EmitCFAByte method and use it.

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

14 years agomove uleb printing from asmprinter to dwarfprinter, mcize,
Chris Lattner [Fri, 22 Jan 2010 23:18:42 +0000 (23:18 +0000)]
move uleb printing from asmprinter to dwarfprinter, mcize,
cleanup and eliminate a bunch more uses of "EOL".

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

14 years agoMake OProfile support compile again after r93630 removed
Jeffrey Yasskin [Fri, 22 Jan 2010 23:04:39 +0000 (23:04 +0000)]
Make OProfile support compile again after r93630 removed
DebugLocTuple.  Also use an AssertingVH to ensure that MDNodes aren't
destroyed while the FilenameCache is using them.

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

14 years agomove sleb printing out of asmprinter into dwarf printer, make clients
Chris Lattner [Fri, 22 Jan 2010 22:56:55 +0000 (22:56 +0000)]
move sleb printing out of asmprinter into dwarf printer, make clients
handle the comment better, MCize the non-.sleb case.

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

14 years agoRemove MetadataBase class because it is not adding significant value.
Devang Patel [Fri, 22 Jan 2010 22:52:10 +0000 (22:52 +0000)]
Remove MetadataBase class because it is not adding significant value.

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

14 years agoAdded a Register token to AsmToken and the appropriate
Sean Callanan [Fri, 22 Jan 2010 22:42:22 +0000 (22:42 +0000)]
Added a Register token to AsmToken and the appropriate
accessor method for its value.

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

14 years agoIgnore DEBUG_VALUE when building live intervals;
Dale Johannesen [Fri, 22 Jan 2010 22:38:21 +0000 (22:38 +0000)]
Ignore DEBUG_VALUE when building live intervals;
this makes the code work transparently the same
whether they're there or not.

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

14 years agoadd a new DwarfPrinter::EmitEncodingByte method which handles
Chris Lattner [Fri, 22 Jan 2010 22:38:16 +0000 (22:38 +0000)]
add a new DwarfPrinter::EmitEncodingByte method which handles
pretty printing encoding comments and eliminates redundancy on
the client side.  We now get pretty dwarf like this again:

        .byte   255                                         ## @LPStart Encoding = omit
        .byte   0                                           ## @TType Encoding = absptr
        .byte   0x28                                        ## @TType base offset
        .byte   3                                           ## Call site Encoding = udata4
        .byte   0x1a                                        ## Call site table size
...

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

14 years agoFilled out the skeleton of the TargetAsmLexer to behave
Sean Callanan [Fri, 22 Jan 2010 22:35:01 +0000 (22:35 +0000)]
Filled out the skeleton of the TargetAsmLexer to behave
exactly like an MCAsmLexer.  (The difference is that the
TargetAsmLexer knows how to handle target-specific stuff
like registers, whereas the MCAsmLexer is fully generic.)

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

14 years agorename the dwarf class to DwarfPrinter. This matches the filename
Chris Lattner [Fri, 22 Jan 2010 22:23:57 +0000 (22:23 +0000)]
rename the dwarf class to DwarfPrinter.  This matches the filename
and much more accurately describes what it is all about.

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

14 years agofix indentation
Chris Lattner [Fri, 22 Jan 2010 22:19:51 +0000 (22:19 +0000)]
fix indentation

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

14 years agoinline away the trivial AsmPrinter::EOL() method.
Chris Lattner [Fri, 22 Jan 2010 22:09:00 +0000 (22:09 +0000)]
inline away the trivial AsmPrinter::EOL() method.

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

14 years agoinline AsmPrinter::PrintHex into its two trivial callers.
Chris Lattner [Fri, 22 Jan 2010 21:57:56 +0000 (21:57 +0000)]
inline AsmPrinter::PrintHex into its two trivial callers.

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

14 years agochange this to be a static function instead of a method on asmprinter.
Chris Lattner [Fri, 22 Jan 2010 21:50:41 +0000 (21:50 +0000)]
change this to be a static function instead of a method on asmprinter.

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

14 years agomake the loop comment printer print out a much better structured
Chris Lattner [Fri, 22 Jan 2010 21:43:28 +0000 (21:43 +0000)]
make the loop comment printer print out a much better structured
output.  An example:

        .align  4, 0x90
LBB1_5:                                                     ## %while.cond3
                                                            ##   Parent Loop BB1_1 Depth=1
                                                            ## =>  This Loop Header: Depth=2
                                                            ##       Child Loop BB1_8 Depth 3
                                                            ##       Child Loop BB1_6 Depth 3

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

14 years agoChanges to fix buffering that I forgot to commit with previous patch.
Chris Lattner [Fri, 22 Jan 2010 21:16:10 +0000 (21:16 +0000)]
Changes to fix buffering that I forgot to commit with previous patch.

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

14 years agoFor blocks that are not loop headers, just print their loop depth and header BB.
Chris Lattner [Fri, 22 Jan 2010 21:11:06 +0000 (21:11 +0000)]
For blocks that are not loop headers, just print their loop depth and header BB.
For loop headers, print Inner loop along with the other stuff so it doesn't take
an extra line.  We now get stuff like this:

LBB1_4:                                                     ## %land.end
                                                            ##   in Loop: Header=BB1_1 Depth=1
        notb    %al
        testb   $1, %al
        jne     LBB1_8

and:

LBB1_6:                                                     ## %while.cond7
                                                            ## Inner Loop Header: Depth=3
                                                            ##     Inside Loop BB1_5 Depth 2
                                                            ##   Inside Loop BB1_1 Depth 1

which still isn't great for loop headers, but is much less verbose.

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

14 years agoreenable the label loop comments and switch them to use the formatted
Chris Lattner [Fri, 22 Jan 2010 21:00:45 +0000 (21:00 +0000)]
reenable the label loop comments and switch them to use the formatted
comment emission stuff.  I'm going to rewrite this though because the
current output doesn't make sense.

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

14 years agoMark EH_RETURN64 as CodeGenOnly.
Daniel Dunbar [Fri, 22 Jan 2010 20:16:37 +0000 (20:16 +0000)]
Mark EH_RETURN64 as CodeGenOnly.

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

14 years agoAnother strncmp -> StringRef.startswith simplification.
Benjamin Kramer [Fri, 22 Jan 2010 20:00:21 +0000 (20:00 +0000)]
Another strncmp -> StringRef.startswith simplification.

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

14 years agoConvert some more random-comment-printing stuff to use
Chris Lattner [Fri, 22 Jan 2010 19:52:01 +0000 (19:52 +0000)]
Convert some more random-comment-printing stuff to use
AddComment and GetCommentOS.  Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.

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

14 years agomake this less constrained, we want blank lines between globals.
Chris Lattner [Fri, 22 Jan 2010 19:51:08 +0000 (19:51 +0000)]
make this less constrained, we want blank lines between globals.

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

14 years agoadd a new MCAsmStreamer::GetCommentOS method to simplify stuff
Chris Lattner [Fri, 22 Jan 2010 19:17:48 +0000 (19:17 +0000)]
add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.

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

14 years agoRevert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
Bob Wilson [Fri, 22 Jan 2010 19:16:40 +0000 (19:16 +0000)]
Revert 94059.  It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
test on ARM.

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

14 years agoadd missing break, PR6114, patch by M Wahab.
Chris Lattner [Fri, 22 Jan 2010 19:11:53 +0000 (19:11 +0000)]
add missing break, PR6114, patch by M Wahab.

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

14 years agoFix/strengthen verification of llvm.dbg.declare
Victor Hernandez [Fri, 22 Jan 2010 19:06:12 +0000 (19:06 +0000)]
Fix/strengthen verification of llvm.dbg.declare

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

14 years agoKeep ignoring pointer-to-pointer bitcasts
Victor Hernandez [Fri, 22 Jan 2010 19:05:05 +0000 (19:05 +0000)]
Keep ignoring pointer-to-pointer bitcasts

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

14 years agouse both the Mangler and the CBE's mangler for identifiers,
Chris Lattner [Fri, 22 Jan 2010 18:33:00 +0000 (18:33 +0000)]
use both the Mangler and the CBE's mangler for identifiers,
this should fix a problem duncan saw handling symbols with '.' in them.

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

14 years agorename addComment -> AddComment for consistency.
Chris Lattner [Fri, 22 Jan 2010 18:21:35 +0000 (18:21 +0000)]
rename addComment -> AddComment for consistency.

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

14 years agoSimplify some uses of str(n)cmp with StringRef.
Benjamin Kramer [Fri, 22 Jan 2010 18:21:23 +0000 (18:21 +0000)]
Simplify some uses of str(n)cmp with StringRef.

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

14 years agoCMake: Don't try to descend into projects/compiler-rt, it doesn't work.
Daniel Dunbar [Fri, 22 Jan 2010 18:14:27 +0000 (18:14 +0000)]
CMake: Don't try to descend into projects/compiler-rt, it doesn't work.

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

14 years agoMake GetSourceVersion more portable, thanks Pawel!
Daniel Dunbar [Fri, 22 Jan 2010 18:14:21 +0000 (18:14 +0000)]
Make GetSourceVersion more portable, thanks Pawel!

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

14 years agoUpdate CMake LibDeps
Daniel Dunbar [Fri, 22 Jan 2010 18:14:14 +0000 (18:14 +0000)]
Update CMake LibDeps

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

14 years agomake: Make .o files depend on Makefile, at least for now.
Daniel Dunbar [Fri, 22 Jan 2010 18:10:54 +0000 (18:10 +0000)]
make: Make .o files depend on Makefile, at least for now.

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

14 years agoFix TimeValue::now() on Unix.
Torok Edwin [Fri, 22 Jan 2010 15:51:31 +0000 (15:51 +0000)]
Fix TimeValue::now() on Unix.

TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.

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

14 years agoRevert r94066, which was the patch which added a Verifier pass after
Dan Gohman [Fri, 22 Jan 2010 10:48:28 +0000 (10:48 +0000)]
Revert r94066, which was the patch which added a Verifier pass after
LoopStrengthReduce, as it's causing too much trouble (even with the
old LoopStrengthReduce code).

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

14 years agoadd comment support to the rest of the directives.
Chris Lattner [Fri, 22 Jan 2010 07:36:39 +0000 (07:36 +0000)]
add comment support to the rest of the directives.

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

14 years agostop using strtoll, it gives windows heartburn.
Chris Lattner [Fri, 22 Jan 2010 07:34:12 +0000 (07:34 +0000)]
stop using strtoll, it gives windows heartburn.

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

14 years agoAdd the ability for MCStreamer to emit comments on the same line as directives.
Chris Lattner [Fri, 22 Jan 2010 07:29:22 +0000 (07:29 +0000)]
Add the ability for MCStreamer to emit comments on the same line as directives.
Switch over the asm-verbose comment for double values to use it.  We now get:

_x:
.long 343597384                                   ## double 1.231200e+02
.long 1079953326

For example, note that the comment is on the same line as the .long.  Woo.

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

14 years agopass "-fasm-verbose" into createAsmStreamer.
Chris Lattner [Fri, 22 Jan 2010 07:06:15 +0000 (07:06 +0000)]
pass "-fasm-verbose" into createAsmStreamer.

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

14 years agoStop building RTTI information for *most* llvm libraries. Notable
Chris Lattner [Fri, 22 Jan 2010 06:49:46 +0000 (06:49 +0000)]
Stop building RTTI information for *most* llvm libraries.  Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

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

14 years agogive PassNameParser a home.
Chris Lattner [Fri, 22 Jan 2010 06:29:25 +0000 (06:29 +0000)]
give PassNameParser a home.

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

14 years agoadd an out-of-line virtual method to CmpInst to give it a home.
Chris Lattner [Fri, 22 Jan 2010 06:25:37 +0000 (06:25 +0000)]
add an out-of-line virtual method to CmpInst to give it a home.

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

14 years agoelimiante the dynamic_cast's from opt.
Chris Lattner [Fri, 22 Jan 2010 06:03:06 +0000 (06:03 +0000)]
elimiante the dynamic_cast's from opt.

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

14 years agosimplify code.
Chris Lattner [Fri, 22 Jan 2010 05:54:03 +0000 (05:54 +0000)]
simplify code.

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

14 years agodrop the pass name from the output.
Chris Lattner [Fri, 22 Jan 2010 05:52:51 +0000 (05:52 +0000)]
drop the pass name from the output.

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

14 years agoeliminate dynamic_cast from this file.
Chris Lattner [Fri, 22 Jan 2010 05:46:59 +0000 (05:46 +0000)]
eliminate dynamic_cast from this file.

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

14 years agoeliminate a bunch more unneeded dynamic_cast's.
Chris Lattner [Fri, 22 Jan 2010 05:37:10 +0000 (05:37 +0000)]
eliminate a bunch more unneeded dynamic_cast's.

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

14 years agoeliminate a bunch of dynamic_cast's.
Chris Lattner [Fri, 22 Jan 2010 05:24:46 +0000 (05:24 +0000)]
eliminate a bunch of dynamic_cast's.

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

14 years agoeliminate a bunch of dynamic_cast's.
Chris Lattner [Fri, 22 Jan 2010 04:55:08 +0000 (04:55 +0000)]
eliminate a bunch of dynamic_cast's.

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

14 years agoTeach pre-regalloc scheduler to schedule loads from nearby addresses. It may improve...
Evan Cheng [Fri, 22 Jan 2010 03:36:51 +0000 (03:36 +0000)]
Teach pre-regalloc scheduler to schedule loads from nearby addresses. It may improve cache locality. This is controlled by -cluster-loads for now.

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

14 years agoAdd two target hooks to determine whether two loads are near and should be scheduled...
Evan Cheng [Fri, 22 Jan 2010 03:34:51 +0000 (03:34 +0000)]
Add two target hooks to determine whether two loads are near and should be scheduled together.

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

14 years agoAdd DenseMapInfo for signed long long.
Evan Cheng [Fri, 22 Jan 2010 03:33:01 +0000 (03:33 +0000)]
Add DenseMapInfo for signed long long.

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

14 years agoCMake: Add MCParser directory.
Daniel Dunbar [Fri, 22 Jan 2010 02:04:33 +0000 (02:04 +0000)]
CMake: Add MCParser directory.

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

14 years agolit: Separate test suite from test name with spaces, to make it easier to cut and...
Daniel Dunbar [Fri, 22 Jan 2010 02:04:28 +0000 (02:04 +0000)]
lit: Separate test suite from test name with spaces, to make it easier to cut and paste.

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

14 years agoadd new file
Chris Lattner [Fri, 22 Jan 2010 01:58:44 +0000 (01:58 +0000)]
add new file

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

14 years agomove some files out of the llvm-mc tool into the MCParser library so
Chris Lattner [Fri, 22 Jan 2010 01:58:08 +0000 (01:58 +0000)]
move some files out of the llvm-mc tool into the MCParser library so
other tools can link it.

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

14 years agoforgot to svn add these, doh.
Chris Lattner [Fri, 22 Jan 2010 01:55:10 +0000 (01:55 +0000)]
forgot to svn add these, doh.

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

14 years agocreate a new MCParser library and move some stuff into it.
Chris Lattner [Fri, 22 Jan 2010 01:44:57 +0000 (01:44 +0000)]
create a new MCParser library and move some stuff into it.

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

14 years agoremove some confused code that used strtoull
Chris Lattner [Fri, 22 Jan 2010 01:17:12 +0000 (01:17 +0000)]
remove some confused code that used strtoull

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

14 years agoallow registering target lexers.
Chris Lattner [Fri, 22 Jan 2010 01:10:40 +0000 (01:10 +0000)]
allow registering target lexers.

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

14 years agostub out a new TargetAsmLexer interface.
Chris Lattner [Fri, 22 Jan 2010 00:58:59 +0000 (00:58 +0000)]
stub out a new TargetAsmLexer interface.

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

14 years agoRevert LoopStrengthReduce.cpp to pre-r94061 for now.
Dan Gohman [Fri, 22 Jan 2010 00:46:49 +0000 (00:46 +0000)]
Revert LoopStrengthReduce.cpp to pre-r94061 for now.

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

14 years agoStore flags in bitfields instead of masking them into the pointer for the left child...
Ted Kremenek [Fri, 22 Jan 2010 00:28:27 +0000 (00:28 +0000)]
Store flags in bitfields instead of masking them into the pointer for the left child.  This leads to some nice conceptually cleanups.

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

14 years agoFix PR5694. The CMN instructions set the flags differently from CMP, so they
Jim Grosbach [Fri, 22 Jan 2010 00:08:13 +0000 (00:08 +0000)]
Fix PR5694. The CMN instructions set the flags differently from CMP, so they
cannot be directly interchanged for comparisons against negated values.
Disable the CMN instructions for the time being.

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

14 years agoTidy up assertion syntax. No functionality change.
Ted Kremenek [Thu, 21 Jan 2010 23:42:57 +0000 (23:42 +0000)]
Tidy up assertion syntax.  No functionality change.

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

14 years agoNo need to look through bitcasts for DbgInfoIntrinsic
Victor Hernandez [Thu, 21 Jan 2010 23:09:12 +0000 (23:09 +0000)]
No need to look through bitcasts for DbgInfoIntrinsic

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

14 years agoDbgInfoIntrinsic no longer appear in an instruction's use list
Victor Hernandez [Thu, 21 Jan 2010 23:08:36 +0000 (23:08 +0000)]
DbgInfoIntrinsic no longer appear in an instruction's use list

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

14 years agoNo need to look through bitcasts for DbgInfoIntrinsic
Victor Hernandez [Thu, 21 Jan 2010 23:07:15 +0000 (23:07 +0000)]
No need to look through bitcasts for DbgInfoIntrinsic

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

14 years agoDbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking...
Victor Hernandez [Thu, 21 Jan 2010 23:05:53 +0000 (23:05 +0000)]
DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics()

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

14 years agoWhen inserting expressions for post-increment users which contain
Dan Gohman [Thu, 21 Jan 2010 23:01:22 +0000 (23:01 +0000)]
When inserting expressions for post-increment users which contain
loop-variant components, adds must be inserted after the increment.
Keep track of the increment position for this case, and insert
these adds in the correct location.

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

14 years agoInclude IVUsers information in LSR's debug output.
Dan Gohman [Thu, 21 Jan 2010 22:46:32 +0000 (22:46 +0000)]
Include IVUsers information in LSR's debug output.

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

14 years agoPrune the search for candidate formulae if the number of register
Dan Gohman [Thu, 21 Jan 2010 22:42:49 +0000 (22:42 +0000)]
Prune the search for candidate formulae if the number of register
operands exceeds the number of registers used in the initial
solution, as that wouldn't lead to a profitable solution anyway.

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

14 years agoTrim unneeded includes.
Evan Cheng [Thu, 21 Jan 2010 21:44:43 +0000 (21:44 +0000)]
Trim unneeded includes.

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

14 years agoAdd a comment.
Dan Gohman [Thu, 21 Jan 2010 21:31:09 +0000 (21:31 +0000)]
Add a comment.

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

14 years agoIt turns out that this #include is needed because otherwise
Chris Lattner [Thu, 21 Jan 2010 21:29:25 +0000 (21:29 +0000)]
It turns out that this #include is needed because otherwise
ValueMapper.cpp ends up calling an out of line
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo.  This sucks, but
keeping the #include is a reasonable workaround.

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

14 years agounbreak the build, apparently without this transformutils starts depending on libipa?
Chris Lattner [Thu, 21 Jan 2010 21:20:51 +0000 (21:20 +0000)]
unbreak the build, apparently without this transformutils starts depending on libipa?

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

14 years agotidy up
Chris Lattner [Thu, 21 Jan 2010 21:05:54 +0000 (21:05 +0000)]
tidy up

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

14 years agotidy up
Chris Lattner [Thu, 21 Jan 2010 21:01:47 +0000 (21:01 +0000)]
tidy up

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

14 years agoremove dead .erase.
Chris Lattner [Thu, 21 Jan 2010 20:43:39 +0000 (20:43 +0000)]
remove dead .erase.

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

14 years agoback this out for now. Growing Function is not good.
Jim Grosbach [Thu, 21 Jan 2010 20:10:22 +0000 (20:10 +0000)]
back this out for now. Growing Function is not good.

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

14 years agotestcase for r94095
Chris Lattner [Thu, 21 Jan 2010 20:01:04 +0000 (20:01 +0000)]
testcase for r94095

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

14 years agofix a problem with a missing _, testcase pending.
Chris Lattner [Thu, 21 Jan 2010 19:58:19 +0000 (19:58 +0000)]
fix a problem with a missing _, testcase pending.

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

14 years agoDon't need to include IntrinsicInst.h any more
Victor Hernandez [Thu, 21 Jan 2010 19:33:59 +0000 (19:33 +0000)]
Don't need to include IntrinsicInst.h any more

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

14 years agoNo need to map NULL operands of metadata
Victor Hernandez [Thu, 21 Jan 2010 19:26:20 +0000 (19:26 +0000)]
No need to map NULL operands of metadata

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

14 years agoAdd a simple script for getting a version tag from a svn/git-svn/git
Daniel Dunbar [Thu, 21 Jan 2010 16:09:59 +0000 (16:09 +0000)]
Add a simple script for getting a version tag from a svn/git-svn/git
repository. Feel free to add support for your favorite VCS.

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

14 years agostruct/class mismatch.
Benjamin Kramer [Thu, 21 Jan 2010 15:40:14 +0000 (15:40 +0000)]
struct/class mismatch.

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

14 years agoMake the parser include the lower level error message in its own error
Dan Gohman [Thu, 21 Jan 2010 10:15:06 +0000 (10:15 +0000)]
Make the parser include the lower level error message in its own error
message, to be more informative.

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

14 years agoAvoid printing a spurious semicolon when there is no filename.
Dan Gohman [Thu, 21 Jan 2010 10:13:27 +0000 (10:13 +0000)]
Avoid printing a spurious semicolon when there is no filename.

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

14 years agoWhen re-using an existing cast for a user, it's still necessary to call
Dan Gohman [Thu, 21 Jan 2010 10:08:42 +0000 (10:08 +0000)]
When re-using an existing cast for a user, it's still necessary to call
rememberInstruction so that future users of that user will be inserted
in the correct position. This fixes the Darwin selfhost.

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