[PATCH] D123172: Transforms: Fix code duplication between LowerAtomic and AtomicExpand

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 17:31:47 PDT 2022


arsenm added a comment.

In D123172#3434681 <https://reviews.llvm.org/D123172#3434681>, @reames wrote:

> After you've added the NotAtomic option to AtomicExpand, does LowerAtomic serve any purpose at all?  The one in tree use I can find (in ARM) could be handled via the shouldExpandX callbacks without issue (I think).  If possible, I'd rather switch that one backend over and then just delete the code.

NVPTX has another conditionalized version of the pass which could be moved to AtomicExpand. WebAssembly also has a use where they use the pass itself inside another pass. The main annoyance is the clumsy API where each instruction gets its own callback

> Unless we think the ability to strip out atomics is useful for debugging or something?

I was thinking it's not useful unless used as a utility, but not sure if there's a real point to that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123172/new/

https://reviews.llvm.org/D123172



More information about the llvm-commits mailing list