Issue 129458
Summary 【BOLT】【RISC-V】createInstrumentedIndCallHandlerExitBB() seems not to be implemented.
Labels BOLT
Assignees
Reporter dinyy
    When I want to run this command on RISC-V platform:

`
llvm-bolt mcf_s_base.mytest-64 -instrument -o mcf_s_base.mytest-64.instr_before
`
it occurs:
`
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: Target architecture: riscv64
BOLT-INFO: BOLT version: <unknown>
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.
BOLT-INFO: enabling relocation mode
BOLT-INFO: forcing -jump-tables=move for instrumentation
BOLT-INFO: 0 out of 49 functions in the binary (0.0%) have non-empty execution profile
not implemented
UNREACHABLE executed at /home/yjn/th1520_build/llvm-project-llvmorg-19.1.7/bolt/include/bolt/Core/MCPlusBuilder.h:2001!
 #0 0x0000003fb936bb64 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMSupport.so.19.1+0x16bb64)
 #1 0x0000003fb9369d36 llvm::sys::RunSignalHandlers() (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMSupport.so.19.1+0x169d36)
 #2 0x0000003fb9369e90 SignalHandler(int) Signals.cpp:0:0
 #3 0x0000003fba35c800 (linux-vdso.so.1+0x800)
 #4 0x0000003fb90f7812 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000003fb90b6be8 raise ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x0000003fb90a6612 abort ./stdlib/abort.c:81:7
 #7 0x0000003fb92c04fe llvm::report_bad_alloc_error(char const*, bool) (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMSupport.so.19.1+0xc04fe)
 #8 0x0000003fb9c16c6c llvm::bolt::MCPlusBuilder::createInstrumentedIndirectCall(llvm::MCInst&&, llvm::MCSymbol*, int, llvm::MCContext*) (/home/sipeed/work_bolt/bolt_install/bin/../lib/../lib/libLLVMBOLTTargetRISCV.so.19.1+0x2c6c)
 #9 0x0000003fb852e8dc llvm::bolt::Instrumentation::createAuxiliaryFunctions(llvm::bolt::BinaryContext&) (/home/sipeed/work_bolt/bolt_install/bin/../lib/../lib/libLLVMBOLTPasses.so.19.1+0x8e8dc)
#10 0x0000003fb852f47a llvm::bolt::Instrumentation::runOnFunctions(llvm::bolt::BinaryContext&) (/home/sipeed/work_bolt/bolt_install/bin/../lib/../lib/libLLVMBOLTPasses.so.19.1+0x8f47a)
#11 0x0000003fb9d1e6a0 llvm::bolt::BinaryFunctionPassManager::runPasses() (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMBOLTRewrite.so.19.1+0x316a0)
#12 0x0000003fb9d20636 llvm::bolt::BinaryFunctionPassManager::runAllPasses(llvm::bolt::BinaryContext&) (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMBOLTRewrite.so.19.1+0x33636)
#13 0x0000003fb9d6cae0 llvm::bolt::RewriteInstance::runOptimizationPasses() (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMBOLTRewrite.so.19.1+0x7fae0)
#14 0x0000003fb9db90c4 llvm::bolt::RewriteInstance::run() (/home/sipeed/work_bolt/bolt_install/bin/../lib/libLLVMBOLTRewrite.so.19.1+0xcc0c4)
#15 0x0000002ad7d93914 main (/home/sipeed/work_bolt/bolt_install/bin/llvm-bolt+0x3914)
#16 0x0000003fb90a6bf0 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#17 0x0000003fb90a6c98 call_init ./csu/libc-start.c:128:20
#18 0x0000003fb90a6c98 __libc_start_main ./csu/libc-start.c:347:5
#19 0x0000002ad7d94078 _start (/home/sipeed/work_bolt/bolt_install/bin/llvm-bolt+0x4078)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: llvm-bolt mcf_s_base.mytest-64 -instrument -o mcf_s_base.mytest-64.instr_before
Aborted
`
I think this is becase createInstrumentedIndCallHandlerExitBB() not to be implemented. I don't find it in 
 bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp. I want know can I use this command on RISCV. or maybe have other alternative solution? 

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to