llvm-project
8d8bd0aa - [flang] Simplify the comparison of characters (#154593)

Commit
44 days ago
[flang] Simplify the comparison of characters (#154593) Because character comparison appends spaces to the shorter character, calls to trim() that are used only in the comparison can be eliminated. Example: `trim(x) == trim(y)` can be simplified to `x == y` This makes 527.cam4_r about 3% faster, measured on Neoverse V2. This patch implements the optimization above in a new pass: ExpressionSimplification. Although no other expression simplifications are planned at the moment, they could be easily added to the new pass. The ExpressionSimplification pass runs early in the HLFIR pipeline, to make it easy to identify expressions before any transformations occur.
Author
Parents
Loading