1 //===-- llvm/Target/TargetSchedule.cpp - Sched Machine Model ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements a wrapper around MCSchedModel that allows the interface
11 // to benefit from information currently only available in TargetInstrInfo.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/CodeGen/TargetSchedule.h"
16 #include "llvm/Target/TargetInstrInfo.h"
17 #include "llvm/Target/TargetSubtargetInfo.h"
18 #include "llvm/Support/CommandLine.h"
22 static cl::opt<bool> EnableSchedModel("schedmodel", cl::Hidden, cl::init(false),
23 cl::desc("Use TargetSchedModel for latency lookup"));
25 void TargetSchedModel::init(const MCSchedModel &sm,
26 const TargetSubtargetInfo *sti,
27 const TargetInstrInfo *tii) {
31 STI->initInstrItins(InstrItins);