// llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cppSelectionDAG::SelectionDAG(constTargetMachine&tm,CodeGenOpt::LevelOL):TM(tm),OptLevel(OL),EntryNode(ISD::EntryToken,0,DebugLoc(),getVTList(MVT::Other)),Root(getEntryNode()){InsertNode(&EntryNode);DbgInfo=newSDDbgInfo();} 表示EntryToken的Ent...
int64_t Offset) const { DebugLoc DL; MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand:: MOStore); unsigned Opc = 0; Opc = xxx::ST; assert(Opc&& "Register class not handled!"); BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)) .addFrameInd...
: TM(tm), OptLevel(OL), EntryNode(ISD::EntryToken, 0, DebugLoc(), getVTList(MVT::Other)), Root(getEntryNode()) { InsertNode(&EntryNode); DbgInfo = new SDDbgInfo(); } /// This represents a list of ValueType's that has been intern'd by /// a SelectionDAG. Instances of th...
Col = 0; } else LexLoc.Col++; return LastChar; } 在这组代码中,我们添加了一些关于如何跟踪“源文件”的行和列的功能。当我们对每个令牌进行lex时,我们将当前的“lexical location”设置为令牌开头的分类行和列。为此,我们使用跟踪信息的新的Advance()覆盖了之前对getchar()的所有调用,然后我们向所有AST类...
对于DEBUG构建,默认值为ON,否则为OFF。要打开断言检查(例如,对于RELEASE构建),必须指定–DLLVM_ENABLE_ASSERTIONS=ON。 LLVM_ENABLE_EXPENSIVE_CHECKS:这将启用一些可能会显著减慢编译速度或消耗大量内存的昂贵检查。默认值为OFF。要打开这些检查,必须指定-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON。 LLVM_APPEND_VC_REV:LLVM...
i->setDebugLoc(ji->getDebugLoc()); ji++; } // The instructions' informations are now all correct 这里的代码的话主要解决两个问题,就cloneBasicBlock函数进行的克隆并不是完全的克隆,第一它不会对操作数进行替换,比如: orig: %a = ... ...
383 DebugLoc Loc = I->getDebugLoc(); 384 // Move all of the specified instructions from the original basic block into 385 // the new basic block. 386 New->getInstList().splice(New->end(), this->getInstList(), I, end()); ...
383DebugLoc Loc = I->getDebugLoc(); 384// Move all of the specified instructions from the original basic block into 385// the new basic block. 386New->getInstList().splice(New->end(), this->getInstList(), I, end()); 387 ...
获取函数CallInst*inst=contextBuilder.CreateCall(beginFun,{bbBuilder.CreateGlobalStringPtr(F.getName())});// 构造函数inst->insertBefore(beginInst);// 插入标记函数autoSP=F.getSubprogram();DebugLoc DL=DebugLoc::get(SP->getScopeLine(),0,SP);inst->setDebugLoc(DL);//设置DebugLoc,给debugger...