Benjamin Kramer
f3da529028
Add more PRI.64 macros for MSVC and use them throughout the codebase.
...
llvm-svn: 143799
2011-11-05 08:57:40 +00:00
Nick Lewycky
d59c0cac6c
Teach our Dwarf emission to use the string pool.
...
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Owen Anderson
0ca562ec4c
Teach the MC to output code/data region marker labels in MachO and ELF modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.
...
llvm-svn: 141135
2011-10-04 23:26:17 +00:00
Duncan Sands
cac86805bf
Place this bracket according to the LLVM style.
...
llvm-svn: 140784
2011-09-29 16:01:46 +00:00
Duncan Sands
5c04c62765
Darwin wants ctors/dtors to be ordered the other way round to linux.
...
llvm-svn: 139015
2011-09-02 18:07:19 +00:00
Benjamin Kramer
6397051ece
Don't drop alignment info on local common symbols.
...
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm
Based on a patch by NAKAMURA Takumi.
Fixes PR9337, PR9483 and PR10128.
llvm-svn: 138976
2011-09-01 23:04:27 +00:00
David Greene
7df940d660
Fix Size Typing
...
Stores sizes as uint64_t to avoid possible truncation.
llvm-svn: 138901
2011-08-31 21:34:20 +00:00
David Greene
cdef71f4f3
Compress Repeated Byte Output
...
Emit a repeated sequence of bytes using .zero. This saves an enormous
amount of asm file space for certain programs.
llvm-svn: 138864
2011-08-31 17:30:56 +00:00
Duncan Sands
4d63542b82
Fix PR5329: pay attention to constructor/destructor priority
...
when outputting them. With this, the entire LLVM testsuite
passes when built with dragonegg.
llvm-svn: 138724
2011-08-28 13:17:22 +00:00
Jay Foad
8dfee5f6bf
Remove an unnecessary cast.
...
llvm-svn: 136609
2011-08-01 12:27:15 +00:00
Evan Cheng
bbf3b0de8b
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
...
There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611
2011-07-20 19:50:42 +00:00
Jay Foad
bf904773bb
Convert TargetData::getIndexedOffset to use ArrayRef.
...
llvm-svn: 135478
2011-07-19 14:01:37 +00:00
Bill Wendling
b20453faae
Add a frame with the compact unwind encoding if it exists.
...
llvm-svn: 135450
2011-07-19 00:02:51 +00:00
Chris Lattner
229907cd11
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Devang Patel
f071d72c44
Handle debug info for i128 constants.
...
llvm-svn: 133821
2011-06-24 20:46:11 +00:00
Nick Lewycky
6208a2fd66
Emit trailing padding on constant vectors when TargetData says that the vector
...
is larger than the sum of the elements (including per-element padding).
llvm-svn: 133631
2011-06-22 18:55:03 +00:00
Jay Foad
6002068c13
Fix a FIXME by making GlobalVariable::getInitializer() return a
...
const Constant *.
llvm-svn: 133400
2011-06-19 18:37:11 +00:00
Rafael Espindola
ab20567227
Handle jump tables. Test to follow soon.
...
llvm-svn: 133083
2011-06-15 21:00:28 +00:00
Eli Friedman
8a3264ad48
Revert r133004 ; it's breaking nightly tests.
...
llvm-svn: 133007
2011-06-14 19:30:33 +00:00
Rafael Espindola
5e85158321
Partial revert of 132882.
...
Dan noted that this would work on the case shown on the commit message. I think
the case that was failing was a bb ending with a redundant conditional jump:
...
jne foo
foo:
...
I was unable to find any such case in the tests or in a debug build of clang,
so I will revert this part of the patch and watch the bots.
llvm-svn: 133004
2011-06-14 18:12:31 +00:00
Rafael Espindola
844485af13
Implement Jakob's suggestion on how to detect fall thought without calling
...
AnalyzeBranch.
llvm-svn: 132981
2011-06-14 06:08:32 +00:00
Rafael Espindola
2f3c2fe7c5
Really fix the fall-through logic.
...
Add a triple to the tests.
llvm-svn: 132885
2011-06-12 05:57:01 +00:00
Rafael Espindola
653a07206d
Fix silly bug I introduce in the previous commit. Fixes debug builds.
...
llvm-svn: 132883
2011-06-12 05:26:32 +00:00
Rafael Espindola
defd4b0875
AnalyzeBranch doesn't change which successors a bb has, just the order
...
we try to branch to them.
Before we were creating successor lists with duplicated entries. Fixing that
found a bug in isBlockOnlyReachableByFallthrough that would causes it to
return the wrong answer for
-----------
...
jne foo
jmp bar
foo:
----------
llvm-svn: 132882
2011-06-12 03:20:32 +00:00
Chad Rosier
b90a43d266
Ensure that EmitGlobalVariable is correctly differentiating between declarations
...
and definitions when emitting global variables. This was causing global
declarations to be emitted as if they were definitions.
Fixes <rdar://problem/9429892>.
llvm-svn: 132825
2011-06-10 00:53:15 +00:00
Charles Davis
5638b9f01e
When generating code for Win64 EH, emit StartProc and EndProc directives.
...
llvm-svn: 132250
2011-05-28 04:21:04 +00:00
Rafael Espindola
836f7db2cc
Fix the root cause of the bootstrap failure:
...
There was no way to check if a given register/mode pair was valid. We now return
an error code (-2) instead of asserting. If anyone thinks that an assert
at this point is really needed, we can autogen a hasValidDwarfRegNum instead.
llvm-svn: 132236
2011-05-28 00:13:01 +00:00
Charles Davis
91ed799eb4
Stub out support for Win64-style exceptions. Note that this is merely using
...
the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports
hardly anything else at this point!
llvm-svn: 132234
2011-05-27 23:47:32 +00:00
Rafael Espindola
b8e08be77d
Fix a regression I recently introduced by removing DwarfRegNum of
...
subregisters:
When a value is in a subregister, at least report the location as being
the superregister. We should extend the .td files to encode the bit
range so that we can produce a DW_OP_bit_piece.
llvm-svn: 132224
2011-05-27 22:15:01 +00:00
Rafael Espindola
d23bfb8a7a
Make size computation less brittle.
...
llvm-svn: 132222
2011-05-27 22:05:41 +00:00
Rafael Espindola
fc9bae6f8b
Replace the -unwind-tables option with a per function flag. This is more
...
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.
llvm-svn: 132033
2011-05-25 03:44:17 +00:00
Rafael Espindola
19c1a56287
Produce a __debug_frame section on darwin ARM when appropriate.
...
llvm-svn: 131151
2011-05-10 21:04:45 +00:00
Rafael Espindola
fdc3e6fab6
Use .cfi_sections to put the unwind info in .debug_frame when possible. With
...
this clang will use .debug_frame in, for example,
clang -g -c -m32 test.c
This matches gcc's behaviour. It looks like .debug_frame is a bit bigger
than .eh_frame, but has the big advantage of not being allocated.
llvm-svn: 131140
2011-05-10 18:39:09 +00:00
Rafael Espindola
705d25a1f4
Nothing else uses this label.
...
llvm-svn: 130989
2011-05-06 15:44:29 +00:00
Rafael Espindola
a716096677
Dead code elimination.
...
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Rafael Espindola
ec0a3a0bbf
Remove the DwarfTable enum.
...
llvm-svn: 130959
2011-05-05 22:14:31 +00:00
Rafael Espindola
59b6bfdbc6
Implement a really simple DwarfSjLjException.
...
llvm-svn: 130947
2011-05-05 20:48:31 +00:00
Rafael Espindola
240c96e2ca
List all exception types in a switch.
...
llvm-svn: 130944
2011-05-05 19:48:34 +00:00
Devang Patel
124ae13421
Hoist MCLineEntry construction AsmPrinter so that anyone who derives from AsmPrinter can have line number entries.
...
PR 9810
llvm-svn: 130518
2011-04-29 18:00:54 +00:00
Rafael Espindola
b7a012a282
Factor some code to needsCFIMoves. Avoid printing moves when we don't have to.
...
llvm-svn: 130501
2011-04-29 14:14:06 +00:00
Devang Patel
3e021533cd
Teach dwarf writer to handle complex address expression for .debug_loc entries.
...
This fixes clang generated blocks' variables' debug info.
Radar 9279956.
llvm-svn: 130373
2011-04-28 02:22:40 +00:00
Devang Patel
e3745fdcf3
Revert r130178. It turned out to be not the optimal path to emit complex location expressions.
...
llvm-svn: 130326
2011-04-27 20:29:27 +00:00
Rafael Espindola
a4fa5ce911
Print the label if we will use it in debug_frame.
...
llvm-svn: 130232
2011-04-26 19:26:53 +00:00
Chris Lattner
189ca1498f
don't emit the symbol name twice for local bss and common
...
symbols. For example, don't emit:
.comm _i,4,2 ## @i
## @i
instead emit:
.comm _i,4,2 ## @i
llvm-svn: 130192
2011-04-26 06:14:13 +00:00
Rafael Espindola
80cb3cb1d6
Print all the moves at a given label instead of just the first one.
...
Remove previous DwarfCFI hack.
llvm-svn: 130187
2011-04-26 03:58:56 +00:00
Devang Patel
cae2fbd6fc
Let dwarf writer allocate extra space in the debug location expression. This space, if requested, will be used for complex addresses of the Blocks' variables.
...
llvm-svn: 130178
2011-04-26 00:12:46 +00:00
Devang Patel
2266aa84a1
Refactor.
...
llvm-svn: 129938
2011-04-21 21:07:35 +00:00
Devang Patel
17740e70d5
Reduce clutter in asm output. Do not emit source location as comment for each instruction.
...
llvm-svn: 129715
2011-04-18 20:26:49 +00:00
Rafael Espindola
beb74c3f00
Some refactoring suggested by Anton Korobeynikov.
...
llvm-svn: 129600
2011-04-15 20:32:03 +00:00
Rafael Espindola
a01cdb0e37
Add 129518 back with a fix for when we are producing eh just because of debug info.
...
Change ELF systems to use CFI for producing the EH tables. This reduces the
size of the clang binary in Debug builds from 690MB to 679MB.
llvm-svn: 129571
2011-04-15 15:11:06 +00:00