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

Unified Diff: src/IceCfg.cpp

Issue 2042063002: Created Ice::Instrumentation base class and accompanying hooks. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Style and comment fixes Created 4 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
« no previous file with comments | « Makefile.standalone ('k') | src/IceClFlags.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 8f6a2fffaca0ecbf8d040b895458c0b33bb69895..a113b95d47948ddd03c1bbe7bd864c2aa3642bd5 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -22,6 +22,7 @@
#include "IceELFObjectWriter.h"
#include "IceGlobalInits.h"
#include "IceInst.h"
+#include "IceInstrumentation.h"
#include "IceInstVarIter.h"
#include "IceLiveness.h"
#include "IceLoopAnalyzer.h"
@@ -238,6 +239,12 @@ void Cfg::translate() {
if (auto *Var64On32 = llvm::dyn_cast<Variable64On32>(Var))
Var64On32->initHiLo(this);
+ // Instrument the Cfg, e.g. with AddressSanitizer
+ if (!BuildDefs::minimal() && getFlags().getSanitizeAddresses()) {
+ getContext()->instrumentFunc(this);
+ dump("Instrumented CFG");
+ }
+
// The set of translation passes and their order are determined by the
// target.
getTarget()->translate();
« no previous file with comments | « Makefile.standalone ('k') | src/IceClFlags.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698