mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Replace isTrapping with a new, similar method called
isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -258,7 +258,8 @@ void TailDup::eliminateUnconditionalBranch(BranchInst *Branch) {
|
||||
while (!isa<TerminatorInst>(BBI)) {
|
||||
Instruction *I = BBI++;
|
||||
|
||||
bool CanHoist = !I->isTrapping() && !I->mayHaveSideEffects();
|
||||
bool CanHoist = I->isSafeToSpeculativelyExecute() &&
|
||||
!I->mayReadFromMemory();
|
||||
if (CanHoist) {
|
||||
for (unsigned op = 0, e = I->getNumOperands(); op != e; ++op)
|
||||
if (Instruction *OpI = dyn_cast<Instruction>(I->getOperand(op)))
|
||||
|
||||
Reference in New Issue
Block a user