[llvm] r354800 - [Lanai] Be super conservative about atomics
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 25 09:36:10 PST 2019
Author: reames
Date: Mon Feb 25 09:36:10 2019
New Revision: 354800
URL: http://llvm.org/viewvc/llvm-project?rev=354800&view=rev
Log:
[Lanai] Be super conservative about atomics
As requested during review of D57601 <https://reviews.llvm.org/D57601>, be equally conservative for atomic MMOs as for volatile MMOs in all in tree backends. At the moment, all atomic MMOs are also volatile, but I'm about to change that.
Reviewed as part of https://reviews.llvm.org/D58490, with other backends still pending review.
Modified:
llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp
Modified: llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp?rev=354800&r1=354799&r2=354800&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp Mon Feb 25 09:36:10 2019
@@ -158,7 +158,8 @@ bool isNonVolatileMemoryOp(const Machine
const MachineMemOperand *MemOperand = *MI.memoperands_begin();
// Don't move volatile memory accesses
- if (MemOperand->isVolatile())
+ // TODO: unclear if we need to be as conservative about atomics
+ if (MemOperand->isVolatile() || MemOperand->isAtomic())
return false;
return true;
More information about the llvm-commits
mailing list