1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Chris Lattner
4b35be3f3b pass mangler in as a reference instead of a pointer.
llvm-svn: 84540
2009-10-19 21:45:31 +00:00
Jakob Stoklund Olesen
31fcbdefbb Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
unused DECLARE instruction.

KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.

llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Chris Lattner
64f72086ad rename X86ATTAsmPrinter.cpp -> X86AsmPrinter.cpp likewise the .h file.
llvm-svn: 82394
2009-09-20 07:41:30 +00:00
Chris Lattner
271256b7a8 rename X86ATTAsmPrinter class -> X86AsmPrinter
llvm-svn: 82391
2009-09-20 07:35:34 +00:00
Chris Lattner
0076b1c63f split random COFF asmprinter state out to X86COFFMachineModuleInfo.h.
Make dllexport directives come out in determinstic order.

llvm-svn: 82381
2009-09-20 06:45:52 +00:00
Chris Lattner
f91260f6cf move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
and use MachineModuleInfoMachO instead.

llvm-svn: 82022
2009-09-16 06:25:03 +00:00
Chris Lattner
96e22d6462 split MCInst printing out of the X86ATTInstPrinter
class into its own X86ATTInstPrinter class.  The inst
printer now has just one dependence on the code generator
(TRI).

llvm-svn: 81703
2009-09-13 19:30:11 +00:00
Chris Lattner
a0dbce2e0e delete the fixme too! :)
llvm-svn: 81689
2009-09-13 18:50:22 +00:00
Chris Lattner
dfc3079a9e merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.
Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
".L4$pb".  The actual name doesn't matter and the darwin name is shorter.

llvm-svn: 81688
2009-09-13 18:46:37 +00:00
Chris Lattner
ff9d0f20fa devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
we only have one place that decides what to name bb labels.  Hopefully various
clients of printBasicBlockLabel can start using GetMBBSymbol instead.

llvm-svn: 81652
2009-09-12 23:02:08 +00:00
Chris Lattner
3d47ac7330 factor MBB label lowering better
llvm-svn: 81630
2009-09-12 21:06:08 +00:00
Chris Lattner
b2fdae122a X86MCInstLower::Lower should only not emit anything to OutStreamer,
this means that it can only lower one MachineInstr to one MCInst.  To
make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS
(which generates an implicit label) out of X86MCInstLower.

llvm-svn: 81629
2009-09-12 21:01:20 +00:00
Chris Lattner
53cca8590c eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
MBB labels like everything else.

llvm-svn: 81628
2009-09-12 20:45:03 +00:00
Chris Lattner
fb113da948 split MachineInstr -> MCInst lowering into its own class (not
being embedded into X86ATTAsmPrinter).  This still depends heavily
on X86ATTAsmPrinter, but this is a step in the right direction.

llvm-svn: 81627
2009-09-12 20:34:57 +00:00
Chris Lattner
6a552d18b5 fix another GCC bootstrap problem, which manifested as things
like:
foo.s:2412:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"

llvm-svn: 81596
2009-09-12 01:11:50 +00:00
Chris Lattner
beee27777a switch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs and GVStubs.
llvm-svn: 81514
2009-09-11 07:03:20 +00:00
Chris Lattner
04be362b0a Fix a bug I introduced in FnStubs generation, switch GVStubs to be a
densemap instead of StringMap to match FnStubs.

llvm-svn: 81513
2009-09-11 06:59:18 +00:00
Chris Lattner
316cce5a0f change FnStubs from being a StringMap<std::string> to being a much
more efficient SmallPtrSet<MCSymbol*>.  This eliminates string
craziness and fixes CodeGen/X86/darwin-quote.ll with the new asmprinter.

Codegen is producing stubs in a nondeterminstic order, but it was doing
this before anyway.

llvm-svn: 81511
2009-09-11 06:36:33 +00:00
Chris Lattner
c61e9c130b printInstruction() no longer prints a \n after itself, do it
for the two instruction MOVPC32r sequence.

llvm-svn: 81509
2009-09-11 05:59:55 +00:00
Chris Lattner
0f5802b4d8 reimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
Mangler::getNameWithPrefix.  In addition to avoiding some over
quoting, this also is more efficient because it uses smallvector
instead of std::string thrashing.

llvm-svn: 81508
2009-09-11 05:58:44 +00:00
Chris Lattner
6484bead9e convert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
instead of std::string and Mangler.

llvm-svn: 81503
2009-09-11 04:36:43 +00:00
Chris Lattner
e2cb22eb96 rearrange some code, export a SmallString version of DecorateCygMingName.
llvm-svn: 81502
2009-09-11 04:28:13 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner
8dd3d8b930 add a gross hack to get "SrcLine" comments to show up with the
new asmprinter.  Differently gross hack coming next.

llvm-svn: 81379
2009-09-09 20:45:42 +00:00
Chris Lattner
52651f7623 hoist the call to processDebugLoc out of the generated
asm printer into the "printInstruction" routine.  This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.

It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.

llvm-svn: 81377
2009-09-09 20:34:59 +00:00
Chris Lattner
91c9c8a18e make sure to send external symbols through the mangler,
this fixes mingw-alloca.ll with the new asmprinter.

llvm-svn: 81301
2009-09-09 00:23:32 +00:00
Chris Lattner
f387735da5 add support for @PLT and friends on external symbols, fixes
x86-64-pic-11.ll with the new asmprinter.

llvm-svn: 81294
2009-09-09 00:10:14 +00:00
Chris Lattner
ca44919aac add support for some missing modifiers on jumptable/constant pool entries.
llvm-svn: 81199
2009-09-08 06:25:12 +00:00
Chris Lattner
893fbc4fec add a bunch more evil lowering code to work around various :subreg32 modifiers
in the .td files.  This gets us down to 18 failures in codegen/x86 with the
new asmprinter.

llvm-svn: 81198
2009-09-08 06:19:15 +00:00
Chris Lattner
ef96a8b64d ADd support for "lowering" the X86::MOVZX16rr8/X86::MOVZX16rm8
subreg32 modifiers.

llvm-svn: 81196
2009-09-08 06:03:07 +00:00
Chris Lattner
8accd1ddcf add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
the problem with subreg32 modifiers.  This gets all of Olden working
with the new asmprinter.

llvm-svn: 81195
2009-09-08 05:49:25 +00:00
Duncan Sands
265ebcdcfc Remove unreachable code.
llvm-svn: 81126
2009-09-06 19:27:53 +00:00
Duncan Sands
598fe699d0 Remove some not-really-used variables, as warned
about by icc (#593, partial).  Patch by Erick Tryzelaar.

llvm-svn: 81115
2009-09-06 12:41:19 +00:00
Chris Lattner
6ea9973a0b don't call getOffset() on jump tables, this fixes three failing olden benchmarks
with the new asmprinter.

llvm-svn: 80906
2009-09-03 07:36:42 +00:00
Chris Lattner
d7cc632fcf Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS. We get very
different formatting from the old asmprinter, but it should be 
semantically the same.  We used to get:

	popl	%eax
	addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
...

Now we get:

	popl	%eax
.Lpicbaseref6:
	addl	$(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
...

llvm-svn: 80905
2009-09-03 07:30:56 +00:00
Evan Cheng
41e87f2f13 Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.
llvm-svn: 80904
2009-09-03 07:04:02 +00:00
Chris Lattner
763a1843ff merge globaladdress symbol processing stuff into other stuff. Now
all global variable operand flag processing stuff is shared between
different operand types.

llvm-svn: 80886
2009-09-03 05:06:07 +00:00
Chris Lattner
72cfe4f49c Split the "operand -> symbol" logic from the "get offset and other munging
from operand" logic.  GlobalAddress still todo.

llvm-svn: 80884
2009-09-03 04:56:20 +00:00
Chris Lattner
3609f4e4b7 implement lowering support for constant pool index operands, this gets a bunch more
olden programs working.

llvm-svn: 80881
2009-09-03 04:44:53 +00:00
Chris Lattner
dfb8d9adcd simplify this by using SmallString::str(), much nicer!
llvm-svn: 80874
2009-09-03 03:54:02 +00:00
Chris Lattner
825c74b1d9 switch from std::string to SmallString + raw_svector_ostream.
llvm-svn: 80807
2009-09-02 17:37:38 +00:00
Chris Lattner
1342ef5d8b split mcinst lowering stuff out to its own file.
llvm-svn: 80806
2009-09-02 17:35:12 +00:00