forked from OSchip/llvm-project
Revert "[AArch64] Fix data race on RegisterBank initialization."
Buildbot failure, revert first while looking at the issue.
This reverts commit a5a4a47d69
.
This commit is contained in:
parent
af620fc36a
commit
8f6761aa41
|
@ -38,14 +38,15 @@ using namespace llvm;
|
|||
|
||||
AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
|
||||
: AArch64GenRegisterBankInfo() {
|
||||
static llvm::once_flag InitializeRegisterBankFlag;
|
||||
|
||||
static auto InitializeRegisterBankOnce = [this](const auto &TRI) {
|
||||
static bool AlreadyInit = false;
|
||||
// We have only one set of register banks, whatever the subtarget
|
||||
// is. Therefore, the initialization of the RegBanks table should be
|
||||
// done only once. Indeed the table of all register banks
|
||||
// (AArch64::RegBanks) is unique in the compiler. At some point, it
|
||||
// will get tablegen'ed and the whole constructor becomes empty.
|
||||
if (AlreadyInit)
|
||||
return;
|
||||
AlreadyInit = true;
|
||||
|
||||
const RegisterBank &RBGPR = getRegBank(AArch64::GPRRegBankID);
|
||||
(void)RBGPR;
|
||||
|
@ -59,8 +60,7 @@ AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
|
|||
|
||||
const RegisterBank &RBCCR = getRegBank(AArch64::CCRegBankID);
|
||||
(void)RBCCR;
|
||||
assert(&AArch64::CCRegBank == &RBCCR &&
|
||||
"The order in RegBanks is messed up");
|
||||
assert(&AArch64::CCRegBank == &RBCCR && "The order in RegBanks is messed up");
|
||||
|
||||
// The GPR register bank is fully defined by all the registers in
|
||||
// GR64all + its subclasses.
|
||||
|
@ -199,9 +199,6 @@ AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
|
|||
CHECK_VALUEMAP_FPEXT(128, 64);
|
||||
|
||||
assert(verify(TRI) && "Invalid register bank information");
|
||||
};
|
||||
|
||||
llvm::call_once(InitializeRegisterBankFlag, InitializeRegisterBankOnce, TRI);
|
||||
}
|
||||
|
||||
unsigned AArch64RegisterBankInfo::copyCost(const RegisterBank &A,
|
||||
|
|
Loading…
Reference in New Issue