ilinpv added a comment.
> Offtopic: Outlining atomics seems to be very CPU specific thing. In my
> experience LSE were ~= old exclusive semantics. So adding extra call + extra
> bit check (too bad IFUNCs are not used :)) each time it would be executed
> seems to be quite an extra load (for CPU,
yota9 added a comment.
Also please keep in mind that despite of different behaviour in gcc/clang not
implying outline atomics won't result in any problems, but implying them in
cases where we don't want them might result in some problems.
Offtopic: Outlining atomics seems to be very CPU specifi
yota9 added a comment.
Great! I've add MaskRay to the reviewers list as known expert in both clang and
gcc, maybe he have some thoughts on this proposal :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159398/new/
https://reviews.llvm.org/D159398
ilinpv added a comment.
> I understand that you could disable it with extra option and that for now it
> would be different with gcc, but it looks debatable to me that such a
> behaviour in gcc is correct and expected, maybe someone need to change it
> there too. (Please keep in mind that I mig
yota9 added a comment.
>> Outline atomics are dependent on runtime library availability ( libgcc or
>> compler-rt ).
I understand that, but we can use compiler that have runtime library, but in
freestanding mode usually we don't want it to be used.
I understand that you could disable it with e
ilinpv added a comment.
Outline atomics are dependent on runtime library availability ( libgcc or
compler-rt ). If there are no proper library available they will be disabled.
So if in freestanding mode compiler is not dependent on runtime library you can
remove it and get rid of outline atomic
yota9 added a comment.
The problem here is that if you would remove the freestanding condition and run
this test it would fail since "-target-feature" "+outline-atomics" would be
passed to the clang. And usually we don't want the compiler to use any
external symbols in freestanding mode, this
ilinpv added a comment.
From what i understand in freestanding environment runtime library is not used
and clang driver can detect this situation and set outline atomics off by
default ( see ##clang/lib/Driver/ToolChains/Linux.cpp##
##Linux::IsAArch64OutlineAtomicsDefault## -> ##GetRuntimeLibTy