Page MenuHomePhabricator
Feed Advanced Search

May 3 2019

ahatanak committed rL359864: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
[Sema][ObjC] Disable -Wunused-parameter for ObjC methods
May 3 2019, 12:21 AM
ahatanak closed D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
May 3 2019, 12:21 AM · Restricted Project, Restricted Project

May 2 2019

ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
  • Instead of passing a flag to CreateMetadataVar that indicates the section is in segment __DATA, just scan the section name string inside CreateMetadataVar.
  • Fix test case ns-constant-strings.m.
May 2 2019, 10:31 PM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
May 2 2019, 3:40 PM · Restricted Project
ahatanak added inline comments to D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
May 2 2019, 3:24 PM · Restricted Project
ahatanak updated the diff for D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..

Address review comments.

May 2 2019, 3:24 PM · Restricted Project
ahatanak created D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal..
May 2 2019, 10:59 AM · Restricted Project
ahatanak committed rGda7ae979f8f8: Fix typo in test case. (authored by ahatanak).
Fix typo in test case.
May 2 2019, 12:36 AM
ahatanak committed rL359761: Fix typo in test case..
Fix typo in test case.
May 2 2019, 12:36 AM
ahatanak committed rC359761: Fix typo in test case..
Fix typo in test case.
May 2 2019, 12:36 AM

Apr 30 2019

ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

I would also recommend that you go fix the warning to never fire on virtual C++ methods.

Apr 30 2019, 4:04 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Disable the warning for ObjC methods.

Apr 30 2019, 3:56 PM · Restricted Project, Restricted Project

Apr 25 2019

ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Yes, I guess we can make -Wunused-parameter cover unused parameters of pure @implementation methods too since users can probably just remove them to silence the warning.

Apr 25 2019, 8:47 PM · Restricted Project, Restricted Project
ahatanak added a comment to D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.

Yeah, I tend to think we should just suppress this unconditionally in Objective-C.

IMO this warning still makes sense for normal functions, or methods that are only declared in an @implementation. Adding a fix-it to cast to void in the function/method body would probably go a long way too.

Apr 25 2019, 3:29 PM · Restricted Project, Restricted Project
ahatanak created D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods.
Apr 25 2019, 1:42 PM · Restricted Project, Restricted Project
ahatanak committed rG8edf8f317b59: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps… (authored by ahatanak).
[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps…
Apr 25 2019, 12:42 PM
ahatanak committed rL359226: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states.
[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states
Apr 25 2019, 12:41 PM
ahatanak closed D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.
Apr 25 2019, 12:41 PM · Restricted Project

Apr 24 2019

ahatanak added a comment to D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.

The test case I'm looking at has a function with over 500k instructions and lots of ObjC runtime function calls.

Apr 24 2019, 3:52 PM · Restricted Project
ahatanak created D61100: [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states it keeps track of becomes too large.
Apr 24 2019, 3:36 PM · Restricted Project

Apr 23 2019

ahatanak committed rG53796d943901: Improve -Wuninitialized warning under ARC for block variables that are… (authored by ahatanak).
Improve -Wuninitialized warning under ARC for block variables that are…
Apr 23 2019, 4:51 PM
ahatanak committed rC359049: Improve -Wuninitialized warning under ARC for block variables that are.
Improve -Wuninitialized warning under ARC for block variables that are
Apr 23 2019, 4:51 PM
ahatanak committed rL359049: Improve -Wuninitialized warning under ARC for block variables that are.
Improve -Wuninitialized warning under ARC for block variables that are
Apr 23 2019, 4:51 PM
ahatanak committed rG5c3117b0a98d: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate. (authored by ahatanak).
[ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Apr 23 2019, 12:48 PM
ahatanak committed rL359027: [ObjC][ARC] Check the basic block size before calling.
[ObjC][ARC] Check the basic block size before calling
Apr 23 2019, 12:47 PM
ahatanak closed D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Apr 23 2019, 12:47 PM · Restricted Project, Restricted Project

Apr 19 2019

ahatanak removed a project from D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate: Restricted Project.
Apr 19 2019, 6:20 PM · Restricted Project, Restricted Project
ahatanak removed a project from D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate: Restricted Project.
Apr 19 2019, 6:19 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.

Fix the comment on why we have to check the size of the basic block before calling DominatorTree::dominate to compute the dominance relation between two instructions in the same basic block.

Apr 19 2019, 6:15 PM · Restricted Project, Restricted Project

Apr 18 2019

ahatanak created D60900: [ObjC][ARC] Check the basic block size before calling DominatorTree::dominate.
Apr 18 2019, 11:26 PM · Restricted Project, Restricted Project

Apr 17 2019

ahatanak committed rGf8268f67f562: Move the implementation of getInnermostBlockDecl to the .cpp file to fix… (authored by ahatanak).
Move the implementation of getInnermostBlockDecl to the .cpp file to fix…
Apr 17 2019, 4:59 PM
ahatanak committed rC358627: Move the implementation of getInnermostBlockDecl to the .cpp file to fix.
Move the implementation of getInnermostBlockDecl to the .cpp file to fix
Apr 17 2019, 4:58 PM
ahatanak committed rL358627: Move the implementation of getInnermostBlockDecl to the .cpp file to fix.
Move the implementation of getInnermostBlockDecl to the .cpp file to fix
Apr 17 2019, 4:58 PM
ahatanak committed rGac57af32843f: [Sema][ObjC] Don't warn about an implicitly retained self if the retaining… (authored by ahatanak).
[Sema][ObjC] Don't warn about an implicitly retained self if the retaining…
Apr 17 2019, 4:14 PM
ahatanak committed rG0b19f5aef94c: Fix formatting. NFC (authored by ahatanak).
Fix formatting. NFC
Apr 17 2019, 4:14 PM
ahatanak committed rC358624: [Sema][ObjC] Don't warn about an implicitly retained self if the.
[Sema][ObjC] Don't warn about an implicitly retained self if the
Apr 17 2019, 4:14 PM
ahatanak committed rL358624: [Sema][ObjC] Don't warn about an implicitly retained self if the.
[Sema][ObjC] Don't warn about an implicitly retained self if the
Apr 17 2019, 4:13 PM
ahatanak closed D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 17 2019, 4:13 PM · Restricted Project, Restricted Project
ahatanak committed rL358623: Fix formatting. NFC.
Fix formatting. NFC
Apr 17 2019, 4:13 PM
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Diagnose implicitly retained self in ActOnFinishFunctionBody.

Apr 17 2019, 3:22 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Rename function.

Apr 17 2019, 11:00 AM · Restricted Project, Restricted Project
ahatanak added inline comments to D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 17 2019, 9:53 AM · Restricted Project, Restricted Project
ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Remove a potentially expensive check.

Apr 17 2019, 9:53 AM · Restricted Project, Restricted Project

Apr 16 2019

ahatanak updated the diff for D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Keep a list of pairs of BlockDecl and SourceLocation and, after the body of an ObjC method is parsed, emit a diagnostic if a SourceLocation in the list is inside an escaping block.

Apr 16 2019, 6:01 PM · Restricted Project, Restricted Project

Apr 15 2019

ahatanak added a comment to D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.

Sorry, clang was failing to diagnose self referenced inside a c++ lambda that was nested inside a block.

Apr 15 2019, 4:36 PM · Restricted Project, Restricted Project
ahatanak created D60736: [Sema][ObjC] Don't warn about a block implicitly retaining self if the block is marked noescape.
Apr 15 2019, 3:38 PM · Restricted Project, Restricted Project

Apr 12 2019

ahatanak accepted D60626: [clang] Aligned allocation is actually supported in macosx 10.13.

LGTM

Apr 12 2019, 4:21 PM · Restricted Project, Restricted Project

Apr 9 2019

ahatanak committed rC358048: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of.
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
Apr 9 2019, 11:19 PM
ahatanak committed rG60c3a3b6d0f1: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named… (authored by ahatanak).
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named…
Apr 9 2019, 11:19 PM
ahatanak committed rG9ca9d32b6be0: [ObjC][ARC] Convert the retainRV marker that is passed as a named metadata into… (authored by ahatanak).
[ObjC][ARC] Convert the retainRV marker that is passed as a named metadata into…
Apr 9 2019, 11:19 PM
ahatanak committed rL358048: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of.
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
Apr 9 2019, 11:19 PM
ahatanak closed D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 9 2019, 11:18 PM · Restricted Project, Restricted Project
ahatanak committed rL358047: [ObjC][ARC] Convert the retainRV marker that is passed as a named.
[ObjC][ARC] Convert the retainRV marker that is passed as a named
Apr 9 2019, 11:18 PM
ahatanak closed D60303: [ObjC][ARC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 9 2019, 11:18 PM · Restricted Project
ahatanak added a comment to D60161: Expose non-trivial struct helpers for Swift..

Just one minor comment, but otherwise the patch looks good to me.

Apr 9 2019, 10:42 PM · Restricted Project
ahatanak added a comment to D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..

Thanks. Does this require changes to swift too?

Apr 9 2019, 1:27 PM · Restricted Project, Restricted Project
ahatanak added a comment to D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..

The upgrader rewrites the named metadata into a module flag (see https://reviews.llvm.org/D60303).

Apr 9 2019, 9:41 AM · Restricted Project, Restricted Project

Apr 4 2019

ahatanak added a comment to D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..

Corresponding llvm patch is here: https://reviews.llvm.org/D60303.

Apr 4 2019, 7:14 PM · Restricted Project, Restricted Project
ahatanak created D60303: [ObjC][ARC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 4 2019, 7:12 PM · Restricted Project
ahatanak created D60302: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 4 2019, 7:03 PM · Restricted Project, Restricted Project
ahatanak abandoned D60301: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..

I'll write the summary and send the patch again.

Apr 4 2019, 6:46 PM · Restricted Project
ahatanak created D60301: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata..
Apr 4 2019, 6:43 PM · Restricted Project

Apr 2 2019

ahatanak added inline comments to D60087: [libc++] Correctly handle Objective-C++ ARC qualifiers in std::is_pointer.
Apr 2 2019, 11:15 AM · Restricted Project
ahatanak accepted D60087: [libc++] Correctly handle Objective-C++ ARC qualifiers in std::is_pointer.

LGTM

Apr 2 2019, 11:08 AM · Restricted Project

Mar 28 2019

ahatanak committed rG8b8d36231369: [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized copy/move… (authored by ahatanak).
[CodeGen][ObjC] Adjust the addresses passed to calls to synthesized copy/move…
Mar 28 2019, 5:24 PM
ahatanak committed rG801cc3272a5f: Fix typos and formatting. NFC. (authored by ahatanak).
Fix typos and formatting. NFC.
Mar 28 2019, 5:24 PM
ahatanak committed rL357229: [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized.
[CodeGen][ObjC] Adjust the addresses passed to calls to synthesized
Mar 28 2019, 5:22 PM
ahatanak committed rC357229: [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized.
[CodeGen][ObjC] Adjust the addresses passed to calls to synthesized
Mar 28 2019, 5:22 PM
ahatanak committed rC357228: Fix typos and formatting. NFC..
Fix typos and formatting. NFC.
Mar 28 2019, 5:22 PM
ahatanak committed rL357228: Fix typos and formatting. NFC..
Fix typos and formatting. NFC.
Mar 28 2019, 5:22 PM

Mar 27 2019

ahatanak accepted D59873: Add additional mangling for struct members of non trivial structs.

LGTM

Mar 27 2019, 10:09 AM · Restricted Project, Restricted Project

Mar 21 2019

ahatanak committed rGb576c77a9ead: Don't add a tail keyword to calls to ObjC runtime functions if the calls are… (authored by ahatanak).
Don't add a tail keyword to calls to ObjC runtime functions if the calls are…
Mar 21 2019, 1:16 PM
ahatanak committed rL356707: Don't add a tail keyword to calls to ObjC runtime functions if the calls.
Don't add a tail keyword to calls to ObjC runtime functions if the calls
Mar 21 2019, 1:15 PM
ahatanak committed rG65bb3f92bd5f: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with… (authored by ahatanak).
[CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with…
Mar 21 2019, 1:00 PM
ahatanak committed rL356705: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue.
[CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue
Mar 21 2019, 1:00 PM
ahatanak committed rC356705: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue.
[CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue
Mar 21 2019, 1:00 PM
ahatanak closed D59656: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with notail on x86-64.
Mar 21 2019, 1:00 PM · Restricted Project, Restricted Project
ahatanak updated the diff for D59656: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with notail on x86-64.

Rename function.

Mar 21 2019, 12:13 PM · Restricted Project, Restricted Project
ahatanak added a comment to D59656: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with notail on x86-64.

There are existing test cases that test notail isn't added to calls on targets that aren't x86-64 (for example, test/CodeGenObjC/arc-arm.m), so I didn't write a new one.

Mar 21 2019, 11:14 AM · Restricted Project, Restricted Project
ahatanak created D59656: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with notail on x86-64.
Mar 21 2019, 11:09 AM · Restricted Project, Restricted Project

Mar 14 2019

ahatanak committed rG6bc3a7703b31: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and… (authored by ahatanak).
[CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and…
Mar 14 2019, 8:17 AM
ahatanak committed rC356156: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol.
[CodeGen][ObjC] Remove the leading 'l' from symbols for protocol
Mar 14 2019, 8:17 AM
ahatanak committed rL356156: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol.
[CodeGen][ObjC] Remove the leading 'l' from symbols for protocol
Mar 14 2019, 8:17 AM
ahatanak closed D59234: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and protocol list.
Mar 14 2019, 8:17 AM · Restricted Project, Restricted Project
ahatanak added a comment to D59234: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and protocol list.

Okay, I'll remove the leading 'l' from other symbols and make them internal in a separate patch.

Mar 14 2019, 8:17 AM · Restricted Project, Restricted Project

Mar 13 2019

ahatanak added a comment to D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap.

Do you mean copying the block to the heap before assigning it to wb and releasing it after the assignment inside bar? Wouldn't the block assigned to wb be deallocated after the release?

Mar 13 2019, 5:34 PM · Restricted Project
ahatanak added a comment to D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap.

Sorry, I misread the code. If you change the parameter type of bar to BlockTy, the code crashes. If the type is id, it doesn't crash because IRGen copies the block to the heap in foo before passing it to bar.

Mar 13 2019, 5:10 PM · Restricted Project
ahatanak added a comment to D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap.

Seems like the chromium code is valid and shouldn't crash. John/Erik what do you think? The following code also crashes with this patch applied.

typedef void (^BlockTy)();

BlockTy sb;
__weak BlockTy wb;

void foo(id a) {
  auto b = ^{ NSLog(@"foo %@", a); };
  wb = b; // block isn't copied to the heap.
  sb = b; // block is copied to the heap.
}

int main() {
  auto x = [NSObject new];
  foo(x);
  sb();
  wb();
  return 0;
}

The assignment to wb seems like an escape of some sort. What happens for this similar code?

typedef void (^BlockTy)();

BlockTy sb;
__weak BlockTy wb;

void bar(id b) {
  wb = b;
  sb = b;
}

void foo(id a) {
  bar(^{ NSLog(@"foo %@", a); });
}

int main() {
  auto x = [NSObject new];
  foo(x);
  sb();
  wb();
  return 0;
}
Mar 13 2019, 4:31 PM · Restricted Project
ahatanak added a comment to D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap.

Seems like the chromium code is valid and shouldn't crash. John/Erik what do you think? The following code also crashes with this patch applied.

Mar 13 2019, 4:13 PM · Restricted Project

Mar 11 2019

ahatanak added a comment to D59234: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and protocol list.

There are other symbols that starts with 'l' and have private linkage. I haven't made any changes to those symbols in this patch, but I think it's possible to remove the leading 'l' from those symbols and change the linkage to internal if we want to keep the symbol names.

Mar 11 2019, 4:01 PM · Restricted Project, Restricted Project
ahatanak created D59234: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and protocol list.
Mar 11 2019, 3:46 PM · Restricted Project, Restricted Project

Mar 8 2019

ahatanak committed rG62d1d024ab35: Use {{.*}} in test case to match the type of wide string literals. (authored by ahatanak).
Use {{.*}} in test case to match the type of wide string literals.
Mar 8 2019, 7:20 AM
ahatanak committed rC355700: Use {{.*}} in test case to match the type of wide string literals..
Use {{.*}} in test case to match the type of wide string literals.
Mar 8 2019, 7:19 AM
ahatanak committed rL355700: Use {{.*}} in test case to match the type of wide string literals..
Use {{.*}} in test case to match the type of wide string literals.
Mar 8 2019, 7:19 AM

Mar 7 2019

ahatanak committed rGa453455cee67: Fix test case committed in r355662. (authored by ahatanak).
Fix test case committed in r355662.
Mar 7 2019, 9:32 PM
ahatanak committed rL355664: Fix test case committed in r355662..
Fix test case committed in r355662.
Mar 7 2019, 9:32 PM
ahatanak committed rC355664: Fix test case committed in r355662..
Fix test case committed in r355662.
Mar 7 2019, 9:32 PM
ahatanak committed rG1488ee4bd541: [ObjC] Emit a boxed expression as a compile-time constant if the expression… (authored by ahatanak).
[ObjC] Emit a boxed expression as a compile-time constant if the expression…
Mar 7 2019, 8:45 PM
ahatanak committed rC355662: [ObjC] Emit a boxed expression as a compile-time constant if the.
[ObjC] Emit a boxed expression as a compile-time constant if the
Mar 7 2019, 8:45 PM
ahatanak committed rL355662: [ObjC] Emit a boxed expression as a compile-time constant if the.
[ObjC] Emit a boxed expression as a compile-time constant if the
Mar 7 2019, 8:44 PM