[PATCH] D82745: [ThinLto] Fix Ifunc symbol usage

Guy David via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 9 15:53:58 PST 2021


guy-david requested changes to this revision.
guy-david added a comment.
This revision now requires changes to proceed.

Hey, requesting a pair of changes changes after I ran into alias-to-ifunc issues.



================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:808-809
 
+  for (const GlobalIFunc &I : M.ifuncs())
+    computeIfuncSummary(Index, I, CantBePromoted);
+
----------------
This should happen before the alias summary loop in case of an alias to an ifunc scenario.


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:3983-3997
+  for (const GlobalIFunc &I : M.ifuncs()) {
+    auto *Ifunc = I.getBaseObject();
+    auto IfuncId = VE.getValueID(&I);
+    auto ResolverId = VE.getValueID(Ifunc);
+
+    auto *Summary = Index->getGlobalValueSummary(I);
+    IfuncSummary *IF = cast<IfuncSummary>(Summary);
----------------
Same as before, this should go before the alias summary loop so the bitcode reader would have all the necessary information to parse the alias.


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

https://reviews.llvm.org/D82745



More information about the llvm-commits mailing list