Improved implementation of NOP removal pass from O(n^2) to O(n) (hnw)