[PATCH] D92611: [LTO][Legacy] Decouple option parsing from LTOCodeGenerator

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 09:41:47 PDT 2021


steven_wu requested changes to this revision.
steven_wu added a comment.
This revision now requires changes to proceed.

Like replied in email. The non-scaleable option is very intentional and `debug_option` is by its name for compiler developer only and should not be used in production. The preferred option is to create API to set every single attributes you want to set.



================
Comment at: llvm/tools/lto/lto.cpp:466
 
+void lto_codegen_debug_options_early(const char *opt) {
+  if (opt) {
----------------
If you have to pick an interface, use the new `_array` interface.

This is also not correct since you skipped `lto_add_attrs` function when you called your version.


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

https://reviews.llvm.org/D92611



More information about the llvm-commits mailing list