[PATCH] D38534: [TablgeGen] : Tidy up CodeGenSchedule. NFC.
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 11:02:56 PDT 2017
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
Sure feel free to also make such changes in tablegen without review. LGTM
================
Comment at: utils/TableGen/CodeGenSchedule.cpp:588
if (!std::count(ProcIndices.begin(), ProcIndices.end(), 0)) {
- for (std::vector<CodeGenProcModel>::iterator PI = ProcModels.begin(),
- PE = ProcModels.end(); PI != PE; ++PI) {
- if (!std::count(ProcIndices.begin(), ProcIndices.end(), PI->Index))
+ for (CodeGenProcModel PM :
+ make_range(ProcModels.begin(), ProcModels.end())) {
----------------
Use a const reference here to avoid unnecessary copying.
https://reviews.llvm.org/D38534
More information about the llvm-commits
mailing list