llvm / llvm/llvm-project

[SPIRV] Remove isOpcodeWithNoSideEffects and intrinsicHasSideEffects in SPIR-V instruction selection

Open
#168,736 0 comments 0 reactions 1 assignee Claimed by @s-perron View on GitHub
backend:SPIR-V
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

In https://github.com/llvm/llvm-project/pull/168428, two helper functions were introduced. The identify opcodes and intrinsics that have no side effects.

We did not use the `hasSideEffects = false` for the opcode because this would cause the shared code in instruction selection to delete the instructions without updating the global registry. That can cause problems in instruction selection and later passes because there will be dangling pointers.

We need to determine a longer term strategy for handling these. Should we add a target specific property to intrinsics and opcodes? Are the extra bits in the opcode table worth it?

Can we remove our dependence on values cached in the global registry so that we can use the existing instructions for many of these opcodes and intrinsics?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.