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

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 18:44:36 PST 2016


sanjoy 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:
> 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.


https://reviews.llvm.org/D27592





More information about the llvm-commits mailing list