[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-09-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. I'm still working on a repro, but after this patch we're seeing "truncated profile data" errors in chromium Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138846/new/ https://reviews.llvm.org/D138846

[PATCH] D157762: Implement [[msvc::no_unique_address]]

2023-09-07 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. turned this into a github PR https://github.com/llvm/llvm-project/pull/65675/commits/923a43cd6386f6e57023fd8928eed0dc0ab04d57 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762

[PATCH] D157762: Implement [[msvc::no_unique_address]]

2023-09-06 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 556091. akhuang added a comment. add note to the docs about no ABI compatibility Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files:

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-09-06 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 556090. akhuang added a comment. more code updates and added some test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files:

[PATCH] D158857: [clang][aarch64] Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr for aarch64

2023-08-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang accepted this revision. akhuang added a comment. This revision is now accepted and ready to land. I think this looks good to me. I remember I also had to make this change to accept old datalayout strings https://reviews.llvm.org/D67631. CHANGES SINCE LAST ACTION

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 551662. akhuang added a comment. address small fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files: clang/include/clang/Basic/Attr.td

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 2 inline comments as done. akhuang added a comment. I'm still trying to figure out the MSVC layouts. I used the EmptySubobjects class for a lot of the logic, which is not always the same as what MSVC does. (some examples of differences in https://godbolt.org/z/6cP554ddb)

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/AST/Decl.cpp:4523-4524 bool FieldDecl::isPotentiallyOverlapping() const { - return hasAttr() && getType()->getAsCXXRecordDecl(); + return (hasAttr() || + hasAttr()) && +

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 551576. akhuang added a comment. combine attributes into the same attribute and add accessors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files:

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1410 + For Windows targets, ``[[no_unique_address]]`` is ignored, but there is a + similar attribute spelled ``[[msvc::no_unique_address]]``. }];

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-17 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 551242. akhuang marked an inline comment as done. akhuang added a comment. Herald added a reviewer: shafik. Add function to check for no_unique_address attributes Some changes to layout code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-17 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/AST/Decl.cpp:4523-4524 bool FieldDecl::isPotentiallyOverlapping() const { - return hasAttr() && getType()->getAsCXXRecordDecl(); + return (hasAttr() || + hasAttr()) && + getType()->getAsCXXRecordDecl();

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This attribute should match the behavior of MSVC's [[msvc::no_unique_address]]

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-26 Thread Amy Huang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG27dab4d305ac: Reland Try to implement lambdas with inalloca parameters by forwarding without… (authored by akhuang). Repository: rG LLVM Github

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544101. akhuang added a comment. add TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544090. akhuang added a comment. go back to previous __impl naming method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files:

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + rnk wrote: > akhuang wrote: > > The old code tried to find the "" part of the

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544086. akhuang added a comment. Add some functions to MicrosoftMangle so we can pass in a custom function name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-21 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 543038. akhuang added a comment. another fix to function naming code (do the same thing as before except when the mangled name is a hash) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + The old code tried to find the "" part of the function name and replace the

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 542721. akhuang added a comment. Change impl function naming scheme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files:

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 539795. akhuang added a comment. minor fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5104 +if (CallInfo.isDelegateCall()) { + NeedCopy = false; +} else if (Addr.getAlignment() < Align && rnk wrote: > Please add a comment about this. We need to avoid

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 539784. akhuang added a comment. Fix alignment problem Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1319 + // Check if the invoker is being emitted (could be in any calling conv). + for (CallingConv CC : {CC_C, CC_X86StdCall, CC_X86FastCall, CC_X86ThisCall, CC_X86VectorCall}) +if

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-06-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5103 -if (Addr.getAlignment() < Align && +if (CallInfo.isDelegateCall()) { + NeedCopy = false; rnk wrote: > akhuang wrote: > > I think the problem is that it tries

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-06-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D154007#4457561 , @efriedma wrote: > I'm not confident that isUsed() works the way you want it to in this context. > In particular, if the code in question runs before we've translated the > whole translation unit, the

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-06-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit 8ed7aa59f489715d39d32e72a787b8e75cfda151

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-20 Thread Amy Huang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG015049338d7e: Try to implement lambdas with inalloca parameters by forwarding without use of… (authored by akhuang). Repository: rG LLVM Github

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 533079. akhuang added a comment. rebase and clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-16 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1470 +->getLambdaStaticInvoker()) && + !Fn->getName().contains("__impl")) { +// If emitting a lambda with static invoker on X86 Windows, change

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-16 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 532291. akhuang added a comment. Use isDelegateCall to check whether function is actual call op fn or not Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files:

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 531571. akhuang added a comment. update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1472 +// the call operator body. +EmitLambdaStaticInvokeBody(cast(FD)); } else if (FD->isDefaulted() && isa(FD) && efriedma wrote: > akhuang wrote: > > efriedma wrote: >

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 531569. akhuang added a comment. Emit call op which forwards %this argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files:

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 531435. akhuang added a comment. Call GenerateCode to emit __impl function body Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files:

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3097 + FD->getLocation(), FD->getLocation()); +CGF.EmitFunctionBody(FD->getBody()); +CGF.FinishFunction(); efriedma wrote: > Is there any way we can use

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-08 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 529780. akhuang added a comment. Fix ordering in the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-08 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 529755. akhuang added a comment. more cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-08 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D137872#4357268 , @efriedma wrote: > In D137872#4348314 , @akhuang wrote: > >> In D137872#4327615 , @efriedma >> wrote: >> >>> I'm having a

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-08 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 529750. akhuang added a comment. remove print statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-06-08 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 529747. akhuang added a comment. - move call operator emission into the path in `GenerateCode` - formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files:

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-05-16 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D137872#4327615 , @efriedma wrote: > I'm having a bit of trouble following how exactly the thunk creation is > working here... do we generate different code depending on whether the call > operator and/or the static invoker

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2023-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. whoops, I've left this here for a while.. @efriedma, are you able to review it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 ___

[PATCH] D144931: DebugInfo: Disable ctor homing for types with only deleted (non copy/move) ctors

2023-02-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang accepted this revision. akhuang added a comment. This revision is now accepted and ready to land. Thanks for adding this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144931/new/ https://reviews.llvm.org/D144931

[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.

2022-12-07 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. ping @efriedma, do you mind looking at this again? thanks! Comment at: clang/include/clang/CodeGen/CGFunctionInfo.h:571 + /// Whether this function should avoid inalloca arguments. + unsigned DontInAlloca: 1; + rnk wrote: > This is

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 478324. akhuang marked 3 inline comments as done. akhuang added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files:

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-22 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 477289. akhuang marked 4 inline comments as done. akhuang added a comment. add to test case, modify name mangling, change fn info opts enum type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D137872#3925723 , @efriedma wrote: > I'm not quite sure I understand what's happening here. Does this actually > avoid generating two copies of the function body if both the call operator > and the conversion are used?

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 476634. akhuang added a comment. cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/ https://reviews.llvm.org/D137872 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 476633. akhuang added a comment. Clean up existing code and add code to make the call operator also call the new function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137872/new/

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D136998#3926368 , @efriedma wrote: > In D136998#3926321 , @rnk wrote: > >> In D136998#3906874 , @efriedma >> wrote: >> >>> Should we try to

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 475269. akhuang added a comment. Fix calling convention of cloned function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGClass.cpp

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D136998#3906881 , @efriedma wrote: > Might also be worth considering if we can avoid cloning here. It should be > possible to emit the lambda body into a separate function with a calling > convention of your choice, and

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 474889. akhuang marked an inline comment as done. akhuang added a comment. Move cloning code into a function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files:

[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.

2022-11-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D137872 Files: clang/lib/CodeGen/CGCall.cpp

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 473082. akhuang added a comment. moved some stuff around Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGClass.cpp

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 472761. akhuang added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGClass.cpp clang/lib/CodeGen/CodeGenFunction.h

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-01 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 472450. akhuang added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGClass.cpp clang/lib/CodeGen/CodeGenFunction.h

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-01 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 472447. akhuang added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGClass.cpp

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-10-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a subscriber: nlopes. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D136998 Files:

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-27 Thread Amy Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8433a2b06d5: Update docs for -fuse-ctor-homing (authored by akhuang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136188/new/

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 471240. akhuang added a comment. Add another debug info strategy to the description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136188/new/ https://reviews.llvm.org/D136188 Files:

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 468687. akhuang added a comment. Move ctor homing info to fstandalone-debug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136188/new/ https://reviews.llvm.org/D136188 Files: clang/docs/UsersManual.rst

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. Actually, maybe I should add some of this info to the -fstandalone-debug section. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136188/new/ https://reviews.llvm.org/D136188 ___

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 468677. akhuang edited the summary of this revision. akhuang added a comment. Remove documentation paragraph. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136188/new/ https://reviews.llvm.org/D136188 Files:

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D136188#3866266 , @dblaikie wrote: > (not sure whether to discuss this here or on the bug) > > Should we remove the documentation? Part of the principles of "cc1" flags is > that their implementation details, not to be

[PATCH] D136188: Update docs for -fuse-ctor-homing

2022-10-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added a reviewer: rnk. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update docs to reflect the fact that this flag is on by default now. Repository: rG LLVM

[PATCH] D135730: Make inalloca lambda parameters work (for 32-bit windows).

2022-10-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a project: All. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes a bug where inalloca arguments can't be used as parameters in non-capturing lambdas. Repository: rG LLVM

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-10-07 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D133457#3832590 , @mstorsjo wrote: > @akhuang I noticed that > https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/MSVC.cpp#L199-L200 > has got an explicit check for

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-22 Thread Amy Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3283f71069a0: Add clang flag equivalent to clang-cl /Zl flag (authored by akhuang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133959/new/

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-22 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 462230. akhuang marked an inline comment as done. akhuang added a comment. Fix flag name in test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133959/new/ https://reviews.llvm.org/D133959 Files:

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-21 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 462042. akhuang marked an inline comment as done. akhuang added a comment. Change name of flag, and alias /Zl to this flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133959/new/

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-21 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D133959#3793283 , @hans wrote: > Could the new flag be marked as an Alias in the tablegen, so that we don't > need to do any code changes for it? It appears before _SLASH_Zl in the file so we'd have to move it out of place.

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-15 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: mstorsjo, hans. Herald added a project: All. akhuang requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. The /Zl flag omits default C runtime library name from obj files. This

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-15 Thread Amy Huang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfda44bedd64d: Add Clang driver flags equivalent to cls /MD, /MT, /MDd, /MTd. (authored by akhuang). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-15 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 460456. akhuang added a comment. ran clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133457/new/ https://reviews.llvm.org/D133457 Files: clang/include/clang/Driver/Options.td

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-15 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4493 + + if (Args.hasArg(options::OPT__SLASH_Zl)) { +CmdArgs.push_back("-D_VC_NODEFAULTLIB"); mstorsjo wrote: > If I understand correctly, we still don't have any corresponding

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 460271. akhuang marked 3 inline comments as done. akhuang added a comment. more comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133457/new/ https://reviews.llvm.org/D133457 Files:

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 460154. akhuang marked an inline comment as done. akhuang added a comment. Address comments, more cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133457/new/ https://reviews.llvm.org/D133457 Files:

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-14 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 3 inline comments as done. akhuang added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4442 +bool IsClangCL) { + unsigned RTOptionID = 0; // MT=0, MTd=1, MD=2, MDd=3 + bool HasLDdFlag = IsClangCL &&

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6480 + // Process Windows runtime flags (equivalent to cl flags /MD, /MDd, /MT, /MTd) + if (Triple.isOSWindows()) { hans wrote: > Could we somehow re-use the logic in

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 459577. akhuang marked 2 inline comments as done. akhuang added a comment. Clean up test, add doc brief to new flag, try to put the flag logic in a separate function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd. This will allow selecting the MS C runtime library without having to use cc1 flags.

2022-09-07 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a project: All. akhuang requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D133457 Files:

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. We're seeing this warning in code with global constants, e.g. const Enum x = static_cast(-1); is this intended? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131704/new/ https://reviews.llvm.org/D131704

[PATCH] D130123: [Phabricator] extend ptr32 support to be applied on typedef

2022-07-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang accepted this revision. akhuang added a comment. This revision is now accepted and ready to land. Looks good, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130123/new/ https://reviews.llvm.org/D130123

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-07 Thread Amy Huang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG28d2977ff236: [-fms-extensions] Make some exception specification warnings/errors compatible… (authored by akhuang). Repository: rG LLVM Github

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-06 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 397930. akhuang marked an inline comment as done. akhuang added a comment. Add std=c++17 to the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116256/new/ https://reviews.llvm.org/D116256 Files:

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D116256#3215801 , @thakis wrote: > Thanks for the patch! This looks roughly right to me. > > Maybe the list of ESTs that are allowed to be mismatched should be opt-in > instead of opt-out? (i.e. instead of checking for "not

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 397760. akhuang marked an inline comment as done. akhuang added a comment. Fix warning behavior Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116256/new/ https://reviews.llvm.org/D116256 Files:

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2021-12-23 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: hans, thakis. akhuang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make clang-cl error when a function definition is missing 'noexcept', and succeed without warnings when missing

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-10-05 Thread Amy Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7104e506619: [Sema] Allow comparisons between different ms ptr size address space types. (authored by akhuang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-10-04 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 376936. akhuang added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110670/new/ https://reviews.llvm.org/D110670 Files: clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-09-30 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682 + isPtrSizeAddressSpace(Q2.getAddressSpace())) +MaybeQ1 = true; + else aaron.ballman wrote: > akhuang wrote: > > aaron.ballman wrote: > > > I'm

[PATCH] D110668: [clang-cl] Accept `#pragma warning(disable : N)` for some N

2021-09-29 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. Seems like there are also errors in chrome builds and the llvm compiler-rt build, will just revert it for now -- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110668/new/ https://reviews.llvm.org/D110668

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-09-29 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682 + isPtrSizeAddressSpace(Q2.getAddressSpace())) +MaybeQ1 = true; + else aaron.ballman wrote: > I'm pretty sure this is correct based on my inspection

  1   2   3   4   5   >