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

Unified Diff: src/IceTargetLowering.h

Issue 1257283004: Iasm and obj lowering for advanced switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 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 | « src/IceSwitchLowering.cpp ('k') | src/IceTargetLoweringARM32.h » ('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 018a5556811e1e72072de435ede144e484958961..c7ef9189fa585dfd9bf7f204e1b0949e4dec7270 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -177,6 +177,7 @@ public:
void updateStackAdjustment(int32_t Offset) { StackAdjustment += Offset; }
void resetStackAdjustment() { StackAdjustment = 0; }
SizeT makeNextLabelNumber() { return NextLabelNumber++; }
+ SizeT makeNextJumpTableNumber() { return NextJumpTableNumber++; }
LoweringContext &getContext() { return Context; }
enum RegSet {
@@ -212,6 +213,8 @@ public:
/// Get the minimum number of clusters required for a jump table to be
/// considered.
virtual SizeT getMinJumpTableSize() const = 0;
+ virtual void emitJumpTable(const Cfg *Func,
+ const InstJumpTable *JumpTable) const = 0;
virtual void emitVariable(const Variable *Var) const = 0;
@@ -338,6 +341,7 @@ protected:
/// natural location, as arguments are pushed for a function call.
int32_t StackAdjustment = 0;
SizeT NextLabelNumber = 0;
+ SizeT NextJumpTableNumber = 0;
LoweringContext Context;
// Runtime helper function names
@@ -397,6 +401,7 @@ public:
virtual void lowerGlobals(const VariableDeclarationList &Vars,
const IceString &SectionSuffix) = 0;
virtual void lowerConstants() = 0;
+ virtual void lowerJumpTables() = 0;
protected:
void emitGlobal(const VariableDeclaration &Var,
« no previous file with comments | « src/IceSwitchLowering.cpp ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698