projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fa5de8
)
Allocating too large an array for ReachibilityMatrix.
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 27 Jul 2006 22:35:40 +0000
(22:35 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 27 Jul 2006 22:35:40 +0000
(22:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29367
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86ISelDAGToDAG.cpp
b/lib/Target/X86/X86ISelDAGToDAG.cpp
index 901409a15451bc5a367f5a3fce3d6cfc3319c310..b6d2a8e9daba63ec768e38459d4bcd7d0f987099 100644
(file)
--- a/
lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/
lib/Target/X86/X86ISelDAGToDAG.cpp
@@
-281,8
+281,11
@@
void X86DAGToDAGISel::DetermineTopologicalOrdering() {
void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) {
if (!ReachibilityMatrix) {
DetermineTopologicalOrdering();
- ReachibilityMatrix = new unsigned char[DAGSize * DAGSize];
- memset(ReachibilityMatrix, 0, DAGSize * DAGSize * sizeof(unsigned char));
+ unsigned RMSize = DAGSize * DAGSize / 8;
+ if ((DAGSize * DAGSize) % 8)
+ RMSize++;
+ ReachibilityMatrix = new unsigned char[RMSize];
+ memset(ReachibilityMatrix, 0, RMSize);
}
int Idf = f->getNodeId();