| #
614dbdcd |
| 22-Aug-2010 |
John McCall <[email protected]> |
Go back to asking CodeGenTypes whether a type is zero-initializable. Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that
Go back to asking CodeGenTypes whether a type is zero-initializable. Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so.
llvm-svn: 111786
show more ...
|
| #
86353416 |
| 21-Aug-2010 |
John McCall <[email protected]> |
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that it deserves its own enumerator. Obviously the implementations should closely follow the Itanium ABI except in cases of diverge
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that it deserves its own enumerator. Obviously the implementations should closely follow the Itanium ABI except in cases of divergence.
llvm-svn: 111749
show more ...
|
| #
6bcb07ad |
| 19-Aug-2010 |
Charles Davis <[email protected]> |
Add some enum goodness as requested by Chris. Now instead of storing the active C++ ABI as a raw string, we store it as an enum. This should improve performance somewhat.
And yes, this time, I start
Add some enum goodness as requested by Chris. Now instead of storing the active C++ ABI as a raw string, we store it as an enum. This should improve performance somewhat.
And yes, this time, I started from a clean build directory, and all the tests passed. :)
llvm-svn: 111507
show more ...
|
| #
dcfba7b3 |
| 18-Aug-2010 |
Alexis Hunt <[email protected]> |
Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accom
Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this.
Some other notes about newly-generated attribute classes:
- The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td
- Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument).
Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name.
llvm-svn: 111455
show more ...
|
| #
35b077e6 |
| 17-Aug-2010 |
Benjamin Kramer <[email protected]> |
Convert all uses of StringLiteral::getStrData() to StringLiteral::getString() and remove getStrData(). Patch by Peter Davies (with some tweaks).
llvm-svn: 111229
|
| #
b3732bb3 |
| 12-Aug-2010 |
John McCall <[email protected]> |
Just disable the hidden-visibility optimization for now by hiding it behind a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects,
Just disable the hidden-visibility optimization for now by hiding it behind a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects, and the optimization isn't really that valuable. Platforms with less ornery linkers can feel free to enable this.
llvm-svn: 110979
show more ...
|
| #
6ff7161d |
| 08-Aug-2010 |
Eric Christopher <[email protected]> |
Thread local variables aren't considered common linkage.
llvm-svn: 110530
|
| #
5513fce9 |
| 05-Aug-2010 |
John McCall <[email protected]> |
It turns out that linkers (at least, the Darwin linker) don't necessarily do the right thing with mixed-visibility symbols, so disable the visibility optimization where that's possible, i.e. with tem
It turns out that linkers (at least, the Darwin linker) don't necessarily do the right thing with mixed-visibility symbols, so disable the visibility optimization where that's possible, i.e. with template classes (since it's possible that an arbitrary template might be subject to an explicit instantiation elsewhere). 447.dealII actually does this.
I've put the code under an option that's currently not hooked up to anything.
llvm-svn: 110374
show more ...
|
| #
570024a8 |
| 05-Aug-2010 |
Eli Friedman <[email protected]> |
Implement #pragma GCC visibility.
llvm-svn: 110315
|
| #
e16adc2b |
| 04-Aug-2010 |
John McCall <[email protected]> |
Emit standard-library RTTI with external linkage, not weak_odr.
Apply hidden visibility to most RTTI; libstdc++ does not rely on exact pointer equality for the type info (just the type info names).
Emit standard-library RTTI with external linkage, not weak_odr.
Apply hidden visibility to most RTTI; libstdc++ does not rely on exact pointer equality for the type info (just the type info names). Apply the same optimization to RTTI that we do to vtables.
Fixes PR5962.
llvm-svn: 110192
show more ...
|
| #
c904933a |
| 29-Jul-2010 |
Argyrios Kyrtzidis <[email protected]> |
Change the name to something less terrible; suggestion by Doug. No functionality change.
llvm-svn: 109797
|
| #
c81af03f |
| 29-Jul-2010 |
Argyrios Kyrtzidis <[email protected]> |
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This is essentially a CodeGen predicate that is also needed
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext, thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.
This fixes current (and avoids future) codegen-from-PCH bugs.
llvm-svn: 109784
show more ...
|
| #
79ac9ed7 |
| 28-Jul-2010 |
Gabor Greif <[email protected]> |
we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself
llvm-svn: 109575
|
| #
c0279a98 |
| 27-Jul-2010 |
Argyrios Kyrtzidis <[email protected]> |
Revert r109546, it broke linux build.
llvm-svn: 109550
|
| #
4fac2806 |
| 27-Jul-2010 |
Argyrios Kyrtzidis <[email protected]> |
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This function is part of the public CodeGen interface since
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. This fixes current (and avoids future) codegen-from-PCH bugs.
llvm-svn: 109546
show more ...
|
| #
6e7e8cc1 |
| 22-Jul-2010 |
Fariborz Jahanian <[email protected]> |
atch for implementation of objective-c's -Wselector warning flag in clang. Little more to do for a PCH issue. Radar 6507158.
llvm-svn: 109129
|
| #
3348e2d1 |
| 16-Jul-2010 |
Daniel Dunbar <[email protected]> |
IRgen: Support user defined attributes on block runtime functions. - This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the targ
IRgen: Support user defined attributes on block runtime functions. - This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the target. This doesn't work in Clang because we aren't using the AST decl for these globals.
- The fix is a pretty gross hack which just watches all the decls for the specific blocks globals we need to know about; if we see one we use it, otherwise we use the hand coded type.
In time, I would like to clean this up by changing IRgen to ask Sema/AST for the decl, which would then be lazily loaded from the builtin table if necessary. This could be used in a whole host of places in IRgen and would get rid of a lot of grotty hand coding of LLVM IR; however, we need some extra Sema support for this as well as support for builtin global variables.
llvm-svn: 108482
show more ...
|
| #
900546d2 |
| 16-Jul-2010 |
Daniel Dunbar <[email protected]> |
IRgen: Move blocks runtime interfaces to CodeGenModule.
llvm-svn: 108481
|
| #
70013b64 |
| 15-Jul-2010 |
John McCall <[email protected]> |
When deferring the emission of declarations with initializers in C++, remember the order they appeared in the translation unit. If they get emitted, put them in their proper order. Fixes rdar://pro
When deferring the emission of declarations with initializers in C++, remember the order they appeared in the translation unit. If they get emitted, put them in their proper order. Fixes rdar://problem/7458115
llvm-svn: 108477
show more ...
|
| #
8997690f |
| 15-Jul-2010 |
Douglas Gregor <[email protected]> |
Don't suppress the emission of available_externally functions marked with always_inline attribute. Thanks to Howard for the tip.
llvm-svn: 108469
|
| #
a700f688 |
| 13-Jul-2010 |
Douglas Gregor <[email protected]> |
Reinstate the optimization suppressing available_externally functions at -O0. The only change from the previous patch is that we don't try to generate virtual method thunks for an available_externall
Reinstate the optimization suppressing available_externally functions at -O0. The only change from the previous patch is that we don't try to generate virtual method thunks for an available_externally function.
llvm-svn: 108230
show more ...
|
| #
553f3a9b |
| 12-Jul-2010 |
Douglas Gregor <[email protected]> |
Speculatively revert r108156; it appears to be breaking self-host.
llvm-svn: 108194
|
| #
dbb2806a |
| 12-Jul-2010 |
Douglas Gregor <[email protected]> |
Do not generate LLVM IR for available_externally function bodies at -O0, since we won't be using the definitions for anything anyway. For lib/System/Path.o when built in Debug+Asserts mode, this lead
Do not generate LLVM IR for available_externally function bodies at -O0, since we won't be using the definitions for anything anyway. For lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4% improvement in compile time (and suppresses 440 function bodies).
<rdar://problem/7987644>
llvm-svn: 108156
show more ...
|
| #
36ea3225 |
| 07-Jul-2010 |
Argyrios Kyrtzidis <[email protected]> |
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-se
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
show more ...
|
| #
09ae0329 |
| 06-Jul-2010 |
John McCall <[email protected]> |
Provide a hook for the benefit of clients using clang IR gen as a subroutine: emit metadata associating allocas and global values with a Decl*. This feature is controlled by an option that (intentio
Provide a hook for the benefit of clients using clang IR gen as a subroutine: emit metadata associating allocas and global values with a Decl*. This feature is controlled by an option that (intentionally) cannot be enabled on the command line.
To use this feature, simply set CodeGenOptions.EmitDeclMetadata = true; and then interpret the completely underspecified metadata. :)
llvm-svn: 107739
show more ...
|