mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[NFC] Remove obsolete checks followed by fix of isGuaranteedToTransferExecutionToSuccessor
In past, isGuaranteedToTransferExecutionToSuccessor contained some weird logic for volatile loads/stores that was ultimately removed by patch D65375. It's time to remove a piece of dependent logic that used to be a workaround for the code which is now deleted. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D76918
This commit is contained in:
parent
2cd7fcb259
commit
8794887cea
@ -126,26 +126,7 @@ bool ImplicitControlFlowTracking::isSpecialInstruction(
|
||||
// to avoid wrong assumptions of sort "if A is executed and B post-dominates
|
||||
// A, then B is also executed". This is not true is there is an implicit
|
||||
// control flow instruction (e.g. a guard) between them.
|
||||
//
|
||||
// TODO: Currently, isGuaranteedToTransferExecutionToSuccessor returns false
|
||||
// for volatile stores and loads because they can trap. The discussion on
|
||||
// whether or not it is correct is still ongoing. We might want to get rid
|
||||
// of this logic in the future. Anyways, trapping instructions shouldn't
|
||||
// introduce implicit control flow, so we explicitly allow them here. This
|
||||
// must be removed once isGuaranteedToTransferExecutionToSuccessor is fixed.
|
||||
if (isGuaranteedToTransferExecutionToSuccessor(Insn))
|
||||
return false;
|
||||
if (isa<LoadInst>(Insn)) {
|
||||
assert(cast<LoadInst>(Insn)->isVolatile() &&
|
||||
"Non-volatile load should transfer execution to successor!");
|
||||
return false;
|
||||
}
|
||||
if (isa<StoreInst>(Insn)) {
|
||||
assert(cast<StoreInst>(Insn)->isVolatile() &&
|
||||
"Non-volatile store should transfer execution to successor!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !isGuaranteedToTransferExecutionToSuccessor(Insn);
|
||||
}
|
||||
|
||||
bool MemoryWriteTracking::isSpecialInstruction(
|
||||
|
Loading…
Reference in New Issue
Block a user