Micah Villmow
083189730e
Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
...
llvm-svn: 165726
2012-10-11 17:21:41 +00:00
Micah Villmow
cdfe20b97f
Move TargetData to DataLayout.
...
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Bill Wendling
d163405df8
Remove tabs.
...
llvm-svn: 160475
2012-07-19 00:04:14 +00:00
Rafael Espindola
ca3e0ee8b3
Move the support for using .init_array from ARM to the generic
...
TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM,
on X86 it is not easy to find out if .init_array should be used or not, so
the decision is made via TargetOptions and defaults to off.
Add a command line option to llc that enables it.
llvm-svn: 158692
2012-06-19 00:48:28 +00:00
Bill Wendling
f1b14b719f
Look for the 'Is Simulated' module flag. This indicates that the program is compiled to run on a simulator.
...
llvm-svn: 155435
2012-04-24 11:03:50 +00:00
Anton Korobeynikov
a22828e085
Fix to make sure that a comdat group gets generated correctly for a static member
...
of instantiated C++ templates.
Patch by Kristof Beyls!
llvm-svn: 151250
2012-02-23 10:36:04 +00:00
David Chisnall
368d460d35
... and it's probably best to use the correct alignment, rather than just guessing that it's the same as the size.
...
llvm-svn: 150813
2012-02-17 16:30:39 +00:00
David Chisnall
8fa1716508
It turns out that putting an 8-byte symbol in a 4-byte section makes Solaris ld sulk. GNU ld is perfectly happy with it, which is worrying for a whole other set of reasons...
...
Thanks to Anton, Duncan and Rafael for helping me track this down.
Pointy hat to Rafael for introducing the bug in the first place.
llvm-svn: 150811
2012-02-17 16:05:50 +00:00
Bill Wendling
a0009ee85a
Use 'getDataNoRel' for the section kind.
...
llvm-svn: 150628
2012-02-15 22:47:53 +00:00
Bill Wendling
734909a078
Modify the code that emits the module flags to use the new module flags accessor
...
method. This allows the target lowering code to not have to deal with MDNodes.
Also, avoid leaking memory like a sieve by not creating a global variable for
the image info section, but just emitting the code directly.
llvm-svn: 150624
2012-02-15 22:36:15 +00:00
Bill Wendling
06df7725fc
Add code to the target lowering object file module to handle module flags.
...
The MachO back-end needs to emit the garbage collection flags specified in the
module flags. This is a WIP, so the front-end hasn't been modified to emit these
flags just yet. Documentation and front-end switching to occur soon.
llvm-svn: 150507
2012-02-14 21:28:13 +00:00
Anton Korobeynikov
c6b4017ce2
Add support for implicit TLS model used with MS VC runtime.
...
Patch by Kai Nacke!
llvm-svn: 150307
2012-02-11 17:26:53 +00:00
Anton Korobeynikov
7722a2d4e3
Properly emit ctors / dtors with priorities into desired sections
...
and let linker handle the rest.
This finally fixes PR5329
llvm-svn: 148990
2012-01-25 22:24:19 +00:00
David Blaikie
46a9f016c5
More dead code removal (using -Wunreachable-code)
...
llvm-svn: 148578
2012-01-20 21:51:11 +00:00
Bill Wendling
e4cc332729
On MachO, the pointer to the personality function should always be in the
...
non_lazy_symbol_pointers section (__IMPORT,__pointers). Ignore the 'hidden' part
since that will place it in the wrong section.
<rdar://problem/10443720>
llvm-svn: 145356
2011-11-29 01:43:20 +00:00
Benjamin Kramer
1f97a5a671
Remove all remaining uses of Value::getNameStr().
...
llvm-svn: 144648
2011-11-15 16:27:03 +00:00
Bill Wendling
57e3aaad89
Check the visibility of the global variable before placing it into the stubs
...
table. A hidden variable could potentially end up in both lists.
<rdar://problem/10336715>
llvm-svn: 142869
2011-10-24 23:05:43 +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
Evan Cheng
76792992d6
Add MCObjectFileInfo and sink the MCSections initialization code from
...
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
2011-07-20 05:58:47 +00:00
Evan Cheng
ccf243d56b
Fix an obvious typo that's preventing x86 (32-bit) from using .literal16.
...
llvm-svn: 135535
2011-07-19 23:14:32 +00:00
Evan Cheng
2d7faa5e3e
Fix up TargetLoweringObjectFile ctors to properly initialize fields.
...
llvm-svn: 135068
2011-07-13 19:54:59 +00:00
Bill Wendling
9af2fa9d1b
Use the presence of the __compact_unwind section to indicate that a target
...
supports compact unwind info instead of having a separate flag indicating this.
llvm-svn: 133685
2011-06-23 05:13:28 +00:00
Bill Wendling
f942585dae
Add a flag that indicates whether a target supports compact unwind info or not.
...
llvm-svn: 133662
2011-06-22 23:16:51 +00:00
Bill Wendling
d346304373
Add a __LD,__compact_unwind section.
...
If the linker supports it, this will hold the CIE and FDE information in a
compact format. The implementation of the compact unwinding emission is coming
soon.
llvm-svn: 133658
2011-06-22 22:22:24 +00:00
Rafael Espindola
51d2d7aabc
Fix invalid uses of Twine. Hopefully this fixes the problem that Takumi is
...
having.
llvm-svn: 132898
2011-06-13 03:09:13 +00:00
Rafael Espindola
c85e0d81e4
Fix a silly error I introduce in r131951.
...
Fixes PR10095.
llvm-svn: 132735
2011-06-07 23:26:45 +00:00
Charles Davis
041ec4aada
Add the suffix to the Win64 EH data sections' names if given. Add a test for
...
this. XFAIL'd, because the COFF AsmParser can't handle .section yet.
llvm-svn: 132220
2011-05-27 21:38:47 +00:00
Charles Davis
936847ddf5
Revert r132111. I built Release (without Asserts), so I didn't know about the
...
assert that prevented setting alignment on section creation.
llvm-svn: 132113
2011-05-26 05:35:55 +00:00
Charles Davis
4be76e2152
Align Win64 EH Table sections to 4 bytes.
...
llvm-svn: 132111
2011-05-26 05:19:54 +00:00
Rafael Espindola
0d018b1155
Explain FIXME.
...
llvm-svn: 131952
2011-05-24 03:10:31 +00:00
Rafael Espindola
0f33be1b87
Fix the defaults for .eh_frame. We were marking it as writable.
...
llvm-svn: 131951
2011-05-24 02:50:20 +00:00
Charles Davis
1a1d4777b9
Fix typo. When will I learn?
...
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Charles Davis
bc1feb1f25
Add .pdata and .xdata sections to the COFF TLOF implementation.
...
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Bill Wendling
a48b1375df
Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one
...
who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>
llvm-svn: 130918
2011-05-05 06:49:15 +00:00
Rafael Espindola
750cb61553
GCC uses a different encoding of pointers in the FDE when using
...
-fno-dwarf2-cfi-asm. Implement the same behavior.
llvm-svn: 130637
2011-05-01 04:49:54 +00:00
Rafael Espindola
ce83fc3463
Remove unnecessary argument.
...
llvm-svn: 130343
2011-04-27 23:17:57 +00:00
Rafael Espindola
08704349da
Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, and
...
give it a bit more responsibility. Also implement it for MachO.
If hacked to use cfi, 32 bit MachO will produce
.cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr
and 64 bit will produce
.cfi_presonality ___gxx_personality_v0
The general idea is that .cfi_personality gets passed the final symbol. It is
up to codegen to produce it if using indirect representation (like 32 bit
MachO), but it is up to MC to decide which relocations to create.
llvm-svn: 130341
2011-04-27 23:08:15 +00:00
Rafael Espindola
3989776770
Fix indentation.
...
llvm-svn: 130331
2011-04-27 21:29:52 +00:00
Rafael Espindola
e473aaf540
Remove unused arguments.
...
llvm-svn: 129844
2011-04-20 03:08:09 +00:00
Daniel Dunbar
cd01ed5bd6
ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
...
triple component.
llvm-svn: 129838
2011-04-20 00:14:25 +00:00
Daniel Dunbar
4a7783b0c2
CodeGen: Eliminate a use of getDarwinMajorNumber().
...
- There is a minor semantic change here (evidenced by the test change) for
Darwin triples that have no version component. I debated changing the default
behavior of isOSVersionLT, but decided it made more sense for triples to be
explicit.
llvm-svn: 129802
2011-04-19 20:32:39 +00:00
Rafael Espindola
a83b177035
Put each personality function in a section. This fixes the gnu ld warning:
...
error in foo.o; no .eh_frame_hdr table will be created.
llvm-svn: 129635
2011-04-16 03:51:21 +00:00
Stuart Hastings
12d5312622
Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>
...
llvm-svn: 127944
2011-03-19 02:42:31 +00:00
Stuart Hastings
08b4daa191
Revert 127939. <rdar://problem/9012638>
...
llvm-svn: 127943
2011-03-19 02:33:56 +00:00
Stuart Hastings
83d4a28d1f
Revise r126127 to address Daniel's comments. <rdar://problem/9012638>
...
llvm-svn: 127939
2011-03-19 01:32:01 +00:00
Rafael Espindola
601a11edd4
Fix llvm-gcc bootstrap with gnu ld.
...
The problem was codegen guessing the wrong values and printing
.section .eh_frame,"aMS",@progbits,4
It is not clear at all if Codegen should try to guess, MC is the
one that should know the default flags.
llvm-svn: 126421
2011-02-24 20:18:01 +00:00
Eric Christopher
9b48fef478
Revert r125960, it's breaking darwin10 bootstrap.
...
llvm-svn: 126163
2011-02-21 23:52:19 +00:00
Stuart Hastings
b4863a41e9
Fix to correctly support attribute((section("__DATA, __common"))).
...
Radar 9012638.
llvm-svn: 126127
2011-02-21 17:27:17 +00:00
Bill Wendling
8fbe09f160
Reapply r114997 now that the buildbots have been updated.
...
llvm-svn: 125960
2011-02-18 21:12:58 +00:00
Rafael Espindola
70d8015063
Switch llvm to using comdats. For now always use groups with a single
...
section.
llvm-svn: 125526
2011-02-14 22:23:49 +00:00