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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 848193003: Subzero: Add locking to prepare for multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTranslator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index f1b746f793cb81cdfe918ca7278964f4da9a4681..ea1f013553a237afb1281ea9511ea46d276332af 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -898,6 +898,7 @@ void TargetX8632::addProlog(CfgNode *Node) {
}
if (ALLOW_DUMP && Func->getContext()->isVerbose(IceV_Frame)) {
+ OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
Str << "Stack layout:\n";
@@ -1028,6 +1029,7 @@ void TargetX8632::emitConstants() const {
Writer->writeConstantPool<ConstantFloat>(IceType_f32);
Writer->writeConstantPool<ConstantDouble>(IceType_f64);
} else {
+ OstreamLocker L(Ctx);
emitConstantPool<PoolTypeConverter<float>>();
emitConstantPool<PoolTypeConverter<double>>();
}
@@ -3567,6 +3569,7 @@ void dumpAddressOpt(const Cfg *Func, const Variable *Base,
return;
if (!Func->getContext()->isVerbose(IceV_AddrOpt))
return;
+ OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
Str << "Instruction: ";
Reason->dumpDecorated(Func);
@@ -3738,6 +3741,7 @@ void computeAddressOpt(Cfg *Func, const Inst *Instr, Variable *&Base,
Variable *&Index, uint16_t &Shift, int32_t &Offset) {
Func->resetCurrentNode();
if (Func->getContext()->isVerbose(IceV_AddrOpt)) {
+ OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
Str << "\nStarting computeAddressOpt for instruction:\n ";
Instr->dumpDecorated(Func);
@@ -4579,6 +4583,7 @@ void TargetX8632::makeRandomRegisterPermutation(
assert(NumShuffled + NumPreserved == RegX8632::Reg_NUM);
if (Func->getContext()->isVerbose(IceV_Random)) {
+ OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
Str << "Register equivalence classes:\n";
for (auto I : EquivalenceClasses) {
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698