我正在尝试修改 LLVM 代码的某些部分。我在这里面临困难:
{这部分代码只是为了创建一个传递给另一个模块的 OptimizationRemark}
OptimizationRemarkAnalysis &LoopAccessInfo::recordAnalysis(StringRef RemarkName,
Instruction *I) {
assert(!Report && "Multiple reports generated");
Value *CodeRegion = TheLoop->getHeader();
DebugLoc DL = TheLoop->getStartLoc();
if (I) {
CodeRegion = I->getParent();
// If there is no debug location attached to the instruction, revert back to
// using the loop's.
if (I->getDebugLoc())
DL = I->getDebugLoc();
}
OptimizationRemarkAnalysis R(DEBUG_TYPE, RemarkName, DL, CodeRegion);
Report = std::unique_ptr<OptimizationRemarkAnalysis>{&R};
return *Report;
}
Run Code Online (Sandbox Code Playgroud)
当我尝试构建它时,它工作正常。但是当我在基准上运行它时,它给出了这样的错误:
#0 0x0000563337f8bb9f llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/cs15btech11044/list_of_llvms/LLVM_second_remark/LLVM_for_commits_2/llvm/lib/Support/Unix/Signals.inc:398:0
#1 0x0000563337f8bc32 PrintStackTraceSignalHandler(void*) /home/cs15btech11044/list_of_llvms/LLVM_second_remark/LLVM_for_commits_2/llvm/lib/Support/Unix/Signals.inc:462:0
#2 0x0000563337f89e07 llvm::sys::RunSignalHandlers() /home/cs15btech11044/list_of_llvms/LLVM_second_remark/LLVM_for_commits_2/llvm/lib/Support/Signals.cpp:49:0
#3 0x0000563337f8b40b …Run Code Online (Sandbox Code Playgroud)