Program aborts when calling getDomTree()

I’m building a pass to optimize my program. In register function, I add four passes to pass manager.

static void registerGPUBeaconPass(const PassManagerBuilder &,
                                  legacy::PassManagerBase &PM) {
  PM.add(new DominatorTreeWrapperPass());
  PM.add(new LoopInfoWrapperPass());
  PM.add(new ScalarEvolutionWrapperPass());
  PM.add(new GPUBeaconPass());
}

After having built the whole pass(libGPUBeaconPass.so), I apply it to a target:

clang -Xclang -load -Xclang libGPUBeaconPass.so backprop_cuda.ii -c

However, when calling auto &DT = getAnalysis<DominatorTreeWrapperPass>(*F).getDomTree(), the program aborts immediately, which outputs:

clang: /usr/local/include/llvm/PassAnalysisSupport.h:275: AnalysisType& llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&, bool*) [with AnalysisType = llvm::DominatorTreeWrapperPass; llvm::AnalysisID = const void*]: Assertion `!LocalChanged && “A pass trigged a code update but the update status is lost”’ failed.

I’m pretty sure the issue occurs at the point of getAnalysis<DominatorTreeWrapperPass>(*F). getDomTree(). But I don’t know how to fix it.
Does anyone have ideas about this? Thanks in advance.

Update1: There is more detailed stack dump information.

Stack dump:
0.	Program arguments: clang -O1 -Xclang -load -Xclang /home/Sched-build/passes/analysis/libGPUBeaconPass.so /tmp/backprop_cuda.ii -c 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Unnamed pass: implement Pass::getPassName()' on module '/tmp/tmpxft_00001aff_00000000-6_backprop_cuda.cudafe1.cpp'.
 #0 0x000055ed00a4144d llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/Unix/Signals.inc:564:22
 #1 0x000055ed00a414e4 PrintStackTraceSignalHandler(void*) /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/Unix/Signals.inc:625:1
 #2 0x000055ed00a3f237 llvm::sys::RunSignalHandlers() /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/Signals.cpp:68:20
 #3 0x000055ed00a40c53 llvm::sys::CleanupOnSignal(unsigned long) /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/Unix/Signals.inc:361:31
 #4 0x000055ed00936eba (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
 #5 0x000055ed009373ac CrashRecoverySignalHandler(int) /home/llvm-11.0.0/llvm-project-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:383:1
 #6 0x00007fbe43747420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #7 0x00007fbe4323200b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #8 0x00007fbe43211859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #9 0x00007fbe43211729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#10 0x00007fbe43222fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#11 0x00007fbe43191a96 llvm::DominatorTreeWrapperPass& llvm::Pass::getAnalysisID<llvm::DominatorTreeWrapperPass>(void const*, llvm::Function&, bool*) /usr/local/include/llvm/PassAnalysisSupport.h:282:64
#12 0x00007fbe4318f1cb llvm::DominatorTreeWrapperPass& llvm::Pass::getAnalysis<llvm::DominatorTreeWrapperPass>(llvm::Function&, bool*) /usr/local/include/llvm/PassAnalysisSupport.h:258:1
#13 0x00007fbe43189f0c GPUBeaconPass::dominate(llvm::CallInst*, llvm::CallInst*) /home/GPU-Sched/src/passes/analysis/GPUBeacon.cpp:262:67