[PATCH] D130450: [JITLink] Relax zero-fill edge assertions.
Sunho Kim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 30 16:34:27 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe781451140fe: [JITLink] Relax zero-fill edge assertions. (authored by sunho).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130450/new/
https://reviews.llvm.org/D130450
Files:
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
Index: llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
===================================================================
--- llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
+++ llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
@@ -128,8 +128,12 @@
// Copy Block data and apply fixups.
LLVM_DEBUG(dbgs() << " Applying fixups.\n");
- assert((!B->isZeroFill() || B->edges_size() == 0) &&
- "Edges in zero-fill block?");
+ assert((!B->isZeroFill() || all_of(B->edges(),
+ [](const Edge &E) {
+ return E.getKind() ==
+ Edge::KeepAlive;
+ })) &&
+ "Non-KeepAlive edges in zero-fill block?");
for (auto &E : B->edges()) {
// Skip non-relocation edges.
Index: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
+++ llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
@@ -303,7 +303,8 @@
/// Add an edge to this block.
void addEdge(Edge::Kind K, Edge::OffsetT Offset, Symbol &Target,
Edge::AddendT Addend) {
- assert(!isZeroFill() && "Adding edge to zero-fill block?");
+ assert((K == Edge::KeepAlive || !isZeroFill()) &&
+ "Adding edge to zero-fill block?");
Edges.push_back(Edge(K, Offset, Target, Addend));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130450.448823.patch
Type: text/x-patch
Size: 1524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220730/049a4475/attachment.bin>
More information about the llvm-commits
mailing list