-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[DebugInfo][RemoveDIs] Delete debug-info-format flag #143746
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
This flag was used to let us incrementally introduce debug intrinsics into LLVM, however everything is now using intrinsics. It serves no purpose now, so delete it.
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-llvm-ir Author: Jeremy Morse (jmorse) ChangesThis flag was used to let us incrementally introduce debug intrinsics into LLVM, however everything is now using intrinsics. It serves no purpose now, so delete it. Patch is 42.58 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143746.diff 33 Files Affected:
diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 07444cd6779e1..c24f01fe26cc8 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -63,9 +63,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
public:
using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>,
ilist_parent<BasicBlock>>;
- /// Flag recording whether or not this block stores debug-info in the form
- /// of intrinsic instructions (false) or non-instruction records (true).
- bool IsNewDbgInfoFormat;
private:
// Allow Function to renumber blocks.
@@ -95,12 +92,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
/// IsNewDbgInfoFormat = false.
LLVM_ABI void convertFromNewDbgValues();
- /// Ensure the block is in "old" dbg.value format (\p NewFlag == false) or
- /// in the new format (\p NewFlag == true), converting to the desired format
- /// if necessary.
- LLVM_ABI void setIsNewDbgInfoFormat(bool NewFlag);
- LLVM_ABI void setNewDbgInfoFormatFlag(bool NewFlag);
-
unsigned getNumber() const {
assert(getParent() && "only basic blocks in functions have valid numbers");
return Number;
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h
index f24d03635731e..c361be3e752a9 100644
--- a/llvm/include/llvm/IR/Function.h
+++ b/llvm/include/llvm/IR/Function.h
@@ -111,11 +111,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
friend class SymbolTableListTraits<Function>;
public:
- /// Is this function using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// hasLazyArguments/CheckLazyArguments - The argument list of a function is
/// built on demand, so that the list isn't allocated until the first client
/// needs it. The hasLazyArguments predicate returns true if the arg list
@@ -130,9 +125,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// \see BasicBlock::convertFromNewDbgValues.
void convertFromNewDbgValues();
- void setIsNewDbgInfoFormat(bool NewVal);
- void setNewDbgInfoFormatFlag(bool NewVal);
-
private:
friend class TargetLibraryInfoImpl;
@@ -760,7 +752,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// to the newly inserted BB.
Function::iterator insert(Function::iterator Position, BasicBlock *BB) {
Function::iterator FIt = BasicBlocks.insert(Position, BB);
- BB->setIsNewDbgInfoFormat(IsNewDbgInfoFormat);
return FIt;
}
diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h
index 7a26efb74b324..f4420f460741b 100644
--- a/llvm/include/llvm/IR/Module.h
+++ b/llvm/include/llvm/IR/Module.h
@@ -215,11 +215,6 @@ class LLVM_ABI Module {
/// @name Constructors
/// @{
public:
- /// Is this Module using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// Used when printing this module in the new debug info format; removes all
/// declarations of debug intrinsics that are replaced by non-intrinsic
/// records in the new format.
@@ -230,7 +225,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertToNewDbgValues();
}
- IsNewDbgInfoFormat = true;
}
/// \see BasicBlock::convertFromNewDbgValues.
@@ -238,20 +232,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertFromNewDbgValues();
}
- IsNewDbgInfoFormat = false;
- }
-
- void setIsNewDbgInfoFormat(bool UseNewFormat) {
- if (UseNewFormat && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!UseNewFormat && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
- }
- void setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &F : *this) {
- F.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
}
/// The Module constructor. Note that there is no default constructor. You
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 5c007dcf00224..926dc6211eb8d 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -441,8 +441,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
UpgradeNVVMAnnotations(*M);
UpgradeSectionAttributes(*M);
- M->setIsNewDbgInfoFormat(true);
-
if (!Slots)
return false;
// Initialize the slot mapping.
@@ -6906,8 +6904,6 @@ bool LLParser::parseBasicBlock(PerFunctionState &PFS) {
if (SeenOldDbgInfoFormat)
return error(Lex.getLoc(), "debug record should not appear in a module "
"containing debug info intrinsics");
- if (!SeenNewDbgInfoFormat)
- M->setNewDbgInfoFormatFlag(true);
SeenNewDbgInfoFormat = true;
Lex.Lex();
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 31129b7e5cf77..fde934fbb3cf1 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4479,10 +4479,6 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
Error BitcodeReader::parseModule(uint64_t ResumeBit,
bool ShouldLazyLoadMetadata,
ParserCallbacks Callbacks) {
- // Don't allow modules to use debug-intrinsics: autoupgrading them is now
- // mandatory.
- TheModule->IsNewDbgInfoFormat = true;
-
this->ValueTypeCallback = std::move(Callbacks.ValueType);
if (ResumeBit) {
if (Error JumpFailed = Stream.JumpToBit(ResumeBit))
@@ -6994,10 +6990,6 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
if (Error JumpFailed = Stream.JumpToBit(DFII->second))
return JumpFailed;
- // Regardless of the debug info format we want to end up in, we need
- // IsNewDbgInfoFormat=true to construct any debug records seen in the bitcode.
- F->IsNewDbgInfoFormat = true;
-
if (Error Err = parseFunctionBody(F))
return Err;
F->setIsMaterializable(false);
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 32348a899683d..3792b456c836e 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -3335,8 +3335,7 @@ class TypePromotionTransaction {
// Record where we would have to re-insert the instruction in the sequence
// of DbgRecords, if we ended up reinserting.
- if (BB->IsNewDbgInfoFormat)
- BeforeDbgRecord = Inst->getDbgReinsertionPosition();
+ BeforeDbgRecord = Inst->getDbgReinsertionPosition();
if (HasPrevInstruction) {
Point.PrevInst = std::prev(Inst->getIterator());
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 62a75313bb171..49a4b9c17cc29 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -52,8 +52,6 @@ DbgMarker *BasicBlock::createMarker(InstListType::iterator It) {
}
void BasicBlock::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
-
// Iterate over all instructions in the instruction list, collecting debug
// info intrinsics and converting them to DbgRecords. Once we find a "real"
// instruction, attach all those DbgRecords to a DbgMarker in that
@@ -91,7 +89,6 @@ void BasicBlock::convertToNewDbgValues() {
void BasicBlock::convertFromNewDbgValues() {
invalidateOrders();
- IsNewDbgInfoFormat = false;
// Iterate over the block, finding instructions annotated with DbgMarkers.
// Convert any attached DbgRecords to debug intrinsics and insert ahead of the
@@ -126,16 +123,6 @@ void BasicBlock::dumpDbgValues() const {
}
#endif
-void BasicBlock::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void BasicBlock::setNewDbgInfoFormatFlag(bool NewFlag) {
- IsNewDbgInfoFormat = NewFlag;
-}
-
ValueSymbolTable *BasicBlock::getValueSymbolTable() {
if (Function *F = getParent())
return F->getValueSymbolTable();
@@ -158,7 +145,7 @@ template class llvm::SymbolTableListTraits<
BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
BasicBlock *InsertBefore)
: Value(Type::getLabelTy(C), Value::BasicBlockVal),
- IsNewDbgInfoFormat(true), Parent(nullptr) {
+ Parent(nullptr) {
if (NewParent)
insertInto(NewParent, InsertBefore);
@@ -168,8 +155,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
end().getNodePtr()->setParent(this);
setName(Name);
- if (NewParent)
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
@@ -180,8 +165,6 @@ void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
NewParent->insert(InsertBefore->getIterator(), this);
else
NewParent->insert(NewParent->end(), this);
-
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
BasicBlock::~BasicBlock() {
@@ -725,10 +708,6 @@ void BasicBlock::flushTerminatorDbgRecords() {
// check whether there's anything trailing at the end and move those
// DbgRecords in front of the terminator.
- // Do nothing if we're not in new debug-info format.
- if (!IsNewDbgInfoFormat)
- return;
-
// If there's no terminator, there's nothing to do.
Instruction *Term = getTerminator();
if (!Term)
@@ -765,10 +744,6 @@ void BasicBlock::spliceDebugInfoEmptyBlock(BasicBlock::iterator Dest,
// in the iterators whether there was the intention to transfer any debug
// info.
- // If we're not in "new" debug-info format, do nothing.
- if (!IsNewDbgInfoFormat)
- return;
-
assert(First == Last);
bool InsertAtHead = Dest.getHeadBit();
bool ReadFromHead = First.getHeadBit();
@@ -1029,8 +1004,6 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src,
void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
iterator Last) {
- assert(Src->IsNewDbgInfoFormat == IsNewDbgInfoFormat);
-
#ifdef EXPENSIVE_CHECKS
// Check that First is before Last.
auto FromBBEnd = Src->end();
@@ -1045,9 +1018,7 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
return;
}
- // Handle non-instr debug-info specific juggling.
- if (IsNewDbgInfoFormat)
- spliceDebugInfo(Dest, Src, First, Last);
+ spliceDebugInfo(Dest, Src, First, Last);
// And move the instructions.
getInstList().splice(Dest, Src->getInstList(), First, Last);
@@ -1056,7 +1027,6 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
}
void BasicBlock::insertDbgRecordAfter(DbgRecord *DR, Instruction *I) {
- assert(IsNewDbgInfoFormat);
assert(I->getParent() == this);
iterator NextIt = std::next(I->getIterator());
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index a7c3a56dcc22a..2a808d4179525 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -432,11 +432,13 @@ void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior,
}
LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M) {
- return unwrap(M)->IsNewDbgInfoFormat;
+ return true;
}
void LLVMSetIsNewDbgInfoFormat(LLVMModuleRef M, LLVMBool UseNewFormat) {
- unwrap(M)->setIsNewDbgInfoFormat(UseNewFormat);
+ if (!UseNewFormat)
+ llvm_unreachable("LLVM no longer supports intrinsic based debug-info");
+ (void)M;
}
/*--.. Printing modules ....................................................--*/
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 493dec72d45af..28fb81055baf4 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -87,32 +87,17 @@ void Function::validateBlockNumbers() const {
}
void Function::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
for (auto &BB : *this) {
BB.convertToNewDbgValues();
}
}
void Function::convertFromNewDbgValues() {
- IsNewDbgInfoFormat = false;
for (auto &BB : *this) {
BB.convertFromNewDbgValues();
}
}
-void Function::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void Function::setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &BB : *this) {
- BB.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
-}
-
//===----------------------------------------------------------------------===//
// Argument Implementation
//===----------------------------------------------------------------------===//
@@ -490,7 +475,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
const Twine &name, Module *ParentModule)
: GlobalObject(Ty, Value::FunctionVal, AllocMarker, Linkage, name,
computeAddrSpace(AddrSpace, ParentModule)),
- NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(true) {
+ NumArgs(Ty->getNumParams()) {
assert(FunctionType::isValidReturnType(getReturnType()) &&
"invalid return type");
setGlobalObjectSubClassData(0);
@@ -505,7 +490,6 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
if (ParentModule) {
ParentModule->getFunctionList().push_back(this);
- IsNewDbgInfoFormat = ParentModule->IsNewDbgInfoFormat;
}
HasLLVMReservedName = getName().starts_with("llvm.");
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index 109d516c61b7c..1b60caab6c11a 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -86,7 +86,7 @@ void Instruction::removeFromParent() {
}
void Instruction::handleMarkerRemoval() {
- if (!getParent()->IsNewDbgInfoFormat || !DebugMarker)
+ if (!DebugMarker)
return;
DebugMarker->removeMarker();
@@ -136,9 +136,6 @@ void Instruction::insertBefore(BasicBlock &BB,
BB.getInstList().insert(InsertPos, this);
- if (!BB.IsNewDbgInfoFormat)
- return;
-
// We've inserted "this": if InsertAtHead is set then it comes before any
// DbgVariableRecords attached to InsertPos. But if it's not set, then any
// DbgRecords should now come before "this".
@@ -226,7 +223,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// If we've been given the "Preserve" flag, then just move the DbgRecords with
// the instruction, no more special handling needed.
- if (BB.IsNewDbgInfoFormat && DebugMarker && !Preserve) {
+ if (DebugMarker && !Preserve) {
if (I != this->getIterator() || InsertAtHead) {
// "this" is definitely moving in the list, or it's moving ahead of its
// attached DbgVariableRecords. Detach any existing DbgRecords.
@@ -238,7 +235,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// the block splicer, which will do more debug-info things.
BB.getInstList().splice(I, getParent()->getInstList(), getIterator());
- if (BB.IsNewDbgInfoFormat && !Preserve) {
+ if (!Preserve) {
DbgMarker *NextMarker = getParent()->getNextMarker(this);
// If we're inserting at point I, and not in front of the DbgRecords
@@ -258,10 +255,6 @@ iterator_range<DbgRecord::self_iterator> Instruction::cloneDebugInfoFrom(
if (!From->DebugMarker)
return DbgMarker::getEmptyDbgRecordRange();
- assert(getParent()->IsNewDbgInfoFormat);
- assert(getParent()->IsNewDbgInfoFormat ==
- From->getParent()->IsNewDbgInfoFormat);
-
if (!DebugMarker)
getParent()->createMarker(this);
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 0a47f98619691..37f4a72d8c20b 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -71,8 +71,7 @@ template class LLVM_EXPORT_TEMPLATE llvm::SymbolTableListTraits<GlobalIFunc>;
Module::Module(StringRef MID, LLVMContext &C)
: Context(C), ValSymTab(std::make_unique<ValueSymbolTable>(-1)),
- ModuleID(std::string(MID)), SourceFileName(std::string(MID)),
- IsNewDbgInfoFormat(true) {
+ ModuleID(std::string(MID)), SourceFileName(std::string(MID)) {
Context.addModule(this);
}
@@ -83,7 +82,6 @@ Module &Module::operator=(Module &&Other) {
ModuleID = std::move(Other.ModuleID);
SourceFileName = std::move(Other.SourceFileName);
- IsNewDbgInfoFormat = std::move(Other.IsNewDbgInfoFormat);
GlobalList.clear();
GlobalList.splice(GlobalList.begin(), Other.GlobalList);
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 9ec94a8b80959..1f1041b259736 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2878,11 +2878,6 @@ void Verifier::visitFunction(const Function &F) {
Check(verifyAttributeCount(Attrs, FT->getNumParams()),
"Attribute after last parameter!", &F);
- CheckDI(F.IsNewDbgInfoFormat == F.getParent()->IsNewDbgInfoFormat,
- "Function debug format should match parent module", &F,
- F.IsNewDbgInfoFormat, F.getParent(),
- F.getParent()->IsNewDbgInfoFormat);
-
bool IsIntrinsic = F.isIntrinsic();
// Check function attributes.
@@ -3233,15 +3228,9 @@ void Verifier::visitBasicBlock(BasicBlock &BB) {
Check(I.getParent() == &BB, "Instruction has bogus parent pointer!");
}
- CheckDI(BB.IsNewDbgInfoFormat == BB.getParent()->IsNewDbgInfoFormat,
- "BB debug format should match parent function", &BB,
- BB.IsNewDbgInfoFormat, BB.getParent(),
- BB.getParent()->IsNewDbgInfoFormat);
-
// Confirm that no issues arise from the debug program.
- if (BB.IsNewDbgInfoFormat)
- CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
- &BB);
+ CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
+ &BB);
}
void Verifier::visitTerminator(Instruction &I) {
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index df395073359cf..9c38cf3bfab54 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -600,7 +600,6 @@ LTO::RegularLTOState::RegularLTOState(unsigned ParallelCodeGenParallelismLevel,
: ParallelCodeGenParallelismLevel(ParallelCodeGenParallelismLevel),
Ctx(Conf), CombinedModule(std::make_unique<Module>("ld-temp.o", Ctx)),
Mover(std::make_unique<IRMover>(*CombinedModule)) {
- CombinedModule->IsNewDbgInfoFormat = true;
}
LTO::ThinLTOState::ThinLTOState(ThinBackend BackendParam)
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index a449185b2b9ba..2a9709050162f 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -595,7 +595,6 @@ Function *IRLinker::copyFunctionProto(const Function *SF) {
SF->getAddressSpace(), SF->getName(), &DstM);
F->copyAttributesFrom(SF);
F->setAttributes(mapAttributeTypes(F->getContext(), F->getAttributes()));
- F->IsNewDbgInfoFormat = SF->IsNewDbgInfoFormat;
return F;
}
@@ -1030,7 +1029,6 @@ Error IRLinker::linkFunctionBody(Function &Dst, Function &Src) {
Dst.setPrologueData(Src.getPrologueData());
if (Src.hasPersonalityFn())
Dst.setPersonalityFn(Src.getPersonalityFn());
- assert(Src.IsNewDbgInfoFormat == Dst.IsNewDbgInfoFormat);
// Copy over the metadata attachments without remapping.
Dst.copyMetadata(&Src, 0);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
index 0f002b016af0c..67db961e60fa3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
@@ -2364,7 +2364,6 @@ static Function *moveFunctionAdaptingType(Function *OldF, FunctionType *NewTy,
bool IsIntrinsic = OldF->isIntrinsic();
Function *NewF =
Function::Create(NewTy, OldF->getLinkage(), OldF->getAddressSpace());
- NewF->IsNewDbgInfoFormat = OldF->IsNewDbgInfoFormat;
NewF->copyAttributesFrom(OldF);
NewF->copyMetadata(OldF, 0);
NewF->takeName(OldF);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArgument...
[truncated]
|
@llvm/pr-subscribers-backend-webassembly Author: Jeremy Morse (jmorse) ChangesThis flag was used to let us incrementally introduce debug intrinsics into LLVM, however everything is now using intrinsics. It serves no purpose now, so delete it. Patch is 42.58 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143746.diff 33 Files Affected:
diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 07444cd6779e1..c24f01fe26cc8 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -63,9 +63,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
public:
using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>,
ilist_parent<BasicBlock>>;
- /// Flag recording whether or not this block stores debug-info in the form
- /// of intrinsic instructions (false) or non-instruction records (true).
- bool IsNewDbgInfoFormat;
private:
// Allow Function to renumber blocks.
@@ -95,12 +92,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
/// IsNewDbgInfoFormat = false.
LLVM_ABI void convertFromNewDbgValues();
- /// Ensure the block is in "old" dbg.value format (\p NewFlag == false) or
- /// in the new format (\p NewFlag == true), converting to the desired format
- /// if necessary.
- LLVM_ABI void setIsNewDbgInfoFormat(bool NewFlag);
- LLVM_ABI void setNewDbgInfoFormatFlag(bool NewFlag);
-
unsigned getNumber() const {
assert(getParent() && "only basic blocks in functions have valid numbers");
return Number;
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h
index f24d03635731e..c361be3e752a9 100644
--- a/llvm/include/llvm/IR/Function.h
+++ b/llvm/include/llvm/IR/Function.h
@@ -111,11 +111,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
friend class SymbolTableListTraits<Function>;
public:
- /// Is this function using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// hasLazyArguments/CheckLazyArguments - The argument list of a function is
/// built on demand, so that the list isn't allocated until the first client
/// needs it. The hasLazyArguments predicate returns true if the arg list
@@ -130,9 +125,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// \see BasicBlock::convertFromNewDbgValues.
void convertFromNewDbgValues();
- void setIsNewDbgInfoFormat(bool NewVal);
- void setNewDbgInfoFormatFlag(bool NewVal);
-
private:
friend class TargetLibraryInfoImpl;
@@ -760,7 +752,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// to the newly inserted BB.
Function::iterator insert(Function::iterator Position, BasicBlock *BB) {
Function::iterator FIt = BasicBlocks.insert(Position, BB);
- BB->setIsNewDbgInfoFormat(IsNewDbgInfoFormat);
return FIt;
}
diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h
index 7a26efb74b324..f4420f460741b 100644
--- a/llvm/include/llvm/IR/Module.h
+++ b/llvm/include/llvm/IR/Module.h
@@ -215,11 +215,6 @@ class LLVM_ABI Module {
/// @name Constructors
/// @{
public:
- /// Is this Module using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// Used when printing this module in the new debug info format; removes all
/// declarations of debug intrinsics that are replaced by non-intrinsic
/// records in the new format.
@@ -230,7 +225,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertToNewDbgValues();
}
- IsNewDbgInfoFormat = true;
}
/// \see BasicBlock::convertFromNewDbgValues.
@@ -238,20 +232,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertFromNewDbgValues();
}
- IsNewDbgInfoFormat = false;
- }
-
- void setIsNewDbgInfoFormat(bool UseNewFormat) {
- if (UseNewFormat && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!UseNewFormat && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
- }
- void setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &F : *this) {
- F.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
}
/// The Module constructor. Note that there is no default constructor. You
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 5c007dcf00224..926dc6211eb8d 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -441,8 +441,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
UpgradeNVVMAnnotations(*M);
UpgradeSectionAttributes(*M);
- M->setIsNewDbgInfoFormat(true);
-
if (!Slots)
return false;
// Initialize the slot mapping.
@@ -6906,8 +6904,6 @@ bool LLParser::parseBasicBlock(PerFunctionState &PFS) {
if (SeenOldDbgInfoFormat)
return error(Lex.getLoc(), "debug record should not appear in a module "
"containing debug info intrinsics");
- if (!SeenNewDbgInfoFormat)
- M->setNewDbgInfoFormatFlag(true);
SeenNewDbgInfoFormat = true;
Lex.Lex();
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 31129b7e5cf77..fde934fbb3cf1 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4479,10 +4479,6 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
Error BitcodeReader::parseModule(uint64_t ResumeBit,
bool ShouldLazyLoadMetadata,
ParserCallbacks Callbacks) {
- // Don't allow modules to use debug-intrinsics: autoupgrading them is now
- // mandatory.
- TheModule->IsNewDbgInfoFormat = true;
-
this->ValueTypeCallback = std::move(Callbacks.ValueType);
if (ResumeBit) {
if (Error JumpFailed = Stream.JumpToBit(ResumeBit))
@@ -6994,10 +6990,6 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
if (Error JumpFailed = Stream.JumpToBit(DFII->second))
return JumpFailed;
- // Regardless of the debug info format we want to end up in, we need
- // IsNewDbgInfoFormat=true to construct any debug records seen in the bitcode.
- F->IsNewDbgInfoFormat = true;
-
if (Error Err = parseFunctionBody(F))
return Err;
F->setIsMaterializable(false);
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 32348a899683d..3792b456c836e 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -3335,8 +3335,7 @@ class TypePromotionTransaction {
// Record where we would have to re-insert the instruction in the sequence
// of DbgRecords, if we ended up reinserting.
- if (BB->IsNewDbgInfoFormat)
- BeforeDbgRecord = Inst->getDbgReinsertionPosition();
+ BeforeDbgRecord = Inst->getDbgReinsertionPosition();
if (HasPrevInstruction) {
Point.PrevInst = std::prev(Inst->getIterator());
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 62a75313bb171..49a4b9c17cc29 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -52,8 +52,6 @@ DbgMarker *BasicBlock::createMarker(InstListType::iterator It) {
}
void BasicBlock::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
-
// Iterate over all instructions in the instruction list, collecting debug
// info intrinsics and converting them to DbgRecords. Once we find a "real"
// instruction, attach all those DbgRecords to a DbgMarker in that
@@ -91,7 +89,6 @@ void BasicBlock::convertToNewDbgValues() {
void BasicBlock::convertFromNewDbgValues() {
invalidateOrders();
- IsNewDbgInfoFormat = false;
// Iterate over the block, finding instructions annotated with DbgMarkers.
// Convert any attached DbgRecords to debug intrinsics and insert ahead of the
@@ -126,16 +123,6 @@ void BasicBlock::dumpDbgValues() const {
}
#endif
-void BasicBlock::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void BasicBlock::setNewDbgInfoFormatFlag(bool NewFlag) {
- IsNewDbgInfoFormat = NewFlag;
-}
-
ValueSymbolTable *BasicBlock::getValueSymbolTable() {
if (Function *F = getParent())
return F->getValueSymbolTable();
@@ -158,7 +145,7 @@ template class llvm::SymbolTableListTraits<
BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
BasicBlock *InsertBefore)
: Value(Type::getLabelTy(C), Value::BasicBlockVal),
- IsNewDbgInfoFormat(true), Parent(nullptr) {
+ Parent(nullptr) {
if (NewParent)
insertInto(NewParent, InsertBefore);
@@ -168,8 +155,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
end().getNodePtr()->setParent(this);
setName(Name);
- if (NewParent)
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
@@ -180,8 +165,6 @@ void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
NewParent->insert(InsertBefore->getIterator(), this);
else
NewParent->insert(NewParent->end(), this);
-
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
BasicBlock::~BasicBlock() {
@@ -725,10 +708,6 @@ void BasicBlock::flushTerminatorDbgRecords() {
// check whether there's anything trailing at the end and move those
// DbgRecords in front of the terminator.
- // Do nothing if we're not in new debug-info format.
- if (!IsNewDbgInfoFormat)
- return;
-
// If there's no terminator, there's nothing to do.
Instruction *Term = getTerminator();
if (!Term)
@@ -765,10 +744,6 @@ void BasicBlock::spliceDebugInfoEmptyBlock(BasicBlock::iterator Dest,
// in the iterators whether there was the intention to transfer any debug
// info.
- // If we're not in "new" debug-info format, do nothing.
- if (!IsNewDbgInfoFormat)
- return;
-
assert(First == Last);
bool InsertAtHead = Dest.getHeadBit();
bool ReadFromHead = First.getHeadBit();
@@ -1029,8 +1004,6 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src,
void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
iterator Last) {
- assert(Src->IsNewDbgInfoFormat == IsNewDbgInfoFormat);
-
#ifdef EXPENSIVE_CHECKS
// Check that First is before Last.
auto FromBBEnd = Src->end();
@@ -1045,9 +1018,7 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
return;
}
- // Handle non-instr debug-info specific juggling.
- if (IsNewDbgInfoFormat)
- spliceDebugInfo(Dest, Src, First, Last);
+ spliceDebugInfo(Dest, Src, First, Last);
// And move the instructions.
getInstList().splice(Dest, Src->getInstList(), First, Last);
@@ -1056,7 +1027,6 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
}
void BasicBlock::insertDbgRecordAfter(DbgRecord *DR, Instruction *I) {
- assert(IsNewDbgInfoFormat);
assert(I->getParent() == this);
iterator NextIt = std::next(I->getIterator());
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index a7c3a56dcc22a..2a808d4179525 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -432,11 +432,13 @@ void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior,
}
LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M) {
- return unwrap(M)->IsNewDbgInfoFormat;
+ return true;
}
void LLVMSetIsNewDbgInfoFormat(LLVMModuleRef M, LLVMBool UseNewFormat) {
- unwrap(M)->setIsNewDbgInfoFormat(UseNewFormat);
+ if (!UseNewFormat)
+ llvm_unreachable("LLVM no longer supports intrinsic based debug-info");
+ (void)M;
}
/*--.. Printing modules ....................................................--*/
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 493dec72d45af..28fb81055baf4 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -87,32 +87,17 @@ void Function::validateBlockNumbers() const {
}
void Function::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
for (auto &BB : *this) {
BB.convertToNewDbgValues();
}
}
void Function::convertFromNewDbgValues() {
- IsNewDbgInfoFormat = false;
for (auto &BB : *this) {
BB.convertFromNewDbgValues();
}
}
-void Function::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void Function::setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &BB : *this) {
- BB.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
-}
-
//===----------------------------------------------------------------------===//
// Argument Implementation
//===----------------------------------------------------------------------===//
@@ -490,7 +475,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
const Twine &name, Module *ParentModule)
: GlobalObject(Ty, Value::FunctionVal, AllocMarker, Linkage, name,
computeAddrSpace(AddrSpace, ParentModule)),
- NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(true) {
+ NumArgs(Ty->getNumParams()) {
assert(FunctionType::isValidReturnType(getReturnType()) &&
"invalid return type");
setGlobalObjectSubClassData(0);
@@ -505,7 +490,6 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
if (ParentModule) {
ParentModule->getFunctionList().push_back(this);
- IsNewDbgInfoFormat = ParentModule->IsNewDbgInfoFormat;
}
HasLLVMReservedName = getName().starts_with("llvm.");
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index 109d516c61b7c..1b60caab6c11a 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -86,7 +86,7 @@ void Instruction::removeFromParent() {
}
void Instruction::handleMarkerRemoval() {
- if (!getParent()->IsNewDbgInfoFormat || !DebugMarker)
+ if (!DebugMarker)
return;
DebugMarker->removeMarker();
@@ -136,9 +136,6 @@ void Instruction::insertBefore(BasicBlock &BB,
BB.getInstList().insert(InsertPos, this);
- if (!BB.IsNewDbgInfoFormat)
- return;
-
// We've inserted "this": if InsertAtHead is set then it comes before any
// DbgVariableRecords attached to InsertPos. But if it's not set, then any
// DbgRecords should now come before "this".
@@ -226,7 +223,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// If we've been given the "Preserve" flag, then just move the DbgRecords with
// the instruction, no more special handling needed.
- if (BB.IsNewDbgInfoFormat && DebugMarker && !Preserve) {
+ if (DebugMarker && !Preserve) {
if (I != this->getIterator() || InsertAtHead) {
// "this" is definitely moving in the list, or it's moving ahead of its
// attached DbgVariableRecords. Detach any existing DbgRecords.
@@ -238,7 +235,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// the block splicer, which will do more debug-info things.
BB.getInstList().splice(I, getParent()->getInstList(), getIterator());
- if (BB.IsNewDbgInfoFormat && !Preserve) {
+ if (!Preserve) {
DbgMarker *NextMarker = getParent()->getNextMarker(this);
// If we're inserting at point I, and not in front of the DbgRecords
@@ -258,10 +255,6 @@ iterator_range<DbgRecord::self_iterator> Instruction::cloneDebugInfoFrom(
if (!From->DebugMarker)
return DbgMarker::getEmptyDbgRecordRange();
- assert(getParent()->IsNewDbgInfoFormat);
- assert(getParent()->IsNewDbgInfoFormat ==
- From->getParent()->IsNewDbgInfoFormat);
-
if (!DebugMarker)
getParent()->createMarker(this);
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 0a47f98619691..37f4a72d8c20b 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -71,8 +71,7 @@ template class LLVM_EXPORT_TEMPLATE llvm::SymbolTableListTraits<GlobalIFunc>;
Module::Module(StringRef MID, LLVMContext &C)
: Context(C), ValSymTab(std::make_unique<ValueSymbolTable>(-1)),
- ModuleID(std::string(MID)), SourceFileName(std::string(MID)),
- IsNewDbgInfoFormat(true) {
+ ModuleID(std::string(MID)), SourceFileName(std::string(MID)) {
Context.addModule(this);
}
@@ -83,7 +82,6 @@ Module &Module::operator=(Module &&Other) {
ModuleID = std::move(Other.ModuleID);
SourceFileName = std::move(Other.SourceFileName);
- IsNewDbgInfoFormat = std::move(Other.IsNewDbgInfoFormat);
GlobalList.clear();
GlobalList.splice(GlobalList.begin(), Other.GlobalList);
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 9ec94a8b80959..1f1041b259736 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2878,11 +2878,6 @@ void Verifier::visitFunction(const Function &F) {
Check(verifyAttributeCount(Attrs, FT->getNumParams()),
"Attribute after last parameter!", &F);
- CheckDI(F.IsNewDbgInfoFormat == F.getParent()->IsNewDbgInfoFormat,
- "Function debug format should match parent module", &F,
- F.IsNewDbgInfoFormat, F.getParent(),
- F.getParent()->IsNewDbgInfoFormat);
-
bool IsIntrinsic = F.isIntrinsic();
// Check function attributes.
@@ -3233,15 +3228,9 @@ void Verifier::visitBasicBlock(BasicBlock &BB) {
Check(I.getParent() == &BB, "Instruction has bogus parent pointer!");
}
- CheckDI(BB.IsNewDbgInfoFormat == BB.getParent()->IsNewDbgInfoFormat,
- "BB debug format should match parent function", &BB,
- BB.IsNewDbgInfoFormat, BB.getParent(),
- BB.getParent()->IsNewDbgInfoFormat);
-
// Confirm that no issues arise from the debug program.
- if (BB.IsNewDbgInfoFormat)
- CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
- &BB);
+ CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
+ &BB);
}
void Verifier::visitTerminator(Instruction &I) {
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index df395073359cf..9c38cf3bfab54 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -600,7 +600,6 @@ LTO::RegularLTOState::RegularLTOState(unsigned ParallelCodeGenParallelismLevel,
: ParallelCodeGenParallelismLevel(ParallelCodeGenParallelismLevel),
Ctx(Conf), CombinedModule(std::make_unique<Module>("ld-temp.o", Ctx)),
Mover(std::make_unique<IRMover>(*CombinedModule)) {
- CombinedModule->IsNewDbgInfoFormat = true;
}
LTO::ThinLTOState::ThinLTOState(ThinBackend BackendParam)
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index a449185b2b9ba..2a9709050162f 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -595,7 +595,6 @@ Function *IRLinker::copyFunctionProto(const Function *SF) {
SF->getAddressSpace(), SF->getName(), &DstM);
F->copyAttributesFrom(SF);
F->setAttributes(mapAttributeTypes(F->getContext(), F->getAttributes()));
- F->IsNewDbgInfoFormat = SF->IsNewDbgInfoFormat;
return F;
}
@@ -1030,7 +1029,6 @@ Error IRLinker::linkFunctionBody(Function &Dst, Function &Src) {
Dst.setPrologueData(Src.getPrologueData());
if (Src.hasPersonalityFn())
Dst.setPersonalityFn(Src.getPersonalityFn());
- assert(Src.IsNewDbgInfoFormat == Dst.IsNewDbgInfoFormat);
// Copy over the metadata attachments without remapping.
Dst.copyMetadata(&Src, 0);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
index 0f002b016af0c..67db961e60fa3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
@@ -2364,7 +2364,6 @@ static Function *moveFunctionAdaptingType(Function *OldF, FunctionType *NewTy,
bool IsIntrinsic = OldF->isIntrinsic();
Function *NewF =
Function::Create(NewTy, OldF->getLinkage(), OldF->getAddressSpace());
- NewF->IsNewDbgInfoFormat = OldF->IsNewDbgInfoFormat;
NewF->copyAttributesFrom(OldF);
NewF->copyMetadata(OldF, 0);
NewF->takeName(OldF);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArgument...
[truncated]
|
@llvm/pr-subscribers-backend-amdgpu Author: Jeremy Morse (jmorse) ChangesThis flag was used to let us incrementally introduce debug intrinsics into LLVM, however everything is now using intrinsics. It serves no purpose now, so delete it. Patch is 42.58 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143746.diff 33 Files Affected:
diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 07444cd6779e1..c24f01fe26cc8 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -63,9 +63,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
public:
using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>,
ilist_parent<BasicBlock>>;
- /// Flag recording whether or not this block stores debug-info in the form
- /// of intrinsic instructions (false) or non-instruction records (true).
- bool IsNewDbgInfoFormat;
private:
// Allow Function to renumber blocks.
@@ -95,12 +92,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
/// IsNewDbgInfoFormat = false.
LLVM_ABI void convertFromNewDbgValues();
- /// Ensure the block is in "old" dbg.value format (\p NewFlag == false) or
- /// in the new format (\p NewFlag == true), converting to the desired format
- /// if necessary.
- LLVM_ABI void setIsNewDbgInfoFormat(bool NewFlag);
- LLVM_ABI void setNewDbgInfoFormatFlag(bool NewFlag);
-
unsigned getNumber() const {
assert(getParent() && "only basic blocks in functions have valid numbers");
return Number;
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h
index f24d03635731e..c361be3e752a9 100644
--- a/llvm/include/llvm/IR/Function.h
+++ b/llvm/include/llvm/IR/Function.h
@@ -111,11 +111,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
friend class SymbolTableListTraits<Function>;
public:
- /// Is this function using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// hasLazyArguments/CheckLazyArguments - The argument list of a function is
/// built on demand, so that the list isn't allocated until the first client
/// needs it. The hasLazyArguments predicate returns true if the arg list
@@ -130,9 +125,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// \see BasicBlock::convertFromNewDbgValues.
void convertFromNewDbgValues();
- void setIsNewDbgInfoFormat(bool NewVal);
- void setNewDbgInfoFormatFlag(bool NewVal);
-
private:
friend class TargetLibraryInfoImpl;
@@ -760,7 +752,6 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
/// to the newly inserted BB.
Function::iterator insert(Function::iterator Position, BasicBlock *BB) {
Function::iterator FIt = BasicBlocks.insert(Position, BB);
- BB->setIsNewDbgInfoFormat(IsNewDbgInfoFormat);
return FIt;
}
diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h
index 7a26efb74b324..f4420f460741b 100644
--- a/llvm/include/llvm/IR/Module.h
+++ b/llvm/include/llvm/IR/Module.h
@@ -215,11 +215,6 @@ class LLVM_ABI Module {
/// @name Constructors
/// @{
public:
- /// Is this Module using intrinsics to record the position of debugging
- /// information, or non-intrinsic records? See IsNewDbgInfoFormat in
- /// \ref BasicBlock.
- bool IsNewDbgInfoFormat;
-
/// Used when printing this module in the new debug info format; removes all
/// declarations of debug intrinsics that are replaced by non-intrinsic
/// records in the new format.
@@ -230,7 +225,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertToNewDbgValues();
}
- IsNewDbgInfoFormat = true;
}
/// \see BasicBlock::convertFromNewDbgValues.
@@ -238,20 +232,6 @@ class LLVM_ABI Module {
for (auto &F : *this) {
F.convertFromNewDbgValues();
}
- IsNewDbgInfoFormat = false;
- }
-
- void setIsNewDbgInfoFormat(bool UseNewFormat) {
- if (UseNewFormat && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!UseNewFormat && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
- }
- void setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &F : *this) {
- F.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
}
/// The Module constructor. Note that there is no default constructor. You
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 5c007dcf00224..926dc6211eb8d 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -441,8 +441,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
UpgradeNVVMAnnotations(*M);
UpgradeSectionAttributes(*M);
- M->setIsNewDbgInfoFormat(true);
-
if (!Slots)
return false;
// Initialize the slot mapping.
@@ -6906,8 +6904,6 @@ bool LLParser::parseBasicBlock(PerFunctionState &PFS) {
if (SeenOldDbgInfoFormat)
return error(Lex.getLoc(), "debug record should not appear in a module "
"containing debug info intrinsics");
- if (!SeenNewDbgInfoFormat)
- M->setNewDbgInfoFormatFlag(true);
SeenNewDbgInfoFormat = true;
Lex.Lex();
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 31129b7e5cf77..fde934fbb3cf1 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4479,10 +4479,6 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
Error BitcodeReader::parseModule(uint64_t ResumeBit,
bool ShouldLazyLoadMetadata,
ParserCallbacks Callbacks) {
- // Don't allow modules to use debug-intrinsics: autoupgrading them is now
- // mandatory.
- TheModule->IsNewDbgInfoFormat = true;
-
this->ValueTypeCallback = std::move(Callbacks.ValueType);
if (ResumeBit) {
if (Error JumpFailed = Stream.JumpToBit(ResumeBit))
@@ -6994,10 +6990,6 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
if (Error JumpFailed = Stream.JumpToBit(DFII->second))
return JumpFailed;
- // Regardless of the debug info format we want to end up in, we need
- // IsNewDbgInfoFormat=true to construct any debug records seen in the bitcode.
- F->IsNewDbgInfoFormat = true;
-
if (Error Err = parseFunctionBody(F))
return Err;
F->setIsMaterializable(false);
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 32348a899683d..3792b456c836e 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -3335,8 +3335,7 @@ class TypePromotionTransaction {
// Record where we would have to re-insert the instruction in the sequence
// of DbgRecords, if we ended up reinserting.
- if (BB->IsNewDbgInfoFormat)
- BeforeDbgRecord = Inst->getDbgReinsertionPosition();
+ BeforeDbgRecord = Inst->getDbgReinsertionPosition();
if (HasPrevInstruction) {
Point.PrevInst = std::prev(Inst->getIterator());
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 62a75313bb171..49a4b9c17cc29 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -52,8 +52,6 @@ DbgMarker *BasicBlock::createMarker(InstListType::iterator It) {
}
void BasicBlock::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
-
// Iterate over all instructions in the instruction list, collecting debug
// info intrinsics and converting them to DbgRecords. Once we find a "real"
// instruction, attach all those DbgRecords to a DbgMarker in that
@@ -91,7 +89,6 @@ void BasicBlock::convertToNewDbgValues() {
void BasicBlock::convertFromNewDbgValues() {
invalidateOrders();
- IsNewDbgInfoFormat = false;
// Iterate over the block, finding instructions annotated with DbgMarkers.
// Convert any attached DbgRecords to debug intrinsics and insert ahead of the
@@ -126,16 +123,6 @@ void BasicBlock::dumpDbgValues() const {
}
#endif
-void BasicBlock::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void BasicBlock::setNewDbgInfoFormatFlag(bool NewFlag) {
- IsNewDbgInfoFormat = NewFlag;
-}
-
ValueSymbolTable *BasicBlock::getValueSymbolTable() {
if (Function *F = getParent())
return F->getValueSymbolTable();
@@ -158,7 +145,7 @@ template class llvm::SymbolTableListTraits<
BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
BasicBlock *InsertBefore)
: Value(Type::getLabelTy(C), Value::BasicBlockVal),
- IsNewDbgInfoFormat(true), Parent(nullptr) {
+ Parent(nullptr) {
if (NewParent)
insertInto(NewParent, InsertBefore);
@@ -168,8 +155,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
end().getNodePtr()->setParent(this);
setName(Name);
- if (NewParent)
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
@@ -180,8 +165,6 @@ void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
NewParent->insert(InsertBefore->getIterator(), this);
else
NewParent->insert(NewParent->end(), this);
-
- setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat);
}
BasicBlock::~BasicBlock() {
@@ -725,10 +708,6 @@ void BasicBlock::flushTerminatorDbgRecords() {
// check whether there's anything trailing at the end and move those
// DbgRecords in front of the terminator.
- // Do nothing if we're not in new debug-info format.
- if (!IsNewDbgInfoFormat)
- return;
-
// If there's no terminator, there's nothing to do.
Instruction *Term = getTerminator();
if (!Term)
@@ -765,10 +744,6 @@ void BasicBlock::spliceDebugInfoEmptyBlock(BasicBlock::iterator Dest,
// in the iterators whether there was the intention to transfer any debug
// info.
- // If we're not in "new" debug-info format, do nothing.
- if (!IsNewDbgInfoFormat)
- return;
-
assert(First == Last);
bool InsertAtHead = Dest.getHeadBit();
bool ReadFromHead = First.getHeadBit();
@@ -1029,8 +1004,6 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src,
void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
iterator Last) {
- assert(Src->IsNewDbgInfoFormat == IsNewDbgInfoFormat);
-
#ifdef EXPENSIVE_CHECKS
// Check that First is before Last.
auto FromBBEnd = Src->end();
@@ -1045,9 +1018,7 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
return;
}
- // Handle non-instr debug-info specific juggling.
- if (IsNewDbgInfoFormat)
- spliceDebugInfo(Dest, Src, First, Last);
+ spliceDebugInfo(Dest, Src, First, Last);
// And move the instructions.
getInstList().splice(Dest, Src->getInstList(), First, Last);
@@ -1056,7 +1027,6 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
}
void BasicBlock::insertDbgRecordAfter(DbgRecord *DR, Instruction *I) {
- assert(IsNewDbgInfoFormat);
assert(I->getParent() == this);
iterator NextIt = std::next(I->getIterator());
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index a7c3a56dcc22a..2a808d4179525 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -432,11 +432,13 @@ void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior,
}
LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M) {
- return unwrap(M)->IsNewDbgInfoFormat;
+ return true;
}
void LLVMSetIsNewDbgInfoFormat(LLVMModuleRef M, LLVMBool UseNewFormat) {
- unwrap(M)->setIsNewDbgInfoFormat(UseNewFormat);
+ if (!UseNewFormat)
+ llvm_unreachable("LLVM no longer supports intrinsic based debug-info");
+ (void)M;
}
/*--.. Printing modules ....................................................--*/
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 493dec72d45af..28fb81055baf4 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -87,32 +87,17 @@ void Function::validateBlockNumbers() const {
}
void Function::convertToNewDbgValues() {
- IsNewDbgInfoFormat = true;
for (auto &BB : *this) {
BB.convertToNewDbgValues();
}
}
void Function::convertFromNewDbgValues() {
- IsNewDbgInfoFormat = false;
for (auto &BB : *this) {
BB.convertFromNewDbgValues();
}
}
-void Function::setIsNewDbgInfoFormat(bool NewFlag) {
- if (NewFlag && !IsNewDbgInfoFormat)
- convertToNewDbgValues();
- else if (!NewFlag && IsNewDbgInfoFormat)
- convertFromNewDbgValues();
-}
-void Function::setNewDbgInfoFormatFlag(bool NewFlag) {
- for (auto &BB : *this) {
- BB.setNewDbgInfoFormatFlag(NewFlag);
- }
- IsNewDbgInfoFormat = NewFlag;
-}
-
//===----------------------------------------------------------------------===//
// Argument Implementation
//===----------------------------------------------------------------------===//
@@ -490,7 +475,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
const Twine &name, Module *ParentModule)
: GlobalObject(Ty, Value::FunctionVal, AllocMarker, Linkage, name,
computeAddrSpace(AddrSpace, ParentModule)),
- NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(true) {
+ NumArgs(Ty->getNumParams()) {
assert(FunctionType::isValidReturnType(getReturnType()) &&
"invalid return type");
setGlobalObjectSubClassData(0);
@@ -505,7 +490,6 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
if (ParentModule) {
ParentModule->getFunctionList().push_back(this);
- IsNewDbgInfoFormat = ParentModule->IsNewDbgInfoFormat;
}
HasLLVMReservedName = getName().starts_with("llvm.");
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index 109d516c61b7c..1b60caab6c11a 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -86,7 +86,7 @@ void Instruction::removeFromParent() {
}
void Instruction::handleMarkerRemoval() {
- if (!getParent()->IsNewDbgInfoFormat || !DebugMarker)
+ if (!DebugMarker)
return;
DebugMarker->removeMarker();
@@ -136,9 +136,6 @@ void Instruction::insertBefore(BasicBlock &BB,
BB.getInstList().insert(InsertPos, this);
- if (!BB.IsNewDbgInfoFormat)
- return;
-
// We've inserted "this": if InsertAtHead is set then it comes before any
// DbgVariableRecords attached to InsertPos. But if it's not set, then any
// DbgRecords should now come before "this".
@@ -226,7 +223,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// If we've been given the "Preserve" flag, then just move the DbgRecords with
// the instruction, no more special handling needed.
- if (BB.IsNewDbgInfoFormat && DebugMarker && !Preserve) {
+ if (DebugMarker && !Preserve) {
if (I != this->getIterator() || InsertAtHead) {
// "this" is definitely moving in the list, or it's moving ahead of its
// attached DbgVariableRecords. Detach any existing DbgRecords.
@@ -238,7 +235,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
// the block splicer, which will do more debug-info things.
BB.getInstList().splice(I, getParent()->getInstList(), getIterator());
- if (BB.IsNewDbgInfoFormat && !Preserve) {
+ if (!Preserve) {
DbgMarker *NextMarker = getParent()->getNextMarker(this);
// If we're inserting at point I, and not in front of the DbgRecords
@@ -258,10 +255,6 @@ iterator_range<DbgRecord::self_iterator> Instruction::cloneDebugInfoFrom(
if (!From->DebugMarker)
return DbgMarker::getEmptyDbgRecordRange();
- assert(getParent()->IsNewDbgInfoFormat);
- assert(getParent()->IsNewDbgInfoFormat ==
- From->getParent()->IsNewDbgInfoFormat);
-
if (!DebugMarker)
getParent()->createMarker(this);
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 0a47f98619691..37f4a72d8c20b 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -71,8 +71,7 @@ template class LLVM_EXPORT_TEMPLATE llvm::SymbolTableListTraits<GlobalIFunc>;
Module::Module(StringRef MID, LLVMContext &C)
: Context(C), ValSymTab(std::make_unique<ValueSymbolTable>(-1)),
- ModuleID(std::string(MID)), SourceFileName(std::string(MID)),
- IsNewDbgInfoFormat(true) {
+ ModuleID(std::string(MID)), SourceFileName(std::string(MID)) {
Context.addModule(this);
}
@@ -83,7 +82,6 @@ Module &Module::operator=(Module &&Other) {
ModuleID = std::move(Other.ModuleID);
SourceFileName = std::move(Other.SourceFileName);
- IsNewDbgInfoFormat = std::move(Other.IsNewDbgInfoFormat);
GlobalList.clear();
GlobalList.splice(GlobalList.begin(), Other.GlobalList);
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 9ec94a8b80959..1f1041b259736 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2878,11 +2878,6 @@ void Verifier::visitFunction(const Function &F) {
Check(verifyAttributeCount(Attrs, FT->getNumParams()),
"Attribute after last parameter!", &F);
- CheckDI(F.IsNewDbgInfoFormat == F.getParent()->IsNewDbgInfoFormat,
- "Function debug format should match parent module", &F,
- F.IsNewDbgInfoFormat, F.getParent(),
- F.getParent()->IsNewDbgInfoFormat);
-
bool IsIntrinsic = F.isIntrinsic();
// Check function attributes.
@@ -3233,15 +3228,9 @@ void Verifier::visitBasicBlock(BasicBlock &BB) {
Check(I.getParent() == &BB, "Instruction has bogus parent pointer!");
}
- CheckDI(BB.IsNewDbgInfoFormat == BB.getParent()->IsNewDbgInfoFormat,
- "BB debug format should match parent function", &BB,
- BB.IsNewDbgInfoFormat, BB.getParent(),
- BB.getParent()->IsNewDbgInfoFormat);
-
// Confirm that no issues arise from the debug program.
- if (BB.IsNewDbgInfoFormat)
- CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
- &BB);
+ CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!",
+ &BB);
}
void Verifier::visitTerminator(Instruction &I) {
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index df395073359cf..9c38cf3bfab54 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -600,7 +600,6 @@ LTO::RegularLTOState::RegularLTOState(unsigned ParallelCodeGenParallelismLevel,
: ParallelCodeGenParallelismLevel(ParallelCodeGenParallelismLevel),
Ctx(Conf), CombinedModule(std::make_unique<Module>("ld-temp.o", Ctx)),
Mover(std::make_unique<IRMover>(*CombinedModule)) {
- CombinedModule->IsNewDbgInfoFormat = true;
}
LTO::ThinLTOState::ThinLTOState(ThinBackend BackendParam)
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index a449185b2b9ba..2a9709050162f 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -595,7 +595,6 @@ Function *IRLinker::copyFunctionProto(const Function *SF) {
SF->getAddressSpace(), SF->getName(), &DstM);
F->copyAttributesFrom(SF);
F->setAttributes(mapAttributeTypes(F->getContext(), F->getAttributes()));
- F->IsNewDbgInfoFormat = SF->IsNewDbgInfoFormat;
return F;
}
@@ -1030,7 +1029,6 @@ Error IRLinker::linkFunctionBody(Function &Dst, Function &Src) {
Dst.setPrologueData(Src.getPrologueData());
if (Src.hasPersonalityFn())
Dst.setPersonalityFn(Src.getPersonalityFn());
- assert(Src.IsNewDbgInfoFormat == Dst.IsNewDbgInfoFormat);
// Copy over the metadata attachments without remapping.
Dst.copyMetadata(&Src, 0);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
index 0f002b016af0c..67db961e60fa3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
@@ -2364,7 +2364,6 @@ static Function *moveFunctionAdaptingType(Function *OldF, FunctionType *NewTy,
bool IsIntrinsic = OldF->isIntrinsic();
Function *NewF =
Function::Create(NewTy, OldF->getLinkage(), OldF->getAddressSpace());
- NewF->IsNewDbgInfoFormat = OldF->IsNewDbgInfoFormat;
NewF->copyAttributesFrom(OldF);
NewF->copyMetadata(OldF, 0);
NewF->takeName(OldF);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArgument...
[truncated]
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
(Because they're on everywhere, so we don't need to check the flag)
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.
nit: Commit message refers to intrinsics instead of records?
Pls appease clang-format-bot
LGTM
There's no need to update the flag now that it's going; but place a call to convert-to-new-dbg-values where we used to call the set-the-flag function. This is a boundary where we might convert intrinsics into records -- I suspect that if MLIR is using DIBuilder, it's already creating records anyway.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/17826 Here is the relevant piece of the build log for the reference
|
This flag was used to let us incrementally introduce debug records into LLVM, however everything is now using records. It serves no purpose now, so delete it.
This flag was used to let us incrementally introduce debug records into LLVM, however everything is now using records. It serves no purpose now, so delete it.
This flag was used to let us incrementally introduce debug intrinsics into LLVM, however everything is now using intrinsics. It serves no purpose now, so delete it.