diff options
author | Nathan Gauër <brioche@google.com> | 2024-09-24 15:24:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 15:24:21 +0200 |
commit | 02a334de6690202154ef09456c581618ff290f9a (patch) | |
tree | db7f9b6c3215addb810cbc4e7095d37d3be8b2f9 /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 57bee1e4322d34f9760563081f9c10b6850bc2bf (diff) | |
download | llvm-02a334de6690202154ef09456c581618ff290f9a.zip llvm-02a334de6690202154ef09456c581618ff290f9a.tar.gz llvm-02a334de6690202154ef09456c581618ff290f9a.tar.bz2 |
[SPIR-V] Fix bad insertion for type/id MIR (#109686)
Those instructions were inserted either after the instruction using it,
or in the middle of the module.
The first directly causes an issue. The second causes a more subtle
issue: the first type the type is inserted, the emission is fine, but
the second times, the first instruction is reused, without checking its
position in the function. This can lead to the second usage dominating
the definition.
In SPIR-V, types are usually in the header, above all code definition,
but at this stage I don't think we can, so what I do instead is to emit
it in the first basic block.
This commit reduces the failed tests with expensive checks from 107 to
71.
Signed-off-by: Nathan Gauër <brioche@google.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
0 files changed, 0 insertions, 0 deletions