New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoopPassManager gives incorrect analysis preservation information #1705
Comments
Valgrind trace: ==30339== |
This is due to a bug in the pass manager where BreakCriticalEdges, called via Loop Unswitch, thinks it
|
Dom info is available at loop-unswitch pass entry. So it is appropriate for pass manager to return its |
One alternative is to remove not-preserved not-required info before running a pass. However, it won't |
No, it's not appropriate for the pass manager to return it, because getAnalysisToUpdate<...>() is being |
You are mistaken.
In this particular example, analysis is available. |
You're right that I was mistaken about getAnalysis<..>( ). I forgot that it returns a reference rather than a What I am saying, however, is that the behavior of getAnalysisToUpdate<...>() is not consistent with its |
If a pass is not preserving analysis A then it should not call getAnalysisToUpdate() :) In this example, LoopUnswitch is not preserving dom info and it is not calling getAnalysisToUpdate. Here, It may be possible to over engineer this in pass manager, but in this example right thing to do is fix loop |
If getAnalysisToUpdate<...>() should never be called on a non-preserving Pass, could we make it assert if I do agree that LoopUnswitch should preserve dominator analyses, but I won't have a chance to implement |
Another crash case of the same issue |
Filed PR 1402 to track dom info update in LoopUnswitch pass |
Fixed by updating LoopUnswitch pass to preserve loop info after invoking SplitCriticalEdge(). Now, http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049453.html |
mentioned in issue llvm/llvm-bugzilla-archive#1342 |
mentioned in issue llvm/llvm-bugzilla-archive#1724 |
…9ea709a1128caa2de2723fe307c81 [lldb] Move Xcode SDK helper functions into lldbutil
Extended Description
opt -loop-unswitch q.1.bc
WARNING: You're attempting to print out a bytecode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bytecode first-hand, you
can force output with the `-f' option.
opt((anonymous namespace)::PrintStackTrace()+0x1a)[0x8649f76]
opt((anonymous namespace)::SignalHandler(int)+0x112)[0x864a23c]
[0xffffe420]
opt(llvm::ETNode::DominatedBySlow(llvm::ETNode*)+0x18)[0x84001c2]
opt(llvm::ETForestBase::dominates(llvm::BasicBlock*, llvm::BasicBlock*)+0xba)
[0x8400282]
opt(llvm::SplitCriticalEdge(llvm::TerminatorInst*, unsigned int, llvm::Pass*,
bool)+0x4f0)[0x84a323e]
opt[0x846652e]
opt[0x84669f7]
opt[0x8467f01]
opt[0x846812d]
opt(llvm::LPPassManager::runOnFunction(llvm::Function&)+0x3f8)[0x851d796]
opt(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x13a)[0x85d80be]
opt(llvm::FPPassManager::runOnModule(llvm::Module&)+0x6e)[0x85d8286]
opt(llvm::MPPassManager::runOnModule(llvm::Module&)+0x11d)[0x85d7d5f]
opt(llvm::PassManagerImpl::run(llvm::Module&)+0x6e)[0x85d7f2c]
opt(llvm::PassManager::run(llvm::Module&)+0x1a)[0x85d7f7e]
opt(main+0xa00)[0x837cc70]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7ce0ebc]
opt(realloc+0x71)[0x836ec51]
Segmentation fault (core dumped)
The text was updated successfully, but these errors were encountered: