aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2024-06-11 12:15:09 +0100
committerStephen Tozer <stephen.tozer@sony.com>2024-06-11 12:19:06 +0100
commit2dc2290860355dd2bac3b655eea895fe30fde257 (patch)
tree00007f64a0db2547527ffc46360f1dffca26f19f /llvm/lib/IR
parentfc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a (diff)
downloadllvm-2dc2290860355dd2bac3b655eea895fe30fde257.zip
llvm-2dc2290860355dd2bac3b655eea895fe30fde257.tar.gz
llvm-2dc2290860355dd2bac3b655eea895fe30fde257.tar.bz2
Revert new debug info format commits:
"[Flang] Update test to not check for tail calls on debug intrinsics" & "Reapply#3 "[RemoveDIs] Load into new debug info format by default in LLVM (#89799)" Recent updates to flang have added debug info generation via MLIR, a path which currently does not support debug records. The patch that enables debug records by default (and a small followup patch) are thus being reverted until the MLIR path has been fixed. This reverts commits: 21396be865b4640abf6afa0b05de6708a1a996e0 c5aeca732d1ff6769b0659efebd1cfb5f60487e4
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/BasicBlock.cpp2
-rw-r--r--llvm/lib/IR/DebugProgramInstruction.cpp4
-rw-r--r--llvm/lib/IR/Function.cpp4
-rw-r--r--llvm/lib/IR/Module.cpp4
4 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index aea9425..29f2cbf 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -181,7 +181,7 @@ template class llvm::SymbolTableListTraits<Instruction,
BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
BasicBlock *InsertBefore)
: Value(Type::getLabelTy(C), Value::BasicBlockVal),
- IsNewDbgInfoFormat(UseNewDbgInfoFormat), Parent(nullptr) {
+ IsNewDbgInfoFormat(false), Parent(nullptr) {
if (NewParent)
insertInto(NewParent, InsertBefore);
diff --git a/llvm/lib/IR/DebugProgramInstruction.cpp b/llvm/lib/IR/DebugProgramInstruction.cpp
index 9a4926c..fbca7cd 100644
--- a/llvm/lib/IR/DebugProgramInstruction.cpp
+++ b/llvm/lib/IR/DebugProgramInstruction.cpp
@@ -366,8 +366,8 @@ void DbgVariableRecord::setKillLocation() {
}
bool DbgVariableRecord::isKillLocation() const {
- return (!hasArgList() && isa<MDNode>(getRawLocation())) ||
- (getNumVariableLocationOps() == 0 && !getExpression()->isComplex()) ||
+ return (getNumVariableLocationOps() == 0 &&
+ !getExpression()->isComplex()) ||
any_of(location_ops(), [](Value *V) { return isa<UndefValue>(V); });
}
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 9360e6d..3f73502 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -83,8 +83,6 @@ static cl::opt<int> NonGlobalValueMaxNameSize(
"non-global-value-max-name-size", cl::Hidden, cl::init(1024),
cl::desc("Maximum size for the name of non-global values."));
-extern cl::opt<bool> UseNewDbgInfoFormat;
-
void Function::convertToNewDbgValues() {
IsNewDbgInfoFormat = true;
for (auto &BB : *this) {
@@ -443,7 +441,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
: GlobalObject(Ty, Value::FunctionVal,
OperandTraits<Function>::op_begin(this), 0, Linkage, name,
computeAddrSpace(AddrSpace, ParentModule)),
- NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(UseNewDbgInfoFormat) {
+ NumArgs(Ty->getNumParams()), IsNewDbgInfoFormat(false) {
assert(FunctionType::isValidReturnType(getReturnType()) &&
"invalid return type");
setGlobalObjectSubClassData(0);
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 55c282c..f97dd18 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -54,8 +54,6 @@
using namespace llvm;
-extern cl::opt<bool> UseNewDbgInfoFormat;
-
//===----------------------------------------------------------------------===//
// Methods to implement the globals and functions lists.
//
@@ -74,7 +72,7 @@ template class 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)), DL(""),
- IsNewDbgInfoFormat(UseNewDbgInfoFormat) {
+ IsNewDbgInfoFormat(false) {
Context.addModule(this);
}