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

Unified Diff: src/IceASanInstrumentation.h

Issue 2183683003: Subzero: Removed unnecessary global access checks (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Small fixes Created 4 years, 5 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 | « no previous file | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceASanInstrumentation.h
diff --git a/src/IceASanInstrumentation.h b/src/IceASanInstrumentation.h
index ef212f5b6713010c16331db28f6e252f623adc52..f3090ef160f27985518e0a01c9c45493958131db 100644
--- a/src/IceASanInstrumentation.h
+++ b/src/IceASanInstrumentation.h
@@ -26,6 +26,7 @@
namespace Ice {
using VarSizeMap = std::unordered_map<Operand *, SizeT>;
+using GlobalSizeMap = std::unordered_map<GlobalString, SizeT>;
class ASanInstrumentation : public Instrumentation {
ASanInstrumentation() = delete;
@@ -41,6 +42,7 @@ public:
private:
std::string nextRzName();
+ bool isOkGlobalAccess(Operand *Op, SizeT Size);
bool isInstrumentable(Cfg *Func) override;
void instrumentFuncStart(LoweringContext &Context) override;
void instrumentCall(LoweringContext &Context, InstCall *Instr) override;
@@ -53,6 +55,7 @@ private:
void finishFunc(Cfg *Func) override;
ICE_TLS_DECLARE_FIELD(VarSizeMap *, LocalVars);
ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors);
+ GlobalSizeMap GlobalSizes;
std::atomic<uint32_t> RzNum;
bool DidProcessGlobals = false;
SizeT RzGlobalsNum = 0;
« no previous file with comments | « no previous file | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698