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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to