Commit Graph

527 Commits

Author SHA1 Message Date
Dan Gohman
29cbade25a Target-independent support for TargetFlags on BlockAddress operands,
and support for blockaddresses in x86-32 PIC mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 23:18:13 +00:00
Devang Patel
017d121c59 Do not hold on to a map slot while new entries may be inserted into the map.
Use ValueMap, instead of std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 21:37:22 +00:00
Devang Patel
1f37b5b3af There is no need to emit source location info for DW_TAG_pointer_type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 21:05:37 +00:00
Bill Wendling
fb7634f1c7 Reverting the EH table patches.
$ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89279 into '.':
U    lib/CodeGen/AsmPrinter/DwarfException.cpp
U    lib/Target/TargetLoweringObjectFile.cpp
$ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89270 into '.':
G    lib/CodeGen/AsmPrinter/DwarfException.cpp
G    lib/Target/TargetLoweringObjectFile.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:21:09 +00:00
Bill Wendling
01c69374b5 The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
exception table than DataRel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 00:09:14 +00:00
Bill Wendling
ec04458551 Attempt #2:
Place the EH table in the __TEXT section on MachO. It saves space.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18 23:18:46 +00:00
Nick Lewycky
381afae68f Remove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 09:17:08 +00:00
Nick Lewycky
5f9843f68f Revert r88939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 08:11:44 +00:00
Bill Wendling
7378b1bd00 Refactor the code that creates the "dot-label" difference. This may be used in
more than one place. No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 01:23:53 +00:00
Devang Patel
f76a3d634f Revert r88939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 21:53:40 +00:00
Devang Patel
270a97430d Add VISIBILITY_HIDDEN marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 19:20:48 +00:00
David Greene
ddff941357 Support spill comments.
Have the asm printer emit a comment if an instruction is a spill or
reload and have the spiller mark copies it introdues so the asm printer
can also annotate those.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 15:12:23 +00:00
Sanjiv Gupta
9a501cf19d revert 88761 as it fails builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 07:22:25 +00:00
Sanjiv Gupta
6fb01a7750 Fix debug info crashes for PIC16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 06:19:49 +00:00
Dan Gohman
24f8e29b4e Use .data() instead of .c_str() when nul-termination is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:55:31 +00:00
David Greene
1924aabf99 Move DebugInfo checks into EmitComments and remove them from
target-specific AsmPrinters.  Not all comments need DebugInfo.

Re-enable the line numbers comment test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:34:57 +00:00
Devang Patel
3fb6bd690a Ignore nameless variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 02:25:26 +00:00
Bill Wendling
ecc260e403 Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 23:13:08 +00:00
Bill Wendling
ed060dcb5c Refactor code that checks if it's a call to a "nounwind" function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:59:20 +00:00
Bill Wendling
ac18929801 If there's more than one function operand to a call instruction, be conservative
and don't assume that the call doesn't throw. It would be nice if there were a
way to determine which is the callee and which is a parameter. In practice, the
architecture we care about normally only have one operand for a call instruction
(x86 and arm).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:51:53 +00:00
Devang Patel
70d75ca310 "Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 19:02:56 +00:00
Bill Wendling
73b5551058 Don't mark a call as potentially throwing if the function it's calling has the
"nounwind" attribute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 23:17:02 +00:00
Devang Patel
3380cc5307 If doesSupportDebugInformation() is false then do not try to emit dwarf debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 19:55:08 +00:00
Daniel Dunbar
c032679d3e Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 03:09:50 +00:00
Bill Wendling
ee161a6824 Make sure that the exception handling data has the same visibility as the
function it's generated for.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 01:24:59 +00:00
Devang Patel
39ae3ff6d1 Do not assume first function scope seen represents current function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 00:31:36 +00:00
Devang Patel
2f105c6e18 While creating DbgScopes, do not forget parent scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 00:18:40 +00:00
Devang Patel
fb0ee43438 Ignore variable if scope info is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 23:20:04 +00:00
Devang Patel
53bb5c95af Implement support to debug inlined functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 23:06:00 +00:00
Jeffrey Yasskin
81cf432569 Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.

The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.

Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.

Patch by Victor Zverovich!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 01:02:17 +00:00
Bob Wilson
c0ef244499 Fix comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 22:38:38 +00:00
Devang Patel
84c73e9b82 Do not bother to emit debug info for nameless global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 17:58:12 +00:00
Devang Patel
465c3bed16 Do not try to emit debug info entry for dead global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 01:30:04 +00:00
Dan Gohman
40c57860da Factor out the printing of the leading tab into printInlineAsm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 00:04:54 +00:00
Dan Gohman
568a3be545 Fix the label name generation for address-taken labels to avoid potential
problems with name collisions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 23:14:35 +00:00
Devang Patel
61ecbd196c While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
This improves bitfield support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 23:48:00 +00:00
Devang Patel
33db508283 Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 22:06:12 +00:00
Devang Patel
c416d3b25d Array element size does not match array size but array is not a bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:37:40 +00:00
Jakob Stoklund Olesen
ad68264f59 Print out an informative comment for KILL instructions.
The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output.

With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 19:24:37 +00:00
Devang Patel
1b845976d0 Ignore unnamed variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 18:30:27 +00:00
Jeffrey Yasskin
36d52bf4df Fix a funky "declared with greater visibility than the type of its field"
warning from gcc by removing VISIBILITY_HIDDEN attributes.  


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 06:29:36 +00:00
Dan Gohman
b953c944b6 Fix a missing newline in the dwarf output code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 20:59:09 +00:00
Dan Gohman
6a55e62996 Add support for BlockAddress static initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:45:18 +00:00
Dan Gohman
6ae5b32e48 Add a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:38:20 +00:00
Dan Gohman
b1cac33856 Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:34:35 +00:00
Dan Gohman
8c2b52552c Initial target-independent CodeGen support for BlockAddresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85556 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:27:03 +00:00
Devang Patel
bdf45cbe15 Do not held on to DenseMap slot accross map insertion. The insertion may cause the map to grow rending the slot invalid.
Use this opportunity to use ValueMap instead of DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 20:47:17 +00:00
Nick Lewycky
f5a86f45e7 Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 06:57:41 +00:00
Nick Lewycky
6726b6d75a Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 06:33:48 +00:00
Bill Wendling
48dc29ef91 Tidying up some code and comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 20:48:59 +00:00