本文整理汇总了C++中Trace::back方法的典型用法代码示例。如果您正苦于以下问题:C++ Trace::back方法的具体用法?C++ Trace::back怎么用?C++ Trace::back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: genExitTrace
Trace* TraceBuilder::genExitTrace(uint32_t bcOff,
int32_t stackDeficit,
uint32_t numOpnds,
SSATmp* const* opnds,
TraceExitType::ExitType exitType,
uint32_t notTakenBcOff,
std::function<void(IRFactory*, Trace*)>
beforeExit) {
Trace* exitTrace = makeExitTrace(bcOff);
MarkerData marker;
marker.bcOff = bcOff;
marker.stackOff = m_spOffset + numOpnds - stackDeficit;
marker.func = m_curFunc->getValFunc();
exitTrace->back()->push_back(m_irFactory.gen(Marker, marker));
if (beforeExit) {
beforeExit(&m_irFactory, exitTrace);
}
SSATmp* sp = m_spValue;
if (numOpnds != 0 || stackDeficit != 0) {
SSATmp* srcs[numOpnds + 2];
srcs[0] = m_spValue;
srcs[1] = cns(stackDeficit);
std::copy(opnds, opnds + numOpnds, srcs + 2);
SSATmp** decayedPtr = srcs;
auto* spillInst = m_irFactory.gen(
SpillStack,
std::make_pair(numOpnds + 2, decayedPtr)
);
sp = spillInst->getDst();
exitTrace->back()->push_back(spillInst);
}
SSATmp* pc = cns(int64_t(bcOff));
if (exitType == TraceExitType::NormalCc) {
assert(notTakenBcOff != 0);
SSATmp* notTakenPC = cns(notTakenBcOff);
genFor(exitTrace, getExitOpcode(exitType),
m_curFunc,
pc, sp, m_fpValue,
notTakenPC);
} else {
assert(notTakenBcOff == 0);
genFor(exitTrace, getExitOpcode(exitType),
m_curFunc,
pc, sp, m_fpValue);
}
return exitTrace;
}