mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-11 15:26:40 +00:00
![Jonas Paulsson](/assets/img/avatar_default.png)
SystemZ needs to do its scheduling after branch relaxation, which can only happen after block placement, and therefore the standard PostRAScheduler point in the pass sequence is too early. TargetMachine::targetSchedulesPostRAScheduling() is a new method that signals on returning true that target will insert the final scheduling pass on its own. Reviewed by Hal Finkel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255234 91177308-0d34-0410-b5e6-96231b3b80d8
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
//==- SystemZTargetMachine.h - Define TargetMachine for SystemZ ---*- C++ -*-=//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares the SystemZ specific subclass of TargetMachine.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
|
|
#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
|
|
|
|
#include "SystemZSubtarget.h"
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
namespace llvm {
|
|
|
|
class TargetFrameLowering;
|
|
|
|
class SystemZTargetMachine : public LLVMTargetMachine {
|
|
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
|
SystemZSubtarget Subtarget;
|
|
|
|
public:
|
|
SystemZTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
|
|
StringRef FS, const TargetOptions &Options,
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
CodeGenOpt::Level OL);
|
|
~SystemZTargetMachine() override;
|
|
|
|
const SystemZSubtarget *getSubtargetImpl() const { return &Subtarget; }
|
|
const SystemZSubtarget *getSubtargetImpl(const Function &) const override {
|
|
return &Subtarget;
|
|
}
|
|
// Override LLVMTargetMachine
|
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
|
TargetIRAnalysis getTargetIRAnalysis() override;
|
|
TargetLoweringObjectFile *getObjFileLowering() const override {
|
|
return TLOF.get();
|
|
}
|
|
|
|
bool targetSchedulesPostRAScheduling() const override { return true; };
|
|
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif
|