[PATCH] D129468: [NFC] Fix compile time regression seen on some benchmarks after a630ea3003 commit

Dawid Jurczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 23:30:13 PDT 2022


yurai007 added inline comments.


================
Comment at: llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp:306
     bool NewFormat = isNewFormat();
+    const ArrayRef<MDOperand> Operands(Node->op_begin(), Node->op_end());
+    const unsigned NumOperands = Operands.size();
----------------
dexonsmith wrote:
> yurai007 wrote:
> > nikic wrote:
> > > Can use `Node->operands()` here?
> > Unfortunately not. I tried this initially, but there is no simple conversion from iterator_range<const llvm::MDOperand *> to MutableArrayRef/ArrayRef<llvm::MDOperand>. Also making Operands iterator_range complicates things with indexing and getting size so ended up with passing iterators directly to ArrayRef.
> As a prep / follow-up, it might be reasonable to update `operands()` to return ArrayRef.
> As a prep / follow-up, it might be reasonable to update operands() to return ArrayRef.
Ok. I can prepare such change as follow-up.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129468



More information about the llvm-commits mailing list