kmclaughlin-arm wrote: Thank you @YonahGoldberg for sharing your SDAG PR!
> Maybe you could describe the specific semantics of your hints in this PR? > Our hints are limited to prefetching and eviction policies. The contention-management hints that we will need to support in future are similar to the store hints supported by this PR, except that the hint instruction is emitted immediately before an atomic read-modify-write rather than a store. The hints are described as follows in the docs, hopefully it explains how this is expected to be extended in future: ``` HINT_STCPH: Ensures that the memory write effect of the next instruction occurs before any other effects from other threads. HINT_SHUH: Informs that the next instruction generates an effect in a location that one or more other threads of execution are likely to subsequently update. HINT_SHUH_PH: PH adds the effects of STCPH to SHUH. ``` I am happy to try using `mem.cache_hint` instead as @nikic suggested. Looking through https://github.com/llvm/llvm-project/pull/204067, the changes to MachineMemOperand should allow me to remove the additional MOTargetFlags uses for AArch64 which I think would improve this PR. > Happy to collaborate and add new features so that the cache hint fits your > needs. For example, I have a PR up to add support in SDAG+NVPTX here: #204067 > (comment), but I was planning to add GISEL support as well since we need that > downstream. But it looks like the MachineMemOperand, where I add the metadata > in the backend, is shared. Given that the hints described above are not strictly cache hints, would you be open to renaming the cache hint to something more general, such as `mem.access_hint`? I also noticed that atomics are not yet supported in your PR at the moment. I just wanted to check whether this is something you are planning to add? https://github.com/llvm/llvm-project/pull/198316 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
