Remove unused data members, parameters, includes.

(cherry picked from commit 872d7c14d8c8e2883ed20a0b6c66a4bbafa4237d)
This commit is contained in:
Axel Naumann 2022-09-20 16:06:12 +02:00 committed by jenkins
parent a319dbff2d
commit 3675713fee
4 changed files with 7 additions and 25 deletions

View File

@ -208,7 +208,6 @@ namespace {
// declarations. This reduces the amount of emitted symbols.
class ReuseExistingWeakSymbols : public ModulePass {
static char ID;
cling::IncrementalJIT& m_JIT;
bool runOnGlobal(GlobalValue& GV) {
if (GV.isDeclaration())
@ -245,8 +244,8 @@ namespace {
}
public:
ReuseExistingWeakSymbols(cling::IncrementalJIT& JIT) :
ModulePass(ID), m_JIT(JIT) {}
ReuseExistingWeakSymbols() :
ModulePass(ID) {}
bool runOnModule(Module &M) override {
bool ret = false;
@ -263,15 +262,9 @@ char ReuseExistingWeakSymbols::ID = 0;
BackendPasses::BackendPasses(const clang::CodeGenOptions &CGOpts,
const clang::TargetOptions & /*TOpts*/,
const clang::LangOptions & /*LOpts*/,
llvm::TargetMachine& TM,
cling::IncrementalJIT& JIT):
llvm::TargetMachine& TM):
m_TM(TM),
m_CGOpts(CGOpts),
//m_TOpts(TOpts),
//m_LOpts(LOpts)
m_JIT(JIT)
m_CGOpts(CGOpts)
{}
@ -347,7 +340,7 @@ void BackendPasses::CreatePasses(llvm::Module& M, int OptLevel)
m_MPM[OptLevel]->add(new KeepLocalGVPass());
m_MPM[OptLevel]->add(new WeakTypeinfoVTablePass());
m_MPM[OptLevel]->add(new ReuseExistingWeakSymbols(m_JIT));
m_MPM[OptLevel]->add(new ReuseExistingWeakSymbols());
// The function __cuda_module_ctor and __cuda_module_dtor will just generated,
// if a CUDA fatbinary file exist. Without file path there is no need for the

View File

@ -45,18 +45,12 @@ namespace cling {
llvm::TargetMachine& m_TM;
const clang::CodeGenOptions &m_CGOpts;
//const clang::TargetOptions &m_TOpts;
//const clang::LangOptions &m_LOpts;
IncrementalJIT &m_JIT;
void CreatePasses(llvm::Module& M, int OptLevel);
public:
BackendPasses(const clang::CodeGenOptions &CGOpts,
const clang::TargetOptions & /*TOpts*/,
const clang::LangOptions & /*LOpts*/,
llvm::TargetMachine& TM,
cling::IncrementalJIT& JIT);
llvm::TargetMachine& TM);
~BackendPasses();
void runOnModule(llvm::Module& M, int OptLevel);

View File

@ -131,11 +131,7 @@ IncrementalExecutor::IncrementalExecutor(clang::DiagnosticsEngine& /*diags*/,
llvm_unreachable("Propagate this error and exit gracefully");
}
m_BackendPasses.reset(new BackendPasses(CI.getCodeGenOpts(),
CI.getTargetOpts(),
CI.getLangOpts(),
TMRef,
*m_JIT));
m_BackendPasses.reset(new BackendPasses(CI.getCodeGenOpts(), TMRef));
}
IncrementalExecutor::~IncrementalExecutor() {}

View File

@ -11,7 +11,6 @@
#include "ASTTransformer.h"
#include "AutoSynthesizer.h"
#include "BackendPasses.h"
#include "CheckEmptyTransactionTransformer.h"
#include "ClingPragmas.h"
#include "DeclCollector.h"