projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95a9268
)
Ensures non-acquire RMWs are transformed to acquire RMWs
relaxed-loads-to-acquire
author
Peizhao Ou
<peizhaoo@uci.edu>
Tue, 17 Jul 2018 19:07:00 +0000
(12:07 -0700)
committer
Peizhao Ou
<peizhaoo@uci.edu>
Tue, 17 Jul 2018 19:07:00 +0000
(12:07 -0700)
lib/CodeGen/AtomicExpandPass.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/AtomicExpandPass.cpp
b/lib/CodeGen/AtomicExpandPass.cpp
index 6152055a5bce8b8523534392ad1850a2444fad1b..8665551bb75ef5037724732c35f2e3c744e9c272 100644
(file)
--- a/
lib/CodeGen/AtomicExpandPass.cpp
+++ b/
lib/CodeGen/AtomicExpandPass.cpp
@@
-131,6
+131,15
@@
bool AtomicExpand::runOnFunction(Function &F) {
}
break;
}
+ case Instruction::AtomicRMW: {
+ auto* RMW = dyn_cast<AtomicRMWInst>(&*I);
+ if (RMW->getOrdering() == Monotonic) {
+ RMW->setOrdering(Acquire);
+ } else if (RMW->getOrdering() == Release) {
+ RMW->setOrdering(AcquireRelease);
+ }
+ break;
+ }
default: {
break;
}