Anton Korobeynikov
e42af3699b
Use TARGET2 relocation for TType references on ARM.
...
Do some cleanup of the code while here.
Inspired by patch by Logan Chien!
llvm-svn: 167904
2012-11-14 01:47:00 +00:00
Micah Villmow
cdfe20b97f
Move TargetData to DataLayout.
...
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Eric Christopher
de9e92ed9b
Typo.
...
llvm-svn: 156226
2012-05-05 01:16:06 +00:00
Craig Topper
1fcf5bcae1
Prune some includes
...
llvm-svn: 153502
2012-03-27 07:54:11 +00:00
Chris Lattner
8213c8af29
Remove some dead code and tidy things up now that vectors use ConstantDataVector
...
instead of always using ConstantVector.
llvm-svn: 149912
2012-02-06 21:56:39 +00:00
Chris Lattner
139822fc83
C++, CBE, and TLOF support for ConstantDataSequential
...
llvm-svn: 148805
2012-01-24 14:17:05 +00:00
Chandler Carruth
f3e8502cc1
Add 'llvm_unreachable' to passify GCC's understanding of the constraints
...
of several newly un-defaulted switches. This also helps optimizers
(including LLVM's) recognize that every case is covered, and we should
assume as much.
llvm-svn: 147861
2012-01-10 18:08:01 +00:00
David Blaikie
edbb58c577
Remove unnecessary default cases in switches that cover all enum values.
...
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Nick Lewycky
50f02cb21b
Move global variables in TargetMachine into new TargetOptions class. As an API
...
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
llvm-svn: 145714
2011-12-02 22:16:29 +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
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
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
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
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
e473aaf540
Remove unused arguments.
...
llvm-svn: 129844
2011-04-20 03:08:09 +00:00
Francois Pichet
47f86e6c60
MSVC needs the return 0 to compile.
...
llvm-svn: 129640
2011-04-16 13:59:23 +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
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
NAKAMURA Takumi
b5e3e9dd27
Revert r129518, "Change ELF systems to use CFI for producing the EH tables. This reduces the"
...
It broke several builds.
llvm-svn: 129557
2011-04-15 03:35:57 +00:00
Rafael Espindola
aa2a7cd828
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: 129518
2011-04-14 15:18:53 +00:00
Rafael Espindola
4b7b7fba38
Delay the creation of eh_frame so that the user can change the defaults.
...
Add support for SHT_X86_64_UNWIND.
llvm-svn: 124059
2011-01-23 05:43:40 +00:00
Chris Lattner
ea4e983d70
minor change to rafael's recent patches: if something is
...
constant but requires a unique address, we can still put it in a
readonly section, just not a mergable one.
llvm-svn: 123711
2011-01-18 01:23:44 +00:00
Rafael Espindola
cba4c33949
Only put unnamed_addr constants in mergeable sections. Fixes PR8297.
...
llvm-svn: 123585
2011-01-16 17:19:34 +00:00
Chris Lattner
9f06f911d1
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
Dan Gohman
f1d8304fe3
Eliminate unnecessary uses of getZExtValue().
...
llvm-svn: 106279
2010-06-18 14:22:04 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
aed00fa039
fix GetOrCreateTemporarySymbol to require a name, clients
...
should use CreateTempSymbol() if they don't care about the
name.
llvm-svn: 98712
2010-03-17 05:41:18 +00:00
Chris Lattner
be3242b523
finally give Mangler a getSymbol method, which returns an MCSymbol
...
for a global instead of messing around with string buffers.
llvm-svn: 98366
2010-03-12 18:55:20 +00:00
Chris Lattner
47bef1a8a2
make TargetLoweringObjectFile::getExprForDwarfReference
...
just make unnamed temp symbols instead of having to come
up with its own names.
llvm-svn: 98324
2010-03-12 01:56:43 +00:00
Chris Lattner
03627cb12c
fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
...
where we used ot create an MCSymbol for ".". Now emit an assembler
temporary label and reference it instead of "." textually.
rdar://7739457
llvm-svn: 98292
2010-03-11 21:55:20 +00:00
Chris Lattner
2562356992
rename getSymbolForDwarf* to getExprForDwarf* since it returns
...
an MCExpr and not an MCSymbol. Change it to take an MCStreamer,
which is currently unused.
No functionality change.
llvm-svn: 98278
2010-03-11 19:41:58 +00:00
Chris Lattner
71c30c164f
move three lowering hooks from MAI to TLOF and make one of them
...
semantic instead of syntactic. This completes MCization of
darwin/x86[-64]!
llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Chris Lattner
ac2361a9b0
set the temporary bit on MCSymbols correctly.
...
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Bill Wendling
85e5081c77
Make error statement more personal.
...
llvm-svn: 96410
2010-02-16 22:47:14 +00:00
Anton Korobeynikov
ab663a0bfe
Move TLOF implementations to libCodegen to resolve layering violation.
...
llvm-svn: 96288
2010-02-15 22:37:53 +00:00
Anton Korobeynikov
397aecb6d6
Add suffix for stubs, so we won't have name clashes with private symbols.
...
llvm-svn: 96286
2010-02-15 22:36:26 +00:00
Anton Korobeynikov
ae4ccc10da
Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there
...
llvm-svn: 96285
2010-02-15 22:35:59 +00:00
Benjamin Kramer
94b993ed8a
Simplify some uses of str(n)cmp with StringRef.
...
llvm-svn: 94189
2010-01-22 18:21:23 +00:00
Chris Lattner
cd2915e467
stop using the .lcomm pseudoop on darwin, instead, directly use the
...
.zerofill directive. Streamerize its generation.
llvm-svn: 93868
2010-01-19 06:25:51 +00:00
Chris Lattner
b253421711
make TLOF subclassify BSS based on linkage type into private, external
...
and everything else (weak).
llvm-svn: 93846
2010-01-19 04:15:51 +00:00
Chris Lattner
a986aa33eb
fix a significant difference between llvm and gcc on ELF systems:
...
GCC would put weak zero initialized mutable data in the .bss section,
we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits'
section. Fixing this will allow simplifications next up.
llvm-svn: 93844
2010-01-19 03:06:01 +00:00
Chris Lattner
5b585f8b1a
introduce a section kind for common linkage. Use this to slightly
...
simplify and commonize some of the asmprinter logic for globals.
This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.
llvm-svn: 93843
2010-01-19 02:48:26 +00:00
Chris Lattner
1d371882b6
Cleanup handling of .zerofill on darwin:
...
1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.
llvm-svn: 93838
2010-01-19 02:09:44 +00:00