#
e302792b |
| 25-Aug-2010 |
John McCall <rjmccall@apple.com> |
GCC didn't care for my attempt at API compatibility, so brute-force everything to the new constants.
llvm-svn: 112047
|
#
614dbdcd |
| 22-Aug-2010 |
John McCall <rjmccall@apple.com> |
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 ...
|
#
a1dee530 |
| 22-Aug-2010 |
John McCall <rjmccall@apple.com> |
Experiment with using first-class aggregates to represent member function pointers. I find the resulting code to be substantially cleaner, and it makes it very easy to use the same APIs for data mem
Experiment with using first-class aggregates to represent member function pointers. I find the resulting code to be substantially cleaner, and it makes it very easy to use the same APIs for data member pointers (which I have conscientiously avoided here), and it avoids a plethora of potential inefficiencies due to excessive memory copying, but we'll have to see if it actually works.
llvm-svn: 111776
show more ...
|
#
84fa510a |
| 22-Aug-2010 |
John McCall <rjmccall@apple.com> |
Abstract more member-pointerness out.
llvm-svn: 111771
|
#
32427785 |
| 14-Aug-2010 |
John McCall <rjmccall@apple.com> |
More cleanup enabling.
llvm-svn: 111070
|
#
612942d6 |
| 13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sketch out a framework for delaying the activation of a cleanup. Not yet complete or used.
llvm-svn: 111044
|
#
59966998 |
| 11-Aug-2010 |
John McCall <rjmccall@apple.com> |
Revise r110163: don't mark weak functions nounwind, because the optimizer treats that as a contract to be fulfilled by any replacements.
llvm-svn: 110864
|
#
d539d098 |
| 11-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
IRGen support for functions returning objc object types. Fixes PR7865.
llvm-svn: 110832
|
#
dc866e11 |
| 10-Aug-2010 |
Devang Patel <dpatel@apple.com> |
Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.
llvm-svn: 110694
|
#
e03edfd3 |
| 10-Aug-2010 |
Devang Patel <dpatel@apple.com> |
Even if a constant's evaluated value is used, emit debug info for the constant variable.
llvm-svn: 110660
|
#
7cd1d97e |
| 07-Aug-2010 |
John McCall <rjmccall@apple.com> |
Inline a special case of EmitAggregateCopy into EmitNullInitialization to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC. Fixes PR7834.
Also fix a subtle address-space bug in th
Inline a special case of EmitAggregateCopy into EmitNullInitialization to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC. Fixes PR7834.
Also fix a subtle address-space bug in the memset path.
llvm-svn: 110511
show more ...
|
#
8601a751 |
| 03-Aug-2010 |
John McCall <rjmccall@apple.com> |
Do a very simple pass over every function we emit to infer whether we can mark it nounwind based on whether it contains any non-nounwind calls. <rdar://problem/8087431>
llvm-svn: 110163
|
#
ba803903 |
| 28-Jul-2010 |
John McCall <rjmccall@apple.com> |
When creating a jump destination, its scope should be the scope of the enclosing normal cleanup, not the top of the EH stack. I'm *really* surprised this hasn't been causing more problems.
Fixes rd
When creating a jump destination, its scope should be the scope of the enclosing normal cleanup, not the top of the EH stack. I'm *really* surprised this hasn't been causing more problems.
Fixes rdar://problem/8231514.
llvm-svn: 109569
show more ...
|
#
5cbe152f |
| 26-Jul-2010 |
John McCall <rjmccall@apple.com> |
Test for the presence of EH branch-throughs instead of normal branch-throughs. I knew this code duplication would bite me.
llvm-svn: 109463
|
#
b412e174 |
| 25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever.
llvm-svn: 109377
|
#
ad5d61e2 |
| 23-Jul-2010 |
John McCall <rjmccall@apple.com> |
Revise cleanup IR generation to fix a major bug with cleanups (PR7686) as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups.
llvm-svn: 109274
|
#
0884a60e |
| 22-Jul-2010 |
Devang Patel <dpatel@apple.com> |
Keep track of artificial scopes introduced by line directives. For example,
#line 41 "bar.c" dummy (1, i); #line 24 "bar.h" i = f2 (i); #line 44 "bar.c"
This is tested by step-line.exp in gdb t
Keep track of artificial scopes introduced by line directives. For example,
#line 41 "bar.c" dummy (1, i); #line 24 "bar.h" i = f2 (i); #line 44 "bar.c"
This is tested by step-line.exp in gdb testsuite.
llvm-svn: 109189
show more ...
|
#
cda666cc |
| 21-Jul-2010 |
John McCall <rjmccall@apple.com> |
Rename LazyCleanup -> Cleanup. No functionality change for these last three commits.
llvm-svn: 109000
|
#
20141f2d |
| 21-Jul-2010 |
John McCall <rjmccall@apple.com> |
Rip out EHCleanupScope.
llvm-svn: 108999
|
#
11a42a46 |
| 20-Jul-2010 |
Devang Patel <dpatel@apple.com> |
Remove unused argument.
llvm-svn: 108946
|
#
f2f38701 |
| 20-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
Follow the implementation approach suggested by PR6687, which generates more efficient and more obviously conformant code. We now test for overflow of the multiply then force the result to -1 if so.
Follow the implementation approach suggested by PR6687, which generates more efficient and more obviously conformant code. We now test for overflow of the multiply then force the result to -1 if so. On X86, this generates nice code like this:
__Z4testl: ## @_Z4testl ## BB#0: ## %entry subl $12, %esp movl $4, %eax mull 16(%esp) testl %edx, %edx movl $-1, %ecx cmovel %eax, %ecx movl %ecx, (%esp) call __Znam addl $12, %esp ret
llvm-svn: 108927
show more ...
|
#
26008e07 |
| 20-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
implement rdar://5739832 - operator new should check for overflow in multiply, causing clang to compile this code into something that correctly throws a length error, fixing a potential integer overf
implement rdar://5739832 - operator new should check for overflow in multiply, causing clang to compile this code into something that correctly throws a length error, fixing a potential integer overflow security attack:
void *test(long N) { return new int[N]; }
int main() { test(1L << 62); }
We do this even when exceptions are disabled, because it is better for the code to abort than for the attack to succeed.
This is heavily based on a patch that Fariborz wrote.
llvm-svn: 108915
show more ...
|
#
2b7fc382 |
| 13-Jul-2010 |
John McCall <rjmccall@apple.com> |
Teach IR generation how to lazily emit cleanups. This has a lot of advantages, mostly in avoiding unnecessary work at compile time but also in producing more sensible block orderings.
Move the dest
Teach IR generation how to lazily emit cleanups. This has a lot of advantages, mostly in avoiding unnecessary work at compile time but also in producing more sensible block orderings.
Move the destructor cleanups for local variables over to use lazy cleanups. Eventually all cleanups will do this; for now we have some awkward code duplication.
Tell IR generation just to never produce landing pads in -fno-exceptions. This is a much more comprehensive solution to a problem which previously was half-solved by checks in most cleanup-generation spots.
llvm-svn: 108270
show more ...
|
#
09ae0329 |
| 06-Jul-2010 |
John McCall <rjmccall@apple.com> |
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 ...
|
#
2d605ac1 |
| 06-Jul-2010 |
John McCall <rjmccall@apple.com> |
When destroying a cleanup, kill any references to instructions in the entry block before deleting it. Fixes PR7575.
This really just a short-term fix before implementing lazy cleanups.
llvm-svn: 1
When destroying a cleanup, kill any references to instructions in the entry block before deleting it. Fixes PR7575.
This really just a short-term fix before implementing lazy cleanups.
llvm-svn: 107676
show more ...
|