mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
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
This commit is contained in:
@@ -924,8 +924,10 @@ bool LoopReroll::reroll(Instruction *IV, Loop *L, BasicBlock *Header,
|
||||
// them, and this matching fails. As an exception, we allow the alias
|
||||
// set tracker to handle regular (simple) load/store dependencies.
|
||||
if (FutureSideEffects &&
|
||||
((!isSimpleLoadStore(J1) && !isSafeToSpeculativelyExecute(J1)) ||
|
||||
(!isSimpleLoadStore(J2) && !isSafeToSpeculativelyExecute(J2)))) {
|
||||
((!isSimpleLoadStore(J1) &&
|
||||
!isSafeToSpeculativelyExecute(J1, DL)) ||
|
||||
(!isSimpleLoadStore(J2) &&
|
||||
!isSafeToSpeculativelyExecute(J2, DL)))) {
|
||||
DEBUG(dbgs() << "LRR: iteration root match failed at " << *J1 <<
|
||||
" vs. " << *J2 <<
|
||||
" (side effects prevent reordering)\n");
|
||||
|
Reference in New Issue
Block a user