[PATCH] D86215: [TableGen][GlobalISel] Fix handling of zero_reg
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 10:52:41 PDT 2020
bjope added inline comments.
================
Comment at: llvm/utils/TableGen/GlobalISelEmitter.cpp:2670
+
+ StringRef findNamespaceForZeroReg() const {
+ // Take value of first Namespace encountered in any defs. We assume that
----------------
Maybe one can add something like this to CodeGenTaget (putting the code close to the getInstNamespace support):
```
StringRef CodeGenTarget::getRegNamespace() const {
auto &RegClasses = RegBank.getRegClasses();
return RegClasses.size() > 0 ? RegClasses.front().Namespace : "";
}
```
and then use `Target.getRegNamespace()` to get it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86215/new/
https://reviews.llvm.org/D86215
More information about the llvm-commits
mailing list