summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Simplify.Devang Patel2009-06-251-4/+2
| | | | llvm-svn: 74215
* Split out the DwarfDebug module from the DwarfWriter module.Bill Wendling2009-05-151-2796/+2
| | | | | | Again, no intendtional functionality change. llvm-svn: 71854
* Split out the DwarfException class into its own file. No functionality change,Bill Wendling2009-05-151-769/+7
| | | | | | though the classes have been marked with "VISIBILITY_HIDDEN". llvm-svn: 71827
* Split out the Dwarf writer stuff into separate files. This is a much moreBill Wendling2009-05-151-1278/+38
| | | | | | | | | logical/sane approach to organizing all of the stuff that goes into writing out DWARF information. Honestly? even this is too complex for what it's supposed to be doing. Trivia: It *looks* like there would be functionality changes, however there aren't! llvm-svn: 71821
* Tag blocks with DW_AT_APPLE_block.Mike Stump2009-05-141-0/+7
| | | | llvm-svn: 71784
* There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.Bill Wendling2009-05-131-21/+30
| | | | | | | Basically, there was a situation where it was getting an empty vector and doing a .back() on that. Which isn't cool. llvm-svn: 71746
* Move the bookkeeping of the debug scopes back to the place where itBill Wendling2009-05-131-20/+20
| | | | | | | | belonged. The variable declaration stuff wasn't happy with it where it was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it successfully. llvm-svn: 71714
* - Record that the debug info is actually used so that the label folder doesn'tBill Wendling2009-05-121-10/+10
| | | | | | | blast it away. - Move InlineInfo bookkeeping to bookkeep the correct debug info object. llvm-svn: 71519
* This is a large rewrite of how Dwarf info for inlined functions is handled.Bill Wendling2009-05-101-95/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DwarfWriter expects DbgScopes and DIEs to behave themselves according to DwarfWriter's rules. However, inlined functions violate these rules. There are two different types of DIEs associated with an inlined function: an abstract instance, which has information about the original source code for the function being inlined; and concrete instances, which are created for each place the function was inlined and point back to the abstract instance. This patch tries to stay true to this schema. It bypasses how regular DbgScopes and DIEs are created and used when necessary. It provides special handling for DIEs of abstract and concrete instances. This doesn't take care of all of the problems with debug info for inlined functions, but it's a step in the right direction. For one thing, llvm-gcc generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the function's inlined) for this example: #include <stdio.h> static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; } void foo() { long long b = 1; int Y = bar(4); printf("%d\n", Y); } while clang generates correct IR. llvm-svn: 71410
* Compute the offsets of the compile units. We need this so that when we emit aBill Wendling2009-05-081-11/+20
| | | | | | | | | concrete instance of an inlined function, we can get the actual address of the abstract instance inside of the compile unit. This isn't currently used, but will be by a future check-in. llvm-svn: 71263
* Minor clean ups. No functionality change.Bill Wendling2009-05-081-5/+4
| | | | llvm-svn: 71256
* Revert 71165. It did more than just revert 71158 and it introducedDan Gohman2009-05-071-140/+57
| | | | | | several regressions. The problem due to 71158 is now fixed. llvm-svn: 71176
* Temporarily revert r71158. It was causing a failure during a full bootstrap:Bill Wendling2009-05-071-57/+140
| | | | | | | | | | | | | | | | | | | | | checking for bcopy... no checking for getc_unlocked... Assertion failed: (0 && "Unknown SCEV kind!"), function operator(), file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/Analysis/ScalarEvolution.cpp, line 511. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/libdecnumber/decUtility.c:360: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. make[4]: *** [decUtility.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Assertion failed: (0 && "Unknown SCEV kind!"), function operator(), file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/Analysis/ScalarEvolution.cpp, line 511. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/libdecnumber/decNumber.c:5591: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. make[4]: *** [decNumber.o] Error 1 make[3]: *** [all-stage2-libdecnumber] Error 2 make[3]: *** Waiting for unfinished jobs.... llvm-svn: 71165
* Make DwarfWriter::RecordInlinedFnStart more like the other DwarfWriter's ↵Argyrios Kyrtzidis2009-05-071-8/+11
| | | | | | | | | | | methods: -Have it return a label ID -Remove the unused Instruction parameter No functionality change. llvm-svn: 71132
* - Move some debug fields to coincide with how GCC emits them. No functionalityBill Wendling2009-05-061-24/+53
| | | | | | | change. - Reformatting. llvm-svn: 71118
* Do not require variable debug info nodes to have a compile unit.Chris Lattner2009-05-051-20/+24
| | | | | | | For implicit decls like "self" and "_cmd" in ObjC, these decls should not have a location. llvm-svn: 70964
* Restore a comment.Argyrios Kyrtzidis2009-05-041-0/+2
| | | | llvm-svn: 70900
* -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.Argyrios Kyrtzidis2009-05-041-5/+6
| | | | | | | | -Depend on DebugLocs for source line info. (Comes with Regression-Be-Gone(tm)) llvm-svn: 70871
* Revert r70803 for now, it causes a regression.Argyrios Kyrtzidis2009-05-031-0/+7
| | | | llvm-svn: 70811
* -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.Argyrios Kyrtzidis2009-05-031-7/+0
| | | | | | -Depend on DebugLocs for source line info. llvm-svn: 70803
* -Move the DwarfWriter::ValidDebugInfo check to a static ↵Argyrios Kyrtzidis2009-05-031-83/+1
| | | | | | | | DIDescriptor::ValidDebugInfo -Create DebugLocs without the need to have a DwarfWriter around llvm-svn: 70682
* Simplify more code and add timer stuff.Bill Wendling2009-05-011-7/+32
| | | | llvm-svn: 70539
* Simplify more code.Bill Wendling2009-05-011-9/+4
| | | | llvm-svn: 70537
* Simplify some code.Bill Wendling2009-05-011-8/+5
| | | | llvm-svn: 70534
* Fix whitespace. It was confusing me.Bill Wendling2009-05-011-21/+20
| | | | llvm-svn: 70533
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-16/+13
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-3/+3
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-5/+5
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-4/+5
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-4/+4
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Fix Visual Studio 2008 build failure.Devang Patel2009-04-211-3/+3
| | | | | | Patch by Marius Wachtler llvm-svn: 69637
* s/RootDbgScope/FunctionDbgScope/gDevang Patel2009-04-151-13/+13
| | | | llvm-svn: 69216
* Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.Devang Patel2009-04-151-1/+2
| | | | llvm-svn: 69202
* Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine ↵Devang Patel2009-04-151-76/+188
| | | | | | scopes (only in FastISel mode). llvm-svn: 69116
* Right now, Debugging information to encode scopes (DW_TAG_lexical_block) ↵Devang Patel2009-04-131-3/+8
| | | | | | | | relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. llvm-svn: 68973
* Reapply 68847.Devang Patel2009-04-131-3/+127
| | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+3
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-111-124/+3
| | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' llvm-svn: 68863
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-111-3/+124
| | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. llvm-svn: 68847
* Pass in the std::string parameter instead of returning it by value.Bill Wendling2009-04-101-12/+16
| | | | llvm-svn: 68747
* Constify getter methods.Bill Wendling2009-04-101-1/+1
| | | | llvm-svn: 68745
* StringMap<DIE*>::iterator::first() returns a pointer to the first character ofBill Wendling2009-04-091-3/+3
| | | | | | | | the key. This will cause it to create a new std::string, which isn't wanted. Instead, pass back the "const char*". Modify the EmitString() method to take a "const char*". llvm-svn: 68741
* Use a StringMap instead of std::map for storing std::string->DIE* maps. ThisBill Wendling2009-04-091-10/+10
| | | | | | gives a micro speedup in the Dwarf writer. llvm-svn: 68728
* If subprogram type is not tagged as DW_TAG_subroutine_type then use it ↵Devang Patel2009-04-081-2/+3
| | | | | | directly as a return value type. llvm-svn: 68647
* CodeGen still defaults to non-verbose asm, but llc now overrides it and ↵Evan Cheng2009-03-251-4/+4
| | | | | | default to verbose. llvm-svn: 67668
* Do not ignore DW_TAG_class_type!Devang Patel2009-03-251-0/+1
| | | | llvm-svn: 67661
* Oops...I committed too much.Bill Wendling2009-03-131-25/+40
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-40/+25
| | | | llvm-svn: 66866
* Put the assignment back at the top of this method.Bill Wendling2009-03-111-2/+2
| | | | llvm-svn: 66611
* Make ivars private. Other cleanup. No functionality change.Bill Wendling2009-03-101-59/+27
| | | | llvm-svn: 66607
OpenPOWER on IntegriCloud