<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/121177>121177</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
void llvm::bolt::BinaryFunction::setIgnored(): Assertion `CurrentState == State::Empty && "cannot ignore non-empty functions in current mode"' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
BOLT
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcci
</td>
</tr>
</table>
<pre>
Invocation:
```
/home/davidino/llvm-project/build/bin/llvm-bolt --force-data-relocations --force-patch --insert-retpolines --strict --align-blocks --assume-abi --elim-link-veneers --eliminate-unreachable --frame-opt=all --frame-opt-rm-stores --group-stubs --icf=all --icp-eliminate-loads --indirect-call-promotion=all --inline-all --jump-tables=aggressive --peepholes=all --plt=all --sctc-mode=always --tail-duplication=aggressive -reorder-blocks=ext-tsp -reorder-functions=hfsort -split-functions -split-all-cold -split-eh /tmp/zeAam7EDIYBm5BZ6cUJckLC6O.o -data=/tmp/zeAam7EDIYBm5BZ6cUJckLC6O.c.fdata -o /tmp/zeAam7EDIYBm5BZ6cUJckLC6O.o.bolt
```
Stacktrace:
```
BOLT-INFO: The number of retpolined branches is : 116
BOLT-WARNING: failed to patch entries in func_42/1(*2). The function will not be optimized.
llvm-bolt: /home/davidino/llvm-project/bolt/lib/Core/BinaryFunction.cpp:3038: void llvm::bolt::BinaryFunction::setIgnored(): Assertion `CurrentState == State::Empty && "cannot ignore non-empty functions in current mode"' failed.
#0 0x0000000000f33601 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/davidino/llvm-project/build/bin/llvm-bolt+0xf33601)
#1 0x0000000000f30dbb llvm::sys::RunSignalHandlers() (/home/davidino/llvm-project/build/bin/llvm-bolt+0xf30dbb)
#2 0x0000000000f30ef5 SignalHandler(int) Signals.cpp:0:0
#3 0x00007fa2f783e730 __restore_rt (/lib64/libc.so.6+0x3e730)
#4 0x00007fa2f788bacc __pthread_kill_implementation (/lib64/libc.so.6+0x8bacc)
#5 0x00007fa2f783e686 gsignal (/lib64/libc.so.6+0x3e686)
#6 0x00007fa2f7828833 abort (/lib64/libc.so.6+0x28833)
#7 0x00007fa2f782875b _nl_load_domain.cold (/lib64/libc.so.6+0x2875b)
#8 0x00007fa2f78373c6 (/lib64/libc.so.6+0x373c6)
#9 0x00000000017a62d8 (/home/davidino/llvm-project/build/bin/llvm-bolt+0x17a62d8)
#10 0x000000000169b179 llvm::bolt::PatchEntries::runOnFunctions(llvm::bolt::BinaryContext&) (/home/davidino/llvm-project/build/bin/llvm-bolt+0x169b179)
#11 0x0000000001030caf llvm::bolt::BinaryFunctionPassManager::runPasses() (/home/davidino/llvm-project/build/bin/llvm-bolt+0x1030caf)
#12 0x0000000001033fe8 llvm::bolt::BinaryFunctionPassManager::runAllPasses(llvm::bolt::BinaryContext&) (/home/davidino/llvm-project/build/bin/llvm-bolt+0x1033fe8)
#13 0x0000000000fdc4c7 llvm::bolt::RewriteInstance::runOptimizationPasses() (/home/davidino/llvm-project/build/bin/llvm-bolt+0xfdc4c7)
#14 0x000000000102c744 llvm::bolt::RewriteInstance::run() (/home/davidino/llvm-project/build/bin/llvm-bolt+0x102c744)
#15 0x000000000041189a main (/home/davidino/llvm-project/build/bin/llvm-bolt+0x41189a)
#16 0x00007fa2f78295d0 __libc_start_call_main (/lib64/libc.so.6+0x295d0)
#17 0x00007fa2f7829680 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x29680)
#18 0x00000000004b3a15 _start (/home/davidino/llvm-project/build/bin/llvm-bolt+0x4b3a15)
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUV12P27oR_TX0CyFBIvX54AfvOr7dIs0GSYqifREoamTzLkUKJLUf99cXlGTLdtNkGxgF7mIXXo2GZ84czgxpZq3YK4A1Su9Qul2xwR20WTeci1Wtm7f1g3rWnDmhFaIbFG1QFs2_0QYjsjvoDhD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