本文整理汇总了C++中BCMarker::valid方法的典型用法代码示例。如果您正苦于以下问题:C++ BCMarker::valid方法的具体用法?C++ BCMarker::valid怎么用?C++ BCMarker::valid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BCMarker
的用法示例。
在下文中一共展示了BCMarker::valid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setMarker
void TraceBuilder::setMarker(BCMarker marker) {
if (m_curMarker == marker) return;
FTRACE(2, "TraceBuilder changing current marker from {} to {}\n",
m_curMarker.func ? m_curMarker.show() : "<invalid>", marker.show());
assert(marker.valid());
m_curMarker = marker;
}
示例2: genBlock
static void genBlock(IRUnit& unit, CodeBlock& cb, CodeBlock& stubsCode,
MCGenerator* mcg, CodegenState& state, Block* block,
std::vector<TransBCMapping>* bcMap) {
FTRACE(6, "genBlock: {}\n", block->id());
std::unique_ptr<CodeGenerator> cg(mcg->backEnd().newCodeGenerator(unit, cb,
stubsCode,
mcg,
state));
BCMarker prevMarker;
for (IRInstruction& instr : *block) {
IRInstruction* inst = &instr;
// If we're on the first instruction of the block or we have a new
// marker since the last instruction, update the bc mapping.
if ((!prevMarker.valid() || inst->marker() != prevMarker) &&
(mcg->tx().isTransDBEnabled() ||
RuntimeOption::EvalJitUseVtuneAPI) && bcMap) {
bcMap->push_back(TransBCMapping{inst->marker().func()->unit()->md5(),
inst->marker().bcOff(),
cb.frontier(),
stubsCode.frontier()});
prevMarker = inst->marker();
}
auto* addr = cg->cgInst(inst);
if (state.asmInfo && addr) {
state.asmInfo->updateForInstruction(inst, addr, cb.frontier());
}
}
}
示例3: setMarker
void IRBuilder::setMarker(BCMarker marker) {
auto const oldMarker = m_state.marker();
if (marker == oldMarker) return;
FTRACE(2, "IRBuilder changing current marker from {} to {}\n",
oldMarker.func ? oldMarker.show() : "<invalid>", marker.show());
assert(marker.valid());
m_state.setMarker(marker);
}
示例4: makeFixup
Fixup makeFixup(const BCMarker& marker, SyncOptions sync) {
assertx(marker.valid());
auto const stackOff = [&] {
switch (sync) {
case SyncOptions::SyncAdjustOne:
return marker.spOff() -= 1;
case SyncOptions::None:
// We can get here if we are memory profiling, since we override the
// normal sync settings and sync anyway.
always_assert(RuntimeOption::HHProfEnabled);
// fallthru
case SyncOptions::Sync:
return marker.spOff();
}
not_reached();
}();
auto const bcOff = marker.fixupBcOff() - marker.fixupFunc()->base();
return Fixup{bcOff, stackOff.offset};
}
示例5: cgBlock
void CodeGenerator::cgBlock(Block* block, vector<TransBCMapping>* bcMap) {
FTRACE(6, "cgBlock: {}\n", block->id());
BCMarker prevMarker;
for (IRInstruction& instr : *block) {
IRInstruction* inst = &instr;
// If we're on the first instruction of the block or we have a new
// marker since the last instruction, update the bc mapping.
if ((!prevMarker.valid() || inst->marker() != prevMarker) &&
m_tx64->isTransDBEnabled() && bcMap) {
bcMap->push_back(TransBCMapping{inst->marker().func->unit()->md5(),
inst->marker().bcOff,
m_as.frontier(),
m_astubs.frontier()});
prevMarker = inst->marker();
}
auto* addr = cgInst(inst);
if (m_state.asmInfo && addr) {
m_state.asmInfo->updateForInstruction(inst, addr, m_as.frontier());
}
}
}