[PATCH] D73094: [WPD] Allow load/save bitcoded index when running opt -wholeprogramdevirt

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 09:19:27 PST 2020


tejohnson added a comment.

One issue with taking combined indexes in testing is the handling of module paths when there are locals (won't be hit by the included test which doesn't contain any). E.g. in WPD if we try to promote when the target is a local function, we attempt to get its promoted global name:

  // If target is a local function and we are exporting it by
  // devirtualizing a call in another module, we need to record the
  // promoted name.
  Res->SingleImplName = ModuleSummaryIndex::getGlobalNameForLocal(
      TheFn.name(), ExportSummary.getModuleHash(S->modulePath()));

Since the modulePath (hardcoded in the test .ll files) won't be found in the index's module path table we'll get an assert in getModulePath. Until this is solved (e.g. possibly via a regex replacement scheme specified by an option that is applied to the module paths in the index, either during assembly or when reading in the bitcode), I'm reluctant to add facilities to consume combined indexes for testing.



================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:120
     "wholeprogramdevirt-read-summary",
     cl::desc("Read summary from given YAML file before running pass"),
     cl::Hidden);
----------------
Option summary needs update.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:125
     "wholeprogramdevirt-write-summary",
     cl::desc("Write summary to given YAML file after running pass"),
     cl::Hidden);
----------------
Ditto (and in particular the format being dependent on the suffix).


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

https://reviews.llvm.org/D73094





More information about the llvm-commits mailing list