aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2024-09-28 20:09:45 +0200
committerGitHub <noreply@github.com>2024-09-28 20:09:45 +0200
commitfcde4f6577697042cec1be4f8fbacc7bf483954c (patch)
tree8c7c23ee40f6adf35714274a551505761ccd5933 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent3a5b9da11598e714890f4e9f37f894fc2c7287c2 (diff)
downloadllvm-fcde4f6577697042cec1be4f8fbacc7bf483954c.zip
llvm-fcde4f6577697042cec1be4f8fbacc7bf483954c.tar.gz
llvm-fcde4f6577697042cec1be4f8fbacc7bf483954c.tar.bz2
[mlir][Transforms][NFC] Dialect Conversion: Remove redundant `lookupOrDefault` (#110370)
Remove a redundant `lookupOrDefault` that has no effect. When no type is passed to `lookupOrDefault`, that function returns the furthest mapped value (by following the mapping iteratively). If there is no mapped value with the desired type, then the function also returns the furthest mapped value. The value that was passed to the redundant `lookupOrDefault` was produced by this code: ``` Value newOperand = mapping.lookupOrDefault(operand, desiredType); ``` There are 2 possible cases: - Case 1: There is no mapping to `desiredType`. Then `newOperand` is the furthest mapped value. - Case 2: There is a mapping to `desiredType`. Then the type of `newOperand` is `desiredType` and the "if" branch that encloses the redundant `lookupOrDefault` is not executed at all. Also improve the documentation of `ConversionValueMapping::lookupOrDefault` and simplify the implementation a bit.
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions