Feeding isSafeToSpeculativelyExecute its DataLayout pointer
authorHal Finkel <hfinkel@anl.gov>
Thu, 10 Jul 2014 14:41:31 +0000 (14:41 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 10 Jul 2014 14:41:31 +0000 (14:41 +0000)
commita995f926278ab380e300bce12dc0fa237fe699c6
tree600aaa37a4b6055127eeb6edf63cd796322e3d49
parent2bf1366ca64a22d29bac1c29b099e135d656dd9b
Feeding isSafeToSpeculativelyExecute its DataLayout pointer

isSafeToSpeculativelyExecute can optionally take a DataLayout pointer. In the
past, this was mainly used to make better decisions regarding divisions known
not to trap, and so was not all that important for users concerned with "cheap"
instructions. However, now it also helps look through bitcasts for
dereferencable loads, and will also be important if/when we add a
dereferencable pointer attribute.

This is some initial work to feed a DataLayout pointer through to callers of
isSafeToSpeculativelyExecute, generally where one was already available.

llvm-svn: 212720
llvm/include/llvm/Transforms/Utils/Local.h
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Scalar/LoopRerollPass.cpp
llvm/lib/Transforms/Utils/LoopSimplify.cpp
llvm/lib/Transforms/Utils/LoopUnroll.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp