<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54894>54894</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-reduce MachineFunction cloning misses many fields that need to be preserved
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm-reduce
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          arsenm
      </td>
    </tr>
</table>

<pre>
    The current MachineFunction cloning code in ReducerWorkItem.cpp only does the most basic cloning of blocks and instructions. It's missing all of the various other fields that functions and blocks track.

The most important obvious ones are
1. Target defined MachineFunctionInfo
2. MachineFrameInfo. Stack objects, hasCalls etc.
3. Function alignments and other flags (e.g. HasInlineAsm)
4. MachineBasicBlock alignments and other flags (e.g. AddressTaken)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUsuumzAQ_RrYjK5FDOSxYJHcq6hZdNNG6nqwB3Bj7Mg2kfL3HUKaPqRKlRBoNDPnNbRe35vzQKCmEMgl-IxqMI6Ok1PJeAfKemdcD8prAuPgC-lJUfjmw-WUaBTqegXv7B20pwiJkUYfE7QYjXot-w5a69UlAjrNKDGF6QEfBZxSJjcRRhPjPIrWzuMz0A2D8VMEz0WAzpDVMwMm6J7qFrwndAqoLiIrPrJiv7zPP9WY8epDQrbn29uC6VgtBloGVwLOGHpKoKlj9_rvGE6u88uoFK9ewJHmhoCviakZ-zupFDP5DgPGd3YSgZJ6SioFvEJFa3o3ctyLgadBi32ETG5J9AI-YTw5yzT7OGZyt2BUL_LDnO9hNv4_YHutA8V4xgs5Bst1U-pducM8mWSpsfY2voXHYf95__k-HNmI7v7HKRxxWslDS3BlDgo30vkUbDOkdI1Zuc_kkZ_epGFqhfJs5jjzPT9v1-Dn1Lhkgok4vWNdbXdVPjSrljqqVbVrN-tSlqt1W1SqqDdrrFe1ajG32JKNTVYfMil_M8FVVn_kppGFlEW14lW5LSqB1Zq67Q5XRLKuZZlVBY1orJh3hQ99HpYs2qmP3LQmpvirifyH9uz3Qcj4OKXBhwZDJDfmD_nNQ_sPkkcjYg">