Introduce a new array_pod_sort function and switch LSR to use it

instead of std::sort.  This shrinks the release-asserts LSR.o file
by 1100 bytes of code on my system.

We should start using array_pod_sort where possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-12-01 06:49:59 +00:00
parent 09fb7dadf1
commit 99d0015735
2 changed files with 39 additions and 2 deletions

View File

@ -243,7 +243,7 @@ void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
// Sort the deadinsts list so that we can trivially eliminate duplicates as we
// go. The code below never adds a non-dead instruction to the worklist, but
// callers may not be so careful.
std::sort(DeadInsts.begin(), DeadInsts.end());
array_pod_sort(DeadInsts.begin(), DeadInsts.end());
// Drop duplicate instructions and those with uses.
for (unsigned i = 0, e = DeadInsts.size()-1; i < e; ++i) {