oota-llvm.git
14 years agoMake APInt::countLeadingZerosSlowCase() treat the contents of padding bits
John McCall [Wed, 3 Feb 2010 03:42:44 +0000 (03:42 +0000)]
Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
as undefined.  Fixes an assertion in APFloat::toString noticed by Dale.

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

14 years agoAllow all types of callee's to be tail called. But avoid automatic tailcall if the...
Evan Cheng [Wed, 3 Feb 2010 03:28:02 +0000 (03:28 +0000)]
Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.

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

14 years agoReconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.
Jeffrey Yasskin [Wed, 3 Feb 2010 02:11:49 +0000 (02:11 +0000)]
Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.

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

14 years agodon't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
Chris Lattner [Wed, 3 Feb 2010 01:49:49 +0000 (01:49 +0000)]
don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
.o files don't like that.

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

14 years agoprivatize a bunch of methods and move \n printing into them.
Chris Lattner [Wed, 3 Feb 2010 01:46:05 +0000 (01:46 +0000)]
privatize a bunch of methods and move \n printing into them.

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

14 years agorename printMachineInstruction -> EmitInstruction
Chris Lattner [Wed, 3 Feb 2010 01:41:03 +0000 (01:41 +0000)]
rename printMachineInstruction -> EmitInstruction

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

14 years agoReapply 95050 with a tweak to check the register class.
Dale Johannesen [Wed, 3 Feb 2010 01:40:33 +0000 (01:40 +0000)]
Reapply 95050 with a tweak to check the register class.

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

14 years agoprint instructions through the mcstreamer.
Chris Lattner [Wed, 3 Feb 2010 01:16:28 +0000 (01:16 +0000)]
print instructions through the mcstreamer.

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

14 years agoemit instructions through the streamer.
Chris Lattner [Wed, 3 Feb 2010 01:15:03 +0000 (01:15 +0000)]
emit instructions through the streamer.

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

14 years agoFinally eliminate printMCInst and send instructions through
Chris Lattner [Wed, 3 Feb 2010 01:13:25 +0000 (01:13 +0000)]
Finally eliminate printMCInst and send instructions through
the streamer.  Demo:

$ cat t.ll
define i32 @test() nounwind {
  ret i32 42
}
$ llc t.ll -o -
...
_test:
movl $42, %eax
ret
$ llc t.ll -o t.o -filetype=obj
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_test:
00000000 movl $0x0000002a,%eax
00000005 ret

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

14 years agorejigger the world so that EmitInstruction prints the \n at
Chris Lattner [Wed, 3 Feb 2010 01:09:55 +0000 (01:09 +0000)]
rejigger the world so that EmitInstruction prints the \n at
the end of the instruction instead of expecting the caller to
do it.  This currently causes the asm-verbose instruction
comments to be on the next line.

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

14 years agosink handling of target-independent machine instrs (other
Chris Lattner [Wed, 3 Feb 2010 01:00:52 +0000 (01:00 +0000)]
sink handling of target-independent machine instrs (other
than DEBUG_VALUE :(  ) into the target indep AsmPrinter.cpp
file.   This allows elimination of the
NO_ASM_WRITER_BOILERPLATE hack among other things.

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

14 years agomake these less sensitive to asm verbose changes by disabling it for them.
Chris Lattner [Wed, 3 Feb 2010 00:48:53 +0000 (00:48 +0000)]
make these less sensitive to asm verbose changes by disabling it for them.

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

14 years agoPrint FPImm a less kludgy way; APFloat.toString seems
Dale Johannesen [Wed, 3 Feb 2010 00:36:40 +0000 (00:36 +0000)]
Print FPImm a less kludgy way; APFloat.toString seems
to have some problems anyway.

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

14 years agoFix some comment typos.
Bob Wilson [Wed, 3 Feb 2010 00:33:21 +0000 (00:33 +0000)]
Fix some comment typos.

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

14 years agopass an instprinter into the AsmPrinter if it is available.
Chris Lattner [Wed, 3 Feb 2010 00:29:55 +0000 (00:29 +0000)]
pass an instprinter into the AsmPrinter if it is available.

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

14 years agomake any use of the "O" stream in asmprinter print to
Chris Lattner [Wed, 3 Feb 2010 00:22:02 +0000 (00:22 +0000)]
make any use of the "O" stream in asmprinter print to
stderr if in filetype=obj mode.  This is a hack, and will
live until dwarf emission and other random stuff that is
not yet going through MCStreamer is upgraded.  It only
impacts filetype=obj mode.

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

14 years agoRecommit this, looks like it wasn't the cause.
Eric Christopher [Wed, 3 Feb 2010 00:21:58 +0000 (00:21 +0000)]
Recommit this, looks like it wasn't the cause.

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

14 years agoByVal frame object size should be that of the byval argument, not the size of the...
Evan Cheng [Tue, 2 Feb 2010 23:58:13 +0000 (23:58 +0000)]
ByVal frame object size should be that of the byval argument, not the size of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless.

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

14 years agoHook up -filetype=obj through the MachO streamer. Here's a demo:
Chris Lattner [Tue, 2 Feb 2010 23:57:42 +0000 (23:57 +0000)]
Hook up -filetype=obj through the MachO streamer.  Here's a demo:

$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g

There is still a ton of work left.  Instructions are not being encoded
yet apparently.

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

14 years agoAs of r79039, we still try to eliminate the frame pointer on leaf functions,
Jim Grosbach [Tue, 2 Feb 2010 23:56:14 +0000 (23:56 +0000)]
As of r79039, we still try to eliminate the frame pointer on leaf functions,
even when -disable-fp-elim is specified.

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

14 years agoRevert 95130.
Evan Cheng [Tue, 2 Feb 2010 23:55:14 +0000 (23:55 +0000)]
Revert 95130.

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

14 years agoAccept floating point immediates in DEBUG_VALUE.
Dale Johannesen [Tue, 2 Feb 2010 23:54:23 +0000 (23:54 +0000)]
Accept floating point immediates in DEBUG_VALUE.

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

14 years agoAsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
Daniel Dunbar [Tue, 2 Feb 2010 23:46:47 +0000 (23:46 +0000)]
AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.

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

14 years agoAsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
Daniel Dunbar [Tue, 2 Feb 2010 23:46:36 +0000 (23:46 +0000)]
AsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
is still deterministic even amongst ambiguous instructions (eventually ambiguous
match orders will be a hard error, but we aren't there yet).

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

14 years agouse OwningPtr and factor code better.
Chris Lattner [Tue, 2 Feb 2010 23:45:17 +0000 (23:45 +0000)]
use OwningPtr and factor code better.

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

14 years agorefactor code so that LLVMTargetMachine creates the asmstreamer and
Chris Lattner [Tue, 2 Feb 2010 23:37:42 +0000 (23:37 +0000)]
refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it.  This allows other
types of MCStreamer's to be passed in.

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

14 years agoHopefully temporarily revert this.
Eric Christopher [Tue, 2 Feb 2010 23:01:31 +0000 (23:01 +0000)]
Hopefully temporarily revert this.

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

14 years agosimplify getVerboseAsm
Chris Lattner [Tue, 2 Feb 2010 22:58:13 +0000 (22:58 +0000)]
simplify getVerboseAsm

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

14 years agomove handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with...
Chris Lattner [Tue, 2 Feb 2010 22:54:51 +0000 (22:54 +0000)]
move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options.

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

14 years agoremove dead #include, stupid symlinks.
Chris Lattner [Tue, 2 Feb 2010 22:37:42 +0000 (22:37 +0000)]
remove dead #include, stupid symlinks.

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

14 years agoremove the # TAILCALL markers, which was causing the to fail.
Chris Lattner [Tue, 2 Feb 2010 22:36:29 +0000 (22:36 +0000)]
remove the # TAILCALL markers, which was causing the to fail.
It's unclear if the matcher is nondeterminstic of what here,
but I'm getting matches without TAILCALL and some other hosts
are getting matches with it.

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

14 years agoRemove a bunch of stuff around the edges of the ELF writer.
Chris Lattner [Tue, 2 Feb 2010 22:31:11 +0000 (22:31 +0000)]
Remove a bunch of stuff around the edges of the ELF writer.
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(

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

14 years agoReformat my last patch slightly.
Eric Christopher [Tue, 2 Feb 2010 22:29:26 +0000 (22:29 +0000)]
Reformat my last patch slightly.

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

14 years agotidy some targets.
Chris Lattner [Tue, 2 Feb 2010 22:13:21 +0000 (22:13 +0000)]
tidy some targets.

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

14 years agoRe-add strcmp and known size object size checking optimization.
Eric Christopher [Tue, 2 Feb 2010 22:10:43 +0000 (22:10 +0000)]
Re-add strcmp and known size object size checking optimization.

Passed bootstrap and nightly test run here.

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

14 years agoremove dead code.
Chris Lattner [Tue, 2 Feb 2010 22:03:00 +0000 (22:03 +0000)]
remove dead code.

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

14 years agoMCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch of
Daniel Dunbar [Tue, 2 Feb 2010 22:00:15 +0000 (22:00 +0000)]
MCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch of
instructions exactly like 'as', and produce equivalent .o files.

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

14 years agodetemplatize the ppc code emitter.
Chris Lattner [Tue, 2 Feb 2010 21:55:58 +0000 (21:55 +0000)]
detemplatize the ppc code emitter.

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

14 years agoremove dead code.
Chris Lattner [Tue, 2 Feb 2010 21:52:03 +0000 (21:52 +0000)]
remove dead code.

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

14 years agoadd a definition for ID.
Chris Lattner [Tue, 2 Feb 2010 21:49:29 +0000 (21:49 +0000)]
add a definition for ID.

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

14 years agodetemplatize ARM code emitter.
Chris Lattner [Tue, 2 Feb 2010 21:48:51 +0000 (21:48 +0000)]
detemplatize ARM code emitter.

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

14 years agoMCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scale
Daniel Dunbar [Tue, 2 Feb 2010 21:44:16 +0000 (21:44 +0000)]
MCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scale
== 1.

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

14 years agoMCCodeEmitter/X86: Handle tied registers better when converting MCInst ->
Daniel Dunbar [Tue, 2 Feb 2010 21:44:10 +0000 (21:44 +0000)]
MCCodeEmitter/X86: Handle tied registers better when converting MCInst ->
MCMachineInstr. This also fixes handling of tied registers for MRMSrcMem
instructions.

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

14 years agoMC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.
Daniel Dunbar [Tue, 2 Feb 2010 21:44:01 +0000 (21:44 +0000)]
MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.

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

14 years agoremove dead code.
Chris Lattner [Tue, 2 Feb 2010 21:38:59 +0000 (21:38 +0000)]
remove dead code.

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

14 years agodetemplatize alpha code emission, it is now JIT specific.
Chris Lattner [Tue, 2 Feb 2010 21:35:47 +0000 (21:35 +0000)]
detemplatize alpha code emission, it is now JIT specific.

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

14 years agoeliminate all the dead addSimpleCodeEmitter implementations.
Chris Lattner [Tue, 2 Feb 2010 21:31:47 +0000 (21:31 +0000)]
eliminate all the dead addSimpleCodeEmitter implementations.

eliminate random "code emitter" stuff in Alpha, except for
the JIT path.  Next up, remove the template cruft.

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

14 years agoPass callsite return type to TargetLowering::LowerCall and use that to check sibcall...
Evan Cheng [Tue, 2 Feb 2010 21:29:10 +0000 (21:29 +0000)]
Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.

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

14 years agoMake DenseSet's erase pass on the return value rather than swallowing it.
Dan Gohman [Tue, 2 Feb 2010 21:11:22 +0000 (21:11 +0000)]
Make DenseSet's erase pass on the return value rather than swallowing it.

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

14 years agoFix function names in comments. Thanks Duncan!
Dan Gohman [Tue, 2 Feb 2010 21:10:27 +0000 (21:10 +0000)]
Fix function names in comments. Thanks Duncan!

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

14 years agoeliminate FileModel::Model, just use CodeGenFileType. The client
Chris Lattner [Tue, 2 Feb 2010 21:06:45 +0000 (21:06 +0000)]
eliminate FileModel::Model, just use CodeGenFileType.  The client
of the code generator shouldn't care what object format a target
uses.

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

14 years agothis apparently depends on the host somehow.
Chris Lattner [Tue, 2 Feb 2010 20:57:28 +0000 (20:57 +0000)]
this apparently depends on the host somehow.

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

14 years agoXFAIL for PPC Darwin.
Bill Wendling [Tue, 2 Feb 2010 20:56:02 +0000 (20:56 +0000)]
XFAIL for PPC Darwin.

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

14 years agodisable this test for now.
Chris Lattner [Tue, 2 Feb 2010 20:41:39 +0000 (20:41 +0000)]
disable this test for now.

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

14 years ago...and fixed the Makefile.
Sean Callanan [Tue, 2 Feb 2010 20:20:30 +0000 (20:20 +0000)]
...and fixed the Makefile.

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

14 years agoRenamed the ed directory to edis, as suggested
Sean Callanan [Tue, 2 Feb 2010 20:11:23 +0000 (20:11 +0000)]
Renamed the ed directory to edis, as suggested
yesterday.  This eliminates possible confusion
about what exactly in this directory; the name
is still short, though.

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

14 years agoremove the remnants of TargetMachOWriterInfo.
Chris Lattner [Tue, 2 Feb 2010 19:41:23 +0000 (19:41 +0000)]
remove the remnants of TargetMachOWriterInfo.

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

14 years agoAdd a new top-level MachO.h file for manifest constants, fixing
Chris Lattner [Tue, 2 Feb 2010 19:38:14 +0000 (19:38 +0000)]
Add a new top-level MachO.h file for manifest constants, fixing
a layering violation from MC -> Target.

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

14 years agoAdded t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.
Johnny Chen [Tue, 2 Feb 2010 19:31:58 +0000 (19:31 +0000)]
Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.

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

14 years agoremove PPCMachOWriterInfo.
Chris Lattner [Tue, 2 Feb 2010 19:23:55 +0000 (19:23 +0000)]
remove PPCMachOWriterInfo.

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

14 years agoeliminate all forms of addPassesToEmitMachineCode except
Chris Lattner [Tue, 2 Feb 2010 19:14:27 +0000 (19:14 +0000)]
eliminate all forms of addPassesToEmitMachineCode except
the one used by the JIT.  Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator.  Inline the remaining version of
addPassesToEmitFileFinish into its only caller.

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

14 years agoAdded another version of the X86 assembler matcher test case.
Kevin Enderby [Tue, 2 Feb 2010 19:05:57 +0000 (19:05 +0000)]
Added another version of the X86 assembler matcher test case.
This test case is different subset of the full auto generated test case, and a
larger subset that is in x86_32-bit.s (that set will encode correctly).  These
instructions can pass though llvm-mc as it were a logical cat(1) and then
reassemble to the same instruction.  It is useful as we bring up the parser and
matcher so we don't break things that currently work.

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

14 years agoremove dead code, we're requesting TargetMachine::AssemblyFile here.
Chris Lattner [Tue, 2 Feb 2010 19:03:39 +0000 (19:03 +0000)]
remove dead code, we're requesting TargetMachine::AssemblyFile here.

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

14 years agoTest revert 95050; there's a good chance it's causing
Dale Johannesen [Tue, 2 Feb 2010 18:52:56 +0000 (18:52 +0000)]
Test revert 95050; there's a good chance it's causing
buildbot failure.

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

14 years agoInline addAssemblyEmitter into its one real caller and delete
Chris Lattner [Tue, 2 Feb 2010 18:44:12 +0000 (18:44 +0000)]
Inline addAssemblyEmitter into its one real caller and delete
the -print-emitted-asm option.  The JIT shouldn't have to pull
in the asmprinter.

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

14 years agoAdding missing methods for creating Add, Mul, Neg and Sub with NUW.
Duncan Sands [Tue, 2 Feb 2010 12:53:04 +0000 (12:53 +0000)]
Adding missing methods for creating Add, Mul, Neg and Sub with NUW.

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

14 years agoReturn value on every path.
Zhongxing Xu [Tue, 2 Feb 2010 07:05:31 +0000 (07:05 +0000)]
Return value on every path.

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

14 years agosimplify code.
Zhongxing Xu [Tue, 2 Feb 2010 06:33:32 +0000 (06:33 +0000)]
simplify code.

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

14 years agoMore logic correction: RemoveOverlap should always create new tree. Add a
Zhongxing Xu [Tue, 2 Feb 2010 06:22:08 +0000 (06:22 +0000)]
More logic correction: RemoveOverlap should always create new tree. Add a
parameter to record whether changes actually happened.

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

14 years agoAdd a lookup method to the IntervalMap. The difference from the original
Zhongxing Xu [Tue, 2 Feb 2010 05:23:23 +0000 (05:23 +0000)]
Add a lookup method to the IntervalMap. The difference from the original
lookup is that if the lookup key is contained in the key, we return the data.

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

14 years agoApparently gdb is not amused by empty lines in pubtypes section.
Devang Patel [Tue, 2 Feb 2010 03:47:27 +0000 (03:47 +0000)]
Apparently gdb is not amused by empty lines in pubtypes section.

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

14 years agoNULL terminate name in pubtypes sections.
Devang Patel [Tue, 2 Feb 2010 03:37:03 +0000 (03:37 +0000)]
NULL terminate name in pubtypes sections.

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

14 years agodon't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B
Chris Lattner [Tue, 2 Feb 2010 02:43:51 +0000 (02:43 +0000)]
don't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) ->  C0 ? A : B
for vectors.  Codegen is generating awful code or segfaulting
in various cases (e.g. PR6204).

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

14 years agoFix a bunch of errors in the old logic.
Zhongxing Xu [Tue, 2 Feb 2010 02:40:56 +0000 (02:40 +0000)]
Fix a bunch of errors in the old logic.

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

14 years agofix a crash in loop unswitch on a loop invariant vector condition.
Chris Lattner [Tue, 2 Feb 2010 02:26:54 +0000 (02:26 +0000)]
fix a crash in loop unswitch on a loop invariant vector condition.

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

14 years agoremove an unreduced testcase, rename another.
Chris Lattner [Tue, 2 Feb 2010 02:23:37 +0000 (02:23 +0000)]
remove an unreduced testcase, rename another.

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

14 years agoPerform sibcall in some cases when arguments are passes memory. Look for cases
Evan Cheng [Tue, 2 Feb 2010 02:22:50 +0000 (02:22 +0000)]
Perform sibcall in some cases when arguments are passes memory. Look for cases
where callee's arguments are already in the caller's own caller's stack and
they line up perfectly. e.g.

extern int foo(int a, int b, int c);

int bar(int a, int b, int c) {
  return foo(a, b, c);
}

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

14 years agoRemoved an unnecessary class from the EDDisassembler
Sean Callanan [Tue, 2 Feb 2010 02:18:20 +0000 (02:18 +0000)]
Removed an unnecessary class from the EDDisassembler
implementation.  Also made sure that the register maps
were created during disassembler initialization.

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

14 years agoMake local RA smarter about reusing input register of a copy
Dale Johannesen [Tue, 2 Feb 2010 02:08:02 +0000 (02:08 +0000)]
Make local RA smarter about reusing input register of a copy
as output.  Needed for (functional) correctness in inline asm,
and should be generally beneficial.  7361612.

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

14 years ago11.8p1: A nested class is a member and as such has the same access rights as
Zhongxing Xu [Tue, 2 Feb 2010 01:57:01 +0000 (01:57 +0000)]
11.8p1: A nested class is a member and as such has the same access rights as
any other member.

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

14 years agoLangRef.html says that inttoptr and ptrtoint always use zero-extension
Dan Gohman [Tue, 2 Feb 2010 01:44:02 +0000 (01:44 +0000)]
LangRef.html says that inttoptr and ptrtoint always use zero-extension
when the cast is extending.

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

14 years agoFactor out alignof expression folding into a separate function and
Dan Gohman [Tue, 2 Feb 2010 01:41:39 +0000 (01:41 +0000)]
Factor out alignof expression folding into a separate function and
generalize it to handle more cases.

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

14 years agoVarious code simplifications.
Dan Gohman [Tue, 2 Feb 2010 01:38:49 +0000 (01:38 +0000)]
Various code simplifications.

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

14 years agoUpdate CMake.
Daniel Dunbar [Tue, 2 Feb 2010 01:12:20 +0000 (01:12 +0000)]
Update CMake.

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

14 years agoDon't need to check the last argument since it'll always be bool. We also
Eric Christopher [Tue, 2 Feb 2010 00:51:45 +0000 (00:51 +0000)]
Don't need to check the last argument since it'll always be bool. We also
don't use TargetData here.

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

14 years agoMore indentation/tabification fixes.
Eric Christopher [Tue, 2 Feb 2010 00:13:06 +0000 (00:13 +0000)]
More indentation/tabification fixes.

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

14 years agoUntabify previous commit.
Eric Christopher [Tue, 2 Feb 2010 00:06:55 +0000 (00:06 +0000)]
Untabify previous commit.

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

14 years agoChanged to Chris Lattner's suggested approach, which
Sean Callanan [Tue, 2 Feb 2010 00:04:46 +0000 (00:04 +0000)]
Changed to Chris Lattner's suggested approach, which
merely stubs out the blocks-based disassembly functions
if the library wasn't built with blocks, which allows a
constant .exports file and also properly deals with
situations in which the compiler used to build a client
is different from the compiler used to build the library.

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

14 years agoKill the Mach-O writer, and temporarily make filetype=obj an error.
Nate Begeman [Mon, 1 Feb 2010 23:56:58 +0000 (23:56 +0000)]
Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.

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

14 years agoFix for builds with separate source and build
Sean Callanan [Mon, 1 Feb 2010 23:27:57 +0000 (23:27 +0000)]
Fix for builds with separate source and build
directories (like, oh, say, any multistage build)

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

14 years agoFormatting.
Eric Christopher [Mon, 1 Feb 2010 23:25:03 +0000 (23:25 +0000)]
Formatting.

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

14 years agoMOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Johnny Chen [Mon, 1 Feb 2010 23:06:04 +0000 (23:06 +0000)]
MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Rn operand.

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

14 years agoUpdated to use the proper .exports file for the
Sean Callanan [Mon, 1 Feb 2010 23:01:38 +0000 (23:01 +0000)]
Updated to use the proper .exports file for the
target platform, depending on whether the target
supports the blocks API or not

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

14 years agoAdd "dump" method to IVUsersOneStride.
Bill Wendling [Mon, 1 Feb 2010 22:51:23 +0000 (22:51 +0000)]
Add "dump" method to IVUsersOneStride.

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

14 years agoTestcase for 94996 (PR 6157)
Dale Johannesen [Mon, 1 Feb 2010 22:46:05 +0000 (22:46 +0000)]
Testcase for 94996 (PR 6157)

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

14 years agoFix PR6196. GV callee may not be a function.
Evan Cheng [Mon, 1 Feb 2010 22:40:09 +0000 (22:40 +0000)]
Fix PR6196. GV callee may not be a function.

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

14 years agoAdd test case for 95013.
Evan Cheng [Mon, 1 Feb 2010 22:32:42 +0000 (22:32 +0000)]
Add test case for 95013.

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

14 years agoImprove EXTRACT_VECTOR_ELT patch based on comments from Duncan
Mon P Wang [Mon, 1 Feb 2010 22:15:09 +0000 (22:15 +0000)]
Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan

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

14 years agoRollback on including blocks functionality in .exports
Sean Callanan [Mon, 1 Feb 2010 21:57:50 +0000 (21:57 +0000)]
Rollback on including blocks functionality in .exports
because some platforms don't support blocks and then
break because the symbols aren't present

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