[PATCH] D78988: [LTO] Suppress emission of the empty object file
    Kuan Hsu Chen (Zakk) via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Apr 29 21:37:34 PDT 2020
    
    
  
khchen marked 6 inline comments as done.
khchen added inline comments.
================
Comment at: lld/test/ELF/lto/linker-script-symbols-assign.ll:6
 ; RUN: ld.lld %t.o -o %t2 --script %t.script -save-temps
-; RUN: llvm-nm %t2.lto.o | count 0
-
----------------
tejohnson wrote:
> Is this change still valid with your new approach of keeping a flag on the RegularLTO state object? Or is lld not even sending the object to LTO? If so, probably should check now that this file isn't created.
In new approach this test passed because input bitcode is not empty, (it will be empty after opt phase).
================
Comment at: llvm/lib/LTO/LTO.cpp:1033
+                  std::move(RegularLTO.CombinedModule), ThinLTO.CombinedIndex,
+                  RegularLTO.EmptyCombinedModule))
     return Err;
----------------
tejohnson wrote:
> Actually, do we even need to call backend() if (!EmptyCombinedModule || C.AlwaysEmitRegularLTOObj) ? It doesn't seem like there should be any need to create a TM or call opt in that case either. And as I note in backend(), there's no need to do the splitCodeGen handling either.
Yes, you are right, we don't need to call backend()
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78988/new/
https://reviews.llvm.org/D78988
    
    
More information about the llvm-commits
mailing list