Commit Graph

10876 Commits

Author SHA1 Message Date
Bill Wendling a73e471c62 - Add a comment to the callback indicating that it's *extremely* not a good
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
  encoded value in the CIE.

llvm-svn: 93753
2010-01-18 19:36:27 +00:00
Benjamin Kramer 6dea75c658 Unnamed symbol index should be >= 1. This was lost during the mangler refactoring. Fixes PR6067.
llvm-svn: 93724
2010-01-18 14:39:20 +00:00
Chris Lattner 1d8b954b43 switch x86 zerofill emission over to use MCStreamer.
llvm-svn: 93702
2010-01-18 01:21:08 +00:00
Chris Lattner 8c21ffdcc6 Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
as it emits code.  Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)

llvm-svn: 93700
2010-01-18 00:59:24 +00:00
Chris Lattner c8f7717808 remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner 8b5d55ed06 now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.

llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner 8c2ab10bdd stop the CBE from using Mangler::appendMangledName, which is a private function, it is mangling types, which don't matter how they are done.
llvm-svn: 93692
2010-01-17 19:32:29 +00:00
Chris Lattner dfc5cbe2a1 fix uninit member, thanks to Benjamin Kramer for identifying the bug.
llvm-svn: 93691
2010-01-17 19:24:35 +00:00
Chris Lattner 83e872e1c4 Get MCSymbol out of the mangling business, and move all the logic
to Mangler.  Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.

This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.

llvm-svn: 93690
2010-01-17 19:23:46 +00:00
Chris Lattner b4ffc894e6 now that mangler is in libtarget, it can use MCAsmInfo instead of clients
having to pass various fields from it in.  Simplify.

llvm-svn: 93686
2010-01-17 18:22:35 +00:00
Benjamin Kramer 4d128a2387 Switch some functions to take Twines, eliminate uses of StringExtras.h.
llvm-svn: 93680
2010-01-17 07:46:39 +00:00
Chris Lattner f62e3ee8c5 move the mangler into libtarget from vmcore.
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner f523bb584c fix a warning.
llvm-svn: 93663
2010-01-16 21:55:24 +00:00
Chris Lattner 1c7beb5638 this doesn't need to suck in Mangler.
llvm-svn: 93662
2010-01-16 21:35:09 +00:00
Chris Lattner 1376b02a17 reapply the mangler gutting patch.
llvm-svn: 93656
2010-01-16 21:08:46 +00:00
Rafael Espindola 9794fdfab0 Revert 93648.
Mangler::getMangledName is used from lto
Mangler::setUseQuotes is used in the AsmPrinter
Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter

llvm-svn: 93652
2010-01-16 20:27:59 +00:00
Chris Lattner 8b27547d6d Mangler::getMangledName is now dead, remove it and all the other stuff in Mangler that is now transitively dead. woo.
llvm-svn: 93648
2010-01-16 19:08:51 +00:00
Chris Lattner 555ceabe64 rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,
and add an explicit ForcePrivate argument.

Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.

llvm-svn: 93646
2010-01-16 18:37:32 +00:00
Chris Lattner 9787fd0468 switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Chris Lattner d3a2163069 add an inefficient version of getNameWithPrefix that returns an std::string.
llvm-svn: 93641
2010-01-16 18:06:34 +00:00
Benjamin Kramer 41cab696fc Revive dead assert.
llvm-svn: 93638
2010-01-16 16:14:55 +00:00
Tobias Grosser b478d3e0fc Fix PR6047
Nodes that had children outside of the post dominator tree (infinite loops)
where removed from the post dominator tree. This seems to be wrong. Leave them
in the tree.

llvm-svn: 93633
2010-01-16 13:38:07 +00:00
Tobias Grosser 53da3f8da8 Create Generic DOTGraphTraits Printer/Viewer
Move the DOTGraphTraits dotty printer/viewer templates, that were developed for
the dominance tree into their own header file. This will allow reuse in future
passes.

llvm-svn: 93632
2010-01-16 10:56:41 +00:00
Devang Patel c0e17df3ce Replace DebugLocTuple with DILocation.
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Bill Wendling bf5cfa1a41 Retrying r91337:
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.

llvm-svn: 93616
2010-01-16 01:40:55 +00:00
Chris Lattner a091179b5f CurrentFnName is now dead, remove it.
llvm-svn: 93612
2010-01-16 01:24:10 +00:00
Chris Lattner fedff0f67d remove the string form of printVisibility.
llvm-svn: 93609
2010-01-16 01:17:26 +00:00
Bill Wendling efda1e4f0f Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
on the build bots.

llvm-svn: 93606
2010-01-16 01:06:58 +00:00
Chris Lattner ae9b9eed18 supplement CurrentFnName with CurrentFnSym, which will eventually
replace it.  Upgrade Alpha, Blackfin, and part of CellSPU to not
use mangler anymore.  CellSPU needs more invasive surgery.

llvm-svn: 93589
2010-01-15 23:55:16 +00:00
Chris Lattner 7fec180909 add a version of AsmPrinter::printVisibility that takes an MCSymbol.
llvm-svn: 93587
2010-01-15 23:38:51 +00:00
Ted Kremenek 12821816c6 BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>.
llvm-svn: 93581
2010-01-15 23:29:34 +00:00
Dale Johannesen 617603aaee Remove unneeded argument per review.
llvm-svn: 93579
2010-01-15 23:28:49 +00:00
Chris Lattner 0dca0a9650 add another helper
llvm-svn: 93577
2010-01-15 23:25:11 +00:00
Chris Lattner 91687f6e28 add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol
helper method, use it to simplify some code.

llvm-svn: 93575
2010-01-15 23:18:17 +00:00
Dan Gohman 8ea3acbb3d Add comments to the dump() and dumpr() routines.
llvm-svn: 93566
2010-01-15 22:22:58 +00:00
Dale Johannesen 188fa96cf9 DEBUG_VALUE is now variable sized, as it has a
target-dependent memory address representation in it.
Restore X86 printing of DEBUG_VALUE; lowering is
done in X86RegisterInfo using the normal algorithm.

llvm-svn: 93565
2010-01-15 22:22:35 +00:00
Eric Christopher 8444d7536c Remove the InlineHint attribute. There are no current or planned
users.

llvm-svn: 93558
2010-01-15 21:36:30 +00:00
David Greene 554039a914 Add some debug routines to SelectionDAG to dump full DAGs.
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).

Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.

llvm-svn: 93538
2010-01-15 19:43:23 +00:00
Chris Lattner e17df0b7f0 fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.

llvm-svn: 93536
2010-01-15 19:39:23 +00:00
Chris Lattner 528d00b913 extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions.  Use this to
provide range info for several new X86Operands.

llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Victor Hernandez b324e66f4c Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.

llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Nate Begeman d232150b83 Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer

Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.

llvm-svn: 93527
2010-01-15 18:51:18 +00:00
Victor Hernandez 8d4904b639 Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Victor Hernandez 5d6551816b Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.

llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Dale Johannesen 881ba0bb92 Remove DEBUG_DECLARE, looks like we don't need it.
Also, DEBUG_VALUE has side effects.

llvm-svn: 93498
2010-01-15 01:50:44 +00:00
Jeffrey Yasskin 1dae4e6c2a Make sure include/llvm/MC/MCParsedAsmOperand.h can be compiled alone.
llvm-svn: 93492
2010-01-15 00:41:53 +00:00
Chris Lattner 14bf521792 add virtual methods to get the start/end of a MCParsedAsmOperand,
the default implementation returns "unknown".

llvm-svn: 93470
2010-01-14 22:29:57 +00:00
Chris Lattner f29c0b6880 Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands.  A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives 
targets the ability to use polymorphic operands if they want to. 

llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Chris Lattner 77fd677111 prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.

llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Chris Lattner 872501b6e0 introduce the MCParsedAsmOperand class.
llvm-svn: 93454
2010-01-14 21:20:55 +00:00