[PATCH] D91157: [AArch64] Out-of-line atomics (-moutline-atomics) implementation.
    Tim Northover via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Nov 11 05:55:18 PST 2020
    
    
  
t.p.northover added inline 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());
----------------
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.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91157/new/
https://reviews.llvm.org/D91157
    
    
More information about the cfe-commits
mailing list