[all-commits] [llvm/llvm-project] cb57b7: [MachineLateInstrsCleanup] Improve compile time fo...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Mon May 8 00:06:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb57b7a770ffff0d5a978403c29231bfd50c2816
      https://github.com/llvm/llvm-project/commit/cb57b7a770ffff0d5a978403c29231bfd50c2816
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list