[flang] Infrastructure improvements in utility routines