diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-30 20:25:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-30 20:25:31 +0000 |
commit | 328e26d0aca59769d0c8cfb3f2e51fe25eac190e (patch) | |
tree | 41c32260b6f72d21824af649c8a804b7232470eb /llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp | |
parent | 9a8d1d9e56ecdc052add3620b478253fda0cb615 (diff) | |
download | bcm5719-llvm-328e26d0aca59769d0c8cfb3f2e51fe25eac190e.tar.gz bcm5719-llvm-328e26d0aca59769d0c8cfb3f2e51fe25eac190e.zip |
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.
llvm-svn: 52915
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 5dcf4ac92d4..c9832ac46ba 100644 --- a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/llvm/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 |