-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[NFC][LLVM] Remove unused TargetIntrinsicInfo class
#126003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Resurrecting this old PR: #111762 given my earlier efforts to compile only intrinsics for enabled target did not succeed. I couldn't use that PR as it was stuck in github "Processing Updates" and seems the workaround is to just create a new PR. |
|
@llvm/pr-subscribers-llvm-selectiondag @llvm/pr-subscribers-backend-nvptx Author: Rahul Joshi (jurahul) ChangesRemove Patch is 31.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/126003.diff 19 Files Affected:
diff --git a/llvm/include/llvm/CodeGen/MachineOperand.h b/llvm/include/llvm/CodeGen/MachineOperand.h
index 3ec46afa781ab68..b4e704654495c7c 100644
--- a/llvm/include/llvm/CodeGen/MachineOperand.h
+++ b/llvm/include/llvm/CodeGen/MachineOperand.h
@@ -32,7 +32,6 @@ class MachineRegisterInfo;
class MCCFIInstruction;
class MDNode;
class ModuleSlotTracker;
-class TargetIntrinsicInfo;
class TargetRegisterInfo;
class hash_code;
class raw_ostream;
@@ -283,8 +282,7 @@ class MachineOperand {
/// Providing a valid \p TRI and \p IntrinsicInfo results in a more
/// target-specific printing. If \p TRI and \p IntrinsicInfo are null, the
/// function will try to pick it up from the parent.
- void print(raw_ostream &os, const TargetRegisterInfo *TRI = nullptr,
- const TargetIntrinsicInfo *IntrinsicInfo = nullptr) const;
+ void print(raw_ostream &os, const TargetRegisterInfo *TRI = nullptr) const;
/// More complex way of printing a MachineOperand.
/// \param TypeToPrint specifies the generic type to be printed on uses and
@@ -310,14 +308,12 @@ class MachineOperand {
void print(raw_ostream &os, ModuleSlotTracker &MST, LLT TypeToPrint,
std::optional<unsigned> OpIdx, bool PrintDef, bool IsStandalone,
bool ShouldPrintRegisterTies, unsigned TiedOperandIdx,
- const TargetRegisterInfo *TRI,
- const TargetIntrinsicInfo *IntrinsicInfo) const;
+ const TargetRegisterInfo *TRI) const;
/// Same as print(os, TRI, IntrinsicInfo), but allows to specify the low-level
/// type to be printed the same way the full version of print(...) does it.
void print(raw_ostream &os, LLT TypeToPrint,
- const TargetRegisterInfo *TRI = nullptr,
- const TargetIntrinsicInfo *IntrinsicInfo = nullptr) const;
+ const TargetRegisterInfo *TRI = nullptr) const;
void dump() const;
diff --git a/llvm/include/llvm/Target/TargetIntrinsicInfo.h b/llvm/include/llvm/Target/TargetIntrinsicInfo.h
deleted file mode 100644
index dc59f11c8d9a136..000000000000000
--- a/llvm/include/llvm/Target/TargetIntrinsicInfo.h
+++ /dev/null
@@ -1,68 +0,0 @@
-//===-- llvm/Target/TargetIntrinsicInfo.h - Instruction Info ----*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file describes the target intrinsic instructions to the code generator.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TARGET_TARGETINTRINSICINFO_H
-#define LLVM_TARGET_TARGETINTRINSICINFO_H
-
-#include "llvm/ADT/StringRef.h"
-#include <string>
-
-namespace llvm {
-
-class Function;
-class Module;
-class Type;
-
-//---------------------------------------------------------------------------
-///
-/// TargetIntrinsicInfo - Interface to description of machine instruction set
-///
-class TargetIntrinsicInfo {
- TargetIntrinsicInfo(const TargetIntrinsicInfo &) = delete;
- void operator=(const TargetIntrinsicInfo &) = delete;
-public:
- TargetIntrinsicInfo();
- virtual ~TargetIntrinsicInfo();
-
- /// Return the name of a target intrinsic, e.g. "llvm.bfin.ssync".
- /// The Tys and numTys parameters are for intrinsics with overloaded types
- /// (e.g., those using iAny or fAny). For a declaration for an overloaded
- /// intrinsic, Tys should point to an array of numTys pointers to Type,
- /// and must provide exactly one type for each overloaded type in the
- /// intrinsic.
- virtual std::string getName(unsigned IID, Type **Tys = nullptr,
- unsigned numTys = 0) const = 0;
-
- /// Look up target intrinsic by name. Return intrinsic ID or 0 for unknown
- /// names.
- virtual unsigned lookupName(const char *Name, unsigned Len) const =0;
-
- unsigned lookupName(StringRef Name) const {
- return lookupName(Name.data(), Name.size());
- }
-
- /// Return the target intrinsic ID of a function, or 0.
- virtual unsigned getIntrinsicID(const Function *F) const;
-
- /// Returns true if the intrinsic can be overloaded.
- virtual bool isOverloaded(unsigned IID) const = 0;
-
- /// Create or insert an LLVM Function declaration for an intrinsic,
- /// and return it. The Tys and numTys are for intrinsics with overloaded
- /// types. See above for more information.
- virtual Function *getDeclaration(Module *M, unsigned ID, Type **Tys = nullptr,
- unsigned numTys = 0) const = 0;
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index b1ec0b9c07c17d9..27eeb415ed64487 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -55,7 +55,6 @@ class ScheduleDAGInstrs;
class SMDiagnostic;
class SMRange;
class Target;
-class TargetIntrinsicInfo;
class TargetIRAnalysis;
class TargetTransformInfo;
class TargetLoweringObjectFile;
@@ -242,11 +241,6 @@ class TargetMachine {
const MCInstrInfo *getMCInstrInfo() const { return MII.get(); }
const MCSubtargetInfo *getMCSubtargetInfo() const { return STI.get(); }
- /// If intrinsic information is available, return it. If not, return null.
- virtual const TargetIntrinsicInfo *getIntrinsicInfo() const {
- return nullptr;
- }
-
bool requiresStructuredCFG() const { return RequireStructuredCFG; }
void setRequiresStructuredCFG(bool Value) { RequireStructuredCFG = Value; }
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 362d856e76a8aa7..d01de29826cad3c 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -79,7 +79,6 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/MemoryOpRemark.h"
@@ -2758,7 +2757,6 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
return false;
const CallInst &CI = cast<CallInst>(U);
- auto TII = MF->getTarget().getIntrinsicInfo();
const Function *F = CI.getCalledFunction();
// FIXME: support Windows dllimport function calls and calls through
@@ -2782,11 +2780,8 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
diagnoseDontCall(CI);
Intrinsic::ID ID = Intrinsic::not_intrinsic;
- if (F && F->isIntrinsic()) {
+ if (F && F->isIntrinsic())
ID = F->getIntrinsicID();
- if (TII && ID == Intrinsic::not_intrinsic)
- ID = static_cast<Intrinsic::ID>(TII->getIntrinsicID(F));
- }
if (!F || !F->isIntrinsic() || ID == Intrinsic::not_intrinsic)
return translateCallBase(CI, MIRBuilder);
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index b44e1e10fef91cc..a4e513d05f9cd01 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -66,7 +66,6 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cctype>
@@ -2669,13 +2668,8 @@ bool MIParser::parseIntrinsicOperand(MachineOperand &Dest) {
if (expectAndConsume(MIToken::rparen))
return error("expected ')' to terminate intrinsic name");
- // Find out what intrinsic we're dealing with, first try the global namespace
- // and then the target's private intrinsics if that fails.
- const TargetIntrinsicInfo *TII = MF.getTarget().getIntrinsicInfo();
+ // Find out what intrinsic we're dealing with.
Intrinsic::ID ID = Intrinsic::lookupIntrinsicID(Name);
- if (ID == Intrinsic::not_intrinsic && TII)
- ID = static_cast<Intrinsic::ID>(TII->lookupName(Name));
-
if (ID == Intrinsic::not_intrinsic)
return error("unknown intrinsic name");
Dest = MachineOperand::CreateIntrinsicID(ID);
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 0b41c90442a5d2a..9b7c30fe7fe3df3 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -1007,10 +1007,9 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx,
unsigned TiedOperandIdx = 0;
if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef())
TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx);
- const TargetIntrinsicInfo *TII = MI.getMF()->getTarget().getIntrinsicInfo();
Op.print(OS, MST, TypeToPrint, OpIdx, PrintDef, /*IsStandalone=*/false,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI, TII);
- OS << formatOperandComment(MOComment);
+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
+ OS << formatOperandComment(MOComment);
break;
}
case MachineOperand::MO_FrameIndex:
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index a9f756b68436030..52c977a3651a3cf 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -70,18 +70,15 @@ static const MachineFunction *getMFIfAvailable(const MachineInstr &MI) {
return nullptr;
}
-// Try to crawl up to the machine function and get TRI and IntrinsicInfo from
-// it.
+// Try to crawl up to the machine function and get TRI/MRI/TII from it.
static void tryToGetTargetInfo(const MachineInstr &MI,
const TargetRegisterInfo *&TRI,
const MachineRegisterInfo *&MRI,
- const TargetIntrinsicInfo *&IntrinsicInfo,
const TargetInstrInfo *&TII) {
if (const MachineFunction *MF = getMFIfAvailable(MI)) {
TRI = MF->getSubtarget().getRegisterInfo();
MRI = &MF->getRegInfo();
- IntrinsicInfo = MF->getTarget().getIntrinsicInfo();
TII = MF->getSubtarget().getInstrInfo();
}
}
@@ -1753,8 +1750,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
// We can be a bit tidier if we know the MachineFunction.
const TargetRegisterInfo *TRI = nullptr;
const MachineRegisterInfo *MRI = nullptr;
- const TargetIntrinsicInfo *IntrinsicInfo = nullptr;
- tryToGetTargetInfo(*this, TRI, MRI, IntrinsicInfo, TII);
+ tryToGetTargetInfo(*this, TRI, MRI, TII);
if (isCFIInstruction())
assert(getNumOperands() == 1 && "Expected 1 operand in CFI instruction");
@@ -1784,7 +1780,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
LLT TypeToPrint = MRI ? getTypeToPrint(StartOp, PrintedTypes, *MRI) : LLT{};
unsigned TiedOperandIdx = getTiedOperandIdx(StartOp);
MO.print(OS, MST, TypeToPrint, StartOp, /*PrintDef=*/false, IsStandalone,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
++StartOp;
}
@@ -1846,9 +1842,9 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
const unsigned OpIdx = InlineAsm::MIOp_AsmString;
LLT TypeToPrint = MRI ? getTypeToPrint(OpIdx, PrintedTypes, *MRI) : LLT{};
unsigned TiedOperandIdx = getTiedOperandIdx(OpIdx);
- getOperand(OpIdx).print(OS, MST, TypeToPrint, OpIdx, /*PrintDef=*/true, IsStandalone,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI,
- IntrinsicInfo);
+ getOperand(OpIdx).print(OS, MST, TypeToPrint, OpIdx, /*PrintDef=*/true,
+ IsStandalone, ShouldPrintRegisterTies,
+ TiedOperandIdx, TRI);
// Print HasSideEffects, MayLoad, MayStore, IsAlignStack
unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm();
@@ -1886,7 +1882,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
LLT TypeToPrint = MRI ? getTypeToPrint(i, PrintedTypes, *MRI) : LLT{};
unsigned TiedOperandIdx = getTiedOperandIdx(i);
MO.print(OS, MST, TypeToPrint, i, /*PrintDef=*/true, IsStandalone,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
}
} else if (isDebugLabel() && MO.isMetadata()) {
// Pretty print DBG_LABEL instructions.
@@ -1897,7 +1893,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
LLT TypeToPrint = MRI ? getTypeToPrint(i, PrintedTypes, *MRI) : LLT{};
unsigned TiedOperandIdx = getTiedOperandIdx(i);
MO.print(OS, MST, TypeToPrint, i, /*PrintDef=*/true, IsStandalone,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
}
} else if (i == AsmDescOp && MO.isImm()) {
// Pretty print the inline asm operand descriptor.
@@ -1941,7 +1937,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
MachineOperand::printSubRegIdx(OS, MO.getImm(), TRI);
else
MO.print(OS, MST, TypeToPrint, i, /*PrintDef=*/true, IsStandalone,
- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
}
}
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index f498491164e14fa..231d66607b700b4 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -27,7 +27,6 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/MC/MCDwarf.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include <optional>
@@ -450,14 +449,11 @@ hash_code llvm::hash_value(const MachineOperand &MO) {
llvm_unreachable("Invalid machine operand type");
}
-// Try to crawl up to the machine function and get TRI and IntrinsicInfo from
-// it.
+// Try to crawl up to the machine function and get TRI from it.
static void tryToGetTargetInfo(const MachineOperand &MO,
- const TargetRegisterInfo *&TRI,
- const TargetIntrinsicInfo *&IntrinsicInfo) {
+ const TargetRegisterInfo *&TRI) {
if (const MachineFunction *MF = getMFIfAvailable(MO)) {
TRI = MF->getSubtarget().getRegisterInfo();
- IntrinsicInfo = MF->getTarget().getIntrinsicInfo();
}
}
@@ -781,20 +777,19 @@ static void printCFI(raw_ostream &OS, const MCCFIInstruction &CFI,
}
}
-void MachineOperand::print(raw_ostream &OS, const TargetRegisterInfo *TRI,
- const TargetIntrinsicInfo *IntrinsicInfo) const {
- print(OS, LLT{}, TRI, IntrinsicInfo);
+void MachineOperand::print(raw_ostream &OS,
+ const TargetRegisterInfo *TRI) const {
+ print(OS, LLT{}, TRI);
}
void MachineOperand::print(raw_ostream &OS, LLT TypeToPrint,
- const TargetRegisterInfo *TRI,
- const TargetIntrinsicInfo *IntrinsicInfo) const {
- tryToGetTargetInfo(*this, TRI, IntrinsicInfo);
+ const TargetRegisterInfo *TRI) const {
+ tryToGetTargetInfo(*this, TRI);
ModuleSlotTracker DummyMST(nullptr);
print(OS, DummyMST, TypeToPrint, std::nullopt, /*PrintDef=*/false,
/*IsStandalone=*/true,
/*ShouldPrintRegisterTies=*/true,
- /*TiedOperandIdx=*/0, TRI, IntrinsicInfo);
+ /*TiedOperandIdx=*/0, TRI);
}
void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
@@ -802,8 +797,7 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
bool PrintDef, bool IsStandalone,
bool ShouldPrintRegisterTies,
unsigned TiedOperandIdx,
- const TargetRegisterInfo *TRI,
- const TargetIntrinsicInfo *IntrinsicInfo) const {
+ const TargetRegisterInfo *TRI) const {
printTargetFlags(OS, *this);
switch (getType()) {
case MachineOperand::MO_Register: {
@@ -1004,8 +998,6 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
Intrinsic::ID ID = getIntrinsicID();
if (ID < Intrinsic::num_intrinsics)
OS << "intrinsic(@" << Intrinsic::getBaseName(ID) << ')';
- else if (IntrinsicInfo)
- OS << "intrinsic(@" << IntrinsicInfo->getName(ID) << ')';
else
OS << "intrinsic(" << ID << ')';
break;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 4e1ce6af3abc846..82f4b0d4a47a3c1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -97,7 +97,6 @@
#include "llvm/Support/InstructionCost.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/TargetParser/Triple.h"
@@ -9360,13 +9359,8 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
if (Function *F = I.getCalledFunction()) {
if (F->isDeclaration()) {
- // Is this an LLVM intrinsic or a target-specific intrinsic?
- unsigned IID = F->getIntrinsicID();
- if (!IID)
- if (const TargetIntrinsicInfo *II = TM.getIntrinsicInfo())
- IID = II->getIntrinsicID(F);
-
- if (IID) {
+ // Is this an LLVM intrinsic?
+ if (unsigned IID = F->getIntrinsicID()) {
visitIntrinsicCall(I, IID);
return;
}
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
index f63c8dd3df1c838..32532d399aac6f7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
@@ -43,7 +43,6 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Printable.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include <cstdint>
#include <iterator>
@@ -164,8 +163,6 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const {
return Intrinsic::getBaseName((Intrinsic::ID)IID).str();
if (!G)
return "Unknown intrinsic";
- if (const TargetIntrinsicInfo *TII = G->getTarget().getIntrinsicInfo())
- return TII->getName(IID);
llvm_unreachable("Invalid intrinsic ID");
}
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 66db2ae993de872..61e5aa270bc11cf 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -98,7 +98,6 @@
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
@@ -4424,8 +4423,6 @@ void SelectionDAGISel::CannotYetSelect(SDNode *N) {
unsigned iid = N->getConstantOperandVal(HasInputChain);
if (iid < Intrinsic::num_intrinsics)
Msg << "intrinsic %" << Intrinsic::getBaseName((Intrinsic::ID)iid);
- else if (const TargetIntrinsicInfo *TII = TM.getIntrinsicInfo())
- Msg << "target intrinsic %" << TII->getName(iid);
else
Msg << "unknown intrinsic #" << iid;
}
diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt
index 2739233f9ccb3d6..9472288229cac66 100644
--- a/llvm/lib/Target/CMakeLists.txt
+++ b/llvm/lib/Target/CMakeLists.txt
@@ -4,7 +4,6 @@ list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target)
add_llvm_component_library(LLVMTarget
Target.cpp
- TargetIntrinsicInfo.cpp
TargetLoweringObjectFile.cpp
TargetMachine.cpp
TargetMachineC.cpp
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/llvm/lib/Target/NVPTX/NVPTXISelD...
[truncated]
|
|
Can we remove this immediately or do we need to deprecate it for a release cycle? Either way it needs to be documented in the llvm Release Notes |
I am not sure if there are any downstream users. I'll update release notes and post on the forum as well. @nikic is that sufficient, or should we follow more rigor here (i.e, deprecate it in some way) and delete in later? |
|
Note that this file/API was last updated in any meaningful way in 2009 and has since then not changed. Hence the guess that it is unused at this point. |
I started https://discourse.llvm.org/t/removing-targetintrinsicinfo-support/84470 |
|
For reference, this was introduced in 6ae3aa8.
I think that's fine. There's no need to deprecate unless the API is widely used, which does not seem to be the case here. |
|
Target APIs get thrashed regularly without warning for out of tree targets. I don't see why this particular case warrants additional attention over others |
|
Sounds good. I’ll add this to release notes and update the PR.
…On Thu, Feb 6, 2025 at 7:49 AM Matt Arsenault ***@***.***> wrote:
Target APIs get thrashed regularly without warning for out of tree
targets. I don't see why this particular case warrants additional attention
over others
—
Reply to this email directly, view it on GitHub
<#126003 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APRMUBYT6C43HOJESMROVE32OOACLAVCNFSM6AAAAABWSULVLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBQGIYDMNZQHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
7af482d to
ec4bfd8
Compare
|
Added a note in Release notes (under LLVM Infrastructure) |
arsenm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release note could use some rewording
Remove `TargetIntrinsicInfo` class as its practically unused (its pure virtual with no subclasses) and its references in the code.
ec4bfd8 to
ab4603a
Compare
rnk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this with a release note update. I think as far as disruptive C++ API update changes go, this is pretty minor. The intrinsic files today are more pluggable than they were when this interface was conceived.
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/15541 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22485 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2267 Here is the relevant piece of the build log for the reference |
Remove `TargetIntrinsicInfo` class as its practically unused (its pure virtual with no subclasses) and its references in the code.
Remove `TargetIntrinsicInfo` class as its practically unused (its pure virtual with no subclasses) and its references in the code.
Remove `TargetIntrinsicInfo` class as its practically unused (its pure virtual with no subclasses) and its references in the code.
Stop mentioning nonexistent parameter in comment. The parameter was removed in llvm#126003 .
Don't mention nonexistent parameter in comment. The parameter was removed in #126003 .
Don't mention nonexistent parameter in comment. The parameter was removed in llvm/llvm-project#126003 .
Remove
TargetIntrinsicInfoclass as its practically unused (its pure virtual with no subclasses) and its references in the code.