| #
74aa7e1e |
| 01-Aug-2008 |
Daniel Dunbar <[email protected]> |
Support constructor and destructor attributes in CodeGen
- There is an miscompilation issue remaining due to a poor interaction between the delayed emission of static functions and the emissi
Support constructor and destructor attributes in CodeGen
- There is an miscompilation issue remaining due to a poor interaction between the delayed emission of static functions and the emission of constructors, but that already existed prior to this change.
llvm-svn: 54258
show more ...
|
| #
e49df9b5 |
| 30-Jul-2008 |
Daniel Dunbar <[email protected]> |
Change CodeGenModule GlobalDeclMap to directly reference globals instead of mapping the decl to a bitcast of the global to the correct type. - GetAddrOf{Function,GlobalVar} introduce the bitcast o
Change CodeGenModule GlobalDeclMap to directly reference globals instead of mapping the decl to a bitcast of the global to the correct type. - GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now.
- This solves a problem where a dangling pointer could be introduced by the RAUW done when replacing a forward or tentative definition. See testcase for more details.
- Fixes <rdar://problem/6108358>
llvm-svn: 54211
show more ...
|
| #
9c426524 |
| 29-Jul-2008 |
Daniel Dunbar <[email protected]> |
Rework codegen emission of globals - No (intended) functionality change.
- Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative defi
Rework codegen emission of globals - No (intended) functionality change.
- Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative definition from those that are the final definition.
- Lazy construction is now encapsulated in GetAddrOf{Function,GlobalVar} while final definitions are constructed in EmitGlobal{Function,Var}Definition. - External interface for dealing with globals is now limited to EmitGlobal and GetAddrOf{Function,GlobalVar}.
- Also updated helper functions dealing with statics, annotations, and ctors to be private.
llvm-svn: 54179
show more ...
|
| #
837fd272 |
| 29-Jul-2008 |
Daniel Dunbar <[email protected]> |
Fix codegen of chained declarations - Killed useless CodeGenModule::EmitGlobalVarDeclarator, instead just recurse on any ScopedDecl. - Fix for <rdar://problem/6093838>
llvm-svn: 54162
|
| #
390d39ac |
| 21-Jul-2008 |
Chris Lattner <[email protected]> |
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>, simplifying code along the way and fixing a problem and memory leak or two.
llvm-svn: 53876
|
| #
d004505b |
| 21-Jul-2008 |
Chris Lattner <[email protected]> |
introduce a new ObjCList templated class and start moving various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl.
llvm-svn: 53856
|
| #
bf231a61 |
| 26-Jun-2008 |
Chris Lattner <[email protected]> |
refactor more objc codegen interfaces to pass around selectors so we don't push strings into LLVM IR and then have to read them back out.
llvm-svn: 52765
|
| #
882034dd |
| 26-Jun-2008 |
Chris Lattner <[email protected]> |
indenting and other minor things.
llvm-svn: 52764
|
| #
87ab27d4 |
| 26-Jun-2008 |
Chris Lattner <[email protected]> |
give CreateObjCRuntime a full CGM so it can get whatever state it needs, instead of passing in just a couple random things it currently happens to use.
llvm-svn: 52756
|
|
Revision tags: llvmorg-2.3.0 |
|
| #
b6f79538 |
| 08-Jun-2008 |
Nuno Lopes <[email protected]> |
implement the alias attirbute (in both Sema and Codegen)
llvm-svn: 52092
|
| #
158143ad |
| 05-Jun-2008 |
Sanjiv Gupta <[email protected]> |
Emit debug information for global and static variables when -g is specified.
llvm-svn: 51993
|
| #
2425cd81 |
| 04-Jun-2008 |
Eli Friedman <[email protected]> |
For setting attributes, don't assume there are ParamVarDecls available, because trying to access non-existent ParamVarDecls can crash. Testcase from the original source for PR2414.
llvm-svn: 51960
|
| #
f6b091f7 |
| 01-Jun-2008 |
Eli Friedman <[email protected]> |
First cut at setting attributes for functions and calls; this puts us much closer to passing the gcc struct layout tests.
It might be possible to refactor this a bit, but I'm not sure there's actu
First cut at setting attributes for functions and calls; this puts us much closer to passing the gcc struct layout tests.
It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful.
To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this.
llvm-svn: 51839
show more ...
|
| #
1200aca7 |
| 01-Jun-2008 |
Anton Korobeynikov <[email protected]> |
Support for code generation of Objective-C top-level language constructs. Implemented by David Chisnall!
llvm-svn: 51835
|
| #
6859a1b9 |
| 30-May-2008 |
Eli Friedman <[email protected]> |
PR1893: Fix up the type of tentative definitions of incomplete array types so that they end up the correct size.
llvm-svn: 51787
|
| #
c18d9d53 |
| 30-May-2008 |
Eli Friedman <[email protected]> |
Allow the type of a global to be different from the type of its associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving p
Allow the type of a global to be different from the type of its associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving pointers has to be turned into a struct because the elements can have incompatible types.
I refactored the code a bit to make it more readable; now, the logic for definitions is all in EmitGlobalVarInit.
The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it separately.
By itself, this patch should not cause any visible changes.
llvm-svn: 51783
show more ...
|
| #
617ba48f |
| 30-May-2008 |
Eli Friedman <[email protected]> |
Always check that the definition of a function has the correct type. This fixes a crash on the included testcase (found in NetHack).
llvm-svn: 51767
|
| #
174d9c26 |
| 29-May-2008 |
Eli Friedman <[email protected]> |
Add CodeGen support for alignment on globals, both for unusual natural alignment and alignment attributes.
llvm-svn: 51676
|
| #
d72a9624 |
| 29-May-2008 |
Eli Friedman <[email protected]> |
Tentative declarations are supposed to have common linkage, not weak. This change makes clang generate the same thing as llvm-gcc.
llvm-svn: 51674
|
| #
70f5a921 |
| 27-May-2008 |
Eli Friedman <[email protected]> |
The cache is working again; re-enable it.
llvm-svn: 51587
|
| #
078c963a |
| 27-May-2008 |
Eli Friedman <[email protected]> |
Add a more reliable check for whether a static declaration has already been used. In preparation for the fix to PR2360, but also a minor bug in its own right.
llvm-svn: 51583
|
| #
df649f3d |
| 26-May-2008 |
Eli Friedman <[email protected]> |
Emit memmove, not memcpy, for structure copies; this is unfortunately required for correctness in cases of copying a struct to itself or to an overlapping struct (itself for cases like *a = *a, and
Emit memmove, not memcpy, for structure copies; this is unfortunately required for correctness in cases of copying a struct to itself or to an overlapping struct (itself for cases like *a = *a, and overlapping is possible with unions).
Hopefully, this won't end up being a perf issue; LLVM *should* be able to optimize memmove to memcpy in a lot of cases, and for small copies the generated code *should* be mostly comparable. (In reality, LLVM is currently horrible at optimizing memmove, but that's a bug, not a fundamental issue.)
gcc currently generates wrong code; that's http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667.
llvm-svn: 51566
show more ...
|
| #
75d69da5 |
| 22-May-2008 |
Dan Gohman <[email protected]> |
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::Visibil
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library.
llvm-svn: 51398
show more ...
|
| #
3ed1d5f4 |
| 20-May-2008 |
Eli Friedman <[email protected]> |
Disable the function address cache; this doesn't have any ill effects, as far as I can tell, and it fixes code like test/CodeGen/functions.c.
(Whatever performance effect it might have, crashing on
Disable the function address cache; this doesn't have any ill effects, as far as I can tell, and it fixes code like test/CodeGen/functions.c.
(Whatever performance effect it might have, crashing on a construct like this isn't really acceptable; I've run into this multiple times.)
llvm-svn: 51312
show more ...
|
| #
15cb6690 |
| 08-May-2008 |
Sanjiv Gupta <[email protected]> |
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.
llvm-svn: 50848
show more ...
|