mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_TARGET_TARGETMACHINE_H
|
||||
#define LLVM_TARGET_TARGETMACHINE_H
|
||||
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/MC/MCCodeGenInfo.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <cassert>
|
||||
@@ -63,7 +64,7 @@ class TargetMachine {
|
||||
void operator=(const TargetMachine &); // DO NOT IMPLEMENT
|
||||
protected: // Can only create subclasses.
|
||||
TargetMachine(const Target &T, StringRef TargetTriple,
|
||||
StringRef CPU, StringRef FS);
|
||||
StringRef CPU, StringRef FS, const TargetOptions &Options);
|
||||
|
||||
/// getSubtargetImpl - virtual method implemented by subclasses that returns
|
||||
/// a reference to that target's TargetSubtargetInfo-derived member variable.
|
||||
@@ -101,6 +102,8 @@ public:
|
||||
const StringRef getTargetCPU() const { return TargetCPU; }
|
||||
const StringRef getTargetFeatureString() const { return TargetFS; }
|
||||
|
||||
TargetOptions Options;
|
||||
|
||||
// Interfaces to the major aspects of target machine information:
|
||||
// -- Instruction opcode and operand information
|
||||
// -- Pipelines and scheduling information
|
||||
@@ -284,10 +287,20 @@ public:
|
||||
class LLVMTargetMachine : public TargetMachine {
|
||||
protected: // Can only create subclasses.
|
||||
LLVMTargetMachine(const Target &T, StringRef TargetTriple,
|
||||
StringRef CPU, StringRef FS,
|
||||
StringRef CPU, StringRef FS, TargetOptions Options,
|
||||
Reloc::Model RM, CodeModel::Model CM,
|
||||
CodeGenOpt::Level OL);
|
||||
|
||||
/// printNoVerify - Add a pass to dump the machine function, if debugging is
|
||||
/// enabled.
|
||||
///
|
||||
void printNoVerify(PassManagerBase &PM, const char *Banner) const;
|
||||
|
||||
/// printAndVerify - Add a pass to dump then verify the machine function, if
|
||||
/// those steps are enabled.
|
||||
///
|
||||
void printAndVerify(PassManagerBase &PM, const char *Banner) const;
|
||||
|
||||
private:
|
||||
/// addCommonCodeGenPasses - Add standard LLVM codegen passes used for
|
||||
/// both emitting to assembly files or machine code output.
|
||||
|
||||
Reference in New Issue
Block a user