| Index: src/IceGlobalContext.h
|
| diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
|
| index d19249d40c2f9aaa6bedf2b27a2b4e328abb4914..acef4c5aae275f2051a615933a83ad5193932211 100644
|
| --- a/src/IceGlobalContext.h
|
| +++ b/src/IceGlobalContext.h
|
| @@ -20,6 +20,7 @@
|
| #include "IceClFlags.h"
|
| #include "IceIntrinsics.h"
|
| #include "IceRNG.h"
|
| +#include "IceSwitchLowering.h"
|
| #include "IceThreading.h"
|
| #include "IceTimerTree.h"
|
| #include "IceTypes.h"
|
| @@ -55,6 +56,7 @@ public:
|
| }
|
| ~LockedPtr() { Lock->unlock(); }
|
| T *operator->() const { return Value; }
|
| + T &operator*() const { return *Value; }
|
|
|
| private:
|
| T *Value;
|
| @@ -209,6 +211,13 @@ public:
|
| /// Returns a copy of the list of external symbols.
|
| ConstantList getConstantExternSyms();
|
|
|
| + /// Return a locked pointer to the registered jump tables.
|
| + LockedPtr<JumpTableDataList> getJumpTables() {
|
| + return LockedPtr<JumpTableDataList>(&JumpTables, &JumpTablesLock);
|
| + }
|
| + /// Create a new jump table entry and return a reference to it.
|
| + JumpTableData &addJumpTable(IceString FuncName, SizeT Id, SizeT NumTargets);
|
| +
|
| const ClFlags &getFlags() const { return Flags; }
|
|
|
| bool isIRGenerationDisabled() const {
|
| @@ -335,6 +344,8 @@ public:
|
|
|
| void lowerConstants();
|
|
|
| + void lowerJumpTables();
|
| +
|
| void emitQueueBlockingPush(EmitterWorkItem *Item);
|
| EmitterWorkItem *emitQueueBlockingPop();
|
| void emitQueueNotifyEnd() { EmitQ.notifyEnd(); }
|
| @@ -456,6 +467,11 @@ private:
|
| std::unique_ptr<ConstantPool> ConstPool;
|
|
|
| ICE_CACHELINE_BOUNDARY;
|
| + // Managed by getJumpTables()
|
| + GlobalLockType JumpTablesLock;
|
| + JumpTableDataList JumpTables;
|
| +
|
| + ICE_CACHELINE_BOUNDARY;
|
| // Managed by getErrorStatus()
|
| GlobalLockType ErrorStatusLock;
|
| ErrorCode ErrorStatus;
|
|
|