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

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: 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
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index e87bf936bbea58ec92b84e5f3236671e90337197..8d70d247a71e78ee132066c047d4b2afe0b07011 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -176,6 +176,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 {
@@ -211,6 +212,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;
@@ -337,6 +340,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
@@ -396,6 +400,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,

Powered by Google App Engine
This is Rietveld 408576698