I have restored the check on every single tile while also adding some
optimizations to the algorithm. It still is pretty slow, mainly during
the INT_[LR] tiles checking, but compared to the previous solution there is
a good improvement.
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>