Displaying 20 results from an estimated 13000 matches similar to: "Adding sanity to the Atomics implementation"
2016 Jan 28
0
Adding sanity to the Atomics implementation
I don't have much of substance to add, but I will say that I like the
proposal (I too prefer Alternative A). When adding C11 atomic support
for hexagon, I found it surprising that support for the __sync_* was
implemented completely differently than the C11 atomics.
On 1/27/2016 1:55 PM, James Knight via llvm-dev wrote:
> Right now, the atomics implementation in clang is a bit of a
2016 Jan 31
2
Adding sanity to the Atomics implementation
----- Original Message -----
> From: "Ben via llvm-dev Craig" <llvm-dev at lists.llvm.org>
> To: llvm-dev at lists.llvm.org
> Sent: Thursday, January 28, 2016 9:41:06 AM
> Subject: Re: [llvm-dev] Adding sanity to the Atomics implementation
>
>
> I don't have much of substance to add, but I will say that I like the
> proposal (I too prefer Alternative
2016 Jan 28
1
[cfe-dev] Adding sanity to the Atomics implementation
On Thu, Jan 28, 2016 at 08:32:31AM -0800, Reid Kleckner via llvm-dev wrote:
> I think Clang should continue to duplicate this information, the same way
> we duplicate target datalayout strings. Other than that, sure, we can let
> LLVM expand IR operations to libcalls. I don't immediately see a problem
> with that.
Note that a libcall doesn't necessarily mean using locks. With
2020 Oct 15
3
Out-of-line atomics implementation ways
Greetings everyone,
I am working on Aarch64 LSE out-of-line atomics support in LLVM, porting this GCC series: https://gcc.gnu.org/legacy-ml/gcc-patches/2019-09/msg01034.html
After local design experiments I've got some questions about upstream-suitable ways of implementation. More specifically:
1. Pass to expand atomics to library helper functions calls.
These helpers test for the presence
2018 Jun 13
12
RFC: Atomic LL/SC loops in LLVM revisited
# RFC: Atomic LL/SC loops in LLVM revisited
## Summary
This proposal gives a brief overview of the challenges of lowering to LL/SC
loops and details the approach I am taking for RISC-V. Beyond getting feedback
on that work, my intention is to find consensus on moving other backends
towards a similar approach and sharing common code where feasible. Scroll down
to 'Questions' for a summary
2015 Dec 11
2
RFC: Extending atomic loads and stores to floating point and vector types
On 12/11/2015 01:29 PM, James Y Knight wrote:
>
> On Fri, Dec 11, 2015 at 3:05 PM, Philip Reames via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
>> One open question I don't know the answer to: Are there any
>> special semantics required from floating point stores which
>> aren't met
2019 Mar 12
1
Handling of __c11_atomic_is_lock_free({1, 2, 4, 8}) in compiler-rt atomic.c
Hi,
I think this more of a front-end issue than a compile-rt issue, but I’m also copying the llvm-dev list
In compiler-rt the file lib/builtins/atomic.c seems to rely on determining at compile time if an atomic operation of size 1, 2, 4, or 8 is always lock free.
For example, in the implementation of __atomic_load_8() we have something like this after macro expansion:
void __atomic_load_8(…)
{
2015 Dec 11
7
RFC: Extending atomic loads and stores to floating point and vector types
Currently, we limit atomic loads and stores to either pointer or integer
types. I would like to propose that we extend this to allow both
floating point and vector types which meet the other requirements.
(i.e. power-of-two multiple of 8 bits, and aligned)
This will enable a couple of follow on changes:
1) Teaching the vectorizer how to vectorize unordered atomic loads and
stores
2)
2019 Dec 29
2
__c11_atomic builtins' input requirements
I have started working on an implementation of atomic_ref. Implementing
this requires performing atomic operations on arbitrary references. The
behavior is undefined if a reference is provided that is not aligned per
the public export required_alignment. What assumptions do the __c11_atomic
builtins make about destination argument alignment, format, size etc.? Is
it required that the destination
2016 Jan 13
4
RFC: non-temporal fencing in LLVM IR
Hello, fencing enthusiasts!
*TL;DR:* We'd like to propose an addition to the LLVM memory model
requiring non-temporal accesses be surrounded by non-temporal load barriers
and non-temporal store barriers, and we'd like to add such orderings to the
fence IR opcode.
We are open to different approaches, hence this email instead of a patch.
*Who's "we"?*
Philip Reames brought
2015 Apr 24
4
[LLVMdev] Floating point atomic load and add
Hello,
I'm wondering how I can create an atomic load and add instruction for
floating point values. If I use IRBuilder::CreateAtomicRMW() I
get the error message: "atomicrmw operand must have integer type".
I am using LLVM 3.4 and the only system I need to support is x86.
2015 Dec 11
2
RFC: Extending atomic loads and stores to floating point and vector types
On 12/11/2015 12:05 AM, JF Bastien wrote:
> On Fri, Dec 11, 2015 at 3:22 AM, Philip Reames via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> Currently, we limit atomic loads and stores to either pointer or
> integer types. I would like to propose that we extend this to
> allow both floating point and vector types
2014 May 24
3
[LLVMdev] Why can't atomic loads and stores handle floats?
Looking through the documentation, I discovered that atomic loads and
stores are only supported for integer types. Can anyone provide some
background on this? Why is this true?
Currently, given code:
std::atomic<float> aFloat;
void foo() {
float f = atomic_load(&aFloat);
..
}
Clang generates code like:||
%"struct.std::atomic.2" = type { float }
@aFloat = global
2014 Jan 03
2
[LLVMdev] AtomicRMW Additions
All,
I was wondering if the following operations could be implemented atomically
in LLVM (a la AtomicRMW): Multiplication, Division, Remainder, Bit
Shifting, or Logical Not (this could be implemented by xor with a value of
all 1's).
Is there a reason implementation-wise that they are not there?
Additionally, would it be possible to create something similar to AtomicRMW
that returned the new
2014 May 29
4
[LLVMdev] Proposal: "load linked" and "store conditional" atomic instructions
Hi,
I've been looking at improving atomicrmw & cmpxchg code more,
particularly on architectures using the load-linked/store-conditional
model.
The summary is that current expansion for cmpxchg seems to happen too
late for LLVM to make meaningful use of the opportunities it provides.
I'd like to move it earlier and express it in terms of a first-class
pair of "load linked"
2019 Jan 02
5
Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
Hi,
I have a custom lowering operation on ISD::BITCAST for the PowerPC/SPE
target, to convert 'f64 bitcast (i64 build_pair i32, i32)' into a 'f64
BUILD_SPE64 i32, i32' node, which can be seen at
https://reviews.llvm.org/D54583. However, when building compiler-rt's
lib/builtins/divdc3.c an assertion is triggered that BUILD_PAIR is not
legal on line 24. There should be no
2016 Jan 14
2
RFC: non-temporal fencing in LLVM IR
Hi JF, Philip,
Clang currently has __builtin_nontemporal_store and __builtin_nontemporal_load. How will the usage model for those change?
Thanks again,
Hal
----- Original Message -----
> From: "Philip Reames via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "JF Bastien" <jfb at google.com>, "llvm-dev"
> <llvm-dev at lists.llvm.org>
>
2020 Oct 15
0
Out-of-line atomics implementation ways
Current precent in the codebase is the __sync_* libcalls. They have essentially the semantics you want, except that they're all seq_cst.
On the LLVM side, I'd rather not have two ways to do the same thing, so I'd prefer to extend the existing mechanism. Adding 100 lines to RuntimeLibcalls.def seems a bit unfortunate, but I think you can reduce that using some C macros.
On the
2009 Jan 28
2
[LLVMdev] AsmPrinter question
Hi,
Probably I did not mention my question correctly.
I need to emit declarations of the libcalls (that are made in the
current module) at the beginning of the assembly file. The class
"Module" does not maintain any list of the libcalls made during the
program. Although, it maintains lists of all the global variables and
functions in the current module.
Traversing each
2014 May 10
6
[LLVMdev] Replacing Platform Specific IR Codes with Generic Implementation and Introducing Macro Facilities
On 10 May 2014, at 13:53, Tim Northover <t.p.northover at gmail.com> wrote:
> It doesn't make sense for everything though, particularly if you want
> target-specific IR to simply not exist. What would you map ARM's
> "ldrex" to on x86?
This isn't a great example. Having load-linked / store-conditional in the IR would make a number of transforms related to