//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Nate Begeman and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
#ifndef LLVM_TARGET_TARGETSUBTARGET_H
#define LLVM_TARGET_TARGETSUBTARGET_H
-#include <string>
-
namespace llvm {
+class SDep;
+
//===----------------------------------------------------------------------===//
///
/// TargetSubtarget - Generic base class for all target subtargets. All
class TargetSubtarget {
TargetSubtarget(const TargetSubtarget&); // DO NOT IMPLEMENT
void operator=(const TargetSubtarget&); // DO NOT IMPLEMENT
- std::string CPU; // CPU name.
protected: // Can only create subclasses...
TargetSubtarget();
public:
virtual ~TargetSubtarget();
- void setCPU(const std::string &C) { CPU = C; }
- const std::string &getCPU() const { return CPU; }
+
+ /// getSpecialAddressLatency - For targets where it is beneficial to
+ /// backschedule instructions that compute addresses, return a value
+ /// indicating the number of scheduling cycles of backscheduling that
+ /// should be attempted.
+ virtual unsigned getSpecialAddressLatency() const { return 0; }
+
+ // adjustSchedDependency - Perform target specific adjustments to
+ // the latency of a schedule dependency.
+ virtual void adjustSchedDependency(SDep&) const { };
};
} // End llvm namespace