[PATCH] D54740: [NewPM] fixing asserts on deleted loop in -print-after-all

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 13:26:48 PST 2018


fedor.sergeev added a comment.

In D54740#1325291 <https://reviews.llvm.org/D54740#1325291>, @philip.pfaffe wrote:

> In case the IRUnit has been invalidated, can we //still// pass it to the callback? When I think of instrumentations that do more complicated things than printing, it's highly likely that they would like to be notified when an IRUnit handle becomes invalid. Which requires passing the handle. If we are passing the handle, though, we need to emphasize that the unit isn't accessible through the handle anymore. Maybe by passing `void*` instead, or some tag type `Invalidated<T> { void* Handle; }`. The latter can go through the `any` and allow deducing the actual IRUnit type.


That would require putting more order on what *is* the invalidated IRUnit.
Overall this looks like a fine solution that can handle come complicated cases, however I would rather follow a common approach and wait until the need for that complication arises.
Perhaps will add a comment somewhere in PassInstrumentation that hints about this.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D54740





More information about the llvm-commits mailing list