[PATCH] D38768: Add remarks describing when a pass changes the IR instruction count of a module
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 18:01:42 PDT 2018
efriedma added inline comments.
================
Comment at: lib/IR/Function.cpp:200
+ for (BasicBlock &BB : BasicBlocks)
+ NumInstrs += BB.size();
+ return NumInstrs;
----------------
Should we use `std::distance(BB.instructionsWithoutDebug.begin(), BB.instructionsWithoutDebug().end())` instead, so the numbers are consistent whether or not debug info is enabled?
https://reviews.llvm.org/D38768
More information about the llvm-commits
mailing list