[LICM] Avoid repeating expensive call while promoting loads. NFC
authorAnna Thomas <anna@azul.com>
Fri, 24 Jun 2016 12:38:45 +0000 (12:38 +0000)
committerAnna Thomas <anna@azul.com>
Fri, 24 Jun 2016 12:38:45 +0000 (12:38 +0000)
commit671513553cd9b202872da27ebeb70548f3075d51
treee4d1b29b84dc8dcf453a21ae9a6e26127a72380e
parent3e2c30d4473e95b5891196051223e88b91d9f68e
[LICM] Avoid repeating expensive call while promoting loads. NFC

Summary:
We can avoid repeating the check `isGuaranteedToExecute` when it's already called once while checking if the alignment can be widened for the load/store being hoisted.

The function is invariant for the same instruction `UI` in `isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);`

Reviewers: hfinkel, eli.friedman

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21672

llvm-svn: 273671
llvm/lib/Transforms/Scalar/LICM.cpp