Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: lib/Transforms/NaCl/ReplacePtrsWithInts.cpp

Issue 17777004: Concurrency support for PNaCl ABI (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Simplify overloading and function verification. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
diff --git a/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp b/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
index c812f4d4328763beeb9039f09d5afc9d8633a29d..9ed5ee2c779fa1adb7b7fde8babc62c95314d6ba 100644
--- a/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
+++ b/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
@@ -491,19 +491,19 @@ static void ConvertInstruction(DataLayout *DL, Type *IntPtrType,
Value *Alloca2 = new PtrToIntInst(Tmp, IntPtrType,
Tmp->getName() + ".asint", Inst);
FC->recordConvertedAndErase(Alloca, Alloca2);
- } else if (// These atomics only operate on integer pointers, not
- // other pointers, so we don't need to recreate the
- // instruction.
- isa<AtomicCmpXchgInst>(Inst) ||
- isa<AtomicRMWInst>(Inst) ||
- // Handle these instructions as a convenience to allow
+ } else if (// Handle these instructions as a convenience to allow
// the pass to be used in more situations, even though we
// don't expect them in PNaCl's stable ABI.
isa<GetElementPtrInst>(Inst) ||
isa<VAArgInst>(Inst) ||
isa<IndirectBrInst>(Inst) ||
isa<ExtractValueInst>(Inst) ||
- isa<InsertValueInst>(Inst)) {
+ isa<InsertValueInst>(Inst) ||
+ // These atomics only operate on integer pointers, not
+ // other pointers, so we don't need to recreate the
+ // instruction.
+ isa<AtomicCmpXchgInst>(Inst) ||
+ isa<AtomicRMWInst>(Inst)) {
FC->convertInPlace(Inst);
}
}

Powered by Google App Engine
This is Rietveld 408576698