<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi all,</div><div>I am going to build a Pass/es that verify OpenMP code.<blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>When we compile an OpenMP program we give the option “-fopenmp” to clang.<br><blockquote type="cite"></blockquote>In this way the LLVM IR code obtained will reflect also the “#pragma” keywords in the code, let’s call it "OpenMP LLVM IR".<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>In my Pass/es before obtaining the OpenMP LLVM IR, I need to do some operation in the LLVM IR, that is the IR code obtained compiling the program without the flag “-fopenmp”.<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>So, to be clear my working flow would be:<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>- Run MyPass with in input the LLVM IR<br><blockquote type="cite"></blockquote>- Do some operation on it and get results<br><blockquote type="cite"></blockquote>- Run MyPass again or a different one (MyPass2) with in input the OpenMP LLVM IR and the results of the previous operations<br><blockquote type="cite"></blockquote>- Do other operations<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>Would it be possible doing something like this? Do you have any idea how should I proceed?<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>I hope this is clear and you can give me some suggestion.<br><blockquote type="cite"></blockquote><font color="#0f61c8"><br></font><blockquote type="cite"></blockquote>Thanks.<br><blockquote type="cite"></blockquote>Best Regards, <br>Simone</div><br></body></html>