[PATCH] D147532: [MachineLateInstrsCleanup] Improve compile time for huge functions.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 02:59:48 PDT 2023
jonpa added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp:46
+ // Data structures to map regs to their definitions and kills per MBB.
+ struct Reg2MIMap : public std::map<Register, MachineInstr *> {
+ MachineInstr *get(Register Reg) {
----------------
vpykhtin wrote:
> If the number of map pairs is usually small I would use SmallDenseMap as it has pre-allocated storage, especially when you're placing it in a vector
I tried replacing for SmallDenseMap here again, but no change in compile time at all that I could see.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147532/new/
https://reviews.llvm.org/D147532
More information about the llvm-commits
mailing list