本文整理汇总了C++中BCMarker类的典型用法代码示例。如果您正苦于以下问题:C++ BCMarker类的具体用法?C++ BCMarker怎么用?C++ BCMarker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BCMarker类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: FTRACE
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());
}
}
}
示例6: pushTrace
void TraceBuilder::pushTrace(IRTrace* t, BCMarker marker, Block* b,
const boost::optional<Block::iterator>& where) {
FTRACE(2, "TraceBuilder saving {}@{} and using {}@{}\n",
m_curTrace, m_state.marker().show(), t, marker.show());
assert(t);
assert(bool(b) == bool(where));
assert(IMPLIES(b, b->trace() == t));
m_savedTraces.push(
TraceState{ m_curTrace, m_curBlock, m_state.marker(), m_curWhere });
m_curTrace = t;
m_curBlock = b;
setMarker(marker);
m_curWhere = where;
}
示例7: pushBlock
void TraceBuilder::pushBlock(BCMarker marker, Block* b,
const boost::optional<Block::iterator>& where) {
FTRACE(2, "TraceBuilder saving {}@{} and using {}@{}\n",
m_curBlock, m_state.marker().show(), b, marker.show());
assert(b);
m_savedBlocks.push_back(
BlockState{ m_curBlock, m_state.marker(), m_curWhere });
m_curBlock = b;
setMarker(marker);
m_curWhere = where ? where : b->end();
if (do_assert) {
for (UNUSED auto const& state : m_savedBlocks) {
assert(state.block != b &&
"Can't push a block that's already in the saved stack");
}
}
}
示例8: FrameState
FrameState::FrameState(IRUnit& unit, BCMarker marker)
: FrameState(unit, marker.spOff(), marker.func(), marker.func()->numLocals())
{
assert(!marker.isDummy());
}