[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 15:30:51 PDT 2023


SeanMollet added a comment.

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

> It might be better to handle this at the start of InstrProfiling::run (to override the Atomic related options with a proper warning).

I agree that a warning is a good idea. Can you point me to a good sample of the right/correct/prefered way to word, format and output one?

> Another thing is that what if an user wants to enable the emulated atomic update even when it is slow? You may want to introduce another internal option to control that : e.g. useAtomicEmulation (default to false). If it is true, do not override the option even when the target does not have hardware impl.

That's a reasonable approach. Is it actually necessary now? Considering that currently profiling isn't available at all on the targets in question, and I'm apparently the first person to notice that in the 9 years since the original change; I don't think the group of people that care is very large. If somebody asks for it in the future, I'll write it.


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

https://reviews.llvm.org/D152328



More information about the llvm-commits mailing list