[PATCH] Introduce GlobalAlias::mayBeResolved().

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Jul 2 06:46:11 PDT 2013



================
Comment at: include/llvm/IR/GlobalAlias.h:82
@@ +81,3 @@
+  /// the global offset table (which can be important).
+  bool mayBeResolved() const {
+    return !mayBeOverridden() &&
----------------
I would still prefer to state this as a profitability issue. We really don't model interposition of non weak symbols, and a partial implementation would do more harm than good IMHO.

In particular, please call this function something like shouldBeResolved or isProfitableToResolve. The function should also return true if the Aliasee is "more hidden" than the alias.


================
Comment at: test/Other/alias-resolution.ll:2
@@ +1,3 @@
+; RUN: opt < %s -O3 -S | FileCheck %s
+
+ at a = hidden global i32 1
----------------
This is a reasonable use of -O3. Please just add a comment saying why (we want to make sure no pass resolves the alias).


http://llvm-reviews.chandlerc.com/D606



More information about the llvm-commits mailing list