blob: 5b825c2bdd7aa3e5095a872d7355ca460632cc9c [file] [log] [blame]
Dan Gohman1adf1b02008-08-19 21:45:35 +00001//===-- X86FastISel.cpp - X86 FastISel implementation ---------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the X86-specific support for the FastISel class. Much
11// of the target-specific code is generated by tablegen in the file
12// X86GenFastISel.inc, which is #included here.
13//
14//===----------------------------------------------------------------------===//
15
16#include "X86.h"
17#include "X86RegisterInfo.h"
18#include "X86ISelLowering.h"
Dan Gohman22bb3112008-08-22 00:20:26 +000019#include "X86TargetMachine.h"
Evan Chengc3f44b02008-09-03 00:03:49 +000020#include "llvm/CodeGen/FastISel.h"
Owen Anderson667d8f72008-08-29 17:45:56 +000021#include "llvm/CodeGen/MachineRegisterInfo.h"
Evan Chengc3f44b02008-09-03 00:03:49 +000022
23using namespace llvm;
24
25class X86FastISel : public FastISel {
26 /// Subtarget - Keep a pointer to the X86Subtarget around so that we can
27 /// make the right decision when generating code for different targets.
28 const X86Subtarget *Subtarget;
29
30 public:
31 explicit X86FastISel(MachineFunction &mf) : FastISel(mf) {}
32
33 virtual bool
34 TargetSelectInstruction(Instruction *I,
35 DenseMap<const Value *, unsigned> &ValueMap,
36 DenseMap<const BasicBlock *, MachineBasicBlock *> &MBBMap,
37 MachineBasicBlock *MBB);
38
Dan Gohman1adf1b02008-08-19 21:45:35 +000039#include "X86GenFastISel.inc"
Evan Chengc3f44b02008-09-03 00:03:49 +000040};
Dan Gohman99b21822008-08-28 23:21:34 +000041
42bool
Evan Chengc3f44b02008-09-03 00:03:49 +000043X86FastISel::TargetSelectInstruction(Instruction *I,
Dan Gohman99b21822008-08-28 23:21:34 +000044 DenseMap<const Value *, unsigned> &ValueMap,
45 DenseMap<const BasicBlock *, MachineBasicBlock *> &MBBMap,
46 MachineBasicBlock *MBB) {
47 switch (I->getOpcode()) {
48 default: break;
49 }
50
51 return false;
52}
53
Evan Chengc3f44b02008-09-03 00:03:49 +000054namespace llvm {
55 llvm::FastISel *X86::createFastISel(MachineFunction &mf) {
56 return new X86FastISel(mf);
57 }
Dan Gohman99b21822008-08-28 23:21:34 +000058}