aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2024-11-15 10:31:20 +0000
committerGitHub <noreply@github.com>2024-11-15 10:31:20 +0000
commite9fc2faf0c2551eb4f9f932da09bdf1af24ac7e2 (patch)
tree97b016063eaefb7f883688ab57929eefe7174a0c /llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
parent7c8e05aa45f006401b71b37127537c4682fe16ee (diff)
downloadllvm-e9fc2faf0c2551eb4f9f932da09bdf1af24ac7e2.zip
llvm-e9fc2faf0c2551eb4f9f932da09bdf1af24ac7e2.tar.gz
llvm-e9fc2faf0c2551eb4f9f932da09bdf1af24ac7e2.tar.bz2
[flang][CodeGen] fix bug hoisting allocas using a shared constant arg (#116251)
When hoisting the allocas with a constant integer size, the constant integer was moved to where the alloca is hoisted to unconditionally. By CodeGen there have been various iterations of mlir canonicalization and dead code elimination. This can cause lots of unrelated bits of code to share the same constant values. If for some reason the alloca couldn't be hoisted all of the way to the entry block of the function, moving the constant might result in it no-longer dominating some of the remaining uses. In theory, there should be dominance analysis to ensure the location of the constant does dominate all uses of it. But those constants are effectively free anyway (they aren't even separate instructions in LLVM IR), so it is less expensive just to leave the old one where it was and insert a new one we know for sure is immediately before the alloca.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions