[flang-commits] [PATCH] D101984: [flang] Remove redundant reallocation
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu May 6 02:46:32 PDT 2021
rovka created this revision.
rovka added reviewers: klausler, tskeith.
rovka added a project: Flang.
Herald added a subscriber: jdoerfert.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The MaxMinHelper used to implement MIN and MAX for character types would
reallocate the accumulator whenever the number of characters in it was
different from that in the other input. This is unnecessary if the
accumulator is already larger than the other input. This patch fixes the
issue and adds a unit test to make sure we don't reallocate if we don't
need to.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101984
Files:
flang/runtime/character.cpp
flang/unittests/RuntimeGTest/CharacterTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101984.343335.patch
Type: text/x-patch
Size: 4704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210506/730d76bd/attachment.bin>
More information about the flang-commits
mailing list