[fir] Add character conversion pass
authorJean Perier <jperier@nvidia.com>
Sun, 10 Oct 2021 18:18:45 +0000 (20:18 +0200)
committerValentin Clement <clementval@gmail.com>
Sun, 10 Oct 2021 18:20:09 +0000 (20:20 +0200)
commit6eb7634f301a0ef6465f514ae8cc4634602470a2
tree86735074f4120359c5a6cd0f6fcf43f8ea05b0fc
parent67964fc4b241ef02705c44ff5d58e61e5bf8b38f
[fir] Add character conversion pass

Upstream the character conversion pass.
Translates entities of one CHARACTER KIND to another.
By default the translation is to naively zero-extend or truncate a code
point to fit the destination size.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Valentin Clement <clementval@gmail.com>
Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D111405
flang/include/flang/Optimizer/Transforms/Passes.h
flang/include/flang/Optimizer/Transforms/Passes.td
flang/lib/Optimizer/Transforms/CMakeLists.txt
flang/lib/Optimizer/Transforms/CharacterConversion.cpp [new file with mode: 0644]
flang/test/Fir/char-conversion.fir [new file with mode: 0644]