#
bd30929e |
| 06-Jul-2010 |
John McCall <rjmccall@apple.com> |
Validated by nightly-test runs on x86 and x86-64 darwin, including after self-host. Hopefully these results hold up on different platforms.
I tried to keep the GNU ObjC runtime happy, but it's ha
Validated by nightly-test runs on x86 and x86-64 darwin, including after self-host. Hopefully these results hold up on different platforms.
I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request.
Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with.
Document a lot of previously poorly-understood (by me, at least) behavior.
The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR.
llvm-svn: 107631
show more ...
|
#
3de064df |
| 01-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "IRgen: Make sure any prolog instructions get debug info.", the lexical scope hasn't been set up yet so this isn't valid. It was just a cleanup to the IR, so I'm going to ignore it for now.
l
Revert "IRgen: Make sure any prolog instructions get debug info.", the lexical scope hasn't been set up yet so this isn't valid. It was just a cleanup to the IR, so I'm going to ignore it for now.
llvm-svn: 107356
show more ...
|
#
d7ac9a37 |
| 30-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Make sure any prolog instructions get debug info.
llvm-svn: 107320
|
#
818efb64 |
| 27-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
misc tidying
llvm-svn: 106978
|
#
5e016ae9 |
| 27-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
finally get around to doing a significant cleanup to irgen: have CGF create and make accessible standard int32,int64 and intptr types. This fixes a ton of 80 column violations introduced by LLVMCo
finally get around to doing a significant cleanup to irgen: have CGF create and make accessible standard int32,int64 and intptr types. This fixes a ton of 80 column violations introduced by LLVMContextification and cleans up stuff a lot.
llvm-svn: 106977
show more ...
|
#
3fcc790c |
| 27-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Change IR generation for return (in the simple case) to avoid doing silly load/store nonsense in the epilog. For example, for:
int foo(int X) { int A[100]; return A[X]; }
we used to generate:
Change IR generation for return (in the simple case) to avoid doing silly load/store nonsense in the epilog. For example, for:
int foo(int X) { int A[100]; return A[X]; }
we used to generate:
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1] %tmp1 = load i32* %arrayidx ; <i32> [#uses=1] store i32 %tmp1, i32* %retval %0 = load i32* %retval ; <i32> [#uses=1] ret i32 %0 }
which codegen'd to this code:
_foo: ## @foo ## BB#0: ## %entry subq $408, %rsp ## imm = 0x198 movl %edi, 400(%rsp) movl 400(%rsp), %edi movslq %edi, %rax movl (%rsp,%rax,4), %edi movl %edi, 404(%rsp) movl 404(%rsp), %eax addq $408, %rsp ## imm = 0x198 ret
Now we generate:
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1] %tmp1 = load i32* %arrayidx ; <i32> [#uses=1] ret i32 %tmp1 }
and:
_foo: ## @foo ## BB#0: ## %entry subq $408, %rsp ## imm = 0x198 movl %edi, 404(%rsp) movl 404(%rsp), %edi movslq %edi, %rax movl (%rsp,%rax,4), %eax addq $408, %rsp ## imm = 0x198 ret
This actually does matter, cutting out 2000 lines of IR from CGStmt.ll for example.
Another interesting effect is that altivec.h functions which are dead now get dce'd by the inliner. Hence all the changes to builtins-ppc-altivec.c to ensure the calls aren't dead.
llvm-svn: 106970
show more ...
|
#
b48a2d5d |
| 23-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
polish the -finstrument-functions implementation, patch by Nelson Elhage!
llvm-svn: 106618
|
#
3c77a355 |
| 22-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
implement support for -finstrument-functions, patch by Nelson Elhage!
llvm-svn: 106507
|
#
9eb101c5 |
| 08-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.
llvm-svn: 105648
|
#
7e10f369 |
| 25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve name mangling for blocks and support mangling of static local variables within blocks. We loosely follow GCC's mangling, but since these are always internal symbols the names don't really mat
Improve name mangling for blocks and support mangling of static local variables within blocks. We loosely follow GCC's mangling, but since these are always internal symbols the names don't really matter. I intend to revisit block mangling later, because GCC's mangling is rather verbose. <rdar://problem/8015719>.
llvm-svn: 104610
show more ...
|
#
c0964b60 |
| 22-May-2010 |
Anders Carlsson <andersca@mac.com> |
Re-land the fix for PR7139.
llvm-svn: 104446
|
#
c866eb5b |
| 21-May-2010 |
Anders Carlsson <andersca@mac.com> |
Unbreak self-host.
llvm-svn: 104390
|
#
da1641cd |
| 21-May-2010 |
Anders Carlsson <andersca@mac.com> |
Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.
llvm-svn: 104387
|
#
16e94af6 |
| 03-May-2010 |
Anders Carlsson <andersca@mac.com> |
Don't copy or initialize empty classes. Fixes PR7012.
llvm-svn: 102891
|
#
b139cd58 |
| 01-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Complete reimplementation of the synthesis for implicitly-defined copy assignment operators.
Previously, Sema provided type-checking and template instantiation for copy assignment operators, then C
Complete reimplementation of the synthesis for implicitly-defined copy assignment operators.
Previously, Sema provided type-checking and template instantiation for copy assignment operators, then CodeGen would synthesize the actual body of the copy constructor. Unfortunately, the two were not in sync, and CodeGen might pick a copy-assignment operator that is different from what Sema chose, leading to strange failures, e.g., link-time failures when CodeGen called a copy-assignment operator that was not instantiation, run-time failures when copy-assignment operators were overloaded for const/non-const references and the wrong one was picked, and run-time failures when by-value copy-assignment operators did not have their arguments properly copy-initialized.
This implementation synthesizes the implicitly-defined copy assignment operator bodies in Sema, so that the resulting ASTs encode exactly what CodeGen needs to do; there is no longer any special code in CodeGen to synthesize copy-assignment operators. The synthesis of the body is relatively simple, and we generate one of three different kinds of copy statements for each base or member:
- For a class subobject, call the appropriate copy-assignment operator, after overload resolution has determined what that is. - For an array of scalar types or an array of class types that have trivial copy assignment operators, construct a call to __builtin_memcpy. - For an array of class types with non-trivial copy assignment operators, synthesize a (possibly nested!) for loop whose inner statement calls the copy constructor. - For a scalar type, use built-in assignment.
This patch fixes at least a few tests cases in Boost.Spirit that were failing because CodeGen picked the wrong copy-assignment operator (leading to link-time failures), and I suspect a number of undiagnosed problems will also go away with this change.
Some of the diagnostics we had previously have gotten worse with this change, since we're going through generic code for our type-checking. I will improve this in a subsequent patch.
llvm-svn: 102853
show more ...
|
Revision tags: llvmorg-2.7.0 |
|
#
74c10507 |
| 13-Apr-2010 |
Devang Patel <dpatel@apple.com> |
Fix debug info for cleanup block.
llvm-svn: 101100
|
#
cc2ab0cd |
| 04-Apr-2010 |
Mon P Wang <wangmp@apple.com> |
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
llvm-svn: 100305
|
#
f7f3bff6 |
| 02-Apr-2010 |
Mon P Wang <wangmp@apple.com> |
Revert r100193 since it causes failures in objc in clang
llvm-svn: 100200
|
#
4b82a887 |
| 02-Apr-2010 |
Mon P Wang <wangmp@apple.com> |
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
llvm-svn: 100193
|
#
adb58e32 |
| 30-Mar-2010 |
Bob Wilson <bob.wilson@apple.com> |
Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.
llvm-svn: 99949
|
#
231e9974 |
| 30-Mar-2010 |
Mon P Wang <wangmp@apple.com> |
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset
llvm-svn: 99930
|
#
c50c27cc |
| 30-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
the big refactoring bits of PR3782.
This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute an
the big refactoring bits of PR3782.
This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug.
llvm-svn: 99920
show more ...
|
#
a864caff |
| 23-Mar-2010 |
Anders Carlsson <andersca@mac.com> |
Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.
llvm-svn: 99250
|
#
36c569fb |
| 21-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the default arguments to ASTContext::getFunctionType(), fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception spe
Eliminate the default arguments to ASTContext::getFunctionType(), fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications.
llvm-svn: 96766
show more ...
|
#
b81884d3 |
| 19-Feb-2010 |
John McCall <rjmccall@apple.com> |
More refactoring around constructor/destructor code generation. Fix some bugs with function-try-blocks and simplify normal try-block code generation.
This implementation excludes a deleting destruct
More refactoring around constructor/destructor code generation. Fix some bugs with function-try-blocks and simplify normal try-block code generation.
This implementation excludes a deleting destructor's call to operator delete() from the function-try-block, which I believe is correct but which I can't find straightforward support for at a moment's glance.
llvm-svn: 96670
show more ...
|