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)
commit73118c41286084de76c9375e7ac40eb46cf40747
tree0aa25b884d1e785d021f8279161cd0c8708fd95e
parent6b0ac2aa02d66883884818282a2318ee5d2c0b13
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212720 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Local.h
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/LoopRerollPass.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/SimplifyCFG.cpp