[MachineLateInstrsCleanup] Improve compile time for huge functions.
It was discovered that this pass could be slow on huge functions, meaning 20% compile time instead of the usual ~0.5% (with a test case spending ~19 mins just in the backend). The problem related to the necessary clearing of earlier kill flags when a redundant instruction is removed. With this patch, the handling of kill flags is now done by maintaining a map instead of scanning backwards in the function. This remedies the compile time on the huge file fully. Reviewed By: vpykhtin, arsenm Differential Revision: https://reviews.llvm.org/D147532 Resolves https://github.com/llvm/llvm-project/issues/61397
Loading
Please sign in to comment