vsk marked an inline comment as done.
vsk added a comment.

> I'd prefer not adding this kind of state to PassBuilder. SplitColdCode is 
> soemthing that refers to the construction of one particular pipeline, not to 
> pipeline-building in general. It should be an argument passed down through 
> the build*Pipeline calls.

I'm not sure I understand the distinction being made here -- could you 
elaborate? Isn't enabling a pass related to pipeline-building in general? If 
not, I don't see how arguments to build*Pipeline //do// become related to 
pipeline-building in general.

For context, I've modeled the addition of the SplitColdCode member to 
PassBuilder on PGOOpt (c.f. PGOOptions::RunProfileGen). One thing I like about 
this approach is that it doesn't require changing IR, or changing very many 
different APIs. But if it's really not reasonable, I'm happy to take another 
shot at it.



================
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);
----------------
tejohnson wrote:
> would it be appropriate to give a warning when being ignored?
I think so, I'll add this in an update.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57265/new/

https://reviews.llvm.org/D57265



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to