Commit Graph

74 Commits

Author SHA1 Message Date
Anton Korobeynikov f6439246cc Remove the LinkGlobal weirderness in common linking phase.
llvm-svn: 48177
2008-03-10 22:33:53 +00:00
Anton Korobeynikov 1f93c50ace Typo
llvm-svn: 48176
2008-03-10 22:33:22 +00:00
Ted Kremenek d48ed17d18 Fix some compilation errors on msvc:
- "Redefinition of I" (iterator masks previous definition)
- include missing header file

Patch by Argiris Kirtzidis!

llvm-svn: 48115
2008-03-09 18:32:50 +00:00
Anton Korobeynikov e8a3e74b6c Clarify some important bits
llvm-svn: 48010
2008-03-07 18:34:50 +00:00
Anton Korobeynikov 0074ea3ae7 Small cleanup: propagate thread-localness via generic routine.
No functionality change.

llvm-svn: 48009
2008-03-07 18:32:18 +00:00
Anton Korobeynikov 2609888f29 Missed patch from my last commit
llvm-svn: 47977
2008-03-05 23:21:39 +00:00
Anton Korobeynikov e43711d392 Resolve aliases to aliasees, where possible
llvm-svn: 47975
2008-03-05 23:08:47 +00:00
Anton Korobeynikov 24f65c3ab7 Handle functions as targets during linking of aliases as well
llvm-svn: 47974
2008-03-05 23:08:16 +00:00
Anton Korobeynikov dac5fa94ef Try hard to link aliases. Checks can be too strict by now.
llvm-svn: 47968
2008-03-05 22:22:46 +00:00
Anton Korobeynikov 2e13597f9d Remember the source->dest mapping when copying aliases. This fixes PR2054
llvm-svn: 47945
2008-03-05 15:27:21 +00:00
Anton Korobeynikov 12cee7195f Clarify the state-of-the-art
llvm-svn: 47944
2008-03-05 15:11:00 +00:00
Anton Korobeynikov bddf51bc9b And final pack of warnings silencing
llvm-svn: 47372
2008-02-20 11:27:04 +00:00
Chris Lattner 90c2df5bd0 random cleanups.
llvm-svn: 47334
2008-02-19 18:49:08 +00:00
Chris Lattner f3ebc3f3d2 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Anton Korobeynikov 4f00f531ad Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function.

llvm-svn: 45375
2007-12-27 23:21:57 +00:00
Gordon Henriksen 520e64c0c2 Fixing several transforms which would drop the collector attribute
when copying functions.

llvm-svn: 45356
2007-12-25 22:16:06 +00:00
Duncan Sands ad0ea2d430 Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Dan Gohman 5e79a6108f Use correct parentheses with the '&& "..."' idiom in an assert.
llvm-svn: 42750
2007-10-08 15:13:30 +00:00
Chris Lattner 1cc79985cd Fix PR1611 - Visibility should be ignored for a declaration
when a definition's visibility is different.  Likewise, the
visibility of two declarations mismatching is not an error.

llvm-svn: 41174
2007-08-19 22:22:54 +00:00
Lauro Ramos Venancio b2c3a67015 Fix a bug in my previous patch.
llvm-svn: 37778
2007-06-28 20:06:38 +00:00
Lauro Ramos Venancio b00c9c0d50 When linking two modules, we should copy the alias.
llvm-svn: 37776
2007-06-28 19:02:54 +00:00
Lauro Ramos Venancio 85703e3796 Propagate alignment, section name and visibility when linking "appending
global values".
Fix noinline linkage.

llvm-svn: 37482
2007-06-06 22:01:12 +00:00
Anton Korobeynikov 31fc4f9526 Implement visibility checking during linking. Also implement protected
visibility support for bitcode.

llvm-svn: 36577
2007-04-29 20:56:48 +00:00
Lauro Ramos Venancio 749e4668e7 Implement the "thread_local" keyword.
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer d84d35ba70 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner 2a8d2e0e52 simplify this code by using value::takename
llvm-svn: 34172
2007-02-11 00:39:38 +00:00
Reid Spencer 3aaaa0b2bd For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer d3ba7d9b42 Fix some comments and other minor sundry things.
llvm-svn: 33873
2007-02-04 04:43:17 +00:00
Reid Spencer 2dc3653531 Ensure that visibility and section are properly propagated.
llvm-svn: 33872
2007-02-04 04:30:33 +00:00
Reid Spencer 90246aa71e Back out last revision which was committed by accident.
llvm-svn: 33871
2007-02-04 04:29:21 +00:00
Reid Spencer 2ea1bb2b8a Make sure that section and visibility are properly propagated.
llvm-svn: 33870
2007-02-04 04:28:18 +00:00
Andrew Lenharth dd924e4e95 preserve sections of globals
llvm-svn: 33756
2007-02-01 17:12:54 +00:00
Reid Spencer 5301e7c605 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Chris Lattner 78bddc388c Read from the right place.
llvm-svn: 33611
2007-01-29 02:18:13 +00:00
Chris Lattner 7f3bd82ab9 Fix PR1139
llvm-svn: 33610
2007-01-29 00:21:34 +00:00
Reid Spencer 3ac38e99b9 For PR761:
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.

llvm-svn: 33530
2007-01-26 08:11:39 +00:00
Reid Spencer 7a9c62baa6 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer 32af9e8cc5 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.

llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Andrew Lenharth e06036d229 extern_weak linkage. fixes PR1038
llvm-svn: 32603
2006-12-15 17:35:32 +00:00
Reid Spencer b341b0861d Change inferred getCast into specific getCast. Passes all tests.
llvm-svn: 32469
2006-12-12 05:05:00 +00:00
Bill Wendling 30c0f3367c Don't use <sstream> in Streams.h but <iosfwd> instead.
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Bill Wendling f3baad3ee1 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Anton Korobeynikov 12c94949e0 Introducing external weak linkage. Darwin codegen should be added later.
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Bill Wendling 7339b8dbfd Removed #include <iostream> and replaced with llvm_* streams.
llvm-svn: 31936
2006-11-27 10:09:12 +00:00
Chris Lattner 1b9633d7f0 silence warnings
llvm-svn: 31587
2006-11-09 05:18:12 +00:00
Anton Korobeynikov d61d39ec53 Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.

llvm-svn: 30374
2006-09-14 18:23:27 +00:00
Chris Lattner 19247f36ea eliminate some ugly code, using ConstantExpr::getWithOperands instead.
llvm-svn: 29149
2006-07-14 22:21:31 +00:00
Chris Lattner 44ab8aefa6 Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll
llvm-svn: 28812
2006-06-16 01:24:04 +00:00
Chris Lattner c774592641 Fix linking of inline asm objects.
llvm-svn: 28640
2006-06-01 19:14:22 +00:00
Chris Lattner 0197e454d1 Add shufflevector support
llvm-svn: 27515
2006-04-08 01:19:47 +00:00