[PATCH] D48721: Patch to fix pragma metadata for do-while loops
Hal Finkel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 4 10:20:33 PDT 2018
hfinkel added a comment.
In https://reviews.llvm.org/D48721#1152023, @deepak2427 wrote:
> I encountered the issue while working with the unroller and found that it was not following the pragma info, and traced it back to the issue with metadata.
> As far as I understood, for for-loops and while-loops, we add the metadata only to the loop back-edge. So it would make sense to keep them consistent.
> I'm not an expert in clang, and do not know how we can detect such problems.
The code change is likely okay. We need to have the tests updated. With rare exception, we don't have end-to-end tests in Clang. We test Clang's CodeGen independently, and so Clang's CodeGen tests shouldn't run the optimizer. Please write tests that directly check the expected output of Clang (without running the optimizer). If you look at other tests in the CodeGen directory, you should see what I mean. If you have any questions, please feel free to ask. Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D48721
More information about the cfe-commits
mailing list