Commit Graph

1884 Commits

Author SHA1 Message Date
Eric Christopher 19d153261f Formatting.
llvm-svn: 186851
2013-07-22 18:26:15 +00:00
Manman Ren 8bfde8917e Add getModuleFlag(StringRef Key) to query a module flag given Key.
No functionality change.

llvm-svn: 186470
2013-07-16 23:21:16 +00:00
Craig Topper d3a34f81f8 Add 'const' qualifiers to static const char* variables.
llvm-svn: 186371
2013-07-16 01:17:10 +00:00
Eric Christopher 7980b957cc Clarify comments.
llvm-svn: 186297
2013-07-14 22:23:54 +00:00
Eric Christopher 666dc635c7 Collapse temporary variable into call.
llvm-svn: 186295
2013-07-14 21:46:51 +00:00
Hal Finkel 6161b9405f Initialize AsmPrinter::MF in the constructor
MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file
contains only globals (no functions), then we need this to be initialized
because, when encountering an error, lowerConstant() references it.

This should fix the non-deterministic failures of
test/CodeGen/X86/nonconst-static-iv.ll, etc.

llvm-svn: 186068
2013-07-11 06:41:14 +00:00
Eric Christopher 93ebdd727f Fix comment.
llvm-svn: 185984
2013-07-09 23:48:45 +00:00
Adrian Prantl 19942885ba Typo.
llvm-svn: 185971
2013-07-09 21:44:06 +00:00
Adrian Prantl 418d1d1ea9 Reapply an improved version of r180816/180817.
Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.

rdar://problem/13658587

llvm-svn: 185966
2013-07-09 20:28:37 +00:00
Eric Christopher aba20dd603 Update comment to avoid mentioning DbgValues which is an instance
variable later in the class.

llvm-svn: 185866
2013-07-08 21:16:18 +00:00
Manman Ren 7504ed4255 Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.

llvm-svn: 185847
2013-07-08 18:33:29 +00:00
David Blaikie ce1960f936 DebugInfo: Correct comment & re-format a nearby loop
llvm-svn: 185844
2013-07-08 17:51:28 +00:00
David Blaikie ac569a656f DebugInfo: Simplify Address Pool index handling.
Since the pool indexes are necessarily sequential and contiguous, just
insert things in the right place rather than having to sort the sequence
after the fact.

No functionality change.

llvm-svn: 185842
2013-07-08 17:33:10 +00:00
Kai Nacke 42097301f6 Revert: Emit personality function and Dwarf EH data for Win64 SEH.
llvm-svn: 185788
2013-07-08 04:43:23 +00:00
Kai Nacke c947ad2a2d Emit personality function and Dwarf EH data for Win64 SEH.
Obviously the personality function should be emitted as language handler
instead of the hard coded _GCC_specific_handler. The language specific
data must be placed after the unwind information therefore it must not
be emitted into a separate section.

Reviewed by Charles Davis and Nico Rieck.

llvm-svn: 185761
2013-07-06 17:17:31 +00:00
Benjamin Kramer 5dbec7d961 Simplify code. No functionality change.
llvm-svn: 185689
2013-07-05 10:20:57 +00:00
Nico Rieck 316c37407e Initialize object file info before output streamer
r179494 switched to using the object file info to retrieve the default text
section for some MC streamers. It is possible that initializing an MC
streamer can request sections before the object file info is initialized
when the AutoInitSections flag is set on the streamer.

llvm-svn: 185670
2013-07-04 21:37:26 +00:00
Eric Christopher 614a89f5b2 Hoist all of the Entry.getLoc() calls int a single variable.
llvm-svn: 185589
2013-07-03 22:40:21 +00:00
Eric Christopher 25f0642afd Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses.

llvm-svn: 185588
2013-07-03 22:40:18 +00:00
Eric Christopher 270a12cff3 Elaborate on comment.
llvm-svn: 185586
2013-07-03 21:37:03 +00:00
Eric Christopher dd7b4615d1 Add names to the header file since they help in documenting the API
(and for consistency).

llvm-svn: 185585
2013-07-03 21:23:59 +00:00
Eric Christopher 18cf0610ef Move typedefs inside the class that they belong to.
llvm-svn: 185573
2013-07-03 20:36:36 +00:00
Eric Christopher 98341b8d63 Remove unused field.
llvm-svn: 185523
2013-07-03 08:26:07 +00:00
Eric Christopher c665af772a Constify a few functions.
llvm-svn: 185520
2013-07-03 08:13:55 +00:00
Craig Topper 2b4a201ba6 Introduce some typedefs for DenseMaps containing SmallVectors so the vector size doesn't have to repeated when creating iterators for the DenseMap.
llvm-svn: 185508
2013-07-03 04:40:27 +00:00
Craig Topper 977e9cd9c6 Use SmallVectorImpl& instead of SmallVector& to avoid needlessly respecifying the small vector size.
llvm-svn: 185505
2013-07-03 04:24:43 +00:00
Craig Topper d8e436550a Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185504
2013-07-03 04:17:25 +00:00
Eric Christopher f94eb2bb26 Avoid doing a lot of computation when we have multiple ranges and
avoid adding information for the debug_inlined section when it isn't
going to be emitted anyhow.

llvm-svn: 185500
2013-07-03 02:23:53 +00:00
Eric Christopher dc42ea8fbd Move iterator to where it's used and update comments.
llvm-svn: 185498
2013-07-03 01:57:28 +00:00
Eric Christopher 070bf1685b Move instance variable before experimental section.
llvm-svn: 185497
2013-07-03 01:57:26 +00:00
Eric Christopher 808fd7bb54 Fix typo to make grep for DW_AT_comp_dir work without case-insensitive
grep.

llvm-svn: 185496
2013-07-03 01:57:23 +00:00
Eric Christopher 95a7d49ecd Remove unnecessary forward declare.
llvm-svn: 185495
2013-07-03 01:57:20 +00:00
Eric Christopher c1110838d3 Add a helpful comment.
llvm-svn: 185492
2013-07-03 01:22:29 +00:00
Eric Christopher 78fcf490d8 addConstantValue, addConstantFPValue never returned anything but
true, so remove the return value and propagate accordingly.

llvm-svn: 185490
2013-07-03 01:08:30 +00:00
Manman Ren ac8062bb72 Debug Info: use module flag to set up Dwarf version.
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.

TODO: turn on/off features depending on the Dwarf version.
llvm-svn: 185484
2013-07-02 23:40:10 +00:00
Eric Christopher 9046f94271 Fix comment.
llvm-svn: 185480
2013-07-02 21:36:07 +00:00
Ulrich Weigand 2b6fc8d613 [DebugInfo] Allow getDebugThreadLocalSymbol to return MCExpr
This allows getDebugThreadLocalSymbol to return a generic MCExpr
instead of just a MCSymbolRefExpr.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.

llvm-svn: 185460
2013-07-02 18:47:09 +00:00
Ulrich Weigand 8b3d22664e [DebugInfo] Hold generic MCExpr in AddrPool
This changes the AddrPool infrastructure to enable it to hold
generic MCExpr expressions, not just MCSymbolRefExpr.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.

llvm-svn: 185459
2013-07-02 18:46:46 +00:00
Ulrich Weigand 396ba8b495 [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr values
This partially reverts r185202 and restores DIELabel to hold plain
MCSymbol references.  Instead, we add a new subclass DIEExpr of
DIEValue that can hold generic MCExpr references.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.

llvm-svn: 185458
2013-07-02 18:46:26 +00:00
Rafael Espindola 64e1af8eb9 Remove address spaces from MC.
This is dead code since PIC16 was removed in 2010. The result was an odd mix,
where some parts would carefully pass it along and others would assert it was
zero (most of the object streamer for example).

llvm-svn: 185436
2013-07-02 15:49:13 +00:00
David Blaikie 8466ca86fe PR14728: DebugInfo: TLS variables with -gsplit-dwarf
llvm-svn: 185398
2013-07-01 23:55:52 +00:00
David Blaikie f269497068 DebugInfo: PR14728: TLS support
Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).

Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.

llvm-svn: 185203
2013-06-28 20:05:11 +00:00
David Blaikie f3cd7c5115 DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.

llvm-svn: 185202
2013-06-28 20:05:04 +00:00
David Blaikie a67de2b1bc DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'
llvm-svn: 185190
2013-06-28 18:55:13 +00:00
David Blaikie b8ef7851dc DebugInfo: Simplify the AddressPool representation
llvm-svn: 185189
2013-06-28 18:47:19 +00:00
David Blaikie dea547b94d DebugInfo: constify the AddressPool MCSymbol pointers
llvm-svn: 185188
2013-06-28 18:47:14 +00:00
Manman Ren aed30fa3de Remove unused code. No functionality change.
llvm-svn: 184866
2013-06-25 18:49:55 +00:00
Eric Christopher 5fdd68e596 80-column and tab character fixes.
llvm-svn: 184792
2013-06-24 23:20:02 +00:00
Eric Christopher 40b6bf6f46 Formatting.
llvm-svn: 184788
2013-06-24 21:34:55 +00:00
Eric Christopher bf2d23c0d7 Use const references instead of pointers to references that are
never modified. No functional change.

llvm-svn: 184781
2013-06-24 21:07:27 +00:00