[PATCH] D57802: Be conservative about unordered accesses for the moment
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 15:37:06 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353766: Be conservative about unordered accesses for the moment (authored by reames, committed by ).
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D57802?vs=185469&id=186352#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57802/new/
https://reviews.llvm.org/D57802
Files:
llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Index: llvm/trunk/lib/CodeGen/MachineInstr.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp
@@ -1291,8 +1291,10 @@
return true;
// Check if any of our memory operands are ordered.
+ // TODO: This should probably be be isUnordered (see D57601), but the callers
+ // need audited and test cases written to be sure.
return llvm::any_of(memoperands(), [](const MachineMemOperand *MMO) {
- return !MMO->isUnordered();
+ return MMO->isVolatile() || MMO->isAtomic();
});
}
Index: llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp
+++ llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp
@@ -235,8 +235,11 @@
assert(!llvm::any_of(MI->operands(), IsRegMask) &&
"Calls were filtered out above!");
- auto IsUnordered = [](MachineMemOperand *MMO) { return MMO->isUnordered(); };
- return llvm::all_of(MI->memoperands(), IsUnordered);
+ // TODO: This should be isUnordered (see D57601) once test cases are written
+ // demonstrating that.
+ auto IsSimple = [](MachineMemOperand *MMO) {
+ return !MMO->isVolatile() && !MMO->isAtomic(); };
+ return llvm::all_of(MI->memoperands(), IsSimple);
}
ImplicitNullChecks::DependenceResult
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57802.186352.patch
Type: text/x-patch
Size: 1389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190211/e6dcb59e/attachment.bin>
More information about the llvm-commits
mailing list