TableGen: Don't reconstruct CodeGenDAGTarget

This is quite expensive and it's already available.

Just ReadLegalValueTypes is taking 4 seconds for me in a debug build
for AMDGPU's -gen-instr-info, and this was introducing a second call.
This commit is contained in:
Matt Arsenault 2020-05-23 11:55:20 -04:00 committed by Matt Arsenault
parent b95f76e8f8
commit 00f5ca799d

View File

@ -822,7 +822,7 @@ void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
OS << "namespace llvm {\n\n";
CodeGenTarget Target(Records);
const CodeGenTarget &Target = CDP.getTargetInfo();
// We must emit the PHI opcode first...
StringRef Namespace = Target.getInstNamespace();