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

Unified Diff: src/IceGlobalContext.cpp

Issue 1386593004: Subzero: Fix nondeterministic behavior in constant pool creation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Update comment Created 5 years, 2 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/IceFixups.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index c7497da83df5a8978fdcdbfdd1fba6045acb1c70..24002d611abc5cf1e1b9790182eb0d2d6a72f809 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -130,7 +130,7 @@ public:
auto Iter = Pool.find(Key);
if (Iter != Pool.end())
return Iter->second;
- ValueType *Result = ValueType::create(Ctx, Ty, Key, NextPoolID++);
+ ValueType *Result = ValueType::create(Ctx, Ty, Key);
Pool[Key] = Result;
return Result;
}
@@ -157,7 +157,6 @@ private:
std::unordered_map<KeyType, ValueType *, std::hash<KeyType>,
KeyCompare<KeyType>>;
ContainerType Pool;
- uint32_t NextPoolID = 0;
};
// UndefPool maps ICE types to the corresponding ConstantUndef values.
@@ -170,12 +169,11 @@ public:
ConstantUndef *getOrAdd(GlobalContext *Ctx, Type Ty) {
if (Pool[Ty] == nullptr)
- Pool[Ty] = ConstantUndef::create(Ctx, Ty, NextPoolID++);
+ Pool[Ty] = ConstantUndef::create(Ctx, Ty);
return Pool[Ty];
}
private:
- uint32_t NextPoolID = 0;
std::vector<ConstantUndef *> Pool;
};
« no previous file with comments | « src/IceFixups.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698