[llvm] [AArch64] Disable Pre-RA Scheduler for Neoverse V2 (PR #127784)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 08:57:44 PST 2025


davemgreen wrote:

> I also don't know what this crash is.

I was running the llvm-test-suite (+spec's) with.. I think `-stdlib=libc++ --rtlib=compiler-rt -fuse-ld=lld -flto -O3 -mcpu=native`. It is hitting a crash that looks like below, it looks like the scheduling out of SDAG. It was hitting it in enough cases that I assumed it was easy enough to reproduce, let me know if it isn't and I can try to check further.
```
clang: error: unable to execute command: Segmentation fault
clang: error: linker command failed due to signal (use -v to see invocation)
 #0 0x00000000008e0040 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (ld.lld+0x8e0040)
 #1 0x00000000008ddc5c llvm::sys::RunSignalHandlers() (ld.lld+0x8ddc5c)
 #2 0x00000000008dddb4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000ffffb5bc67f0 (linux-vdso.so.1+0x7f0)
 #4 0x00000000017b34ec GetCostForDef(llvm::ScheduleDAGSDNodes::RegDefIter const&, llvm::TargetLowering const*, llvm::TargetInstrInfo const*, llvm::TargetRegisterInfo const*, unsigned int&, unsigned int&, llvm::MachineFunction const&) ScheduleDAGRRList.cpp:0:0
 #5 0x00000000017b4c74 (anonymous namespace)::RegReductionPQBase::HighRegPressure(llvm::SUnit const*) const ScheduleDAGRRList.cpp:0:0
 #6 0x00000000017b68d8 (anonymous namespace)::hybrid_ls_rr_sort::operator()(llvm::SUnit*, llvm::SUnit*) const (.part.0) ScheduleDAGRRList.cpp:0:0
 #7 0x00000000017b75f4 llvm::SUnit* (anonymous namespace)::popFromQueueImpl<(anonymous namespace)::hybrid_ls_rr_sort>(std::vector<llvm::SUnit*, std::allocator<llvm::SUnit*>>&, (anonymous namespace)::hybrid_ls_rr_sort&) ScheduleDAGRRList.cpp:0:0
 #8 0x00000000017b7684 (anonymous namespace)::RegReductionPriorityQueue<(anonymous namespace)::hybrid_ls_rr_sort>::pop() ScheduleDAGRRList.cpp:0:0
 #9 0x00000000017c0394 (anonymous namespace)::ScheduleDAGRRList::Schedule() ScheduleDAGRRList.cpp:0:0
#10 0x00000000016e17f4 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (ld.lld+0x16e17f4)
#11 0x00000000016e4398 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (ld.lld+0x16e4398)
#12 0x00000000016e582c llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (ld.lld+0x16e582c)
#13 0x00000000016d7308 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (ld.lld+0x16d7308)
#14 0x0000000001c55208 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#15 0x000000000383476c llvm::FPPassManager::runOnFunction(llvm::Function&) (ld.lld+0x383476c)
#16 0x0000000003834a20 llvm::FPPassManager::runOnModule(llvm::Module&) (ld.lld+0x3834a20)
#17 0x00000000038353e8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (ld.lld+0x38353e8)
#18 0x0000000001915800 codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
#19 0x0000000001916d70 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (ld.lld+0x1916d70)
```

>>  There is a chance this works differently to specifying the option, can you give it another test?

> Sorry, the experiment is unclear to me, what is it exactly?

Sorry, I just meant test it doesn't crash. I was guessing that you might have been testing with `-enable-misched=0`, but that might have worked a little differently.

https://github.com/llvm/llvm-project/pull/127784


More information about the llvm-commits mailing list