[PATCH] D144653: remove assert in addCFIInstruction
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 09:23:17 PST 2023
sebpop created this revision.
sebpop added reviewers: ayermolo, yota9.
sebpop added a project: bolt.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
sebpop requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
With the patch in https://reviews.llvm.org/D144588 perf2bolt continues and then crashes on an assert:
#9 0x0000ffff940ccaec llvm::bolt::BinaryFunction::addCFIInstruction(unsigned long, llvm::MCCFIInstruction&&) /home/admin/llvm-project/bolt/include/bolt/Core/BinaryFunction.h:1654:45
#10 0x0000ffff940c7f10 llvm::bolt::CFIReaderWriter::fillCFIInfoFor(llvm::bolt::BinaryFunction&) const::'lambda'(llvm::dwarf::CFIProgram::Instruction const&)::operator()(llvm::dwarf::CFIProgram::Instruction const&) const /home/admin/llvm-project/bolt/lib/Core/Exceptions.cpp:571:38
#11 0x0000ffff940c863c llvm::bolt::CFIReaderWriter::fillCFIInfoFor(llvm::bolt::BinaryFunction&) const /home/admin/llvm-project/bolt/lib/Core/Exceptions.cpp:650:32
#12 0x0000ffff9aa48074 llvm::bolt::RewriteInstance::disassembleFunctions() /home/admin/llvm-project/bolt/lib/Rewrite/RewriteInstance.cpp:3135:62
#13 0x0000ffff9aa3bed4 llvm::bolt::RewriteInstance::run() /home/admin/llvm-project/bolt/lib/Rewrite/RewriteInstance.cpp:771:27
#14 0x0000aaaad74258b0 main /home/admin/llvm-project/bolt/tools/driver/llvm-bolt.cpp:243:29
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144653
Files:
bolt/include/bolt/Core/BinaryFunction.h
Index: bolt/include/bolt/Core/BinaryFunction.h
===================================================================
--- bolt/include/bolt/Core/BinaryFunction.h
+++ bolt/include/bolt/Core/BinaryFunction.h
@@ -1644,8 +1644,6 @@
uint16_t getProfileFlags() const { return ProfileFlags; }
void addCFIInstruction(uint64_t Offset, MCCFIInstruction &&Inst) {
- assert(!Instructions.empty());
-
// Fix CFI instructions skipping NOPs. We need to fix this because changing
// CFI state after a NOP, besides being wrong and inaccurate, makes it
// harder for us to recover this information, since we can create empty BBs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144653.499892.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/400aa92c/attachment.bin>
More information about the llvm-commits
mailing list