[PATCH] D152328: InstrProf - don't emit 64 bit atomic operations on 32 bit platforms

Sean Mollet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 12:53:42 PDT 2023


SeanMollet added a comment.

In D152328#4435713 <https://reviews.llvm.org/D152328#4435713>, @davidxl wrote:

> For target without hw instruction for fetch add, intrinsic like __sync_fetch_and_add() can be used instead -- it will be slow but workable. Why disabling it?

Because the whole "lowering to an atomic operation" thing exists for the purpose of improving performance, A slow replacement doesn't accomplish that, so why add more code and potential bugs when there's no benefit?


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

https://reviews.llvm.org/D152328



More information about the llvm-commits mailing list