[all-commits] [llvm/llvm-project] 434369: [LICM] Don't try to constant fold instructions
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Apr 26 00:27:03 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 43436993f48b1d75d9d80796cb0889ce7d191888
https://github.com/llvm/llvm-project/commit/43436993f48b1d75d9d80796cb0889ce7d191888
Author: Nikita Popov <npopov at redhat.com>
Date: 2023-04-26 (Wed, 26 Apr 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/LICM.cpp
M llvm/test/Transforms/LICM/hoisting.ll
M llvm/test/Transforms/LICM/pr32129.ll
M llvm/test/Transforms/LICM/scalar-promote.ll
Log Message:
-----------
[LICM] Don't try to constant fold instructions
This was introduced in 030f02021b6359ec5641622cf1aa63d873ecf55a as
an alleged compile-time optimization. In reality, trying to constant
fold instructions is more expensive than just hoisting them. In a
standard pipeline, LICM tends to run either after a run of
LoopInstSimplify or InstCombine, so LICM doesn't really see constant
foldable instructions in the first place, and the attempted fold
is futile.
This makes for a very minor compile-time improvement.
Differential Revision: https://reviews.llvm.org/D149134
More information about the All-commits
mailing list