[PATCH] D109169: [GlobalDCE] In VFE support for relative pointers, allow GEP references to the base symbol
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 13 08:40:56 PDT 2021
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
================
Comment at: llvm/lib/Analysis/TypeMetadataUtils.cpp:129
+static Constant *stripGEP(Constant *C) {
+ auto *CE = dyn_cast<ConstantExpr>(C);
----------------
given that this is only used at a single point, maybe define it as a lambda at the use, so all the swift specific code is kept close together?
================
Comment at: llvm/test/Transforms/GlobalDCE/virtual-functions-relative-pointers-gep.ll:1
+; RUN: opt < %s -globaldce -S | FileCheck %s
+
----------------
new tests probably should use the new pm syntax (`-passes='globaldce'`)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109169/new/
https://reviews.llvm.org/D109169
More information about the llvm-commits
mailing list