When LVI is performing assume intersections, it also checks for llvm.experimental.guard intrinsics. To avoid unnecessary block scans, it first checks whether this intrinsic is declared in the module at all. I've noticed that we end up spending quite a lot of time lookup up that function again and again...
Avoid this by only looking it up once when LazyValueInfo is constructed. This of course assumes that we don't introduce new guard intrinsics (which is the case for all existing uses of LVI -- and even if it weren't, it would not introduce miscompiles, just potentially lose optimization power.)
Most of the patch is threading through the Module into getImpl().
Compile-time numbers: https://llvm-compile-time-tracker.com/compare.php?from=d449cb81232e38d1175b0c9c316129c4637d3cbc&to=35c3e576fa3bc961223d4d45ca2aa8fc6db2b1cf&stat=instructions
The indentation in this class is messed up. I'll address that separately.