[PATCH] D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 09:34:34 PST 2019

tejohnson added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Overall it looks ok to me, but I'd like Chandler to comment regarding the preferred way to do this with the new PM, since we don't tend to use booleans there in the PassBuilder to control passes. Is it preferable to instead use a new function attribute instead of boolean flags on the PMs (e.g. the way -fno-inline is handled)?

Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1331
+  Opts.SplitColdCode =
+      (Opts.OptimizationLevel > 0) && (Opts.OptimizeSize != 2) &&
+      Args.hasFlag(OPT_fsplit_cold_code, OPT_fno_split_cold_code, false);
would it be appropriate to give a warning when being ignored?



More information about the cfe-commits mailing list