<div dir="ltr">Hi all,<div><br></div><div>I was discussing this with a few folks at the dev meeting and it would be interesting for some passes to print some warnings on a later stage than the front-end, in special cases, especially if line information is kept and available at that stage. Is this possible today?</div>
<div><br></div><div>My main concern is not correctness, that should have been taken care by the front-end and the sanitizers, but things like we already do with the debug messages, only less verbose, and possibly formatted in a special way, so that other front-end tools can read and propose changes to the code.</div>
<div><br></div><div>I don't have a clear picture of it yet in my mind, but I was thinking of hints like "this loop could be vectorized if you added a restrict keyword to your pointers". </div><div><br></div>
<div>The vectorizer doesn't know if they alias, so it prints the warning. Then another front-end tool could read this and do some code analysis and tell the user if there is at least a few cases in the call graph in which they can't alias, and propose some code changes.</div>
<div><br></div><div>This can also be used to raise bugs. Even though the debug info is already good enough for it, a flag in Clang to enable these non-verbose warnings would be more effective than a list of debug messages, and maybe the user could even figure it out by him/herself before sending the email.</div>
<div><br></div><div>So instead of an email like "why doesn't my loop vectorize?", we get a bug report "implement THIS and THAT in the vectorizer", with an example of the loop.</div><div><br></div><div>
Does that make sense? This could be a nice GSOC project...</div><div><br></div><div>cheers,</div><div>--renato</div></div>