diff options
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h index e42214d1569..63c0ba2811e 100644 --- a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h +++ b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h @@ -162,6 +162,19 @@ public: unsigned getVarArgsFPRSize() const { return VarArgsFPRSize; } void setVarArgsFPRSize(unsigned Size) { VarArgsFPRSize = Size; } + unsigned getJumpTableEntrySize(int Idx) const { + auto It = JumpTableEntryInfo.find(Idx); + if (It != JumpTableEntryInfo.end()) + return It->second.first; + return 4; + } + MCSymbol *getJumpTableEntryPCRelSymbol(int Idx) const { + return JumpTableEntryInfo.find(Idx)->second.second; + } + void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym) { + JumpTableEntryInfo[Idx] = std::make_pair(Size, PCRelSym); + } + using SetOfInstructions = SmallPtrSet<const MachineInstr *, 16>; const SetOfInstructions &getLOHRelated() const { return LOHRelated; } @@ -200,6 +213,8 @@ private: // Hold the lists of LOHs. MILOHContainer LOHContainerSet; SetOfInstructions LOHRelated; + + DenseMap<int, std::pair<unsigned, MCSymbol *>> JumpTableEntryInfo; }; } // end namespace llvm |