mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
revert r79708 + r79711
llvm-svn: 79720
This commit is contained in:
parent
79615641f1
commit
b75d76e6d1
@ -5017,19 +5017,17 @@ void SDNode::Profile(FoldingSetNodeID &ID) const {
|
||||
|
||||
static ManagedStatic<std::set<EVT, EVT::compareRawBits> > EVTs;
|
||||
static EVT VTs[MVT::LAST_VALUETYPE];
|
||||
static ManagedStatic<sys::SmartMutex<true> > VTMutex;
|
||||
|
||||
/// getValueTypeList - Return a pointer to the specified value type.
|
||||
///
|
||||
const EVT *SDNode::getValueTypeList(EVT VT) {
|
||||
sys::SmartScopedLock<true> Lock(*VTMutex);
|
||||
if (VT.isExtended()) {
|
||||
return &(*EVTs->insert(VT).first);
|
||||
} else {
|
||||
// All writes to this location will have the same value, so it's ok
|
||||
// to race on it. We only need to ensure that at least one write has
|
||||
// succeeded before we return the pointer into the array.
|
||||
VTs[VT.getSimpleVT().SimpleTy] = VT;
|
||||
sys::MemoryFence();
|
||||
return VTs + VT.getSimpleVT().SimpleTy;
|
||||
return &VTs[VT.getSimpleVT().SimpleTy];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user