aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/class.cc
diff options
context:
space:
mode:
authorAndi Kleen <ak@gcc.gnu.org>2024-12-25 20:21:58 -0800
committerAndi Kleen <ak@gcc.gnu.org>2025-01-25 10:50:16 -0800
commite2f024f586e99fb63dd49e0603f52d1cb765a77e (patch)
tree2f22f04835041e513af13c3a90144d8f48470960 /gcc/fortran/class.cc
parent2531cb1d20d9c5b8a5390816a10a018c59506250 (diff)
downloadgcc-e2f024f586e99fb63dd49e0603f52d1cb765a77e.zip
gcc-e2f024f586e99fb63dd49e0603f52d1cb765a77e.tar.gz
gcc-e2f024f586e99fb63dd49e0603f52d1cb765a77e.tar.bz2
Move ferror out of hot loop of file cache
glibc ferror is surprisingly expensive. Move it out of the hot loop of finding lines by setting a flag after the actual IO operations. gcc/ChangeLog: PR preprocessor/118168 * input.cc (file_cache_slot::m_error): New field. (file_cache_slot::create): Clear m_error. (file_cache_slot::file_cache_slot): Clear m_error. (file_cache_slot::read_data): Set m_error on error. (file_cache_slot::get_next_line): Use m_error instead of ferror.
Diffstat (limited to 'gcc/fortran/class.cc')
0 files changed, 0 insertions, 0 deletions