1 change: 0 additions & 1 deletion llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ ExecutionEngine *MCJITHelper::compileModule(Module *M) {
std::string ErrStr;
ExecutionEngine *NewEngine = EngineBuilder(M)
.setErrorStr(&ErrStr)
.setUseMCJIT(true)
.setMCJITMemoryManager(new HelpingMemoryManager(this))
.create();
if (!NewEngine) {
Expand Down
1 change: 0 additions & 1 deletion llvm/examples/ParallelJIT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ set(LLVM_LINK_COMPONENTS
Core
ExecutionEngine
Interpreter
JIT
Support
nativecodegen
)
Expand Down
1 change: 0 additions & 1 deletion llvm/examples/ParallelJIT/ParallelJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
Expand Down
344 changes: 0 additions & 344 deletions llvm/include/llvm/CodeGen/JITCodeEmitter.h

This file was deleted.

46 changes: 0 additions & 46 deletions llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ class ExecutionEngine {
// To avoid having libexecutionengine depend on the JIT and interpreter
// libraries, the execution engine implementations set these functions to ctor
// pointers at startup time if they are linked in.
static ExecutionEngine *(*JITCtor)(
Module *M,
std::string *ErrorStr,
JITMemoryManager *JMM,
bool GVsWithCode,
TargetMachine *TM);
static ExecutionEngine *(*MCJITCtor)(
Module *M,
std::string *ErrorStr,
Expand Down Expand Up @@ -335,13 +329,6 @@ class ExecutionEngine {
/// getFunctionAddress instead.
virtual void *getPointerToFunction(Function *F) = 0;

/// getPointerToBasicBlock - The different EE's represent basic blocks in
/// different ways. Return the representation for a blockaddress of the
/// specified block.
///
/// This function will not be implemented for the MCJIT execution engine.
virtual void *getPointerToBasicBlock(BasicBlock *BB) = 0;

/// getPointerToFunctionOrStub - If the specified function has been
/// code-gen'd, return a pointer to the function. If not, compile it, or use
/// a stub to implement lazy compilation if available. See
Expand Down Expand Up @@ -389,18 +376,6 @@ class ExecutionEngine {

void InitializeMemory(const Constant *Init, void *Addr);

/// recompileAndRelinkFunction - This method is used to force a function which
/// has already been compiled to be compiled again, possibly after it has been
/// modified. Then the entry to the old copy is overwritten with a branch to
/// the new copy. If there was no old copy, this acts just like
/// VM::getPointerToFunction().
virtual void *recompileAndRelinkFunction(Function *F) = 0;

/// freeMachineCodeForFunction - Release memory in the ExecutionEngine
/// corresponding to the machine code emitted to execute this function, useful
/// for garbage-collecting generated code.
virtual void freeMachineCodeForFunction(Function *F) = 0;

/// getOrEmitGlobalVariable - Return the address of the specified global
/// variable, possibly emitting it to memory if needed. This is used by the
/// Emitter.
Expand Down Expand Up @@ -537,14 +512,12 @@ class EngineBuilder {
CodeGenOpt::Level OptLevel;
RTDyldMemoryManager *MCJMM;
JITMemoryManager *JMM;
bool AllocateGVsWithCode;
TargetOptions Options;
Reloc::Model RelocModel;
CodeModel::Model CMModel;
std::string MArch;
std::string MCPU;
SmallVector<std::string, 4> MAttrs;
bool UseMCJIT;
bool VerifyModules;

/// InitEngine - Does the common initialization of default options.
Expand Down Expand Up @@ -626,18 +599,6 @@ class EngineBuilder {
return *this;
}

/// setAllocateGVsWithCode - Sets whether global values should be allocated
/// into the same buffer as code. For most applications this should be set
/// to false. Allocating globals with code breaks freeMachineCodeForFunction
/// and is probably unsafe and bad for performance. However, we have clients
/// who depend on this behavior, so we must support it. This option defaults
/// to false so that users of the new API can safely use the new memory
/// manager and free machine code.
EngineBuilder &setAllocateGVsWithCode(bool a) {
AllocateGVsWithCode = a;
return *this;
}

/// setMArch - Override the architecture set by the Module's triple.
EngineBuilder &setMArch(StringRef march) {
MArch.assign(march.begin(), march.end());
Expand All @@ -650,13 +611,6 @@ class EngineBuilder {
return *this;
}

/// setUseMCJIT - Set whether the MC-JIT implementation should be used
/// (experimental).
EngineBuilder &setUseMCJIT(bool Value) {
UseMCJIT = Value;
return *this;
}

/// setVerifyModules - Set whether the JIT implementation should verify
/// IR modules during compilation.
EngineBuilder &setVerifyModules(bool Verify) {
Expand Down
38 changes: 0 additions & 38 deletions llvm/include/llvm/ExecutionEngine/JIT.h

This file was deleted.

136 changes: 0 additions & 136 deletions llvm/include/llvm/Target/TargetJITInfo.h

This file was deleted.

14 changes: 0 additions & 14 deletions llvm/include/llvm/Target/TargetLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,6 @@ class TargetLoweringBase {
return UseUnderscoreLongJmp;
}

/// Return whether the target can generate code for jump tables.
bool supportJumpTables() const {
return SupportJumpTables;
}

/// Return integer threshold on number of blocks to use jump tables rather
/// than if sequence.
int getMinimumJumpTableEntries() const {
Expand Down Expand Up @@ -1001,11 +996,6 @@ class TargetLoweringBase {
UseUnderscoreLongJmp = Val;
}

/// Indicate whether the target can generate code for jump tables.
void setSupportJumpTables(bool Val) {
SupportJumpTables = Val;
}

/// Indicate the number of blocks to generate jump tables rather than if
/// sequence.
void setMinimumJumpTableEntries(int Val) {
Expand Down Expand Up @@ -1509,10 +1499,6 @@ class TargetLoweringBase {
/// Defaults to false.
bool UseUnderscoreLongJmp;

/// Whether the target can generate code for jumptables. If it's not true,
/// then each jumptable must be lowered into if-then-else's.
bool SupportJumpTables;

/// Number of blocks threshold to use jump tables.
int MinimumJumpTableEntries;

Expand Down
35 changes: 0 additions & 35 deletions llvm/include/llvm/Target/TargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
namespace llvm {

class InstrItineraryData;
class JITCodeEmitter;
class GlobalValue;
class Mangler;
class MCAsmInfo;
Expand All @@ -36,7 +35,6 @@ class DataLayout;
class TargetLibraryInfo;
class TargetFrameLowering;
class TargetIntrinsicInfo;
class TargetJITInfo;
class TargetLowering;
class TargetPassConfig;
class TargetRegisterInfo;
Expand Down Expand Up @@ -101,10 +99,6 @@ class TargetMachine {
virtual const TargetSubtargetInfo *getSubtargetImpl() const {
return nullptr;
}
TargetSubtargetInfo *getSubtargetImpl() {
const TargetMachine *TM = this;
return const_cast<TargetSubtargetInfo *>(TM->getSubtargetImpl());
}

/// getSubtarget - This method returns a pointer to the specified type of
/// TargetSubtargetInfo. In debug builds, it verifies that the object being
Expand Down Expand Up @@ -201,18 +195,6 @@ class TargetMachine {
return true;
}

/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
/// get machine code emitted. This uses a JITCodeEmitter object to handle
/// actually outputting the machine code and resolving things like the address
/// of functions. This method returns true if machine code emission is
/// not supported.
///
virtual bool addPassesToEmitMachineCode(PassManagerBase &,
JITCodeEmitter &,
bool /*DisableVerify*/ = true) {
return true;
}

/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
Expand Down Expand Up @@ -259,30 +241,13 @@ class LLVMTargetMachine : public TargetMachine {
AnalysisID StartAfter = nullptr,
AnalysisID StopAfter = nullptr) override;

/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
/// get machine code emitted. This uses a JITCodeEmitter object to handle
/// actually outputting the machine code and resolving things like the address
/// of functions. This method returns true if machine code emission is
/// not supported.
///
bool addPassesToEmitMachineCode(PassManagerBase &PM, JITCodeEmitter &MCE,
bool DisableVerify = true) override;

/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
/// used to build custom MCStreamer.
///
bool addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
raw_ostream &OS, bool DisableVerify = true) override;

/// addCodeEmitter - This pass should be overridden by the target to add a
/// code emitter, if supported. If this is not supported, 'true' should be
/// returned.
virtual bool addCodeEmitter(PassManagerBase &,
JITCodeEmitter &) {
return true;
}
};

} // End llvm namespace
Expand Down
6 changes: 0 additions & 6 deletions llvm/include/llvm/Target/TargetSubtargetInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class SDep;
class SUnit;
class TargetFrameLowering;
class TargetInstrInfo;
class TargetJITInfo;
class TargetLowering;
class TargetRegisterClass;
class TargetRegisterInfo;
Expand Down Expand Up @@ -79,11 +78,6 @@ class TargetSubtargetInfo : public MCSubtargetInfo {
///
virtual const TargetRegisterInfo *getRegisterInfo() const { return nullptr; }

/// getJITInfo - If this target supports a JIT, return information for it,
/// otherwise return null.
///
virtual TargetJITInfo *getJITInfo() { return nullptr; }

/// getInstrItineraryData - Returns instruction itinerary data for the target
/// or specific subtarget.
///
Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ unsigned BasicTTI::getJumpBufSize() const {

bool BasicTTI::shouldBuildLookupTables() const {
const TargetLoweringBase *TLI = getTLI();
return TLI->supportJumpTables() &&
(TLI->isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) ||
TLI->isOperationLegalOrCustom(ISD::BRIND, MVT::Other));
return TLI->isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) ||
TLI->isOperationLegalOrCustom(ISD::BRIND, MVT::Other);
}

bool BasicTTI::haveFastSqrt(Type *Ty) const {
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/CodeGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_llvm_library(LLVMCodeGen
InlineSpiller.cpp
InterferenceCache.cpp
IntrinsicLowering.cpp
JITCodeEmitter.cpp
JumpInstrTables.cpp
LLVMTargetMachine.cpp
LatencyPriorityQueue.cpp
Expand Down
14 changes: 0 additions & 14 deletions llvm/lib/CodeGen/JITCodeEmitter.cpp

This file was deleted.

20 changes: 0 additions & 20 deletions llvm/lib/CodeGen/LLVMTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,26 +226,6 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
return false;
}

/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
/// get machine code emitted. This uses a JITCodeEmitter object to handle
/// actually outputting the machine code and resolving things like the address
/// of functions. This method should return true if machine code emission is
/// not supported.
///
bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
JITCodeEmitter &JCE,
bool DisableVerify) {
// Add common CodeGen passes.
MCContext *Context = addPassesToGenerateCode(this, PM, DisableVerify, nullptr,
nullptr);
if (!Context)
return true;

addCodeEmitter(PM, JCE);

return false; // success!
}

/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2228,9 +2228,8 @@ bool SelectionDAGBuilder::handleSmallSwitchRange(CaseRec& CR,
}

static inline bool areJTsAllowed(const TargetLowering &TLI) {
return TLI.supportJumpTables() &&
(TLI.isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) ||
TLI.isOperationLegalOrCustom(ISD::BRIND, MVT::Other));
return TLI.isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) ||
TLI.isOperationLegalOrCustom(ISD::BRIND, MVT::Other);
}

static APInt ComputeRange(const APInt &First, const APInt &Last) {
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/CodeGen/TargetLoweringBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm,
PrefLoopAlignment = 0;
MinStackArgumentAlignment = 1;
InsertFencesForAtomic = false;
SupportJumpTables = true;
MinimumJumpTableEntries = 4;

InitLibcallNames(LibcallRoutineNames, Triple(TM.getTargetTriple()));
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/ExecutionEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_llvm_library(LLVMExecutionEngine
)

add_subdirectory(Interpreter)
add_subdirectory(JIT)
add_subdirectory(MCJIT)
add_subdirectory(RuntimeDyld)

Expand Down
27 changes: 2 additions & 25 deletions llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ void ObjectCache::anchor() {}
void ObjectBuffer::anchor() {}
void ObjectBufferStream::anchor() {}

ExecutionEngine *(*ExecutionEngine::JITCtor)(
Module *M,
std::string *ErrorStr,
JITMemoryManager *JMM,
bool GVsWithCode,
TargetMachine *TM) = nullptr;
ExecutionEngine *(*ExecutionEngine::MCJITCtor)(
Module *M,
std::string *ErrorStr,
Expand Down Expand Up @@ -417,10 +411,8 @@ void EngineBuilder::InitEngine() {
MCJMM = nullptr;
JMM = nullptr;
Options = TargetOptions();
AllocateGVsWithCode = false;
RelocModel = Reloc::Default;
CMModel = CodeModel::JITDefault;
UseMCJIT = false;

// IR module verification is enabled by default in debug builds, and disabled
// by default in release builds.
Expand Down Expand Up @@ -453,14 +445,6 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
return nullptr;
}
}

if (MCJMM && ! UseMCJIT) {
if (ErrorStr)
*ErrorStr =
"Cannot create a legacy JIT with a runtime dyld memory "
"manager.";
return nullptr;
}

// Unless the interpreter was explicitly selected or the JIT is not linked,
// try making a JIT.
Expand All @@ -473,12 +457,9 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
}

ExecutionEngine *EE = nullptr;
if (UseMCJIT && ExecutionEngine::MCJITCtor)
if (ExecutionEngine::MCJITCtor)
EE = ExecutionEngine::MCJITCtor(M, ErrorStr, MCJMM ? MCJMM : JMM,
TheTM.release());
else if (ExecutionEngine::JITCtor)
EE = ExecutionEngine::JITCtor(M, ErrorStr, JMM,
AllocateGVsWithCode, TheTM.release());

if (EE) {
EE->setVerifyModules(VerifyModules);
Expand All @@ -496,8 +477,7 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
return nullptr;
}

if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::JITCtor &&
!ExecutionEngine::MCJITCtor) {
if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::MCJITCtor) {
if (ErrorStr)
*ErrorStr = "JIT has not been linked in.";
}
Expand Down Expand Up @@ -843,9 +823,6 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
Result = PTOGV(getPointerToFunctionOrStub(const_cast<Function*>(F)));
else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(C))
Result = PTOGV(getOrEmitGlobalVariable(const_cast<GlobalVariable*>(GV)));
else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C))
Result = PTOGV(getPointerToBasicBlock(const_cast<BasicBlock*>(
BA->getBasicBlock())));
else
llvm_unreachable("Unknown constant pointer type!");
break;
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ LLVMBool LLVMCreateMCJITCompilerForModule(
EngineBuilder builder(unwrap(M));
builder.setEngineKind(EngineKind::JIT)
.setErrorStr(&Error)
.setUseMCJIT(true)
.setOptLevel((CodeGenOpt::Level)options.OptLevel)
.setCodeModel(unwrap(options.CodeModel))
.setTargetOptions(targetOptions);
Expand Down Expand Up @@ -275,7 +274,6 @@ LLVMGenericValueRef LLVMRunFunction(LLVMExecutionEngineRef EE, LLVMValueRef F,
}

void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F) {
unwrap(EE)->freeMachineCodeForFunction(unwrap<Function>(F));
}

void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M){
Expand Down Expand Up @@ -314,7 +312,7 @@ LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name,

void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE,
LLVMValueRef Fn) {
return unwrap(EE)->recompileAndRelinkFunction(unwrap<Function>(Fn));
return nullptr;
}

LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) {
Expand Down
12 changes: 0 additions & 12 deletions llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,6 @@ class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
return nullptr;
}

/// recompileAndRelinkFunction - For the interpreter, functions are always
/// up-to-date.
///
void *recompileAndRelinkFunction(Function *F) override {
return getPointerToFunction(F);
}

/// freeMachineCodeForFunction - The interpreter does not generate any code.
///
void freeMachineCodeForFunction(Function *F) override { }

// Methods used to execute code:
// Place a call on the stack
void callFunction(Function *F, const std::vector<GenericValue> &ArgVals);
Expand Down Expand Up @@ -213,7 +202,6 @@ class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
void SwitchToNewBasicBlock(BasicBlock *Dest, ExecutionContext &SF);

void *getPointerToFunction(Function *F) override { return (void*)F; }
void *getPointerToBasicBlock(BasicBlock *BB) override { return (void*)BB; }

void initializeExecutionEngine() { }
void initializeExternalFunctions();
Expand Down
8 changes: 0 additions & 8 deletions llvm/lib/ExecutionEngine/JIT/CMakeLists.txt

This file was deleted.

696 changes: 0 additions & 696 deletions llvm/lib/ExecutionEngine/JIT/JIT.cpp

This file was deleted.

214 changes: 0 additions & 214 deletions llvm/lib/ExecutionEngine/JIT/JIT.h

This file was deleted.

1,249 changes: 0 additions & 1,249 deletions llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions llvm/lib/ExecutionEngine/JIT/LLVMBuild.txt

This file was deleted.

38 changes: 0 additions & 38 deletions llvm/lib/ExecutionEngine/JIT/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/LLVMBuild.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
;===------------------------------------------------------------------------===;

[common]
subdirectories = Interpreter JIT MCJIT RuntimeDyld IntelJITEvents OProfileJIT
subdirectories = Interpreter MCJIT RuntimeDyld IntelJITEvents OProfileJIT

[component_0]
type = Library
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_llvm_library(LLVMMCJIT
JITMemoryManager.cpp
MCJIT.cpp
SectionMemoryManager.cpp
)
File renamed without changes.
18 changes: 3 additions & 15 deletions llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ void MCJIT::finalizeModule(Module *M) {
finalizeLoadedModules();
}

void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) {
report_fatal_error("not yet implemented");
}

uint64_t MCJIT::getExistingSymbolAddress(const std::string &Name) {
Mangler Mang(TM->getSubtargetImpl()->getDataLayout());
SmallString<128> FullName;
Expand Down Expand Up @@ -372,14 +368,6 @@ void *MCJIT::getPointerToFunction(Function *F) {
return (void*)Dyld.getSymbolLoadAddress(Name);
}

void *MCJIT::recompileAndRelinkFunction(Function *F) {
report_fatal_error("not yet implemented");
}

void MCJIT::freeMachineCodeForFunction(Function *F) {
report_fatal_error("not yet implemented");
}

void MCJIT::runStaticConstructorsDestructorsInModulePtrSet(
bool isDtors, ModulePtrSet::iterator I, ModulePtrSet::iterator E) {
for (; I != E; ++I) {
Expand Down Expand Up @@ -549,8 +537,7 @@ void MCJIT::UnregisterJITEventListener(JITEventListener *L) {
if (!L)
return;
MutexGuard locked(lock);
SmallVector<JITEventListener*, 2>::reverse_iterator I=
std::find(EventListeners.rbegin(), EventListeners.rend(), L);
auto I = std::find(EventListeners.rbegin(), EventListeners.rend(), L);
if (I != EventListeners.rend()) {
std::swap(*I, EventListeners.back());
EventListeners.pop_back();
Expand All @@ -566,7 +553,8 @@ void MCJIT::NotifyObjectEmitted(const ObjectImage& Obj) {
void MCJIT::NotifyFreeingObject(const ObjectImage& Obj) {
MutexGuard locked(lock);
for (unsigned I = 0, S = EventListeners.size(); I < S; ++I) {
EventListeners[I]->NotifyFreeingObject(Obj);
JITEventListener *L = EventListeners[I];
L->NotifyFreeingObject(Obj);
}
}

Expand Down
8 changes: 1 addition & 7 deletions llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class MCJIT : public ExecutionEngine {
MCContext *Ctx;
LinkingMemoryManager MemMgr;
RuntimeDyld Dyld;
SmallVector<JITEventListener*, 2> EventListeners;
std::vector<JITEventListener*> EventListeners;

OwningModuleContainer OwnedModules;

Expand Down Expand Up @@ -275,14 +275,8 @@ class MCJIT : public ExecutionEngine {
/// \param isDtors - Run the destructors instead of constructors.
void runStaticConstructorsDestructors(bool isDtors) override;

void *getPointerToBasicBlock(BasicBlock *BB) override;

void *getPointerToFunction(Function *F) override;

void *recompileAndRelinkFunction(Function *F) override;

void freeMachineCodeForFunction(Function *F) override;

GenericValue runFunction(Function *F,
const std::vector<GenericValue> &ArgValues) override;

Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/ExecutionEngine/TargetSelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TargetMachine *EngineBuilder::selectTarget() {

// MCJIT can generate code for remote targets, but the old JIT and Interpreter
// must use the host architecture.
if (UseMCJIT && WhichEngine != EngineKind::Interpreter && M)
if (WhichEngine != EngineKind::Interpreter && M)
TT.setTriple(M->getTargetTriple());

return selectTarget(TT, MArch, MCPU, MAttrs);
Expand Down Expand Up @@ -89,8 +89,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
}

// FIXME: non-iOS ARM FastISel is broken with MCJIT.
if (UseMCJIT &&
TheTriple.getArch() == Triple::arm &&
if (TheTriple.getArch() == Triple::arm &&
!TheTriple.isiOS() &&
OptLevel == CodeGenOpt::None) {
OptLevel = CodeGenOpt::Less;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(LLVM_TARGET_DEFINITIONS AArch64.td)

tablegen(LLVM AArch64GenRegisterInfo.inc -gen-register-info)
tablegen(LLVM AArch64GenInstrInfo.inc -gen-instr-info)
tablegen(LLVM AArch64GenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM AArch64GenMCCodeEmitter.inc -gen-emitter)
tablegen(LLVM AArch64GenMCPseudoLowering.inc -gen-pseudo-lowering)
tablegen(LLVM AArch64GenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM AArch64GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
Expand Down
5 changes: 0 additions & 5 deletions llvm/lib/Target/ARM/ARM.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ class ARMAsmPrinter;
class ARMBaseTargetMachine;
class FunctionPass;
class ImmutablePass;
class JITCodeEmitter;
class MachineInstr;
class MCInst;
class TargetLowering;
class TargetMachine;

FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM,
CodeGenOpt::Level OptLevel);

FunctionPass *createARMJITCodeEmitterPass(ARMBaseTargetMachine &TM,
JITCodeEmitter &JCE);

FunctionPass *createA15SDOptimizerPass();
FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false);
FunctionPass *createARMExpandPseudoPass();
Expand Down
1,910 changes: 0 additions & 1,910 deletions llvm/lib/Target/ARM/ARMCodeEmitter.cpp

This file was deleted.

1 change: 1 addition & 0 deletions llvm/lib/Target/ARM/ARMISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAG.h"
Expand Down
344 changes: 0 additions & 344 deletions llvm/lib/Target/ARM/ARMJITInfo.cpp

This file was deleted.

177 changes: 0 additions & 177 deletions llvm/lib/Target/ARM/ARMJITInfo.h

This file was deleted.

3 changes: 1 addition & 2 deletions llvm/lib/Target/ARM/ARMSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "ARMFrameLowering.h"
#include "ARMISelLowering.h"
#include "ARMInstrInfo.h"
#include "ARMJITInfo.h"
#include "ARMSelectionDAGInfo.h"
#include "ARMSubtarget.h"
#include "ARMMachineFunctionInfo.h"
Expand Down Expand Up @@ -158,7 +157,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU,
ARMProcClass(None), stackAlignment(4), CPUString(CPU), IsLittle(IsLittle),
TargetTriple(TT), Options(Options), TargetABI(ARM_ABI_UNKNOWN),
DL(computeDataLayout(initializeSubtargetDependencies(CPU, FS))),
TSInfo(DL), JITInfo(),
TSInfo(DL),
InstrInfo(isThumb1Only()
? (ARMBaseInstrInfo *)new Thumb1InstrInfo(*this)
: !isThumb()
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/Target/ARM/ARMSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
#include "ARMFrameLowering.h"
#include "ARMISelLowering.h"
#include "ARMInstrInfo.h"
#include "ARMJITInfo.h"
#include "ARMSelectionDAGInfo.h"
#include "ARMSubtarget.h"
#include "Thumb1FrameLowering.h"
#include "Thumb1InstrInfo.h"
#include "Thumb2InstrInfo.h"
#include "ARMJITInfo.h"
#include "MCTargetDesc/ARMMCTargetDesc.h"
#include "llvm/ADT/Triple.h"
#include "llvm/IR/DataLayout.h"
Expand Down Expand Up @@ -261,7 +259,6 @@ class ARMSubtarget : public ARMGenSubtargetInfo {
const ARMSelectionDAGInfo *getSelectionDAGInfo() const override {
return &TSInfo;
}
ARMJITInfo *getJITInfo() override { return &JITInfo; }
const ARMBaseInstrInfo *getInstrInfo() const override {
return InstrInfo.get();
}
Expand All @@ -278,7 +275,6 @@ class ARMSubtarget : public ARMGenSubtargetInfo {
private:
const DataLayout DL;
ARMSelectionDAGInfo TSInfo;
ARMJITInfo JITInfo;
// Either Thumb1InstrInfo or Thumb2InstrInfo.
std::unique_ptr<ARMBaseInstrInfo> InstrInfo;
ARMTargetLowering TLInfo;
Expand Down
7 changes: 0 additions & 7 deletions llvm/lib/Target/ARM/ARMTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,3 @@ bool ARMPassConfig::addPreEmitPass() {

return true;
}

bool ARMBaseTargetMachine::addCodeEmitter(PassManagerBase &PM,
JITCodeEmitter &JCE) {
// Machine code emitter pass for ARM.
PM.add(createARMJITCodeEmitterPass(*this, JCE));
return false;
}
2 changes: 0 additions & 2 deletions llvm/lib/Target/ARM/ARMTargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class ARMBaseTargetMachine : public LLVMTargetMachine {

// Pass Pipeline Configuration
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;

bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &MCE) override;
};

/// ARMTargetMachine - ARM target machine.
Expand Down
5 changes: 1 addition & 4 deletions llvm/lib/Target/ARM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ set(LLVM_TARGET_DEFINITIONS ARM.td)

tablegen(LLVM ARMGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM ARMGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM ARMGenCodeEmitter.inc -gen-emitter)
tablegen(LLVM ARMGenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM ARMGenMCCodeEmitter.inc -gen-emitter)
tablegen(LLVM ARMGenMCPseudoLowering.inc -gen-pseudo-lowering)
tablegen(LLVM ARMGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM ARMGenAsmMatcher.inc -gen-asm-matcher)
Expand All @@ -19,7 +18,6 @@ add_llvm_target(ARMCodeGen
ARMAsmPrinter.cpp
ARMBaseInstrInfo.cpp
ARMBaseRegisterInfo.cpp
ARMCodeEmitter.cpp
ARMConstantIslandPass.cpp
ARMConstantPoolValue.cpp
ARMExpandPseudoInsts.cpp
Expand All @@ -29,7 +27,6 @@ add_llvm_target(ARMCodeGen
ARMISelDAGToDAG.cpp
ARMISelLowering.cpp
ARMInstrInfo.cpp
ARMJITInfo.cpp
ARMLoadStoreOptimizer.cpp
ARMMCInstLower.cpp
ARMMachineFunctionInfo.cpp
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TARGET = ARM
BUILT_SOURCES = ARMGenRegisterInfo.inc ARMGenInstrInfo.inc \
ARMGenAsmWriter.inc ARMGenAsmMatcher.inc \
ARMGenDAGISel.inc ARMGenSubtargetInfo.inc \
ARMGenCodeEmitter.inc ARMGenCallingConv.inc \
ARMGenCallingConv.inc \
ARMGenFastISel.inc ARMGenMCCodeEmitter.inc \
ARMGenMCPseudoLowering.inc ARMGenDisassemblerTables.inc

Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_llvm_library(LLVMTarget
Target.cpp
TargetIntrinsicInfo.cpp
TargetJITInfo.cpp
TargetLibraryInfo.cpp
TargetLoweringObjectFile.cpp
TargetMachine.cpp
Expand Down
5 changes: 1 addition & 4 deletions llvm/lib/Target/Mips/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ set(LLVM_TARGET_DEFINITIONS Mips.td)
tablegen(LLVM MipsGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM MipsGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM MipsGenDisassemblerTables.inc -gen-disassembler)
tablegen(LLVM MipsGenCodeEmitter.inc -gen-emitter)
tablegen(LLVM MipsGenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM MipsGenMCCodeEmitter.inc -gen-emitter)
tablegen(LLVM MipsGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM MipsGenDAGISel.inc -gen-dag-isel)
tablegen(LLVM MipsGenFastISel.inc -gen-fast-isel)
Expand All @@ -24,11 +23,9 @@ add_llvm_target(MipsCodeGen
Mips16RegisterInfo.cpp
MipsAnalyzeImmediate.cpp
MipsAsmPrinter.cpp
MipsCodeEmitter.cpp
MipsConstantIslandPass.cpp
MipsDelaySlotFiller.cpp
MipsFastISel.cpp
MipsJITInfo.cpp
MipsInstrInfo.cpp
MipsISelDAGToDAG.cpp
MipsISelLowering.cpp
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TARGET = Mips

# Make sure that tblgen is run, first thing.
BUILT_SOURCES = MipsGenRegisterInfo.inc MipsGenInstrInfo.inc \
MipsGenAsmWriter.inc MipsGenFastISel.inc MipsGenCodeEmitter.inc \
MipsGenAsmWriter.inc MipsGenFastISel.inc \
MipsGenDAGISel.inc MipsGenCallingConv.inc \
MipsGenSubtargetInfo.inc MipsGenMCCodeEmitter.inc \
MipsGenDisassemblerTables.inc \
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/Target/Mips/Mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ namespace llvm {
FunctionPass *createMipsOptimizePICCallPass(MipsTargetMachine &TM);
FunctionPass *createMipsDelaySlotFillerPass(MipsTargetMachine &TM);
FunctionPass *createMipsLongBranchPass(MipsTargetMachine &TM);
FunctionPass *createMipsJITCodeEmitterPass(MipsTargetMachine &TM,
JITCodeEmitter &JCE);
FunctionPass *createMipsConstantIslandPass(MipsTargetMachine &tm);
} // end namespace llvm;

Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Target/Mips/Mips16ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//===----------------------------------------------------------------------===//
#include "Mips16ISelLowering.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "Mips16HardFloatInfo.h"
#include "MipsMachineFunction.h"
#include "MipsRegisterInfo.h"
#include "MipsTargetMachine.h"
#include "llvm/ADT/StringRef.h"
Expand Down
483 changes: 0 additions & 483 deletions llvm/lib/Target/Mips/MipsCodeEmitter.cpp

This file was deleted.

1 change: 1 addition & 0 deletions llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "MipsTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/Mips/MipsISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/CodeGen/ValueTypes.h"
Expand Down
286 changes: 0 additions & 286 deletions llvm/lib/Target/Mips/MipsJITInfo.cpp

This file was deleted.

71 changes: 0 additions & 71 deletions llvm/lib/Target/Mips/MipsJITInfo.h

This file was deleted.

1 change: 1 addition & 0 deletions llvm/lib/Target/Mips/MipsLongBranch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Mips.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "MCTargetDesc/MipsMCNaCl.h"
#include "MipsMachineFunction.h"
#include "MipsTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/Mips/MipsSEISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
#include "MipsSEISelLowering.h"
#include "MipsMachineFunction.h"
#include "MipsRegisterInfo.h"
#include "MipsTargetMachine.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Mips/MipsSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
HasDSPR2(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16),
HasMSA(false), TM(_TM), TargetTriple(TT),
DL(computeDataLayout(initializeSubtargetDependencies(CPU, FS, TM))),
TSInfo(DL), JITInfo(), InstrInfo(MipsInstrInfo::create(*this)),
TSInfo(DL), InstrInfo(MipsInstrInfo::create(*this)),
FrameLowering(MipsFrameLowering::create(*this)),
TLInfo(MipsTargetLowering::create(*TM, *this)) {

Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/Mips/MipsSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "MipsFrameLowering.h"
#include "MipsISelLowering.h"
#include "MipsInstrInfo.h"
#include "MipsJITInfo.h"
#include "MipsSelectionDAGInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/MC/MCInstrItineraries.h"
Expand Down Expand Up @@ -145,7 +144,6 @@ class MipsSubtarget : public MipsGenSubtargetInfo {

const DataLayout DL; // Calculates type size & alignment
const MipsSelectionDAGInfo TSInfo;
MipsJITInfo JITInfo;
std::unique_ptr<const MipsInstrInfo> InstrInfo;
std::unique_ptr<const MipsFrameLowering> FrameLowering;
std::unique_ptr<const MipsTargetLowering> TLInfo;
Expand Down Expand Up @@ -272,7 +270,6 @@ class MipsSubtarget : public MipsGenSubtargetInfo {
void setHelperClassesMips16();
void setHelperClassesMipsSE();

MipsJITInfo *getJITInfo() override { return &JITInfo; }
const MipsSelectionDAGInfo *getSelectionDAGInfo() const override {
return &TSInfo;
}
Expand Down
7 changes: 0 additions & 7 deletions llvm/lib/Target/Mips/MipsTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,3 @@ bool MipsPassConfig::addPreEmitPass() {
addPass(createMipsConstantIslandPass(TM));
return true;
}

bool MipsTargetMachine::addCodeEmitter(PassManagerBase &PM,
JITCodeEmitter &JCE) {
// Machine code emitter pass for Mips.
PM.add(createMipsJITCodeEmitterPass(*this, JCE));
return false;
}
4 changes: 0 additions & 4 deletions llvm/lib/Target/Mips/MipsTargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ class MipsTargetMachine : public LLVMTargetMachine {
return Subtarget;
return &DefaultSubtarget;
}
MipsSubtarget *getSubtargetImpl() {
return static_cast<MipsSubtarget *>(TargetMachine::getSubtargetImpl());
}

/// \brief Reset the subtarget for the Mips target.
void resetSubtarget(MachineFunction *MF);

// Pass Pipeline Configuration
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE) override;
};

/// MipsebTargetMachine - Mips32/64 big endian target machine.
Expand Down
6 changes: 0 additions & 6 deletions llvm/lib/Target/NVPTX/NVPTXTargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ class NVPTXTargetMachine : public LLVMTargetMachine {

TargetPassConfig *createPassConfig(PassManagerBase &PM) override;

// Emission of machine code through JITCodeEmitter is not supported.
bool addPassesToEmitMachineCode(PassManagerBase &, JITCodeEmitter &,
bool = true) override {
return true;
}

// Emission of machine code through MCJIT is not supported.
bool addPassesToEmitMC(PassManagerBase &, MCContext *&, raw_ostream &,
bool = true) override {
Expand Down
5 changes: 1 addition & 4 deletions llvm/lib/Target/PowerPC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ set(LLVM_TARGET_DEFINITIONS PPC.td)

tablegen(LLVM PPCGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM PPCGenAsmMatcher.inc -gen-asm-matcher)
tablegen(LLVM PPCGenCodeEmitter.inc -gen-emitter)
tablegen(LLVM PPCGenDisassemblerTables.inc -gen-disassembler)
tablegen(LLVM PPCGenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM PPCGenMCCodeEmitter.inc -gen-emitter)
tablegen(LLVM PPCGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM PPCGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM PPCGenDAGISel.inc -gen-dag-isel)
Expand All @@ -16,15 +15,13 @@ add_public_tablegen_target(PowerPCCommonTableGen)
add_llvm_target(PowerPCCodeGen
PPCAsmPrinter.cpp
PPCBranchSelector.cpp
PPCCodeEmitter.cpp
PPCCTRLoops.cpp
PPCHazardRecognizers.cpp
PPCInstrInfo.cpp
PPCISelDAGToDAG.cpp
PPCISelLowering.cpp
PPCFastISel.cpp
PPCFrameLowering.cpp
PPCJITInfo.cpp
PPCMCInstLower.cpp
PPCMachineFunctionInfo.cpp
PPCRegisterInfo.cpp
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/PowerPC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TARGET = PPC

# Make sure that tblgen is run, first thing.
BUILT_SOURCES = PPCGenRegisterInfo.inc PPCGenAsmMatcher.inc \
PPCGenAsmWriter.inc PPCGenCodeEmitter.inc \
PPCGenAsmWriter.inc \
PPCGenInstrInfo.inc PPCGenDAGISel.inc \
PPCGenSubtargetInfo.inc PPCGenCallingConv.inc \
PPCGenMCCodeEmitter.inc PPCGenFastISel.inc \
Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/PowerPC/PPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace llvm {
class PassRegistry;
class FunctionPass;
class ImmutablePass;
class JITCodeEmitter;
class MachineInstr;
class AsmPrinter;
class MCInst;
Expand All @@ -41,8 +40,6 @@ namespace llvm {
FunctionPass *createPPCVSXFMAMutatePass();
FunctionPass *createPPCBranchSelectionPass();
FunctionPass *createPPCISelDag(PPCTargetMachine &TM);
FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM,
JITCodeEmitter &MCE);
void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
AsmPrinter &AP, bool isDarwin);

Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) {
return true;
const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();

if (TLI->supportJumpTables() &&
SI->getNumCases()+1 >= (unsigned) TLI->getMinimumJumpTableEntries())
if (SI->getNumCases() + 1 >= (unsigned)TLI->getMinimumJumpTableEntries())
return true;
}
}
Expand Down
Loading