[PATCH] D157495: [WIP] Run SimplifyCFG from Atomic-Expand on CAS loop blocks.
Pravin Jagtap via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 06:30:00 PDT 2023
pravinjagtap added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:116
+ CreateCmpXchgInstFun CreateCmpXchg,
+ SmallVector<BasicBlock *> &CmpXchgLoopBlocks);
bool tryExpandAtomicCmpXchg(AtomicCmpXchgInst *CI);
----------------
arsenm wrote:
> pravinjagtap wrote:
> > arsenm wrote:
> > > Do you need to track this or can you just clean each one up as it happens?
> > > Do you need to track this or can you just clean each one up as it happens?
> >
> > I am clearing this vector at the beginning itself in runOnFunction
> That's not what I meant, I mean you performed the expansion and can immediately simplify the block without recording it and treating it like a separate pass
I think, this is a cleaner way compared to simplifying these basic blocks when created. We need to pass inputs argument required for `simplifyCFG` API from runOnFunction to all the way inside `insertRMWCmpXchgLoop` through member functions and few helper functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157495/new/
https://reviews.llvm.org/D157495
More information about the llvm-commits
mailing list