Strange LLVM behavior after commit r193719

Dmitry Babokin babokin at gmail.com
Tue Nov 12 22:34:50 PST 2013


Adding llvm-commits alias.


On Tue, Nov 12, 2013 at 2:05 PM, Ilia Filippov <ili.filippov at gmail.com>wrote:

> Hi Michael,
>
> Looks like your recent commit (r193719) has undesired / not intended side
> effect. Doing *function* verification we end up verifying module's global
> values.
> Here's a call stack, which leads to such behavior:
>
> #0  ::Verifier::doFinalization (this=0x490c110, M=...) at
> lib/IR/Verifier.cpp:199
> #1  llvm::FPPassManager::doFinalization (this=0x490bf60, M=...) at
> lib/IR/LegacyPassManager.cpp:1576
> #2  llvm::legacy::FunctionPassManagerImpl::doFinalization (this=0x490bc60,
> M=...) at lib/IR/LegacyPassManager.cpp:1448
> #3  llvm::legacy::FunctionPassManager::doFinalization
> (this=0x7fffffffd100) at lib/IR/LegacyPassManager.cpp:1420
> #4  llvm::verifyFunction (f=..., action=llvm::ReturnStatusAction) at
> lib/IR/Verifier.cpp:2405
>
> Where #4 is in the function verifyFunction, that you've modified, and #0
> contains the loop over all module global values:
>
>     bool doFinalization(Module &M) {
>       // Scan through, checking all of the external function's linkage
> now...
>       for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
>         visitGlobalValue(*I);
>         <...>
>
> So you call a part of whole module verification inside function
> verification routine. This seems to be incorrect first of all (and leads to
> fails in our project based on LLVM, for example) and also inefficient
> (doing the same module walk for each function).
>
> Any thoughts how to fix it?
>
> Thanks!
>
> Ilia.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131113/68312a18/attachment.html>


More information about the llvm-commits mailing list