mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232976 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
//===----------------------------------------------------------------------===//
 | 
						|
// Instruction Selector Subtarget Control
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
// This file defines a pass used to change the subtarget for the
 | 
						|
// Mips Instruction selector.
 | 
						|
//
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
 | 
						|
#include "Mips.h"
 | 
						|
#include "MipsTargetMachine.h"
 | 
						|
#include "llvm/Support/Debug.h"
 | 
						|
#include "llvm/Support/raw_ostream.h"
 | 
						|
 | 
						|
using namespace llvm;
 | 
						|
 | 
						|
#define DEBUG_TYPE "mips-isel"
 | 
						|
 | 
						|
namespace {
 | 
						|
  class MipsModuleDAGToDAGISel : public MachineFunctionPass {
 | 
						|
  public:
 | 
						|
    static char ID;
 | 
						|
 | 
						|
    explicit MipsModuleDAGToDAGISel(MipsTargetMachine &TM_)
 | 
						|
      : MachineFunctionPass(ID), TM(TM_) {}
 | 
						|
 | 
						|
    // Pass Name
 | 
						|
    const char *getPassName() const override {
 | 
						|
      return "MIPS DAG->DAG Pattern Instruction Selection";
 | 
						|
    }
 | 
						|
 | 
						|
    bool runOnMachineFunction(MachineFunction &MF) override;
 | 
						|
 | 
						|
  protected:
 | 
						|
    MipsTargetMachine &TM;
 | 
						|
  };
 | 
						|
 | 
						|
  char MipsModuleDAGToDAGISel::ID = 0;
 | 
						|
}
 | 
						|
 | 
						|
bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) {
 | 
						|
  DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n");
 | 
						|
  TM.resetSubtarget(&MF);
 | 
						|
  return false;
 | 
						|
}
 | 
						|
 | 
						|
llvm::FunctionPass *llvm::createMipsModuleISelDagPass(MipsTargetMachine &TM) {
 | 
						|
  return new MipsModuleDAGToDAGISel(TM);
 | 
						|
}
 |