mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Also count identity copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
STATISTIC(NumSpills , "Number of register spills");
|
STATISTIC(NumSpills , "Number of register spills");
|
||||||
|
STATISTIC(NumIdCopies, "Number of identity moves eliminated after rewriting");
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// VirtRegMap implementation
|
// VirtRegMap implementation
|
||||||
@@ -318,6 +319,7 @@ void VirtRegMap::rewrite(SlotIndexes *Indexes) {
|
|||||||
|
|
||||||
// Finally, remove any identity copies.
|
// Finally, remove any identity copies.
|
||||||
if (MI->isIdentityCopy()) {
|
if (MI->isIdentityCopy()) {
|
||||||
|
++NumIdCopies;
|
||||||
if (MI->getNumOperands() == 2) {
|
if (MI->getNumOperands() == 2) {
|
||||||
DEBUG(dbgs() << "Deleting identity copy.\n");
|
DEBUG(dbgs() << "Deleting identity copy.\n");
|
||||||
RemoveMachineInstrFromMaps(MI);
|
RemoveMachineInstrFromMaps(MI);
|
||||||
|
Reference in New Issue
Block a user