[GlobalISel] Avoid repeated target info queries in combiners (#196530)
tryCombineAllImpl queries target info for every instruction. Cache
TargetInstrInfo/TargetRegisterInfo/RegisterBankInfo in CombinerHelper
and pass to executeMatchTable instead.
This avoids repeated virtual calls on the combiner executeMatchTable
path.
CTMark -0.08% geomean improvement on aarch64-O0-g.
https://llvm-compile-time-tracker.com/compare.php?from=71fef6d5a306d1adf8bf7d30d2fe9e286380fecf&to=13bc49510657450402c066098e3a4b7d1af9d0e6&stat=instructions%3Au
Assisted-by: codex