Go to the documentation of this file.
13 #ifndef LLVM_XRAY_PROFILE_H
14 #define LLVM_XRAY_PROFILE_H
107 swap(L.Blocks, R.Blocks);
108 swap(L.NodeStorage, R.NodeStorage);
109 swap(L.Roots, R.Roots);
110 swap(L.PathIDMap, R.PathIDMap);
111 swap(L.NextID, R.NextID);
115 using BlockList = std::list<Block>;
119 std::vector<TrieNode *> Callees{};
120 TrieNode *Caller =
nullptr;
128 std::list<TrieNode> NodeStorage;
131 SmallVector<TrieNode *, 4> Roots;
134 DenseMap<PathID, TrieNode *> PathIDMap;
143 bool empty()
const {
return Blocks.empty(); }
This is an optimization pass for GlobalISel generic memory operations.
Expected< Profile > loadProfile(StringRef Filename)
This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Profile & operator=(Profile &&O) noexcept
Tagged union holding either a T or a Error.
Expected< Profile > profileFromTrace(const Trace &T)
This function takes a Trace and creates a Profile instance from it.
uint64_t CumulativeLocalTime
const_iterator begin() const
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Profile mergeProfilesByStack(const Profile &L, const Profile &R)
This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Error addBlock(Block &&B)
Appends a fully-formed Block instance into the Profile.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
friend void swap(Profile &L, Profile &R)
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
PathID internPath(ArrayRef< FuncID > P)
The stack represented in |P| must be in stack order (leaf to root).
Profile instances are thread-compatible.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
std::vector< std::pair< PathID, Data > > PathData
Lightweight error class with error context and mandatory checking.
Profile mergeProfilesByThread(const Profile &L, const Profile &R)
This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by...
Profile(Profile &&O) noexcept
const_iterator end() const
Expected< std::vector< FuncID > > expandPath(PathID P) const
Provides a sequence of function IDs from a previously interned PathID.
BlockList::const_iterator const_iterator