[ConstantHoisting] stop rematerializing InsertionPt
authorNick Desaulniers <ndesaulniers@google.com>
Mon, 17 Jul 2023 21:49:39 +0000 (14:49 -0700)
committerNick Desaulniers <ndesaulniers@google.com>
Mon, 17 Jul 2023 22:01:29 +0000 (15:01 -0700)
commitdda3b70602bcf8e0490fbd38ce8a0a45527a110d
treece7f31a586d29e410876a88ccc9a8accf882c404
parentc9c3cddb5e99a4d73a29580e1ba4cd8165424bab
[ConstantHoisting] stop rematerializing InsertionPt

Reading this code, I noticed that we call findMatInsertPt a lot, for the
same inputs. Calculate it once and save the result.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D155237
llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h
llvm/lib/Transforms/Scalar/ConstantHoisting.cpp