[PATCH] D129009: [Analysis][LTO] Fix LTO for aliased IFuncs.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 13:43:50 PDT 2022


MaskRay added a comment.

LG but the test needs a change.



================
Comment at: clang/test/Analysis/alias-indirect-function-lto.c:1
+// RUN: %clang_analyze_cc1 -flto -c
+void f() __attribute__((ifunc("g")));
----------------
The test is added to the wrong place. clang Analysis != llvm Analysis.

Find somewhere in `llvm/test/ThinLTO`.




================
Comment at: clang/test/Analysis/alias-indirect-function-lto.c:5
+void h() __attribute__((alias("f")));
\ No newline at end of file

----------------
No newline at end of file


================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:654
+  // summary for aliasee will not be emitted.
+  if (Aliasee->getValueID() != Value::ValueTy::GlobalIFuncVal) {
+    bool NonRenamableLocal = isNonRenamableLocal(A);
----------------
Use an early return to avoid indenting so many lines.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129009



More information about the cfe-commits mailing list