aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/CodeGen/AsmPrinter.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/CodeGen/AsmPrinter.h')
-rw-r--r--llvm/include/llvm/CodeGen/AsmPrinter.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index 4c744a2..19ca444 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -198,26 +198,13 @@ private:
/// and targets.
using CGTypeId = uint64_t;
- /// Map type identifiers to callsite labels. Labels are generated for each
- /// indirect callsite in the function.
- SmallVector<std::pair<CGTypeId, MCSymbol *>> CallSiteLabels;
+ /// Unique target type IDs.
+ SmallSet<CGTypeId, 4> IndirectCalleeTypeIDs;
+ /// Unique direct callees.
SmallSet<MCSymbol *, 4> DirectCallees;
};
- /// Enumeration of function kinds, and their mapping to function kind values
- /// stored in callgraph section entries.
- enum class FunctionKind : uint64_t {
- /// Function cannot be target to indirect calls.
- NOT_INDIRECT_TARGET = 0,
-
- /// Function may be target to indirect calls but its type id is unknown.
- INDIRECT_TARGET_UNKNOWN_TID = 1,
-
- /// Function may be target to indirect calls and its type id is known.
- INDIRECT_TARGET_KNOWN_TID = 2,
- };
-
- enum CallGraphSectionFormatVersion : uint64_t {
+ enum CallGraphSectionFormatVersion : uint8_t {
V_0 = 0,
};
@@ -386,9 +373,9 @@ public:
/// are available. Returns empty string otherwise.
StringRef getConstantSectionSuffix(const Constant *C) const;
- /// Iff MI is an indirect call, generate and emit a label after the callsites
- /// which will be used to populate the .callgraph section. For direct
- /// callsites add the callee symbol to direct callsites list of FuncCGInfo.
+ /// If MI is an indirect call, add expected type IDs to indirect type ids
+ /// list. If MI is a direct call add the callee symbol to direct callsites
+ /// list of FuncCGInfo.
void handleCallsiteForCallgraph(
FunctionCallGraphInfo &FuncCGInfo,
const MachineFunction::CallSiteInfoMap &CallSitesInfoMap,