Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

Feed Advanced Search

Sep 13 2023

brendandahl added a comment to rG88b7e06dcf97: Revert "[clang][CodeGen] Emit annotations for function declarations.".

Thanks, I'm able to reproduce. Seems to be a difference between -c and -cc1. With -c the global value of the mangled name of the constructor is not being found. Looking into it more...

Sep 13 2023, 11:34 AM · Restricted Project, Restricted Project
brendandahl added a comment to rG88b7e06dcf97: Revert "[clang][CodeGen] Emit annotations for function declarations.".

@bkramer
I'm unable to reproduce the crash. What flags are you compiling with?

Sep 13 2023, 10:27 AM · Restricted Project, Restricted Project

Sep 12 2023

brendandahl updated the summary of D156172: [clang][CodeGen] Emit annotations for function declarations..
Sep 12 2023, 1:04 PM · Restricted Project, Restricted Project

Sep 6 2023

brendandahl updated the diff for D156172: [clang][CodeGen] Emit annotations for function declarations..

Rebase and fix unused variable warning.

Sep 6 2023, 3:47 PM · Restricted Project, Restricted Project

Aug 24 2023

brendandahl added a comment to D156172: [clang][CodeGen] Emit annotations for function declarations..

@efriedma ping

Aug 24 2023, 2:00 PM · Restricted Project, Restricted Project

Aug 8 2023

brendandahl added a comment to D156172: [clang][CodeGen] Emit annotations for function declarations..

@efriedma I've updated the patch to fix the decl-use-decl example and added a test for it. Anything else?

Aug 8 2023, 11:24 AM · Restricted Project, Restricted Project

Aug 3 2023

brendandahl updated the diff for D156172: [clang][CodeGen] Emit annotations for function declarations..

Cleanup some extra brackets.

Aug 3 2023, 1:23 PM · Restricted Project, Restricted Project
brendandahl updated the diff for D156172: [clang][CodeGen] Emit annotations for function declarations..

Update deferred annotations whenever EmitGlobalDefinition is called
with a FunctionDecl and it has already been used or defined.

Aug 3 2023, 12:07 PM · Restricted Project, Restricted Project

Aug 2 2023

brendandahl updated the diff for D156172: [clang][CodeGen] Emit annotations for function declarations..

Switch to emitting annotations and the end.

Aug 2 2023, 4:08 PM · Restricted Project, Restricted Project

Jul 27 2023

brendandahl added a comment to D156172: [clang][CodeGen] Emit annotations for function declarations..

I looked into the above issue with mixing declarations and definitions and I think I can fix that by leaving the AddGlobalAnnotations call in EmitGlobalFunctionDefinition and only calling AddGlobalAnnotations from GetOrCreateLLVMFunction when it's for a definition. However, with that I'm running into some duplicate annotations being created with C++ templates that I need to fix.

Jul 27 2023, 12:11 PM · Restricted Project, Restricted Project

Jul 25 2023

brendandahl added a comment to D156172: [clang][CodeGen] Emit annotations for function declarations..

That example appears to still work the same with my patch:

Jul 25 2023, 2:06 PM · Restricted Project, Restricted Project
brendandahl added a comment to D156172: [clang][CodeGen] Emit annotations for function declarations..

A little more context for the new reviewers. Over in this patch I added support for annotations to be emitted into WebAssembly. We'd like to use this to mark imported (declarations) and exported (definitions) of functions with special attributes.

Jul 25 2023, 12:25 PM · Restricted Project, Restricted Project

Jul 24 2023

brendandahl added a reviewer for D156172: [clang][CodeGen] Emit annotations for function declarations.: aaron.ballman.
Jul 24 2023, 3:09 PM · Restricted Project, Restricted Project
brendandahl requested review of D156172: [clang][CodeGen] Emit annotations for function declarations..
Jul 24 2023, 3:07 PM · Restricted Project, Restricted Project

Jul 11 2023

brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Rebase on main.

Jul 11 2023, 10:48 AM · Restricted Project, Restricted Project, Restricted Project

Jun 27 2023

brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 27 2023, 4:40 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Remove annotate arguments. Change name from func_attr to llvm.func_attr.

Jun 27 2023, 4:40 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 27 2023, 3:34 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl retitled D150803: [WebAssembly] Support `annotate` clang attributes for marking functions. from Add a new `wasm_custom` clang attribute for marking functions. to [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 27 2023, 3:32 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl added a comment to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Marking as requested changes so it's clear there's more worth discussing, so we don't accidentally land this.

Jun 27 2023, 3:00 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Use the annotate attribute to generate custom sections.

Jun 27 2023, 1:54 PM · Restricted Project, Restricted Project, Restricted Project

Jun 22 2023

brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 22 2023, 9:50 AM · Restricted Project, Restricted Project, Restricted Project

Jun 21 2023

brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 21 2023, 3:39 PM · Restricted Project, Restricted Project, Restricted Project

Jun 20 2023

brendandahl added a comment to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

@aaron.ballman or @erichkeane Did you want to re-review after that latest changes (more generic attribute) or are things good to go?

Jun 20 2023, 11:43 AM · Restricted Project, Restricted Project, Restricted Project

Jun 14 2023

brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Review comments.

Jun 14 2023, 9:40 AM · Restricted Project, Restricted Project, Restricted Project
brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 14 2023, 9:39 AM · Restricted Project, Restricted Project, Restricted Project

Jun 13 2023

brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Fix few remaining issues.

Jun 13 2023, 11:40 AM · Restricted Project, Restricted Project, Restricted Project
brendandahl retitled D150803: [WebAssembly] Support `annotate` clang attributes for marking functions. from [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions. to Add a new `wasm_custom` clang attribute for marking functions..
Jun 13 2023, 11:35 AM · Restricted Project, Restricted Project, Restricted Project
brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

After some feedback, a few people have indicated they'd like to do something similar to this, but for their own attributes. I've changed to a more generic attribute that allows arbitrary strings. Now a custom section will be created for each unique attribute.

Jun 13 2023, 11:33 AM · Restricted Project, Restricted Project, Restricted Project

Jun 6 2023

brendandahl added a comment to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Hm, this is interesting because in the long term we plan to have stack switching in wasm, which could allow for similar async behavior that JSPI has, and could be useful in non-web systems. But that's a ways off. The file format we are generating with this CL will be used in emscripten sooner (and we may want to try to stabilize it some point, possibly before pure wasm stack switching is usable in non-web systems).
So overall I kind of feel like I could go either way on this. Curious if @sunfish has had any thoughts about async outside of emscripten.

When we do have stack switching, would you anticipate still using this wasm_async attribute, or would we switch to something else at that point?

Jun 6 2023, 1:45 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 6 2023, 1:40 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Review comments. Add tombstone for unused functions.

Jun 6 2023, 1:38 PM · Restricted Project, Restricted Project, Restricted Project

Jun 1 2023

brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
Jun 1 2023, 2:59 PM · Restricted Project, Restricted Project, Restricted Project

May 31 2023

brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Address comments.

May 31 2023, 3:41 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
May 31 2023, 3:40 PM · Restricted Project, Restricted Project, Restricted Project

May 24 2023

brendandahl added inline comments to D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
May 24 2023, 3:02 PM · Restricted Project, Restricted Project, Restricted Project
brendandahl updated the diff for D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..

Review comments.

May 24 2023, 3:02 PM · Restricted Project, Restricted Project, Restricted Project

May 17 2023

brendandahl requested review of D150803: [WebAssembly] Support `annotate` clang attributes for marking functions..
May 17 2023, 10:45 AM · Restricted Project, Restricted Project, Restricted Project