[llvm] [AArch64] Create set.fpmr intrinsic and assembly lowering (PR #114248)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 23:37:49 PST 2024


davemgreen wrote:

> Hello David,
> 
> Thank you for your feedback! I have now fixed the first issue you had with the patch. As for the 2nd one, for now I don't think creating data dependencies is necessary. Functionally, dependencies between defs and uses of FPMR are going to be handled using memory dependency through inaccessible memory. I do not see a "nice" way to handle overlaping ranges without using memory dependency, but if you know of a way I would be keen on hearing about it and we might change to data dependency only later. I agree that it will help with optimization to not have to search through the program for where the fpmr value might be coming from, but that is something we will think about once we start optimizing these intrinsics.

As you ask here I will try and reply - we had a conversation about this internally and it seemed the response was that we plan to look into this more and hopefully change it later.  (My worry with that is that is will hard to do the more time is spent with them working this way).  As for handling overlapping ranges it would just be a case of sinking the intrinsic to the use, it sounds like this will need a pass to do the placement in either case. But I don't actually mean to say that it needs to remove the memory side effect entirely.  It could keep the side effect to limit how much the intrinsics move and have the benefits of knowing the fpmr and no overlapping ranges at the same time. You can even remove one of them later if it is decided they are not useful (going the other way is obviously more difficult).

Thanks for simplifying the codegen though - hopefully we won't end up needing it in the future, and if we do we can always resurrect it.

https://github.com/llvm/llvm-project/pull/114248


More information about the llvm-commits mailing list