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

279 Commits

Author SHA1 Message Date
Bill Wendling
83903bc85f Set the unnamed_addr only when we're creating a new GV in the dest module.
llvm-svn: 128507
2011-03-29 23:31:06 +00:00
Bill Wendling
48a0bb7712 Revert r128501. It caused test failures.
llvm-svn: 128506
2011-03-29 23:28:02 +00:00
Bill Wendling
ed457e662c We need to copy over the unnamed_addr attribute.
llvm-svn: 128501
2011-03-29 23:05:41 +00:00
Rafael Espindola
e60f9519d8 Correctly merge available_externally and regular definitions when they have
different visibilities.

llvm-svn: 124650
2011-02-01 05:33:52 +00:00
Rafael Espindola
3b43f22391 Allow unnamed_addr on declarations.
llvm-svn: 123529
2011-01-15 08:15:00 +00:00
Rafael Espindola
0272c002ae Keep unnamed_addr when linking.
llvm-svn: 123364
2011-01-13 05:12:34 +00:00
Chris Lattner
397937fa0d Revamp the ValueMapper interfaces in a couple ways:
1. Take a flags argument instead of a bool.  This makes
   it more clear to the reader what it is used for.
2. Add a flag that says that "remapping a value not in the
   map is ok".
3. Reimplement MapValue to share a bunch of code and be a lot
   more efficient.  For lookup failures, don't drop null values
   into the map.
4. Using the new flag a bunch of code can vaporize in LinkModules
   and LoopUnswitch, kill it.

No functionality change.

llvm-svn: 123058
2011-01-08 08:15:20 +00:00
Chris Lattner
f0e1e53e62 include the module identifier when emitting this warning, PR8865.
llvm-svn: 122637
2010-12-30 02:49:45 +00:00
Chris Lattner
f3912fd05b print the right string, thanks for Frits for noticing.
llvm-svn: 122636
2010-12-30 01:07:20 +00:00
Chris Lattner
8b738dffaa improve warning message to at least say what the triples are.
llvm-svn: 122632
2010-12-29 22:41:18 +00:00
Michael J. Spencer
6269cd9426 Fix whitespace.
llvm-svn: 122158
2010-12-18 22:23:15 +00:00
Michael J. Spencer
4701f704be Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
llvm-svn: 122157
2010-12-18 22:23:07 +00:00
Owen Anderson
7103acd18e Revert r122143 through r122140, which collectively broke the LLVMC tests on
the buildbots.

llvm-svn: 122149
2010-12-18 07:37:18 +00:00
Michael J. Spencer
1bbb8752a8 Fix whitespace.
llvm-svn: 122142
2010-12-18 04:13:46 +00:00
Michael J. Spencer
6d64a36ced Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
llvm-svn: 122141
2010-12-18 04:13:36 +00:00
Michael J. Spencer
86f6a9ac6e MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Michael J. Spencer
15483143ec Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
2010-12-09 17:36:48 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Mikhail Glushenkov
4c2caa10ad GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.
This allows using GetDLLSuffix() with appendSuffix().

llvm-svn: 118051
2010-11-02 20:32:59 +00:00
Mikhail Glushenkov
709ca9117a Trailing whitespace.
llvm-svn: 118050
2010-11-02 20:32:52 +00:00
Rafael Espindola
2ba55832f3 Fix PR8300 by remembering to keep the bitcast in all cases.
llvm-svn: 116788
2010-10-19 02:02:57 +00:00
Bill Wendling
ee02c0c6fe Revert "RequiresUnique" patch. This should be handled at a lower level.
llvm-svn: 115827
2010-10-06 20:18:44 +00:00
Bill Wendling
c44ee01ccc Change RequiresMerge to RequiresUnique. It's a better description of what this
fix is trying to accomplish.

This code could still use some polishing.

llvm-svn: 115759
2010-10-06 07:03:52 +00:00
Bill Wendling
9372fed918 If the destination module all ready has a copy of the global coming from the
source module *and* it must be merged (instead of simply replaced or appended
to), then merge instead of replacing or adding another global.

The ObjC __image_info section was being appended to because of this
failure. This caused a crash because the linker expects the image info section
to be a specific size.

<rdar://problem/8198537>

llvm-svn: 115753
2010-10-06 06:16:30 +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
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
118bf38c3f dead code patrol
llvm-svn: 112713
2010-09-01 16:06:39 +00:00
Dan Gohman
8088d5e31d Reapply r112091 and r111922, support for metadata linking, with a
fix: add a flag to MapValue and friends which indicates whether
any module-level mappings are being made. In the common case of
inlining, no module-level mappings are needed, so MapValue doesn't
need to examine non-function-local metadata, which can be very
expensive in the case of a large module with really deep metadata
(e.g. a large C++ program compiled with -g).

This flag is a little awkward; perhaps eventually it can be moved
into the ClonedCodeInfo class.

llvm-svn: 112190
2010-08-26 15:41:53 +00:00
Daniel Dunbar
aeb8abb0e0 Revert r112091, "Remap metadata attached to instructions when remapping
individual ...", which depends on r111922, which I am reverting.

llvm-svn: 112157
2010-08-26 03:48:08 +00:00
Dan Gohman
d19a0a49d1 Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.

llvm-svn: 112091
2010-08-25 21:36:50 +00:00
Bill Wendling
9e3d8d1a60 - Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.

llvm-svn: 111952
2010-08-24 20:00:52 +00:00
Dan Gohman
2dfd959d32 Link NamedMDNodes after linking GlobalValues, so that MDNodes
which reference GlobalValues are properly remapped.

llvm-svn: 111949
2010-08-24 19:37:11 +00:00
Dan Gohman
dbd04d0886 When linking NamedMDNodes, remap their operands.
llvm-svn: 111948
2010-08-24 19:31:04 +00:00
Dan Gohman
30fd721e48 Use MapValue in the Linker instead of having a private function
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.

llvm-svn: 111941
2010-08-24 18:50:07 +00:00
Dan Gohman
c4d5e30436 Don't cast away qualifiers with C-style casts.
llvm-svn: 111933
2010-08-24 18:09:44 +00:00
Argyrios Kyrtzidis
75b69c1de3 Revert r111082. No warnings for this common pattern.
llvm-svn: 111102
2010-08-15 10:27:23 +00:00
Argyrios Kyrtzidis
70b248e3ac Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.
llvm-svn: 111082
2010-08-14 21:35:10 +00:00
Dan Gohman
859ffd353e Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.

llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Bill Wendling
59ef9bcc6d Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +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
Dan Gohman
9789093ab7 Add basic error checking to MemoryBuffer::getSTDIN.
llvm-svn: 104855
2010-05-27 17:31:51 +00:00
Dan Gohman
018b11555d Use the return value of getMagicNumber instead of using a
separate canRead() call.

llvm-svn: 104853
2010-05-27 17:18:38 +00:00
Duncan Sands
e9a13a3c60 Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.

llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Victor Hernandez
157da4b794 Linker should not remap null operands of metadata
llvm-svn: 95468
2010-02-06 01:31:55 +00:00
Victor Hernandez
8bef667691 Need to recurse for all operands of function-local metadata; and handle Instructions (which map to themselves)
llvm-svn: 94691
2010-01-27 22:03:03 +00:00
Jeffrey Yasskin
fb10587e50 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.

llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
3b984e1b99 merge two ifs
llvm-svn: 94650
2010-01-27 02:18:21 +00:00
Victor Hernandez
db86c7d1a0 Linker needs to do deep-copy of function-local metadata to update references to function arguments
llvm-svn: 94632
2010-01-27 00:30:42 +00:00
Chris Lattner
5a57121631 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Devang Patel
81f0fa06d7 Remove MetadataBase class because it is not adding significant value.
llvm-svn: 94243
2010-01-22 22:52:10 +00:00