<div dir="ltr">Hi all,<div><br></div><div>Currently, debug info verifier is part of the IR verifier which is a function pass.</div><div><br></div><div>One part of the IR verifier that I don't like is it verifies module-level data in doFinalization. If we have two verifier passes in a single module pass manager, doFinalization of the two passes will run on the same module data after all passes.</div>
<div><br></div><div>I followed the same model for debug info verifier: verifying debug info reachable from a function in runOnFunction and verifying module level debug info in doFinalization. But it can be time consuming (see email discussion in "Debug Info Slowing Things Down?!"), since each function can reach a lot of debug info MDNodes, some of them are shared between functions.</div>
<div><br></div><div>One possibility is to cache MDNodes verified by one function so other functions do not verify those MDNodes again. But this is a violation of Function Pass in my opinion, since other optimization passes can run between verifying one function and verifying another function, and the MDNodes verified by one function can be modified when verifying another function.</div>
<div><br></div><div>Another possibility is to separate debug info verifier into its own module pass. The disadvantage is that we have to run the IR verifier and the debug info verifier, each will traverse the module.</div>
<div><br></div><div>Comments and suggestions are welcome.</div><div><br></div><div>Thanks,</div><div>Manman</div></div>