[PATCH] D54175: [PGO] context sensitive PGO

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 10:51:53 PST 2018


xur marked 4 inline comments as done.
xur added inline comments.


================
Comment at: lib/LTO/LTOBackend.cpp:152
 
 static void runNewPMPasses(Config &Conf, Module &Mod, TargetMachine *TM,
                            unsigned OptLevel, bool IsThinLTO,
----------------
tejohnson wrote:
> Presumably need a corresponding change in runOldPMPasses?
> 
> You'll also want to have a way to test via llvm-lto2. E.g. llvm-lto2 has an option for passing a sample profile.
You are right. I need to set the options for oldPM.


================
Comment at: tools/gold/gold-plugin.cpp:898
+    Conf.CSIRProfile = options::cs_profile_path;
+  Conf.RunCSIRInstr = options::cs_pgo_gen;
+
----------------
tejohnson wrote:
> Needs tests
> 
> Also, support should be added to lld too - is there a separate patch for that?
I haven't done lld patch yet. There are too many moving parts at this stage.


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:231
+  // outs() << "Loadinput for " << Input.Filename << " CS=" << HasCSIRProfile <<
+  // " IR=" << IsIRProfile << "\n";
+  if (WC->Writer.setIsIRLevelProfile(IsIRProfile, HasCSIRProfile)) {
----------------
tejohnson wrote:
> leftover debug output
Removed.


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

https://reviews.llvm.org/D54175





More information about the llvm-commits mailing list