llvm.org GIT mirror llvm / ddf4c98
Remove JumpInstrTableInfo.h as it is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241517 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 5 years ago
2 changed file(s) with 0 addition(s) and 72 deletion(s). Raw diff Collapse all Expand all
+0
-71
include/llvm/Analysis/JumpInstrTableInfo.h less more
None //===-- JumpInstrTableInfo.h: Info for Jump-Instruction Tables --*- C++ -*-===//
1 //
2 // This file is distributed under the University of Illinois Open Source
3 // License. See LICENSE.TXT for details.
4 //
5 //===----------------------------------------------------------------------===//
6 ///
7 /// \file
8 /// \brief Information about jump-instruction tables that have been created by
9 /// JumpInstrTables pass.
10 ///
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_ANALYSIS_JUMPINSTRTABLEINFO_H
14 #define LLVM_ANALYSIS_JUMPINSTRTABLEINFO_H
15
16 #include "llvm/ADT/DenseMap.h"
17 #include "llvm/Pass.h"
18 #include
19
20 namespace llvm {
21 class Function;
22 class FunctionType;
23
24 /// This class stores information about jump-instruction tables created by the
25 /// JumpInstrTables pass (in lib/CodeGen/JumpInstrTables.cpp). Each table is a
26 /// map from a function type to a vector of pairs. The first element of each
27 /// pair is the function that has the jumptable annotation. The second element
28 /// is a function that was declared by JumpInstrTables and used to replace all
29 /// address-taking sites for the original function.
30 ///
31 /// The information in this pass is used in AsmPrinter
32 /// (lib/CodeGen/AsmPrinter/AsmPrinter.cpp) to generate the required assembly
33 /// for the jump-instruction tables.
34 class JumpInstrTableInfo : public ImmutablePass {
35 public:
36 static char ID;
37
38 /// The default byte alignment for jump tables is 16, which is large but
39 /// usually safe.
40 JumpInstrTableInfo(uint64_t ByteAlign = 16);
41 ~JumpInstrTableInfo() override;
42 const char *getPassName() const override {
43 return "Jump-Instruction Table Info";
44 }
45
46 typedef std::pair JumpPair;
47 typedef DenseMap > JumpTables;
48
49 /// Inserts an entry in a table, adding the table if it doesn't exist.
50 void insertEntry(FunctionType *TableFunTy, Function *Target, Function *Jump);
51
52 /// Gets the tables.
53 const JumpTables &getTables() const { return Tables; }
54
55 /// Gets the alignment in bytes of a jumptable entry.
56 uint64_t entryByteAlignment() const { return ByteAlignment; }
57 private:
58 JumpTables Tables;
59
60 /// A power-of-two alignment of a jumptable entry.
61 uint64_t ByteAlignment;
62 };
63
64 /// Creates a JumpInstrTableInfo pass with the given bound on entry size. This
65 /// bound specifies the maximum number of bytes needed to represent an
66 /// unconditional jump or a trap instruction in the back end currently in use.
67 ModulePass *createJumpInstrTableInfoPass(unsigned Bound);
68 }
69
70 #endif /* LLVM_ANALYSIS_JUMPINSTRTABLEINFO_H */
1818 #include "llvm/ADT/SmallString.h"
1919 #include "llvm/ADT/Statistic.h"
2020 #include "llvm/Analysis/ConstantFolding.h"
21 #include "llvm/Analysis/JumpInstrTableInfo.h"
2221 #include "llvm/CodeGen/Analysis.h"
2322 #include "llvm/CodeGen/GCMetadataPrinter.h"
2423 #include "llvm/CodeGen/MachineConstantPool.h"