[all-commits] [llvm/llvm-project] a4c76b: [InstCombine] Don't use getFirstNonPHI in FoldInte...

Visoiu Mistrih Francis via All-commits all-commits at lists.llvm.org
Thu Nov 14 17:54:26 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a4c76be5068991780342cc5aaac12f8c73050ea1
      https://github.com/llvm/llvm-project/commit/a4c76be5068991780342cc5aaac12f8c73050ea1
  Author: Francis Visoiu Mistrih <francisvm at yahoo.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp

  Log Message:
  -----------
  [InstCombine] Don't use getFirstNonPHI in FoldIntegerTypedPHI

getFirstNonPHI iterates over all the instructions in a block until it
finds a non-PHI.

Then, the loop starts from the beginning of the block and goes through
all the instructions until it reaches the instruction found by
getFirstNonPHI.

Instead of doing that, just stop when a non-PHI is found.

This reduces the compile-time of a test case discussed in
https://reviews.llvm.org/D47023 by 13x.

Not entirely sure how to come up with a test case for this since it's a
compile time issue that would significantly slow down running the tests.

Differential Revision: https://reviews.llvm.org/D70016




More information about the All-commits mailing list