Chromium Code Reviews| Index: src/IceCfg.h |
| diff --git a/src/IceCfg.h b/src/IceCfg.h |
| index 08b4e979c2c07d993a56b38a2f3163627b45c1e1..b3dd37381424483572cb509b064d73f30b6ba3d1 100644 |
| --- a/src/IceCfg.h |
| +++ b/src/IceCfg.h |
| @@ -24,6 +24,8 @@ |
| namespace Ice { |
| +class InstJumpTable; |
| + |
| class Cfg { |
| Cfg() = delete; |
| Cfg(const Cfg &) = delete; |
| @@ -140,6 +142,13 @@ public: |
| const VarList &getImplicitArgs() const { return ImplicitArgs; } |
| /// @} |
| + /// \name Manage the jump tables. |
| + /// @{ |
| + void addJumpTable(InstJumpTable *JumpTable) { |
| + JumpTables.emplace_back(JumpTable); |
| + } |
| + /// @} |
| + |
| /// \name Miscellaneous accessors. |
| /// @{ |
| TargetLowering *getTarget() const { return Target.get(); } |
| @@ -229,6 +238,12 @@ private: |
| /// code needs to be defined. |
| void profileBlocks(); |
| + /// Delete registered jump table placeholder instructions. This should only be |
| + /// called once all repointing has taken palce. |
|
jvoung (off chromium)
2015/07/29 21:31:16
palce -> place
ascull
2015/07/29 22:43:04
Done.
|
| + void deleteJumpTableInsts(); |
| + /// Iterate through the registered jump tables and emit them. |
| + void emitJumpTables(); |
| + |
| GlobalContext *Ctx; |
| uint32_t SequenceNumber; /// output order for emission |
| VerboseMask VMask; |
| @@ -252,6 +267,7 @@ private: |
| std::unique_ptr<Assembler> TargetAssembler; |
| /// Globals required by this CFG. Mostly used for the profiler's globals. |
| std::unique_ptr<VariableDeclarationList> GlobalInits; |
| + std::vector<InstJumpTable *> JumpTables; |
| /// CurrentNode is maintained during dumping/emitting just for |
| /// validating Variable::DefNode. Normally, a traversal over |