From 09a6739ae57e20129d5783489c3d41d9114fa8e2 Mon Sep 17 00:00:00 2001 From: Xin Tong Date: Mon, 18 Mar 2024 22:23:21 -0700 Subject: [PATCH] Remove unused code.[NFC] Differential Revision: D54888372 --- lib/LLVMIRCodeGen/BundleSaver.cpp | 2 -- lib/LLVMIRCodeGen/LLVMBackend.cpp | 4 ---- 2 files changed, 6 deletions(-) diff --git a/lib/LLVMIRCodeGen/BundleSaver.cpp b/lib/LLVMIRCodeGen/BundleSaver.cpp index 0504904f5d..2bbbcab1dd 100644 --- a/lib/LLVMIRCodeGen/BundleSaver.cpp +++ b/lib/LLVMIRCodeGen/BundleSaver.cpp @@ -173,8 +173,6 @@ BundleSaver::BundleSaver(const LLVMBackend &llvmBackend, llvm::StringRef outputDir, llvm::StringRef bundleName) : irgen_(llvmBackend.createIRGen(nullptr, allocationsInfo_)), bundleAPI_(llvmBackend.getOptions().getBundleAPI()) { - llvm::SmallVector targetFeatures(llvmTargetFeatures.begin(), - llvmTargetFeatures.end()); irgen_->setBundleName(bundleName.str()); irgen_->setOutputDir(outputDir); irgen_->setObjectRegistry(llvmBackend.getObjectRegistry()); diff --git a/lib/LLVMIRCodeGen/LLVMBackend.cpp b/lib/LLVMIRCodeGen/LLVMBackend.cpp index 7acba1d720..f3b89d220e 100644 --- a/lib/LLVMIRCodeGen/LLVMBackend.cpp +++ b/lib/LLVMIRCodeGen/LLVMBackend.cpp @@ -688,8 +688,6 @@ std::unique_ptr LLVMBackend::compileIRWithoutConstants(IRFunction *IR) const { AllocationsInfo allocationsInfo; std::unique_ptr irgen = createIRGen(IR, allocationsInfo); - llvm::SmallVector targetFeatures(llvmTargetFeatures.begin(), - llvmTargetFeatures.end()); irgen->initTargetMachine(getOptions()); irgen->initCodeGen(); irgen->setIRFunction(IR); @@ -736,8 +734,6 @@ LLVMBackend::compile(Function *F, const BackendOptions &opts) const { void LLVMBackend::save(Function *F, llvm::StringRef outputDir, llvm::StringRef bundleName, llvm::StringRef mainEntryName) const { - llvm::SmallVector targetFeatures(llvmTargetFeatures.begin(), - llvmTargetFeatures.end()); auto IR = generateAndOptimizeIR(F, *this, shouldShareBuffers()); auto bundleSaver = createBundleSaver(*this, outputDir, bundleName); bundleSaver->save(mainEntryName, IR.get());