[PATCH] Bugfix for Codegen of atomic load/store ops.
Alexey Bataev
a.bataev at hotmail.com
Mon Dec 8 23:35:12 PST 2014
John, Ok, I'll split this patch in 2 parts.
================
Comment at: lib/CodeGen/CGAtomic.cpp:1073
@@ -1049,1 +1072,3 @@
+static llvm::Value *convertRValueToInt(CodeGenFunction &CGF,
+ const AtomicInfo &AI, RValue RVal) {
----------------
rjmccall wrote:
> Consider making this a method on the AtomicInfo.
Ok, done.
================
Comment at: lib/CodeGen/CGAtomic.cpp:1274
@@ +1273,3 @@
+ // Other decoration.
+ if (Obj.isVolatileQualified())
+ Inst->setVolatile(/*V=*/true);
----------------
rjmccall wrote:
> Inst->setVolatile(Obj.isVolatileQualified());
> Inst->setWeak(IsWeak);
Done
================
Comment at: lib/CodeGen/CGAtomic.cpp:1282
@@ +1281,3 @@
+
+ // The easiest way to do this this is to go through memory, but we
+ // try not to in some easy cases.
----------------
rjmccall wrote:
> This part should also be a method on the AtomicInfo, or at least its own helper function. convertIntToRValue?
>
> We probably have the same code in the atomic-load path.
I reworked it.
http://reviews.llvm.org/D6499
More information about the cfe-commits
mailing list