Skip to content

Commit

Permalink
Remove the default subtarget from the new Nios2 port. It's unused and…
Browse files Browse the repository at this point in the history
… deprecated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313808 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Sep 20, 2017
1 parent ce7bcb2 commit 5a4ca9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions lib/Target/Nios2/Nios2TargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Nios2TargetMachine::Nios2TargetMachine(const Target &T, const Triple &TT,
Optional<CodeModel::Model> CM,
CodeGenOpt::Level OL, bool JIT)
: LLVMTargetMachine(T, computeDataLayout(), TT, CPU, FS, Options,
getEffectiveRelocModel(RM), *CM, OL),
DefaultSubtarget(TT, CPU, FS, *this) {}
getEffectiveRelocModel(RM), *CM, OL) {}

Nios2TargetMachine::~Nios2TargetMachine() {}

Expand Down Expand Up @@ -82,9 +81,6 @@ class Nios2PassConfig : public TargetPassConfig {
return getTM<Nios2TargetMachine>();
}

const Nios2Subtarget &getNios2Subtarget() const {
return *getNios2TargetMachine().getSubtargetImpl();
}
void addCodeGenPrepare() override;
void addIRPasses() override;
};
Expand Down
4 changes: 0 additions & 4 deletions lib/Target/Nios2/Nios2TargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

namespace llvm {
class Nios2TargetMachine : public LLVMTargetMachine {
Nios2Subtarget DefaultSubtarget;

mutable StringMap<std::unique_ptr<Nios2Subtarget>> SubtargetMap;

public:
Expand All @@ -30,8 +28,6 @@ class Nios2TargetMachine : public LLVMTargetMachine {
CodeGenOpt::Level OL, bool JIT);
~Nios2TargetMachine() override;

const Nios2Subtarget *getSubtargetImpl() const { return &DefaultSubtarget; }

const Nios2Subtarget *getSubtargetImpl(const Function &F) const override;

// Pass Pipeline Configuration
Expand Down

0 comments on commit 5a4ca9a

Please sign in to comment.