[PATCH] D29049: TableGen: Fix infinite recursion in RegisterBankEmitter

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 03:56:36 PST 2017


dsanders added a comment.

It seems this patch removes ClassB from GPRRegBank:

  const uint32_t GPRRegBankCoverageData[] = {
      // 0-31
      (1u << (MyTarget::ClassARegClassID - 0)) |
      0,
  };

Was that the intention? If not, then I think we need to keep track of the classes that visitRegisterBankClasses() has been called on and prevent multiple visits at the top of visitRegisterBankClasses().



================
Comment at: test/TableGen/RegisterBankEmitter.td:11
+}
+// CHECK: MyTarget::GPRRegBank
+def GPRRegBank : RegisterBank<"GPR", [ClassA]>;
----------------
Could you add checks for the MyTarget::<Name>RegClassID's you're expecting here? I think you should have ClassB in GPRRegBank but this patch prevents ClassB from being added.


https://reviews.llvm.org/D29049





More information about the llvm-commits mailing list