[PATCH] D23339: Don't import variadic functions

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 14:37:22 PDT 2016


tejohnson accepted this revision.
tejohnson added a comment.

LGTM with a couple nits.


================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:189
@@ -177,1 +188,3 @@
 
+  bool isViableToInline() const { return !Flags.IsNotViableToInline; }
+
----------------
Make this also isNotViableToInline, so that we don't negate here and then again at the callsite of this method.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:724
@@ -724,1 +723,3 @@
+/// Decode the flags for GlobalValue in the summary
+/// FIXME: remove Version because it is not used.
 static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags(uint64_t RawFlags,
----------------
The Version flag is there in case we ever add flags such that older versions of bitcode need to be handled specially. E.g. if you had left this as a positive IsViableToInline, we would probably want to bump the version and set that flag when we had an older version of bitcode (so we didn't completely stop importing when compiling with older bitcode). Since the reversed flag indicates when not to import (and it is a heuristic and not correctness), I don't think there is any need to bump/check the version.

The upshot is that the FIXME can be removed.


https://reviews.llvm.org/D23339





More information about the llvm-commits mailing list