Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[CoroEarly] Hide promise alloca for later passes #139243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 16, 2025
Prev Previous commit
Next Next commit
Reformat
  • Loading branch information
NewSigma committed May 12, 2025
commit 2908155efeaa065c9c8f90e355ad4820195a7cc3
6 changes: 2 additions & 4 deletions 6 llvm/lib/Transforms/Coroutines/CoroEarly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "llvm/Transforms/Coroutines/CoroEarly.h"
#include "CoroInternal.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
Expand Down Expand Up @@ -264,9 +263,8 @@ void Lowerer::lowerEarlyIntrinsics(Function &F) {
auto *Alignment = Builder.getInt32(PA->getAlign().value());
auto *FromPromise = Builder.getInt1(false);
SmallVector<Value *, 3> Arg{CoroBegin, Alignment, FromPromise};
auto *PI =
Builder.CreateIntrinsic(Builder.getPtrTy(), Intrinsic::coro_promise,
Arg, {}, "promise.addr");
auto *PI = Builder.CreateIntrinsic(
Builder.getPtrTy(), Intrinsic::coro_promise, Arg, {}, "promise.addr");
PA->replaceUsesWithIf(PI, [CoroId](Use &U) {
bool IsBitcast = U == U.getUser()->stripPointerCasts();
bool IsCoroId = U.getUser() == CoroId;
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.