Jakob Stoklund Olesen
9f7beb42a8
Assert on bad jump tables.
...
llvm-svn: 125225
2011-02-09 21:52:06 +00:00
Devang Patel
930b4b16a1
Merge .debug_loc entries whenever possible to reduce debug_loc size.
...
llvm-svn: 124904
2011-02-04 22:57:18 +00:00
Devang Patel
71b1fadf20
Add support to describe template value parameter in debug info.
...
llvm-svn: 124755
2011-02-02 22:35:53 +00:00
Devang Patel
89455dc7cd
Add support to describe template parameter type in debug info.
...
llvm-svn: 124752
2011-02-02 21:38:25 +00:00
Anton Korobeynikov
c608d67509
Clarify the LSDASection NULL check
...
llvm-svn: 124569
2011-01-30 22:07:31 +00:00
Rafael Espindola
9bc19ee478
Print the visibility of declarations.
...
llvm-svn: 124468
2011-01-28 03:20:10 +00:00
Anton Korobeynikov
febd3ec17f
Support printing exception section into the current one. This is the case when LSDASection is blank
...
llvm-svn: 124150
2011-01-24 22:38:40 +00:00
Devang Patel
729c5e59af
Fix debug info for merged global.
...
llvm-svn: 123862
2011-01-20 00:02:16 +00:00
Devang Patel
574e10fa1e
Fix register address expression. Patch by Ken Dyck.
...
llvm-svn: 123856
2011-01-19 23:04:47 +00:00
Ted Kremenek
c9d2425c5a
Update CMake build.
...
llvm-svn: 123491
2011-01-14 22:58:11 +00:00
Anton Korobeynikov
1f9df99db1
Add a possibility to switch between CFI directives- and table-based frame description emission. Currently all the backends use table-based stuff.
...
llvm-svn: 123476
2011-01-14 21:58:08 +00:00
Anton Korobeynikov
ef11a77938
Add CFI directives-based frame information emission. Not hooked yet.
...
llvm-svn: 123474
2011-01-14 21:57:53 +00:00
Anton Korobeynikov
e53322ef91
Split stuff as a preparation for CFI directives-based frame information emission
...
llvm-svn: 123473
2011-01-14 21:57:45 +00:00
Devang Patel
7b5cf4eafc
Appropriately truncate debug info range in dwarf output.
...
This is not yet completely enabled.
llvm-svn: 123274
2011-01-11 21:42:10 +00:00
Anton Korobeynikov
cf5967630b
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
...
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Evan Cheng
aa16fd02ad
Do not model all INLINEASM instructions as having unmodelled side effects.
...
Instead encode llvm IR level property "HasSideEffects" in an operand (shared
with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
the operand when the instruction is an INLINEASM.
This allows memory instructions to be moved around INLINEASM instructions.
llvm-svn: 123044
2011-01-07 23:50:32 +00:00
Devang Patel
d3ba97949a
Speculatively revert r123032.
...
llvm-svn: 123039
2011-01-07 22:33:41 +00:00
Devang Patel
a52d6c216d
Appropriately truncate debug info range in dwarf output.
...
Enable live debug variables pass.
llvm-svn: 123032
2011-01-07 21:30:41 +00:00
Devang Patel
7cb0e7c2ef
Emit 128 bit constant.
...
This fixes PR 8913 crash.
llvm-svn: 122971
2011-01-06 21:39:25 +00:00
Chris Lattner
e396e846b4
split dom frontier handling stuff out to its own DominanceFrontier header,
...
so that Dominators.h is *just* domtree. Also prune #includes a bit.
llvm-svn: 122714
2011-01-02 22:09:33 +00:00
Nick Lewycky
c85935836b
Add missing standard headers. Patch by Joerg Sonnenberger!
...
llvm-svn: 122193
2010-12-19 20:43:38 +00:00
Chris Lattner
324f849088
remove the verbose-asm "constant pool double" comments that we were printing
...
for each constant pool entry. Using WriteTypeSymbolic here takes time
proportional to the size of the module, for each constant pool entry.
This speeds up -verbose-asm llc on 252.eon (a random testcase at my disposal)
from 4.4s to 2.137s. llc takes 2.11s with asm-verbose off, so this is now a
pretty reasonable cost for verbose comments.
llvm-svn: 121691
2010-12-13 07:35:47 +00:00
Devang Patel
b3e0d80b1f
DW_FORM_data1 may not provide sufficient room for vtable index, use _udata instead.
...
This fixes radar 8730409.
llvm-svn: 121323
2010-12-09 00:10:40 +00:00
Devang Patel
12459bc442
Undefined value in reg 0 may need a marker to identify end of source range.
...
This will be used to truncate live range of DBG_VALUE instruction by register allocator and friends.
llvm-svn: 121061
2010-12-06 22:48:22 +00:00
Rafael Espindola
3e954d16f4
Second try at making direct object emission produce the same results
...
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.
llvm-svn: 121006
2010-12-06 17:27:56 +00:00
Rafael Espindola
4ec917db9b
Revert previous two patches while I try to find out how to make both
...
linux and darwin assemblers happy :-(
llvm-svn: 121004
2010-12-06 15:35:15 +00:00
Rafael Espindola
3dc2b4cba7
Add an EmitAbsValue helper method and use it in cases where we want to be sure
...
that no relocations are used (on MochO).
Fixes llc producing different output from llc + llvm-mc.
llvm-svn: 121000
2010-12-06 14:53:14 +00:00
Michael J. Spencer
d5ec932c3a
Merge System into Support.
...
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Anton Korobeynikov
ff8c52bd51
Move some more hooks to TargetFrameInfo
...
llvm-svn: 119904
2010-11-20 15:59:32 +00:00
Anton Korobeynikov
ce676f96e1
Move getInitialFrameState() to TargetFrameInfo
...
llvm-svn: 119754
2010-11-18 23:25:52 +00:00
Rafael Espindola
93a07b464e
Change CodeGen to use .loc directives. This produces a lot more readable output
...
and testing is easier. A good example is the unknown-location.ll test that
now can just look for ".loc 1 0 0". We also don't use a DW_LNE_set_address for
every address change anymore.
llvm-svn: 119613
2010-11-18 02:04:25 +00:00
Chris Lattner
5faff99d84
With the newly simplified SourceMgr interfaces and the generalized
...
SrcMgrDiagHandler, we can improve clang diagnostics for inline asm:
instead of reporting them on a source line of the original line,
we can report it on the correct line wherever the string literal came
from. For something like this:
void foo() {
asm("push %rax\n"
".code32\n");
}
we used to get this: (note that the line in t.c isn't helpful)
t.c:4:7: error: warning: ignoring directive for now
asm("push %rax\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^
now we get:
t.c:5:8: error: warning: ignoring directive for now
".code32\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^
Note that we're pointing to line 5 properly now.
llvm-svn: 119488
2010-11-17 08:20:42 +00:00
Chris Lattner
99b8654169
now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
...
cookie argument to the SourceMgr diagnostic stuff. This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling
definition, increasing type safety and cleaning things up.
llvm-svn: 119486
2010-11-17 08:13:01 +00:00
Chris Lattner
2cc6515616
rearrange how the handler in SourceMgr is installed, eliminating the use of
...
the cookie argument to setDiagHandler
llvm-svn: 119483
2010-11-17 08:03:32 +00:00
Chris Lattner
003e3db609
refactor the interface to EmitInlineAsm a bit, no functionality change.
...
llvm-svn: 119482
2010-11-17 07:53:40 +00:00
Devang Patel
3dd764feda
Remove DW_AT_start_scope support. It is incomplete and superseeded by location entries support.
...
llvm-svn: 118940
2010-11-12 23:20:42 +00:00
Devang Patel
5520a6fc97
Take care of special characters while creating named MDNode name to hold function specific local variable's info.
...
This fixes radar 8653152. I am checking in testcase as a separate check-in.
llvm-svn: 118726
2010-11-10 22:19:21 +00:00
Rafael Espindola
3f4a79b243
Add 118023 back, but with proper spelling for .uleb128/.sleb128.
...
llvm-svn: 118254
2010-11-04 18:17:08 +00:00
Rafael Espindola
618eefb925
Revert previous patch. Some targets don't support uleb and say
...
they do :-(
llvm-svn: 118250
2010-11-04 17:04:24 +00:00
Rafael Espindola
afb48cd73d
MCize.
...
llvm-svn: 118249
2010-11-04 16:32:18 +00:00
Devang Patel
37fa9bb66a
Simplify.
...
llvm-svn: 118027
2010-11-02 17:37:00 +00:00
Devang Patel
bf9c3c8947
Ignore empty blocks.
...
llvm-svn: 117615
2010-10-28 22:11:59 +00:00
Devang Patel
a496603faf
Do not work too hard to find type's file info. There is a special field to record file info.
...
llvm-svn: 117588
2010-10-28 19:50:08 +00:00
Devang Patel
0e43a2d84f
Technically DIFile scope should also be handled here.
...
llvm-svn: 117563
2010-10-28 17:30:52 +00:00
Devang Patel
e544bb3842
s/beginScope/beginInstruction/g
...
s/endScope/endInstruction/g
llvm-svn: 117376
2010-10-26 17:49:02 +00:00
Nick Lewycky
f7dddd658f
For statistics that are only used in functions declared in !NDEBUG, wrap the
...
declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by
Matt Beaumont-Gay!
llvm-svn: 117345
2010-10-26 00:51:57 +00:00
Devang Patel
24a6b791b6
Add simple counter to count no. of basic blocks without any line number information. At -O0, these basic block coule cause less than optimial debugging experience.
...
llvm-svn: 117307
2010-10-25 20:45:32 +00:00
Devang Patel
3090b0ebf1
Line number 0 indicates there is no source line/file name info available for this construct.
...
llvm-svn: 116061
2010-10-08 17:18:54 +00:00
Devang Patel
ee23e6ea23
Provie a clearner interface so that FE can decide whether a function has prototype or not.
...
llvm-svn: 115988
2010-10-07 22:03:01 +00:00
Devang Patel
eeb0b64560
Add support for DW_TAG_unspecified_parameters.
...
llvm-svn: 115833
2010-10-06 20:50:40 +00:00
Devang Patel
f612c0b23e
Add support to let FE mark explict methods as explict in debug info.
...
llvm-svn: 115378
2010-10-01 23:31:40 +00:00
Jim Grosbach
77531e2727
Nuke trailing whitespace.
...
llvm-svn: 115377
2010-10-01 23:29:12 +00:00
Devang Patel
41e2a94595
Let FE mark a variable as artificial variable.
...
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Devang Patel
f600d9f0ed
Add support to let FE encode method access specifier.
...
llvm-svn: 115089
2010-09-29 21:44:16 +00:00
Devang Patel
fd6665e8aa
Assign DW_ACCESS_public accessibility attribute to members by default.
...
llvm-svn: 115067
2010-09-29 19:08:08 +00:00
Oscar Fuentes
eb27a44982
Removed a bunch of unnecessary target_link_libraries.
...
llvm-svn: 114999
2010-09-28 22:39:14 +00:00
Devang Patel
e1f502ee26
Provide an interface to let FEs anchor debug info for types.
...
llvm-svn: 114969
2010-09-28 18:08:20 +00:00
Devang Patel
0a414c918a
Remove dead argument.
...
llvm-svn: 114920
2010-09-27 23:15:27 +00:00
Chris Lattner
0ebcc18dec
the latest assembler that runs on powerpc 10.4 machines doesn't
...
support aligned comm. Detect when compiling for 10.4 and don't
emit an alignment for comm. THis will hopefully fix PR8198.
llvm-svn: 114817
2010-09-27 06:44:54 +00:00
Devang Patel
8914755c40
Use DW_OP_fbreg when offset is based on frame register.
...
llvm-svn: 114585
2010-09-22 21:10:38 +00:00
Devang Patel
99777d1d07
If FE forgot to provide a file name (usually it uses "stdin" as name in such situation) then make one up to ensure that debug info is not malformed.
...
llvm-svn: 114119
2010-09-16 20:57:49 +00:00
Michael J. Spencer
90f807fda5
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
...
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Benjamin Kramer
9859d9eee4
Fix linux/msvc build, move include.
...
llvm-svn: 113776
2010-09-13 20:04:49 +00:00
Michael J. Spencer
98ad3f2ea7
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
...
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Chris Lattner
6c08c3b321
add a comment about where this should eventually move.
...
llvm-svn: 113117
2010-09-05 20:33:40 +00:00
Devang Patel
e431686861
There is no need to use .set here.
...
Thanks Chris!
llvm-svn: 112900
2010-09-02 23:01:10 +00:00
Devang Patel
bbbd35d042
Fix .debug_range for linux. Patch by Krister Wombell.
...
llvm-svn: 112830
2010-09-02 16:43:44 +00:00
Devang Patel
9e8ee9242f
Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
...
This patch was developed on top of original patch by Artur Pietrek.
llvm-svn: 112678
2010-08-31 23:50:19 +00:00
Devang Patel
46570e6783
Reapply r112623. Included additional check for unused byval argument.
...
llvm-svn: 112659
2010-08-31 22:22:42 +00:00
Devang Patel
b94251aea0
Revert r112623. It is causing self host build failures.
...
llvm-svn: 112631
2010-08-31 19:41:03 +00:00
Devang Patel
414cbc940a
Remember byval argument's frame index during argument lowering and use this info to emit debug info.
...
Fixes Radar 8367011.
llvm-svn: 112623
2010-08-31 18:50:09 +00:00
Devang Patel
2eeab37306
Simplify.
...
llvm-svn: 112583
2010-08-31 06:11:28 +00:00
Chris Lattner
ecf276b787
remove unions from LLVM IR. They are severely buggy and not
...
being actively maintained, improved, or extended.
llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Devang Patel
9024c19242
Revert r107202. It is not adding any value.
...
llvm-svn: 111870
2010-08-24 00:06:12 +00:00
Devang Patel
cf6c6b4038
Handle qualified constants that are directly folded by FE.
...
PR 7920.
llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Bill Wendling
163660135e
Create the new linker type "linker_private_weak_def_auto".
...
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility. The symbols are removed by the linker from the final linked image
(executable or dynamic library).
llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Bill Wendling
a055bae65f
Improve whitespace.
...
llvm-svn: 111384
2010-08-18 18:41:13 +00:00
Eli Friedman
fb8b05726f
Until uleb/sleb are MC-ized, add a hack to make them work with ELF object
...
emission.
llvm-svn: 111177
2010-08-16 20:08:40 +00:00
Devang Patel
9b12559c4f
Do not forget debug info for enums. Use named mdnode to keep track of these types.
...
llvm-svn: 110712
2010-08-10 20:01:20 +00:00
Devang Patel
84f48b5483
Handle TAG_constant for integers.
...
llvm-svn: 110656
2010-08-10 07:11:13 +00:00
Devang Patel
8edc7575a4
Simplify.
...
llvm-svn: 110653
2010-08-10 04:12:17 +00:00
Devang Patel
191ed4c41d
Drop "const". It does not add value here.
...
llvm-svn: 110652
2010-08-10 04:09:06 +00:00
Devang Patel
ef61383343
Do not include file static variable in pubnames list.
...
Refactor and simplify code to avoid redundant checks.
llvm-svn: 110642
2010-08-10 01:37:23 +00:00
Devang Patel
c5f885e228
Undo accidental commit.
...
llvm-svn: 110623
2010-08-09 23:28:52 +00:00
Devang Patel
4ccbd73f20
Simplify. Avoid redundant checks.
...
llvm-svn: 110621
2010-08-09 23:26:06 +00:00
Devang Patel
8d0c79694e
Refactor.
...
llvm-svn: 110607
2010-08-09 21:39:24 +00:00
Devang Patel
2d9b975304
Refactoring. Update DbgVarible to handle queries itself.
...
llvm-svn: 110600
2010-08-09 21:01:39 +00:00
Devang Patel
9110ec63bc
It is ok, and convenient, to pass descriptors by value.
...
llvm-svn: 110590
2010-08-09 20:20:05 +00:00
Devang Patel
409f683e17
Rename a method.
...
llvm-svn: 110586
2010-08-09 18:51:29 +00:00
Owen Anderson
f2fea95f2f
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Devang Patel
4c36d66bde
Use location entry only of the location described by DBG_VALUE is valid.
...
llvm-svn: 110255
2010-08-04 22:07:27 +00:00
Devang Patel
35e3dd45c0
Fix typo in comment.
...
llvm-svn: 110244
2010-08-04 20:32:36 +00:00
Dan Gohman
670b397ecc
Change this llvm_unreachable to report_fatal_error, since it can
...
be triggered by valid, if dubious, IR.
llvm-svn: 110240
2010-08-04 18:51:09 +00:00
Devang Patel
eb7cff69c8
If a variable is spilled by code generator then use DW_OP_fbreg to describe its location on stack.
...
llvm-svn: 110234
2010-08-04 18:40:52 +00:00
Devang Patel
8a18e29b50
Free DbgScope created for dead functions.
...
llvm-svn: 110045
2010-08-02 17:32:15 +00:00
Bill Wendling
36376df573
Reference the personalities. Don't copy them into a new vector.
...
llvm-svn: 109966
2010-08-01 01:34:21 +00:00
Devang Patel
38a7221118
It is FE's responsibility to emit proper directory name.
...
llvm-svn: 109538
2010-07-27 20:51:15 +00:00
Devang Patel
df9f5bf991
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
...
llvm-svn: 109302
2010-07-24 00:53:22 +00:00
Devang Patel
7049c83125
Revert r109262.
...
llvm-svn: 109285
2010-07-23 23:04:41 +00:00
Devang Patel
01d5937192
IF directory name is empty then try to extract one using absolute file name.
...
llvm-svn: 109262
2010-07-23 20:36:13 +00:00
Jim Grosbach
489d758ea8
For ARM/Darwin, add a dwarf entry indicating whether a function is arm or thumb
...
rdar://8202967
llvm-svn: 109057
2010-07-21 23:03:52 +00:00
Jim Grosbach
6b4f9f4c14
80 column and trailing whitespace cleanup
...
llvm-svn: 109037
2010-07-21 21:21:52 +00:00
Dan Gohman
fc3ee085a0
Disallow null as a named metadata operand.
...
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.
One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).
llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Stuart Hastings
587ed4918c
Correct line info for declarations/definitions. Radar 8063111.
...
llvm-svn: 108784
2010-07-19 23:56:30 +00:00
Devang Patel
e401bfe168
Fix PR 7662.
...
Do not try to insert local variable info to a DIE used for function declaration.
llvm-svn: 108731
2010-07-19 17:53:55 +00:00
Daniel Dunbar
150021561c
Target: Give the TargetAsmParser access to the TargetMachine.
...
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.
llvm-svn: 108664
2010-07-19 00:33:49 +00:00
Daniel Dunbar
4dc7255379
MC: Move several clients to using AsmParser constructor function.
...
llvm-svn: 108645
2010-07-18 18:31:33 +00:00
Bill Wendling
72c0967ce7
Use isPrologLabel() instead of checking the opcode directly.
...
llvm-svn: 108628
2010-07-17 19:18:44 +00:00
Bill Wendling
85d6ed81b7
Consider this function:
...
void foo() { __builtin_unreachable(); }
It will output the following on Darwin X86:
_func1:
Leh_func_begin0:
pushq %rbp
Ltmp0:
movq %rsp, %rbp
Ltmp1:
Leh_func_end0:
This prolog adds a new Call Frame Information (CFI) row to the FDE with an
address that is not within the address range of the code it describes -- part is
equal to the end of the function -- and therefore results in an invalid EH
frame. If we emit a nop in this situation, then the CFI row is now within the
address range.
llvm-svn: 108568
2010-07-16 22:51:10 +00:00
Bill Wendling
e2833a21c2
Rename DBG_LABEL PROLOG_LABEL, because it's only used during prolog emission and
...
thus is a much more meaningful name.
llvm-svn: 108563
2010-07-16 22:20:36 +00:00
Jakob Stoklund Olesen
bcee53a2b8
Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.
...
TII::isMoveInstr is going tobe completely removed.
llvm-svn: 108507
2010-07-16 04:45:42 +00:00
Chris Lattner
01c2381bd7
a more graceful fix for test/Other/inline-asm-newline-terminator.ll,
...
follow on to r103765
llvm-svn: 108390
2010-07-15 00:37:34 +00:00
Stuart Hastings
a3999081cf
Reverting r107918 and r107919. Radar 8063111.
...
llvm-svn: 107930
2010-07-08 23:25:39 +00:00
Devang Patel
2abdcdfb40
Relax assertion. In optimized code, it is possible that first instruction is coming from a inlined function.
...
This fixes PR7596 .
llvm-svn: 107923
2010-07-08 22:39:20 +00:00
Stuart Hastings
b70d4e06e3
Fix decl/def debug info for template functions. Radar 8063111.
...
llvm-svn: 107919
2010-07-08 22:28:59 +00:00
Devang Patel
69b391b5b1
Reuse DIEInteger for 1. This is frequently used while emitting an attribute using dwarf::DW_FORM_flag form.
...
llvm-svn: 107903
2010-07-08 20:10:35 +00:00
Devang Patel
3d7c71dbbb
One MDNode may be used to create regular DIE as well as abstract DIE.
...
Keep track of abstract subprogram DIEs.
llvm-svn: 107822
2010-07-07 22:20:57 +00:00
Devang Patel
3e07e4eb8b
Rename couple of maps.
...
llvm-svn: 107810
2010-07-07 20:49:57 +00:00
Devang Patel
6aef3e8bb3
80 cols.
...
llvm-svn: 107807
2010-07-07 20:12:52 +00:00
Dale Johannesen
df6db93a4d
Propagate the AlignStack bit in InlineAsm's to the
...
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not. gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks. There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it. PR 5125. Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now. I'm not making it any
worse. If anyone is inspired I think you can find all
the right places from this patch.
llvm-svn: 107506
2010-07-02 20:16:09 +00:00
Bill Wendling
f21e2fe2b9
Make the "linker_private" linkage type emit a non-weak symbol to the file. It
...
will still be stripped by the linker when it generates the final image.
llvm-svn: 107440
2010-07-01 22:38:24 +00:00
Bill Wendling
90b6422f2f
Implement the "linker_private_weak" linkage type. This will be used for
...
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.
For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
Currently only supported on Darwin platforms.
llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Devang Patel
606a8f3fbf
Do not require line number entry for undefined local variable.
...
This is a regression caused by r106792 and caught by gdb testsuite.
llvm-svn: 107430
2010-07-01 21:38:08 +00:00
Daniel Dunbar
37b4089fbf
MC: Pass the target instance to the AsmParser constructor.
...
llvm-svn: 107426
2010-07-01 20:41:56 +00:00
Mikhail Glushenkov
0163e1e289
Trailing whitespace.
...
llvm-svn: 107360
2010-07-01 01:00:22 +00:00
Devang Patel
00ee7ba38c
Do not construct DIE for already processed MDNode.
...
llvm-svn: 107237
2010-06-30 01:40:11 +00:00
Devang Patel
93e5e9bd19
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
...
llvm-svn: 107228
2010-06-30 00:11:08 +00:00
Bill Wendling
59ef9bcc6d
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Devang Patel
6d7cc07644
Print InlinedAt location.
...
llvm-svn: 107214
2010-06-29 22:29:15 +00:00
Bill Wendling
05a4c0b1f2
Introducing the "linker_weak" linkage type. This will be used for Objective-C
...
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Devang Patel
8052c941ca
Do not hardcode DW_AT_stmt_list value.
...
Inspired by Artur Pietrek.
llvm-svn: 107202
2010-06-29 20:17:53 +00:00
Devang Patel
2c43f47ccc
Use DW_FORM_addr for DW_AT_entry_pc.
...
llvm-svn: 107085
2010-06-28 22:22:47 +00:00
Devang Patel
229053c609
Include inlined function in list of processed subprograms.
...
llvm-svn: 107065
2010-06-28 20:53:04 +00:00
Devang Patel
dffbf36af7
Preserve deleted function's local variables' debug info.
...
Radar 8122864.
llvm-svn: 107027
2010-06-28 18:25:03 +00:00
Devang Patel
1929457a0f
Remove dead code.
...
llvm-svn: 106990
2010-06-28 05:59:13 +00:00
Devang Patel
b5b193fb87
Collect debug info for optimized variables of inlined functions.
...
llvm-svn: 106895
2010-06-25 22:07:34 +00:00
Devang Patel
af1d4eede5
DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
...
Radar 8122864.
llvm-svn: 106792
2010-06-24 21:51:19 +00:00
Devang Patel
f50b6147ad
Use single interface, using twine, to get named metadata.
...
getNamedMetadata().
llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Devang Patel
38d9ee4e35
Discard special LLVM prefix from linkage name.
...
llvm-svn: 106516
2010-06-22 01:06:05 +00:00
Devang Patel
dee41b010a
Do not rely on Twine temporaries to survive.
...
llvm-svn: 106515
2010-06-22 01:01:58 +00:00
Dan Gohman
6c6e9a45ff
Give NamedRegionTimer an Enabled flag, allowing all its clients to
...
switch from this:
if (TimePassesIsEnabled) {
NamedRegionTimer T(Name, GroupName);
do_something();
} else {
do_something(); // duplicate the code, this time without a timer!
}
to this:
{
NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled);
do_something();
}
llvm-svn: 106285
2010-06-18 15:56:31 +00:00
Devang Patel
3282324020
Use separate named MDNode to hold each function's local variable info.
...
This speeds up local variable handling in DwarfDebug.
llvm-svn: 106075
2010-06-16 00:53:55 +00:00
Eric Christopher
db2cef56c9
Don't emit the linkage for initializer label for mach-o tls.
...
llvm-svn: 106073
2010-06-16 00:27:30 +00:00
Stuart Hastings
5dd588e7d9
Added a comment.
...
llvm-svn: 106063
2010-06-15 23:06:30 +00:00
Stuart Hastings
f9ef9ff3d6
Support for nested functions/classes in debug output. (Again.) Radar 7424645.
...
llvm-svn: 105828
2010-06-11 20:08:44 +00:00
Stuart Hastings
37ed2a9663
Revert 105492 & 105493 due to a testcase regression. Radar 7424645.
...
llvm-svn: 105511
2010-06-05 00:39:29 +00:00
Stuart Hastings
eb78f8db98
Support for nested functions/classes in debug output. Radar 7424645.
...
llvm-svn: 105492
2010-06-04 22:36:03 +00:00
Eric Christopher
00f399e90a
One underscore, not two.
...
llvm-svn: 105379
2010-06-03 04:02:59 +00:00
Devang Patel
5fb0590e9c
Skip identical instruction while calculating DBG_VALUE range.
...
llvm-svn: 105340
2010-06-02 19:05:13 +00:00
Devang Patel
a5f4e6f4d9
Use local small vector.
...
llvm-svn: 105332
2010-06-02 16:42:51 +00:00
Devang Patel
345874624f
Ignore line number of debug value in undefined register.
...
llvm-svn: 105292
2010-06-01 21:43:09 +00:00
Stuart Hastings
369d3391d8
Revert 104841, 104842, 104876 due to buildbot failures. Radar 7424645.
...
llvm-svn: 104953
2010-05-28 16:41:07 +00:00
Devang Patel
8d4eb26f24
Do not drop location info for inlined function args.
...
llvm-svn: 104884
2010-05-27 20:25:04 +00:00
Devang Patel
747f1a373b
inlined function's arguments need a label to mark the start point because they are not directly attached to current function.
...
llvm-svn: 104848
2010-05-27 16:47:30 +00:00
Stuart Hastings
60d799e343
Support for nested functions/classes in debug output. Radar 7424645.
...
llvm-svn: 104841
2010-05-27 16:16:54 +00:00
Devang Patel
bdda547db4
Simplify. Eliminate unneeded debug_loc entry.
...
llvm-svn: 104785
2010-05-26 23:55:23 +00:00
Devang Patel
2bbe13a797
There is no need to force an line number entry (using previous location) for a temp label at unknown location.
...
llvm-svn: 104740
2010-05-26 21:23:46 +00:00
Devang Patel
c24a269116
Identify instructions, that needs a label to mark debug info entity, in advance. This simplifies beginScope().
...
llvm-svn: 104720
2010-05-26 19:37:24 +00:00
Devang Patel
6f08a37562
Remove dead code.
...
llvm-svn: 104706
2010-05-26 17:42:50 +00:00
Devang Patel
691615151f
Do not construct location list backword!
...
llvm-svn: 104705
2010-05-26 17:29:32 +00:00
Devang Patel
d7ad8ac4c0
First cut at supporting .debug_loc section.
...
This is used to track variable information.
llvm-svn: 104649
2010-05-25 23:40:22 +00:00
Eric Christopher
f6d55e86e7
Move the verbose asm output up a bit so it can be used in the special cases
...
as well.
llvm-svn: 104642
2010-05-25 21:49:43 +00:00
Eric Christopher
5c5a5be829
Add support for initialized global data for darwin tls. Update comments
...
and testcases accordingly.
llvm-svn: 104635
2010-05-25 21:28:50 +00:00
Devang Patel
345bc8667e
Do not emit line number entries for unknown debug values.
...
This fixes recent regression in store.exp from gdb testsuite.
llvm-svn: 104524
2010-05-24 18:26:49 +00:00
Nicolas Geoffray
803f2761ec
Encode the Caml frametable by following what the comment says: the number of descriptors
...
is first emitted, and StackOffsets are emitted in 16 bits.
llvm-svn: 104488
2010-05-24 12:24:11 +00:00
Eric Christopher
165bcdf8a8
Add full bss data support for darwin tls variables.
...
llvm-svn: 104414
2010-05-22 00:10:22 +00:00
Devang Patel
e611375617
Collect variable information during endFunction() instead of beginFunction().
...
llvm-svn: 104412
2010-05-22 00:04:14 +00:00
Devang Patel
e8f686625e
Simplify
...
llvm-svn: 104338
2010-05-21 18:49:09 +00:00
Devang Patel
765d605934
Simplify.
...
llvm-svn: 104302
2010-05-21 00:10:20 +00:00
Devang Patel
32a1ce3b3a
Refactor.
...
llvm-svn: 104265
2010-05-20 19:57:06 +00:00
Devang Patel
f90f78669f
Split DbgVariable. Eventually, variable info will be communicated through frame index, or DBG_VALUE instruction, or collection of DBG_VALUE instructions. Plus each DbgVariable may not need a label.
...
llvm-svn: 104233
2010-05-20 16:36:41 +00:00
Eric Christopher
1a7bc06b28
Partial code for emitting thread local bss data.
...
llvm-svn: 104197
2010-05-20 00:49:07 +00:00
Devang Patel
069568c287
Revert r104165.
...
llvm-svn: 104172
2010-05-19 21:58:28 +00:00
Devang Patel
d0b5830f72
There is no need to maintain InsnsBeginScopeSet separately.
...
llvm-svn: 104165
2010-05-19 21:26:53 +00:00
Devang Patel
e54dbcd4bf
Do not forget to mark prcessed arguments.
...
llvm-svn: 103822
2010-05-14 21:55:50 +00:00
Bill Wendling
e346a38ed4
Rename "HasCalls" in MachineFrameInfo to "AdjustsStack" to better describe what
...
the variable actually tracks.
N.B., several back-ends are using "HasCalls" as being synonymous for something
that adjusts the stack. This isn't 100% correct and should be looked into.
llvm-svn: 103802
2010-05-14 21:14:32 +00:00
Devang Patel
2b99c27e47
Add support to preserve type info for the variables that are removed by the optimizer.
...
llvm-svn: 103798
2010-05-14 21:01:35 +00:00
Daniel Dunbar
26fa01eb86
Inline Asm: Ensure buffer is newline terminated to match how the text is printed.
...
- This is a hack, but I can't decide the best place to handle this. Chris?
llvm-svn: 103765
2010-05-14 04:31:50 +00:00
Duncan Sands
bd83ac415f
Remove unused variable. Tweak a comment while there.
...
llvm-svn: 103586
2010-05-12 07:11:33 +00:00
Nathan Jeffords
9952bcf9f6
updated support for the COFF .linkonce
...
Now, the .linkonce directive is emitted as part of MCSectionCOFF::PrintSwitchToSection instead of AsmPrinter::EmitLinkage since it is an attribute of the section the symbol was placed into not the symbol itself.
llvm-svn: 103568
2010-05-12 04:26:09 +00:00
Devang Patel
23f7323e7f
Enable multiple Compile Units in one module.
...
This means now 'llvm-ld a.bc b.bc' will preserve debug info appropriately.
llvm-svn: 103439
2010-05-10 22:49:55 +00:00
Devang Patel
eed188e776
Instead of just verifying compile unit, verify entire type, variable, namespace etc..
...
llvm-svn: 103327
2010-05-07 23:33:41 +00:00
Devang Patel
14f07a8625
Remove DIGlobal.
...
llvm-svn: 103325
2010-05-07 23:19:07 +00:00
Devang Patel
e7333c8318
Verify entire type descriptor not just tag.
...
llvm-svn: 103303
2010-05-07 21:45:47 +00:00
Devang Patel
0638b539bb
Wrap const MDNode * inside DIDescriptor.
...
llvm-svn: 103295
2010-05-07 20:54:48 +00:00
Devang Patel
02bb578ffd
Avoid DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103272
2010-05-07 18:11:54 +00:00
Dan Gohman
f863ad3dc5
Disable the new unknown-location code for now. It causes a major
...
increase in the debug line info section, and it's causing
regressions in a gdb testsuite.
llvm-svn: 103226
2010-05-07 01:08:53 +00:00
Dan Gohman
365b0e0f0f
Update LabelsBeforeInsn also, when creating unknown-position labels.
...
llvm-svn: 103145
2010-05-06 00:29:41 +00:00
Chris Lattner
014a954e3d
Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
...
Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.
llvm-svn: 103140
2010-05-06 00:05:37 +00:00
Dan Gohman
2f1182c0ac
Emit debug info for MachineInstrs with unknown debug locations, instead
...
of just letting them inherit the debug locations of adjacent instructions.
Debug info should aim to be either accurate or absent.
llvm-svn: 103135
2010-05-05 23:41:32 +00:00
Devang Patel
ee7c7143dc
Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
...
llvm-svn: 103001
2010-05-04 06:15:30 +00:00
Dale Johannesen
a8f83a5f1b
Don't count debug info as instructions. This was
...
preventing the emission of the NOP on Darwin for a
function with no actual code. From timberwolfmc
with TEST=optllcdbg.
llvm-svn: 102843
2010-05-01 16:41:11 +00:00
Devang Patel
52c2d4d378
Attach AT_APPLE_optimized attribute to optimized function's debug info.
...
llvm-svn: 102743
2010-04-30 19:38:23 +00:00
Devang Patel
c34efcfee7
Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.
...
##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0
##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0
##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706
##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0
##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0
llvm-svn: 102655
2010-04-29 18:52:10 +00:00
Chris Lattner
9867c1a075
Rework global alignment computation again. Now we do round up
...
alignment of globals to the preferred alignment, but only when
there is no section specified on the global (by far the common
case).
llvm-svn: 102515
2010-04-28 19:58:07 +00:00
Devang Patel
570e9d53a7
Emit debug info for byval parameters.
...
llvm-svn: 102486
2010-04-28 01:39:28 +00:00
Chris Lattner
19715b76b7
further simplify EmitAlignment by eliminating the
...
ForcedAlignBits argument, tweaking the single client of it.
llvm-svn: 102484
2010-04-28 01:08:40 +00:00
Chris Lattner
d14f04d0f7
remove a dead argument to EmitAlignment.
...
llvm-svn: 102483
2010-04-28 01:06:02 +00:00