mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	I have to work out the Target/CodeGen header dependencies before putting this back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164072 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===-- llvm/Target/TargetSchedule.cpp - Sched Machine Model ----*- C++ -*-===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| //
 | |
| // This file implements a wrapper around MCSchedModel that allows the interface
 | |
| // to benefit from information currently only available in TargetInstrInfo.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include "llvm/CodeGen/TargetSchedule.h"
 | |
| #include "llvm/Target/TargetInstrInfo.h"
 | |
| #include "llvm/Target/TargetSubtargetInfo.h"
 | |
| #include "llvm/Support/CommandLine.h"
 | |
| 
 | |
| using namespace llvm;
 | |
| 
 | |
| static cl::opt<bool> EnableSchedModel("schedmodel", cl::Hidden, cl::init(false),
 | |
|   cl::desc("Use TargetSchedModel for latency lookup"));
 | |
| 
 | |
| void TargetSchedModel::init(const MCSchedModel &sm,
 | |
|                             const TargetSubtargetInfo *sti,
 | |
|                             const TargetInstrInfo *tii) {
 | |
|   SchedModel = sm;
 | |
|   STI = sti;
 | |
|   TII = tii;
 | |
|   STI->initInstrItins(InstrItins);
 | |
| }
 |