[PATCH] D76918: [NFC] Remove obsolete checks followed by fix of isGuaranteedToTransferExecutionToSuccessor
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 29 22:30:03 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e0d9925d6a3: [NFC] Remove obsolete checks followed by fix of… (authored by mkazantsev).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76918/new/
https://reviews.llvm.org/D76918
Files:
llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
Index: llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
===================================================================
--- llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
+++ llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
@@ -126,26 +126,7 @@
// 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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76918.253495.patch
Type: text/x-patch
Size: 1517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200330/a8ad56a5/attachment-0001.bin>
More information about the llvm-commits
mailing list