[PATCH] D146810: [CodeGen] Compile-time improvement for Machine Late Instructions Cleanup Pass.
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 04:09:49 PDT 2023
vpykhtin added a comment.
> If the map lookup time really matters, maybe it could be worth trying a vector of DefMI/KillMI pairs, so lookup time would be O(n) into the vector..?
I don't think it's that critical
> BTW, I really hope we don't have to use first/second accesses, something like RegInstrs[Reg].DefMI seems more readable...
RegInstrs[Reg] is a lookup in the map, I don't know if compilers are good enough to optimize several identical map lookups.
> If it's not possible to speed it up further, I think the simple version I tried is acceptable: it avoids the slowdowns in huge functions and is just barely slower on SPEC, which is then probably preferrable...
I agree, I'll abandon this review then. Maybe it worth to use SmallDenseMap in your version instead of std::map.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146810/new/
https://reviews.llvm.org/D146810
More information about the llvm-commits
mailing list