mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	regpressure: Added RegisterPressure::dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -18,6 +18,8 @@
 | 
				
			|||||||
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
 | 
					#include "llvm/CodeGen/LiveIntervalAnalysis.h"
 | 
				
			||||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
 | 
					#include "llvm/CodeGen/MachineRegisterInfo.h"
 | 
				
			||||||
#include "llvm/Target/TargetMachine.h"
 | 
					#include "llvm/Target/TargetMachine.h"
 | 
				
			||||||
 | 
					#include "llvm/Support/Debug.h"
 | 
				
			||||||
 | 
					#include "llvm/Support/raw_ostream.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace llvm;
 | 
					using namespace llvm;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -61,6 +63,22 @@ void RegisterPressure::decrease(const TargetRegisterClass *RC,
 | 
				
			|||||||
  decreaseSetPressure(MaxSetPressure, RC, TRI);
 | 
					  decreaseSetPressure(MaxSetPressure, RC, TRI);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void RegisterPressure::dump(const TargetRegisterInfo *TRI) {
 | 
				
			||||||
 | 
					  dbgs() << "Live In: ";
 | 
				
			||||||
 | 
					  for (unsigned i = 0, e = LiveInRegs.size(); i < e; ++i)
 | 
				
			||||||
 | 
					    dbgs() << PrintReg(LiveInRegs[i], TRI) << " ";
 | 
				
			||||||
 | 
					  dbgs() << '\n';
 | 
				
			||||||
 | 
					  dbgs() << "Live Out: ";
 | 
				
			||||||
 | 
					  for (unsigned i = 0, e = LiveOutRegs.size(); i < e; ++i)
 | 
				
			||||||
 | 
					    dbgs() << PrintReg(LiveOutRegs[i], TRI) << " ";
 | 
				
			||||||
 | 
					  dbgs() << '\n';
 | 
				
			||||||
 | 
					  for (unsigned i = 0, e = MaxSetPressure.size(); i < e; ++i) {
 | 
				
			||||||
 | 
					    if (MaxSetPressure[i] != 0)
 | 
				
			||||||
 | 
					      dbgs() << TRI->getRegPressureSetName(i) << "=" << MaxSetPressure[i]
 | 
				
			||||||
 | 
					             << '\n';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Increase the current pressure as impacted by these physical registers and
 | 
					/// Increase the current pressure as impacted by these physical registers and
 | 
				
			||||||
/// bump the high water mark if needed.
 | 
					/// bump the high water mark if needed.
 | 
				
			||||||
void RegPressureTracker::increasePhysRegPressure(ArrayRef<unsigned> Regs) {
 | 
					void RegPressureTracker::increasePhysRegPressure(ArrayRef<unsigned> Regs) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,6 +42,8 @@ struct RegisterPressure {
 | 
				
			|||||||
  /// Decrease register pressure for each pressure set impacted by this register
 | 
					  /// Decrease register pressure for each pressure set impacted by this register
 | 
				
			||||||
  /// class. This is only useful to account for spilling or rematerialization.
 | 
					  /// class. This is only useful to account for spilling or rematerialization.
 | 
				
			||||||
  void decrease(const TargetRegisterClass *RC, const TargetRegisterInfo *TRI);
 | 
					  void decrease(const TargetRegisterClass *RC, const TargetRegisterInfo *TRI);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  void dump(const TargetRegisterInfo *TRI);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// RegisterPressure computed within a region of instructions delimited by
 | 
					/// RegisterPressure computed within a region of instructions delimited by
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user