[PATCH] D51744: [WIP] Early ThinLTOLayer2 prototype

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 7 10:14:13 PDT 2018


tejohnson added inline comments.


================
Comment at: unittests/ExecutionEngine/Orc/Inputs/Bar.ll:22
+^0 = module: (path: "Bar.o", hash: (1372045330, 2056102272, 1752332163, 195788812, 3147837727))
+^1 = gv: (name: "bar", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 1, live: 0, dsoLocal: 0), insts: 1))) ; guid = 16434608426314478903
----------------
sgraenitz wrote:
> `notEligibleToImport: 1` popped up recently and currently fails discovery with: //ignored! No qualifying callee with summary found.// Didn't find a quick way to fix that, so for now I will just clear it manually. Generated with:
> ```
> clang -c -flto=thin Foo.cpp -o - | llvm-dis -o Foo.ll
> ```
There are 2 categories that will cause notEligibleToImport to be set:
1) Correctness: the value is a local used in some opaque way (e.g. in module asm or on the llvm.used) that means the backend cannot safely promote it to global scope and rename.
2) Profitability: if we think the backend cannot inline it anyway, then there has traditionally not been a reason to import.

Looks like you are being hit here by reason 2 - since bar has a "noinline" attribute.

I've been thinking about splitting these categories into 2 different flags, looks like that might be useful for you.


Repository:
  rL LLVM

https://reviews.llvm.org/D51744





More information about the llvm-commits mailing list