<div dir="ltr">Adding llvm-commits alias.<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 2:05 PM, Ilia Filippov <span dir="ltr"><<a href="mailto:ili.filippov@gmail.com" target="_blank">ili.filippov@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Michael,<br><br>Looks like your recent commit (r193719) has undesired / not intended side effect. Doing *function* verification we end up verifying module's global values.<br>

Here's a call stack, which leads to such behavior:<br>
<br><div>#0  ::Verifier::doFinalization (this=0x490c110, M=...) at lib/IR/Verifier.cpp:199<br>#1  llvm::FPPassManager::doFinalization (this=0x490bf60, M=...) at lib/IR/LegacyPassManager.cpp:1576<br>#2  llvm::legacy::FunctionPassManagerImpl::doFinalization (this=0x490bc60, M=...) at lib/IR/LegacyPassManager.cpp:1448<br>


#3  llvm::legacy::FunctionPassManager::doFinalization (this=0x7fffffffd100) at lib/IR/LegacyPassManager.cpp:1420<br>#4  llvm::verifyFunction (f=..., action=llvm::ReturnStatusAction) at lib/IR/Verifier.cpp:2405<br><br>Where #4 is in the function verifyFunction, that you've modified, and #0 contains the loop over all module global values:<br>


<br>    bool doFinalization(Module &M) {<br>      // Scan through, checking all of the external function's linkage now...<br>      for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {<br>        visitGlobalValue(*I);<div>


        <...><br><br>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).<br>


</div></div><div><br></div><div>Any thoughts how to fix it?</div><div><br></div><div>Thanks!</div><span><font color="#888888"><div><br></div><div>Ilia.</div></font></span></div>
</blockquote></div><br></div></div>