aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authoreddyz87 <eddyz87@gmail.com>2024-06-20 21:28:02 +0300
committerGitHub <noreply@github.com>2024-06-20 21:28:02 +0300
commit01ce74fe14fb98af42a3f2f7c8c6b04487761cf1 (patch)
tree6d014ba4167cdd60329f33ed77f50fe90d63c330 /llvm/lib/Bitcode
parent88dae3d5d0230747f3cbabdde9ac5ae9e5dc3f8d (diff)
downloadllvm-01ce74fe14fb98af42a3f2f7c8c6b04487761cf1.zip
llvm-01ce74fe14fb98af42a3f2f7c8c6b04487761cf1.tar.gz
llvm-01ce74fe14fb98af42a3f2f7c8c6b04487761cf1.tar.bz2
Revert "[DebugInfo][BPF] Add 'annotations' field for DIBasicType & DI… (#96172)
…SubroutineType (#91422)" This reverts commit 3ca17443ef4af21bdb1f3b4fbcfff672cbc6176c. As reported in [1,2] the commit above causes CI failure for powerpc-aix target. There is also a performance regression reported in [3]. Reverting to comply with the developer policy. [1] https://github.com/llvm/llvm-project/pull/91422#issuecomment-2179425473 [2] https://lab.llvm.org/buildbot/#/builders/64/builds/62 [3] https://github.com/llvm/llvm-project/pull/91422#issuecomment-2175631443
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/MetadataLoader.cpp16
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
2 files changed, 4 insertions, 14 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index bc06c55..9102f3a 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -1527,7 +1527,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
break;
}
case bitc::METADATA_BASIC_TYPE: {
- if (Record.size() < 6 || Record.size() > 8)
+ if (Record.size() < 6 || Record.size() > 7)
return error("Invalid record");
IsDistinct = Record[0];
@@ -1535,14 +1535,10 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
? static_cast<DINode::DIFlags>(Record[6])
: DINode::FlagZero;
- Metadata *Annotations = nullptr;
- if (Record.size() > 7 && Record[7])
- Annotations = getMDOrNull(Record[7]);
-
MetadataList.assignValue(
GET_OR_DISTINCT(DIBasicType,
(Context, Record[1], getMDString(Record[2]), Record[3],
- Record[4], Record[5], Flags, Annotations)),
+ Record[4], Record[5], Flags)),
NextMetadataNo);
NextMetadataNo++;
break;
@@ -1707,7 +1703,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
break;
}
case bitc::METADATA_SUBROUTINE_TYPE: {
- if (Record.size() < 3 || Record.size() > 5)
+ if (Record.size() < 3 || Record.size() > 4)
return error("Invalid record");
bool IsOldTypeRefArray = Record[0] < 2;
unsigned CC = (Record.size() > 3) ? Record[3] : 0;
@@ -1717,13 +1713,9 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
Metadata *Types = getMDOrNull(Record[2]);
if (LLVM_UNLIKELY(IsOldTypeRefArray))
Types = MetadataList.upgradeTypeRefArray(Types);
- Metadata *Annotations = nullptr;
- if (Record.size() > 4 && Record[4])
- Annotations = getMDOrNull(Record[4]);
MetadataList.assignValue(
- GET_OR_DISTINCT(DISubroutineType,
- (Context, Flags, CC, Types, Annotations)),
+ GET_OR_DISTINCT(DISubroutineType, (Context, Flags, CC, Types)),
NextMetadataNo);
NextMetadataNo++;
break;
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index f3e8731..b08d5c5 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1816,7 +1816,6 @@ void ModuleBitcodeWriter::writeDIBasicType(const DIBasicType *N,
Record.push_back(N->getAlignInBits());
Record.push_back(N->getEncoding());
Record.push_back(N->getFlags());
- Record.push_back(VE.getMetadataOrNullID(N->getRawAnnotations()));
Stream.EmitRecord(bitc::METADATA_BASIC_TYPE, Record, Abbrev);
Record.clear();
@@ -1912,7 +1911,6 @@ void ModuleBitcodeWriter::writeDISubroutineType(
Record.push_back(N->getFlags());
Record.push_back(VE.getMetadataOrNullID(N->getTypeArray().get()));
Record.push_back(N->getCC());
- Record.push_back(VE.getMetadataOrNullID(N->getRawAnnotations()));
Stream.EmitRecord(bitc::METADATA_SUBROUTINE_TYPE, Record, Abbrev);
Record.clear();