]> granicus.if.org Git - llvm/commit
MIR: Stop reinitializing target information for every use
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 12 Mar 2019 20:42:12 +0000 (20:42 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 12 Mar 2019 20:42:12 +0000 (20:42 +0000)
commitf5a4de6d253d026219ff93bc4e6b5053e2ae70fa
treeb84f4c83b1fb5b39e3f4223d9601aac7ec9e3281
parent1bd774409d87a919fb84a6028d19dd817ca77c4d
MIR: Stop reinitializing target information for every use

Every time a physical register reference was parsed, this would
initialize a string map for every register in in target, and discard
it for the next. The same applies for the other fields initialized
from target information.

Follow along with how the function state is tracked, and add a new
tracking class for target information.

The string->register class/register bank for some reason were kept
separately, so track them in the same place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355970 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MIRParser/MIParser.cpp
lib/CodeGen/MIRParser/MIParser.h
lib/CodeGen/MIRParser/MIRParser.cpp