本文整理汇总了C++中UserValue类的典型用法代码示例。如果您正苦于以下问题:C++ UserValue类的具体用法?C++ UserValue怎么用?C++ UserValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UserValue类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DEBUG
bool LDVImpl::handleDebugValue(MachineInstr *MI, SlotIndex Idx) {
// DBG_VALUE loc, offset, variable
if (MI->getNumOperands() != 3 ||
!MI->getOperand(1).isImm() || !MI->getOperand(2).isMetadata()) {
DEBUG(dbgs() << "Can't handle " << *MI);
return false;
}
// Get or create the UserValue for (variable,offset).
unsigned Offset = MI->getOperand(1).getImm();
const MDNode *Var = MI->getOperand(2).getMetadata();
UserValue *UV = getUserValue(Var, Offset, MI->getDebugLoc());
UV->addDef(Idx, MI->getOperand(0));
return true;
}
开发者ID:Sciumo,项目名称:llvm,代码行数:15,代码来源:LiveDebugVariables.cpp
示例2: renameRegister
void LDVImpl::
renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx) {
UserValue *UV = lookupVirtReg(OldReg);
if (!UV)
return;
if (TargetRegisterInfo::isVirtualRegister(NewReg))
mapVirtReg(NewReg, UV);
virtRegToEqClass.erase(OldReg);
do {
UV->renameRegister(OldReg, NewReg, SubIdx, TRI);
UV = UV->getNext();
} while (UV);
}
开发者ID:Sciumo,项目名称:llvm,代码行数:15,代码来源:LiveDebugVariables.cpp
示例3:
UserValue *LDVImpl::getUserValue(const MDNode *Var, const MDNode *Expr,
bool IsIndirect, const DebugLoc &DL) {
UserValue *&Leader = userVarMap[Var];
if (Leader) {
UserValue *UV = Leader->getLeader();
Leader = UV;
for (; UV; UV = UV->getNext())
if (UV->match(Var, Expr, DL->getInlinedAt(), IsIndirect))
return UV;
}
userValues.push_back(
llvm::make_unique<UserValue>(Var, Expr, IsIndirect, DL, allocator));
UserValue *UV = userValues.back().get();
Leader = UserValue::merge(Leader, UV);
return UV;
}
开发者ID:CTSRD-SOAAP,项目名称:llvm,代码行数:17,代码来源:LiveDebugVariables.cpp
示例4:
UserValue *LDVImpl::getUserValue(const MDNode *Var, unsigned Offset,
bool IsIndirect, DebugLoc DL) {
UserValue *&Leader = userVarMap[Var];
if (Leader) {
UserValue *UV = Leader->getLeader();
Leader = UV;
for (; UV; UV = UV->getNext())
if (UV->match(Var, Offset, IsIndirect))
return UV;
}
userValues.push_back(
make_unique<UserValue>(Var, Offset, IsIndirect, DL, allocator));
UserValue *UV = userValues.back().get();
Leader = UserValue::merge(Leader, UV);
return UV;
}
开发者ID:DiamondLovesYou,项目名称:llvm,代码行数:17,代码来源:LiveDebugVariables.cpp
示例5: DEBUG
bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotIndex Idx) {
// DBG_VALUE loc, offset, variable
if (MI.getNumOperands() != 4 ||
!(MI.getOperand(1).isReg() || MI.getOperand(1).isImm()) ||
!MI.getOperand(2).isMetadata()) {
DEBUG(dbgs() << "Can't handle " << MI);
return false;
}
// Get or create the UserValue for (variable,offset).
bool IsIndirect = MI.isIndirectDebugValue();
unsigned Offset = IsIndirect ? MI.getOperand(1).getImm() : 0;
const MDNode *Var = MI.getDebugVariable();
const MDNode *Expr = MI.getDebugExpression();
//here.
UserValue *UV = getUserValue(Var, Expr, Offset, IsIndirect, MI.getDebugLoc());
UV->addDef(Idx, MI.getOperand(0));
return true;
}
开发者ID:sanjoy,项目名称:llvm,代码行数:19,代码来源:LiveDebugVariables.cpp
注:本文中的UserValue类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论