LLVM API Documentation

TargetSubtarget.h

Go to the documentation of this file.
00001 //==-- llvm/Target/TargetSubtarget.h - Target Information --------*- C++ -*-==//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file describes the subtarget options of a Target machine.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_TARGET_TARGETSUBTARGET_H
00015 #define LLVM_TARGET_TARGETSUBTARGET_H
00016 
00017 namespace llvm {
00018 
00019 class SDep;
00020 class SUnit;
00021 
00022 //===----------------------------------------------------------------------===//
00023 ///
00024 /// TargetSubtarget - Generic base class for all target subtargets.  All
00025 /// Target-specific options that control code generation and printing should
00026 /// be exposed through a TargetSubtarget-derived class.
00027 ///
00028 class TargetSubtarget {
00029   TargetSubtarget(const TargetSubtarget&);   // DO NOT IMPLEMENT
00030   void operator=(const TargetSubtarget&);  // DO NOT IMPLEMENT
00031 protected: // Can only create subclasses...
00032   TargetSubtarget();
00033 public:
00034   virtual ~TargetSubtarget();
00035 
00036   /// getSpecialAddressLatency - For targets where it is beneficial to
00037   /// backschedule instructions that compute addresses, return a value
00038   /// indicating the number of scheduling cycles of backscheduling that
00039   /// should be attempted.
00040   virtual unsigned getSpecialAddressLatency() const { return 0; }
00041 
00042   // adjustSchedDependency - Perform target specific adjustments to
00043   // the latency of a schedule dependency.
00044   virtual void adjustSchedDependency(SUnit *def, SUnit *use, 
00045                                      SDep& dep) const { };
00046 };
00047 
00048 } // End llvm namespace
00049 
00050 #endif