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

Unified Diff: src/IceTargetLowering.h

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix insertion strategy Created 6 years, 4 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/IceRNG.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 39e08def9b2c1a684d2437773f4ff76312e9ae80..6bf142487eb520aaee58570acef2341a84fbf0ed 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -121,6 +121,8 @@ public:
// Tries to do address mode optimization on a single instruction.
void doAddressOpt();
+ // Randomly insert NOPs.
+ void doNopInsertion();
// Lowers a single instruction.
void lower();
@@ -136,6 +138,7 @@ public:
virtual SizeT getFrameOrStackReg() const = 0;
virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0;
bool hasComputedFrame() const { return HasComputedFrame; }
+ bool shouldDoNopInsertion() const;
int32_t getStackAdjustment() const { return StackAdjustment; }
void updateStackAdjustment(int32_t Offset) { StackAdjustment += Offset; }
void resetStackAdjustment() { StackAdjustment = 0; }
@@ -193,6 +196,7 @@ protected:
virtual void doAddressOptLoad() {}
virtual void doAddressOptStore() {}
+ virtual void randomlyInsertNop(float Probability) = 0;
// This gives the target an opportunity to post-process the lowered
// expansion before returning. The primary intention is to do some
// Register Manager activity as necessary, specifically to eagerly
« no previous file with comments | « src/IceRNG.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698