[PATCH] D16585: In split module utility we should never separate alias with its aliasee.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 11:49:12 PST 2016


pcc added inline comments.

================
Comment at: lib/Transforms/Utils/SplitModule.cpp:94
@@ +93,3 @@
+    if (GlobalAlias *GA = dyn_cast<GlobalAlias>(&GV)) {
+      if (const Constant *C = GA->getAliasee())
+        GVtoClusterMap.unionSets(&GV, cast<GlobalValue>(C));
----------------
An aliasee can be something other than a `GlobalValue` (for example, it could be a `ConstantInt` or a GEP `ConstantExpr`). I think what you want here is `getBaseObject`.


http://reviews.llvm.org/D16585





More information about the llvm-commits mailing list