aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-30 20:25:31 +0000
committerDan Gohman <gohman@apple.com>2008-06-30 20:25:31 +0000
commita1ee9e855c4c0dcb317bd222f31fb0558ef04958 (patch)
tree3b551327821da9d2abf822966738361327a5f500 /lib/CodeGen/SelectionDAG/CallingConvLower.cpp
parent8e728a8b046337ff1e409a52245a7f2a4a4f80e8 (diff)
downloadexternal_llvm-a1ee9e855c4c0dcb317bd222f31fb0558ef04958.zip
external_llvm-a1ee9e855c4c0dcb317bd222f31fb0558ef04958.tar.gz
external_llvm-a1ee9e855c4c0dcb317bd222f31fb0558ef04958.tar.bz2
Correct the allocation size for CCState's UsedRegs member, which
only needs one bit for each register. UsedRegs is a SmallVector sized at 16, so this eliminates a heap allocation/free for every call and return processed by Legalize on most targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/CallingConvLower.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
index 5dcf4ac..c9832ac 100644
--- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
+++ b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
@@ -26,7 +26,7 @@ CCState::CCState(unsigned CC, bool isVarArg, const TargetMachine &tm,
// No stack is used.
StackOffset = 0;
- UsedRegs.resize(TRI.getNumRegs());
+ UsedRegs.resize((TRI.getNumRegs()+31)/32);
}
// HandleByVal - Allocate a stack slot large enough to pass an argument by