diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/CodeGen/SlotIndexes.cpp | |
parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) |
Diffstat (limited to 'lib/CodeGen/SlotIndexes.cpp')
-rw-r--r-- | lib/CodeGen/SlotIndexes.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp index fccbb8ec91cb..9fff873324d0 100644 --- a/lib/CodeGen/SlotIndexes.cpp +++ b/lib/CodeGen/SlotIndexes.cpp @@ -1,9 +1,8 @@ //===-- SlotIndexes.cpp - Slot Indexes Pass ------------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -23,7 +22,6 @@ INITIALIZE_PASS(SlotIndexes, DEBUG_TYPE, "Slot index numbering", false, false) STATISTIC(NumLocalRenum, "Number of local renumberings"); -STATISTIC(NumGlobalRenum, "Number of global renumberings"); void SlotIndexes::getAnalysisUsage(AnalysisUsage &au) const { au.setPreservesAll(); @@ -95,7 +93,7 @@ bool SlotIndexes::runOnMachineFunction(MachineFunction &fn) { } // Sort the Idx2MBBMap - llvm::sort(idx2MBBMap, Idx2MBBCompare()); + llvm::sort(idx2MBBMap, less_first()); LLVM_DEBUG(mf->print(dbgs(), this)); @@ -145,20 +143,6 @@ void SlotIndexes::removeSingleMachineInstrFromMaps(MachineInstr &MI) { } } -void SlotIndexes::renumberIndexes() { - // Renumber updates the index of every element of the index list. - LLVM_DEBUG(dbgs() << "\n*** Renumbering SlotIndexes ***\n"); - ++NumGlobalRenum; - - unsigned index = 0; - - for (IndexList::iterator I = indexList.begin(), E = indexList.end(); - I != E; ++I) { - I->setIndex(index); - index += SlotIndex::InstrDist; - } -} - // Renumber indexes locally after curItr was inserted, but failed to get a new // index. void SlotIndexes::renumberIndexes(IndexList::iterator curItr) { |