aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorVyacheslav Levytskyy <vyacheslav.levytskyy@intel.com>2025-02-25 14:44:12 +0100
committerGitHub <noreply@github.com>2025-02-25 14:44:12 +0100
commitd21b2e619a5e23fd2f4cb05f5929990ee517d164 (patch)
treeecfb7c55ea6909116b32108779dc6d4277930d9e /llvm/lib/Support/APFloat.cpp
parent089f988f46d7350827c38c1718d47caa56c5a206 (diff)
downloadllvm-d21b2e619a5e23fd2f4cb05f5929990ee517d164.zip
llvm-d21b2e619a5e23fd2f4cb05f5929990ee517d164.tar.gz
llvm-d21b2e619a5e23fd2f4cb05f5929990ee517d164.tar.bz2
[SPIR-V] Fix generation of gMIR vs. SPIR-V code from utility methods (#128159)
The SPIR-V Backend uses the same set of utility functions, mostly though not entirely from SPIRVGlobalRegistry, to generate gMIR and SPIR-V opcodes, depending on the current stage of translation. This is controlled by an explicit EmitIR flag rather than the current translation pass, and there are legacy pieces of code where the EmitIR flag is declared so that it has a default true value, allowing using utility functions without explicitly declaring their intent to work either in gMIR or in SPIR-V part of the lowering process. While it may be ok to leave this default EmitIR flag as is in generation of scalar integer/float types, as we don't expect to see any dependent opcodes derived from such OpTypeXXX instructions, using of EmitIR by default in aggregation types is a source of hidden logical flaws and actual issues. This PR provides a partial fix to the problem by removing default status of EmitIR, requiring a user call site to explicitly announce its intent to generate gMIR or SPIR-V code, fixes several cases of misuse of EmitIR, and, the most important, fixes a nasty logical error that breaks passing of actually asked EmitIR value by the default value in the middle of the chain of calls, in the `findSPIRVType` call. The latter error was a source of issues in the post-instruction selection pass that has been getting gMIR code where SPIR-V was explicitly requested due to overloaded with default parameters internal API in SPIRVGlobalRegistry (most notably, `findSPIRVType`).
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
0 files changed, 0 insertions, 0 deletions