summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2018-02-15 09:45:59 +0000
committerSerge Pavlov <sepavloff@gmail.com>2018-02-15 09:45:59 +0000
commit4500001905805be5437cfe21e9f65820202c8966 (patch)
tree93ba69588b99c6008de5d6306d91c0a9ddf0feae /llvm/lib/CodeGen
parentce719a0def0054c03a9787ddb5a1e0235bbea103 (diff)
downloadbcm5719-llvm-4500001905805be5437cfe21e9f65820202c8966.tar.gz
bcm5719-llvm-4500001905805be5437cfe21e9f65820202c8966.zip
Revert r325224 "Report fatal error in the case of out of memory"
It caused fails on some buildbots. llvm-svn: 325227
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/InterferenceCache.cpp4
-rw-r--r--llvm/lib/CodeGen/LiveIntervalUnion.cpp2
-rw-r--r--llvm/lib/CodeGen/RegisterPressure.cpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/InterferenceCache.cpp b/llvm/lib/CodeGen/InterferenceCache.cpp
index 2bc56c509b9..72227cc7bba 100644
--- a/llvm/lib/CodeGen/InterferenceCache.cpp
+++ b/llvm/lib/CodeGen/InterferenceCache.cpp
@@ -48,8 +48,8 @@ void InterferenceCache::reinitPhysRegEntries() {
if (PhysRegEntriesCount == TRI->getNumRegs()) return;
free(PhysRegEntries);
PhysRegEntriesCount = TRI->getNumRegs();
- PhysRegEntries = static_cast<unsigned char*>(
- llvm::calloc(PhysRegEntriesCount, sizeof(unsigned char)));
+ PhysRegEntries = (unsigned char*)
+ calloc(PhysRegEntriesCount, sizeof(unsigned char));
}
void InterferenceCache::init(MachineFunction *mf,
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp
index 84b3294fbb8..3e742a6c2f2 100644
--- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp
@@ -187,7 +187,7 @@ void LiveIntervalUnion::Array::init(LiveIntervalUnion::Allocator &Alloc,
clear();
Size = NSize;
LIUs = static_cast<LiveIntervalUnion*>(
- llvm::malloc(sizeof(LiveIntervalUnion)*NSize));
+ malloc(sizeof(LiveIntervalUnion)*NSize));
for (unsigned i = 0; i != Size; ++i)
new(LIUs + i) LiveIntervalUnion(Alloc);
}
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp
index 9f8c7288e25..bc1af1594c2 100644
--- a/llvm/lib/CodeGen/RegisterPressure.cpp
+++ b/llvm/lib/CodeGen/RegisterPressure.cpp
@@ -635,8 +635,7 @@ void PressureDiffs::init(unsigned N) {
}
Max = Size;
free(PDiffArray);
- PDiffArray = static_cast<PressureDiff*>(
- llvm::calloc(N, sizeof(PressureDiff)));
+ PDiffArray = reinterpret_cast<PressureDiff*>(calloc(N, sizeof(PressureDiff)));
}
void PressureDiffs::addInstruction(unsigned Idx,
OpenPOWER on IntegriCloud