[PATCH] D91157: [AArch64] Out-of-line atomics (-moutline-atomics) implementation.

Pavel Iliin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 07:22:20 PST 2020


ilinpv added a comment.

Have you got any further comments?



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2170
+  SmallVector<SDValue, 4> Ops;
+  if (TLI.getLibcallName(LC)) {
+    Ops.append(Node->op_begin() + 2, Node->op_end());
----------------
t.p.northover wrote:
> jyknight wrote:
> > t.p.northover wrote:
> > > I think this is a bit of an abuse of the `LibcallName` mechanism. A separate function in `TargetLowering` would probably be better.
> > I don't think that's odd or unusual -- we often condition libcall availability on getLibcallName != nullptr.
> > 
> > What does strike me here is the (pre-existing) code duplication between this function (DAGTypeLegalizer::ExapndAtomic) and SelectionDAGLegalize::ConvertNodeToLibcall. Not sure what's up with that...
> Fair enough. Didn't realise it was that common.
I noticed this existed duplication too, but find no proper place to put common functionality from DAGTypeLegalizer and  SelectionDAGLegalize.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91157



More information about the llvm-commits mailing list