[PATCH] D27592: Reimplement depedency tracking in the ImplicitNullChecks pass

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 08:11:24 PST 2016


anna added inline comments.


================
Comment at: lib/CodeGen/ImplicitNullChecks.cpp:195
+ImplicitNullChecks::computeDependence(MachineInstr *MI,
+                                      ArrayRef<MachineInstr *> Block) {
+  assert(llvm::all_of(Block, canHandle) && "Check this first!");
----------------
sanjoy wrote:
> sanjoy wrote:
> > anna wrote:
> > > Nit: const with pass by reference. 
> > Are you talking about `ArrayRef`?  `ArrayRef` are lightweight immutable objects that are generally supposed to be passed by value.
> In case you were talking about the `MachineInstr`, I did manage to constify some of the parameters.  Did not change to a reference since that would involved more dereferencing ceremony than I think is necessary.
Actually, I meant the `ArrayRef` itself. You're right, I checked the ADT definition, the elements are const.


https://reviews.llvm.org/D27592





More information about the llvm-commits mailing list