[PATCH] D145265: [Pipeline] Remove GlobalCleanupPM

Arthur Eubanks (out until mid-April) via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 15:26:44 PDT 2023


aeubanks added a comment.

got IR diffs for llvm-test-suite by dumping the IR in clang after running the optimization pipeline (-O3), IR file name is md5 of the module identifier

  @@@ -1093,6 -1093,6 +1096,16 @@@ void EmitAssemblyHelper::EmitAssembly(B
    
      std::unique_ptr<llvm::ToolOutputFile> ThinLinkOS, DwoOS;
      RunOptimizationPipeline(Action, OS, ThinLinkOS);
  ++  if (!TheModule->getModuleIdentifier().empty()) {
  ++    std::error_code EC;
  ++    std::string FileName = "/usr/local/google/home/aeubanks/tmp/wow3/";
  ++    FileName += llvm::utohexstr(llvm::MD5Hash(TheModule->getModuleIdentifier()), false, 16);
  ++    FileName += ".ll";
  ++    llvm::raw_fd_ostream OS(FileName, EC);
  ++    if (EC)
  ++      report_fatal_error(createStringError(EC, "???"));
  ++    TheModule->print(OS, nullptr);
  ++  }
      RunCodegenPipeline(Action, OS, DwoOS);

all IR diffs: https://github.com/aeubanks/llvm-ir-diff/commit/ca19575407a94933d10e9b493784cce47751d0aa
diffs with <50 lines changed: https://github.com/aeubanks/llvm-ir-diff/commit/5592d7e71191501b6029af1daa1ee438076f4913

I'm going to be out for a couple weeks, but a couple initial observations:
4508D45179E820C5.ll: we don't run instcombine anymore before getting to the function simplification pipeline, and that causes argpromo to fail. perhaps we should add back in an early instcombine somewhere. (but the forced noinline in the file prevents obvious inlining)
1A365B06B0D46C86.ll: `select i1 %37, i32 %38, i32 %35` becomes `call i32 @llvm.smin.i32(i32 %36, i32 4095)`
1ACE620D6E75417F.ll: extra `memset`
A4B000DC4289863A.ll: missed used once global -> alloca

will see if running an early instcombine resolves most of these issues


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145265



More information about the cfe-commits mailing list