1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
Anton Korobeynikov
880f98920c Fix thinko: put stuff with both global and local relocations into data.rel{.ro}, not .local
llvm-svn: 68036
2009-03-30 17:37:43 +00:00
Anton Korobeynikov
0404baca28 Do not propagate ELF-specific stuff (data.rel) into other targets. This simplifies code and also ensures correctness.
llvm-svn: 68032
2009-03-30 15:27:43 +00:00
Anton Korobeynikov
2ea565a37b Add data.rel stuff
llvm-svn: 68031
2009-03-30 15:27:03 +00:00
Duncan Sands
5ab54d488f Introduce new linkage types linkonce_odr, weak_odr, common_odr
and extern_weak_odr.  These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global.  In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time.   This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function.  If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body.  The
code generators on the other hand map weak and weak_odr linkage
to the same thing.

llvm-svn: 66339
2009-03-07 15:45:40 +00:00
Anton Korobeynikov
7e63f1aae6 Treat [1 x i8] zeroinitializer as a C string, placing such stuff into
mergeable string section. I don't see any bad impact of such decision
(rather then placing it into mergeable const section, as it was before),
but at least Darwin linker won't complain anymore.

The problem in LLVM is that we don't have special type for string constants
(like gcc does). Even more, we have two separate types: ConstatArray for non-null
strings and ConstantAggregateZero for null stuff.... It's a bit weird :)

llvm-svn: 63142
2009-01-27 22:29:24 +00:00
Rafael Espindola
0aba6c9435 Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Duncan Sands
bcdbfb63dc Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.

llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Devang Patel
689e130117 squash warnings.
llvm-svn: 61707
2009-01-05 17:31:22 +00:00
Dan Gohman
155df8a79e Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.

llvm-svn: 58624
2008-11-03 18:22:42 +00:00
Duncan Sands
651eeb4be2 Rename isWeakForLinker to mayBeOverridden. Use it
instead of hasWeakLinkage in a bunch of optimization
passes.

llvm-svn: 56782
2008-09-29 11:25:42 +00:00
Anton Korobeynikov
b9294473f0 Get rid of ReadOnlySection duplicate
llvm-svn: 56582
2008-09-24 22:20:27 +00:00
Anton Korobeynikov
154a35a723 Cleanup
llvm-svn: 56578
2008-09-24 22:17:27 +00:00
Anton Korobeynikov
1b3c67c5cf Get rid of duplicate char*/Section* stuff for TLS sections
llvm-svn: 56577
2008-09-24 22:17:06 +00:00
Anton Korobeynikov
021a7eed86 Cleanup, no functionality change
llvm-svn: 56576
2008-09-24 22:16:33 +00:00
Anton Korobeynikov
dca16f3acf Get rid of duplicate char*/Section* DataSection
llvm-svn: 56575
2008-09-24 22:16:16 +00:00
Anton Korobeynikov
83fa257f55 Get rid of duplicate char*/Section* TextSection
llvm-svn: 56574
2008-09-24 22:15:21 +00:00
Anton Korobeynikov
767865a3d1 Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations
llvm-svn: 54842
2008-08-16 12:57:07 +00:00
Evan Cheng
804e157031 Undo most of r54519.
llvm-svn: 54534
2008-08-08 17:56:50 +00:00
Evan Cheng
4708df4776 It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.
llvm-svn: 54519
2008-08-08 06:56:16 +00:00
Anton Korobeynikov
52d0ff92cc Print section flags ok on platforms, which use '@' as comment string. Fix test.
llvm-svn: 54460
2008-08-07 09:55:06 +00:00
Anton Korobeynikov
5fa19dc20a Add assertion for easy debugging of missing stuff
llvm-svn: 54459
2008-08-07 09:54:40 +00:00
Anton Korobeynikov
ebd773939c Add hook for constant pool section selection for darwin.
llvm-svn: 54449
2008-08-07 09:51:02 +00:00
Anton Korobeynikov
d37daa2aeb Select section for constant pool entries
llvm-svn: 54448
2008-08-07 09:50:34 +00:00
Anton Korobeynikov
090eca95ab Tie small stuff to non-small by default on ELF platforms
llvm-svn: 53919
2008-07-22 17:09:41 +00:00
Anton Korobeynikov
78bab0e7f2 Use better variable names
llvm-svn: 53859
2008-07-21 18:29:23 +00:00
Anton Korobeynikov
3d4c55bb7a Don't use larger alignment.
llvm-svn: 53857
2008-07-21 18:25:17 +00:00
Anton Korobeynikov
3724600253 Add TargetAsmInfo for all ELF-based targets
llvm-svn: 53786
2008-07-19 13:14:11 +00:00