[llvm] r347061 - [CodeGen] Expose some data types and accessors from StackMaps
Than McIntosh via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 16 08:48:50 PST 2018
Author: thanm
Date: Fri Nov 16 08:48:49 2018
New Revision: 347061
URL: http://llvm.org/viewvc/llvm-project?rev=347061&view=rev
Log:
[CodeGen] Expose some data types and accessors from StackMaps
Summary:
This is for supporting custom stack map formats, where the
custom printer can access the stack map data.
Patch by Cherry Zhang <cherryyz at google.com>.
Related: https://reviews.llvm.org/D53892
Reviewers: thanm, apilipenko
Reviewed By: apilipenko
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54224
Modified:
llvm/trunk/include/llvm/CodeGen/StackMaps.h
Modified: llvm/trunk/include/llvm/CodeGen/StackMaps.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/StackMaps.h?rev=347061&r1=347060&r2=347061&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/StackMaps.h (original)
+++ llvm/trunk/include/llvm/CodeGen/StackMaps.h Fri Nov 16 08:48:49 2018
@@ -236,25 +236,6 @@ public:
FnInfos.clear();
}
- /// Generate a stackmap record for a stackmap instruction.
- ///
- /// MI must be a raw STACKMAP, not a PATCHPOINT.
- void recordStackMap(const MachineInstr &MI);
-
- /// Generate a stackmap record for a patchpoint instruction.
- void recordPatchPoint(const MachineInstr &MI);
-
- /// Generate a stackmap record for a statepoint instruction.
- void recordStatepoint(const MachineInstr &MI);
-
- /// If there is any stack map data, create a stack map section and serialize
- /// the map info into it. This clears the stack map data structures
- /// afterwards.
- void serializeToStackMapSection();
-
-private:
- static const char *WSMP;
-
using LocationVec = SmallVector<Location, 8>;
using LiveOutVec = SmallVector<LiveOutReg, 8>;
using ConstantPool = MapVector<uint64_t, uint64_t>;
@@ -283,6 +264,31 @@ private:
using FnInfoMap = MapVector<const MCSymbol *, FunctionInfo>;
using CallsiteInfoList = std::vector<CallsiteInfo>;
+ /// Generate a stackmap record for a stackmap instruction.
+ ///
+ /// MI must be a raw STACKMAP, not a PATCHPOINT.
+ void recordStackMap(const MachineInstr &MI);
+
+ /// Generate a stackmap record for a patchpoint instruction.
+ void recordPatchPoint(const MachineInstr &MI);
+
+ /// Generate a stackmap record for a statepoint instruction.
+ void recordStatepoint(const MachineInstr &MI);
+
+ /// If there is any stack map data, create a stack map section and serialize
+ /// the map info into it. This clears the stack map data structures
+ /// afterwards.
+ void serializeToStackMapSection();
+
+ /// Get call site info.
+ CallsiteInfoList &getCSInfos() { return CSInfos; }
+
+ /// Get function info.
+ FnInfoMap &getFnInfos() { return FnInfos; }
+
+private:
+ static const char *WSMP;
+
AsmPrinter &AP;
CallsiteInfoList CSInfos;
ConstantPool ConstPool;
More information about the llvm-commits
mailing list