[PATCH] D134013: [lld][thinlto] Include -mllvm options in the thinlto cache key

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 21:58:52 PDT 2022


MaskRay added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1352
     parseClangOption(arg->getValue(), arg->getSpelling());
+    config->mllvmOpts.insert(config->mllvmOpts.end(), arg->getValue());
+  }
----------------
emplace_back or push_back


================
Comment at: lld/test/ELF/lto/cache.ll:54
 
+; Check that mllvm options participate in the cache key
+; RUN: rm -rf %t.cache
----------------
Use `;; ` for non-RUN-non-CHECK comments.


================
Comment at: lld/test/ELF/lto/cache.ll:55
+; Check that mllvm options participate in the cache key
+; RUN: rm -rf %t.cache
+; RUN: mkdir %t.cache
----------------
In the top of the file and other places in test/ELF, we prefer `rm -rf %t.cache && mkdir %t.cache` in one line


================
Comment at: llvm/include/llvm/LTO/Config.h:51
   std::vector<std::string> PassPlugins;
+  std::vector<std::string> MllvmArgs;
   /// For adding passes that run right before codegen.
----------------
Move before PassPlugins for an alphabetical order among vector<string> variables.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134013



More information about the llvm-commits mailing list