[PATCH] D94355: [Passes] Add relative lookup table converter pass

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 20:50:04 PDT 2021


pcc added inline comments.
Herald added a subscriber: ormris.


================
Comment at: llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp:73
+      return false;
+
+    // If an operand in the lookup table is not dso_local,
----------------
In the version of the patch that you committed, you have this check here:
```
    // If operand is mutable, do not generate a relative lookup table.
    auto *GlovalVarOp = dyn_cast<GlobalVariable>(GVOp);
    if (!GlovalVarOp || !GlovalVarOp->isConstant())
      return false;
```
1. Nit: Gloval -> Global
2. Why is it important whether the referenced global is mutable? The pointer itself is constant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94355



More information about the llvm-commits mailing list