1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

847 Commits

Author SHA1 Message Date
Chris Lattner
45a0ae21b8 Implement support for the case when a reference to a addr-of-bb
label is generated, but then the block is deleted.  Since the
value is undefined, we just emit the label right after the entry 
label of the function.  It might matter that the label is in the
same section as the function was afterall.

llvm-svn: 98579
2010-03-15 20:39:00 +00:00
Devang Patel
3244526a3b Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.
This is a work in progress.

llvm-svn: 98556
2010-03-15 18:33:46 +00:00
Chris Lattner
37c5893297 remove dead method.
llvm-svn: 98526
2010-03-15 00:00:42 +00:00
Chris Lattner
2bdb0765f8 fix AsmPrinter::GetBlockAddressSymbol to always return a unique
label instead of trying to form one based on the BB name (which
causes collisions if the name is empty).  This fixes PR6608

llvm-svn: 98495
2010-03-14 17:53:23 +00:00
Chris Lattner
9331acc6d7 get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.

llvm-svn: 98489
2010-03-14 08:36:50 +00:00
Chris Lattner
5af59dfd1b don't use getDWLabel("label" anymore, always go through MMI.
llvm-svn: 98485
2010-03-14 08:18:13 +00:00
Chris Lattner
49130c09d0 remove now-dead code, all labels use MCSymbols.
llvm-svn: 98484
2010-03-14 08:17:53 +00:00
Chris Lattner
5ee7841af2 change SrcLineInfo to contain a label instead of a label ID.
llvm-svn: 98483
2010-03-14 08:15:55 +00:00
Chris Lattner
23ec7363b8 Now that DBG_LABEL is updated, we can finally make MachineMove
contain an MCSymbol instead of a label index.

llvm-svn: 98482
2010-03-14 08:12:40 +00:00
Chris Lattner
ba3b320aa3 change the DBG_LABEL MachineInstr to always be created
with an MCSymbol instead of an immediate.

llvm-svn: 98481
2010-03-14 07:56:48 +00:00
Chris Lattner
45aceed227 unbreak the build, grr symlinks.
llvm-svn: 98477
2010-03-14 07:36:49 +00:00
Chris Lattner
853b4f38df switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
llvm-svn: 98474
2010-03-14 07:27:07 +00:00
Chris Lattner
ee71bdd77f Fix some EH failures on NNT I introduced in r98461
llvm-svn: 98471
2010-03-14 07:02:50 +00:00
Chris Lattner
961e202df4 fix a bug I introduced in r98459, causing some NNT failures.
llvm-svn: 98470
2010-03-14 06:50:56 +00:00
Chris Lattner
5fef80c5aa change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".

llvm-svn: 98463
2010-03-14 02:33:54 +00:00
Chris Lattner
f856c407af use Label->isDefined() instead of isLabelDeleted() now that we
consistently use MCSymbol and only call this predicate after
they should have been emitted.

llvm-svn: 98461
2010-03-14 02:20:58 +00:00
Chris Lattner
149cf816bb change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's.  This cleans up and regularizes a bunch 
of code and makes way for future progress.

Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places.  This is very sad and disturbing. :(

One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction.  There should not be any 
functionality change from doing this, but I'm not an EH expert.

llvm-svn: 98459
2010-03-14 01:41:15 +00:00
Chris Lattner
ceaa2343e7 eliminate the now-unneeded context argument of MBB::getSymbol()
llvm-svn: 98451
2010-03-13 21:04:28 +00:00
Chris Lattner
e7538fa303 rearrange MCContext ownership. Before LLVMTargetMachine created it
and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to 
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.

llvm-svn: 98450
2010-03-13 20:55:24 +00:00
Chris Lattner
f26e0336c2 simplify EmitFrameMoves to take BaseLabel in as a symbol
instead of as a stem+idx pair, simplify the "is a new 
location" check to use symbol comparison.

llvm-svn: 98432
2010-03-13 08:05:25 +00:00
Chris Lattner
ade5faaac4 factor some labels, simplify some code.
llvm-svn: 98429
2010-03-13 07:40:56 +00:00
Chris Lattner
836e8b5d1b various cleanups.
llvm-svn: 98426
2010-03-13 07:26:18 +00:00
Chris Lattner
bfdbd2f3a2 reimplement the string pool used for inlined function
entries to not thrash std::strings and MCSymbols.

llvm-svn: 98415
2010-03-13 02:17:42 +00:00
Chris Lattner
14ab9784f4 remove gone method, grr symlinks.
llvm-svn: 98392
2010-03-12 21:30:49 +00:00
Chris Lattner
7a2e6110bc inline the now-trivial implementation of GetGlobalValueSymbol into
some of its callers.

llvm-svn: 98388
2010-03-12 21:09:07 +00:00
Chris Lattner
c101ad818c give Mangler access to TargetData.
llvm-svn: 98378
2010-03-12 20:47:28 +00:00
Chris Lattner
01e70df9b2 finally give Mangler a getSymbol method, which returns an MCSymbol
for a global instead of messing around with string buffers.

llvm-svn: 98366
2010-03-12 18:55:20 +00:00
Chris Lattner
04cd48f865 remove dead code.
llvm-svn: 98365
2010-03-12 18:49:32 +00:00
Chris Lattner
956582f876 make the mangler take an MCContext instead of an MAI.
No functionality change.

llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner
4cc9a9004f fix a bug emitting .secrel32 that I introduced, PR6587, patch
by A.Mazur!

llvm-svn: 98360
2010-03-12 18:10:35 +00:00
Jeffrey Yasskin
824bd1b30d Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
several fields to make it easier to figure out where bugs might be creeping in.

llvm-svn: 98358
2010-03-12 17:45:06 +00:00
Devang Patel
93aa350213 There is no need to create specification DIE for definitions at DIFile level.
llvm-svn: 98302
2010-03-11 23:44:52 +00:00
Chris Lattner
5aefaeb42e fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
where we used ot create an MCSymbol for ".".  Now emit an assembler
temporary label and reference it instead of "." textually.

rdar://7739457

llvm-svn: 98292
2010-03-11 21:55:20 +00:00
Chris Lattner
1ce9dfd498 rename getSymbolForDwarf* to getExprForDwarf* since it returns
an MCExpr and not an MCSymbol.  Change it to take an MCStreamer,
which is currently unused.

No functionality change.

llvm-svn: 98278
2010-03-11 19:41:58 +00:00
Jeffrey Yasskin
239beb0e85 Avoid leaking CompileUnits in DwarfDebug.cpp.
llvm-svn: 98268
2010-03-11 18:29:55 +00:00
Richard Osborne
9c71a0a5ba Add a new jump table encoding to indicate jump tables entries
are inside the function by the target at the point of use.

llvm-svn: 98255
2010-03-11 14:58:16 +00:00
Chris Lattner
e34dde1e83 move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!

llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Chris Lattner
270a61db96 mcize the rest of EH emission, only one more directive missing
for darwin/x86 to be completely mcized.

llvm-svn: 98130
2010-03-10 02:48:06 +00:00
Chris Lattner
60b9c3a333 add missing filename!
llvm-svn: 98125
2010-03-10 02:29:31 +00:00
Chris Lattner
ed0b8d36e4 set the temporary bit on MCSymbols correctly.
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Chris Lattner
e284f80948 inline away a form of IsPCRelative, eliminating the
dead IsPCRel argument.

llvm-svn: 98117
2010-03-10 01:17:49 +00:00
Chris Lattner
cff79125fb add some fixme's for MCizing. EH still has a few things that
need to be MCized, but the last debug info thing are LEB and
cygwin specific (which the MC api doesn't support yet) and
one specific form of EmitReference which I'll tackle next.

llvm-svn: 98116
2010-03-10 01:04:13 +00:00
Chris Lattner
915a362856 mcize uses of PrintRelDirective and eliminate it.
llvm-svn: 98107
2010-03-10 00:09:21 +00:00
Chris Lattner
84561d5f46 inline the bool form of PrintRelDirective away, leaving just the unsigned form.
llvm-svn: 98106
2010-03-09 23:54:52 +00:00
Chris Lattner
d5d96f76d0 eliminate EOL, adding all comments with the OutStreamer.AddComment
method.  With this, comments should end up on the same lines as the .byte
directives (for example) and we now get no output with:

$ llc CodeGen/X86/2009-02-12-DebugInfoVLA.ll -o - -filetype=null -asm-verbose

woot.

llvm-svn: 98105
2010-03-09 23:52:58 +00:00
Chris Lattner
58829fcfe9 eliminate a bunch of \n's that are being printed to O. Next up is to kill
off "EOL".

llvm-svn: 98102
2010-03-09 23:38:23 +00:00
Chris Lattner
2ede66313d convert the non-"ispcrel" case of EmitReference to MC,
significant debug info testcases are now all going through
MCStreamer, though they print a lot of extraneous newlines to "O".

llvm-svn: 98101
2010-03-09 23:19:15 +00:00
Chris Lattner
d51f1bdc58 reapply r98035:
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.

llvm-svn: 98047
2010-03-09 04:54:43 +00:00
Chris Lattner
43b812b6a8 add some extra checks. I'm not sure why, but this does unbreak a
failure remaining on mainline.

llvm-svn: 98046
2010-03-09 04:48:35 +00:00
Eric Christopher
8875eba06a Speculatively revert r98035. It appears to have caused a set of buildbot
failures.

llvm-svn: 98039
2010-03-09 02:36:31 +00:00