1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

63 Commits

Author SHA1 Message Date
Chris Lattner
f720dd9257 eliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
it into all of its call sites and simplifying them.

llvm-svn: 81962
2009-09-16 00:08:41 +00:00
Caroline Tice
9584af22be Don't generate Dwarf line table entries for source line 0.
llvm-svn: 81542
2009-09-11 18:25:54 +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
Devang Patel
c174e064b2 Ignore malformed global variable debug info.
llvm-svn: 81055
2009-09-04 23:59:07 +00:00
Devang Patel
fb8892d0e1 Subprogram is a scope. Derive DISubprogram from DIScope.
llvm-svn: 80637
2009-08-31 22:47:13 +00:00
Devang Patel
4a89fae1fe Rename DIBlock as DILexicalBlock.
llvm-svn: 80633
2009-08-31 22:00:15 +00:00
Caroline Tice
e49e2d352c Add flag to mark structs for Apple Block "byref" variables; also add code to
modify the type and location debug information for these variables to match the
programmer's expectations.

llvm-svn: 80625
2009-08-31 21:19:37 +00:00
Devang Patel
29f14e754f Simplify isDerivedType() and other predicate interface.
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Devang Patel
fbaeda732e Reapply 79977.
Use MDNodes to encode debug info in llvm IR.

llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Devang Patel
c1fe40a1b3 Closure is a very generic name. Use AppleBlock instead.
llvm-svn: 80307
2009-08-27 23:51:51 +00:00
Devang Patel
10c075a316 Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Devang Patel
7bee319f4a Add isClosure() predicate. This is used to add DW_AT_APPLE_block attribute.
Patch by Caroline Tice.

llvm-svn: 80061
2009-08-26 00:39:50 +00:00
Devang Patel
7d42bfab6c Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)

llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Chris Lattner
39262eb119 prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.

llvm-svn: 79885
2009-08-24 03:52:50 +00:00
Chris Lattner
3203639c35 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Chris Lattner
1c6c358071 remove some random indentation stuff, yay for efficiency.
llvm-svn: 79797
2009-08-23 00:51:00 +00:00
Chris Lattner
8d06945fff rename TAI -> MAI, being careful not to make MAILJMP instructions :)
llvm-svn: 79777
2009-08-22 21:43:10 +00:00
Chris Lattner
5d8af49626 Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
llvm-svn: 79763
2009-08-22 20:48:53 +00:00
Devang Patel
c071d6c1b4 Record variable debug info at ISel time directly.
llvm-svn: 79742
2009-08-22 17:12:53 +00:00
David Greene
1df248be05 Add missing includes.
llvm-svn: 79473
2009-08-19 21:52:55 +00:00
Chris Lattner
9cbc9c2d13 eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.

llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Devang Patel
b6add4ace3 Do not completely skip subrange info for a zero sized array.
llvm-svn: 79044
2009-08-14 20:59:16 +00:00
Chris Lattner
9e2c3aa666 sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)

llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Chris Lattner
628047fd32 eliminate CurrentSection, rename CurrentSection_ -> CurrentSection, make it private,
eliminate IsInTextSection.

llvm-svn: 78017
2009-08-03 23:20:21 +00:00
Chris Lattner
738a9ba448 move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.

llvm-svn: 77889
2009-08-02 07:24:22 +00:00
Chris Lattner
75b7692e66 switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.

llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Devang Patel
9b0dea089b Start using DebugInfoFinder.
llvm-svn: 77621
2009-07-30 18:56:46 +00:00
Chris Lattner
55461787cc Rip all of the global variable lowering logic out of TargetAsmInfo. Since
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.

Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.

This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.

llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Daniel Dunbar
4a36d5dcfd Remove Value::getName{Start,End}, the last of the old Name APIs.
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Devang Patel
58a041b634 Skip special LLVM prefix '1' while emitting linknage name.
This prefix is used by LLVM to inform the asm printer to not emit usual global symbol prefix before the symbol name.

llvm-svn: 75875
2009-07-16 01:01:22 +00:00
Chris Lattner
2a6bb9bc51 Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.

llvm-svn: 75607
2009-07-14 04:50:12 +00:00
Devang Patel
4992f3bed3 Do not use Mangler to remove '1' from linkage name.
llvm-svn: 75574
2009-07-14 00:55:28 +00:00
Devang Patel
8af4ed78a9 Use assertion.
llvm-svn: 75540
2009-07-13 22:46:19 +00:00
Devang Patel
af27c5b2bd Use AsmPrinter's Mangler to remove leading '1' from linkage names.
llvm-svn: 75515
2009-07-13 21:48:26 +00:00
Devang Patel
f1387bc427 revert rev. 75503 for now.
llvm-svn: 75507
2009-07-13 21:26:33 +00:00
Devang Patel
ca075d2f7a Use Mangler to remove leading '1' from linkage names.
llvm-svn: 75503
2009-07-13 21:19:56 +00:00
Devang Patel
e416111eeb Accidently dropped this while removing dead code in previous commit.
llvm-svn: 74953
2009-07-07 21:55:14 +00:00
Devang Patel
4fdc3e6c1d Remove dead code.
llvm-svn: 74949
2009-07-07 21:12:32 +00:00
Devang Patel
e35cd91347 Struct types are described using field types only.
llvm-svn: 74477
2009-06-29 23:46:50 +00:00
Devang Patel
bff451b95b s/MainCU/ModuleCU/g
llvm-svn: 74452
2009-06-29 20:45:18 +00:00
Devang Patel
4ba8cbff55 Multiple DW_TAG_compile_unit is not used, afaict, on any target.
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file. 

llvm-svn: 74449
2009-06-29 20:38:13 +00:00
Devang Patel
84a8914a4a Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
and llvm.dbg.global_variables.

llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Devang Patel
32bbebe82f Simplify.
llvm-svn: 74215
2009-06-25 22:36:02 +00:00
Owen Anderson
7b32a5b971 Down with statics!
llvm-svn: 74134
2009-06-24 22:53:20 +00:00
Chris Lattner
ea0ea2f4bc simplify macro debug info directive handling.
llvm-svn: 73736
2009-06-18 23:31:37 +00:00
Devang Patel
5941941827 Use MainCU if it is available.
llvm-svn: 73457
2009-06-16 02:09:30 +00:00
Devang Patel
1fb2606b12 Gracefully handle imbalanced inline function begin and end markers.
llvm-svn: 73426
2009-06-15 21:45:50 +00:00
Devang Patel
bcc1187643 llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function. If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available. LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics.
Apply defensive patch to preserve at least one lexical scope till the end of function.

llvm-svn: 73282
2009-06-13 02:16:18 +00:00
Devang Patel
8d9aa4249a Clear AbstractInstanceRootMap at the end of the function.
llvm-svn: 73244
2009-06-12 19:24:05 +00:00
Dan Gohman
ee407d25ca Remove some unnecessary #includes.
llvm-svn: 72948
2009-06-05 16:32:58 +00:00