Skip to content
Snippets Groups Projects
Commit baf26fcc authored by Andi Kleen's avatar Andi Kleen
Browse files

Size input line cache based on file size

While the input line cache size now tunable it's better if the compiler
auto tunes it. Otherwise large files needing random file access will
still have to search many lines to find the right lines.

Add support for allocating one line anchor per hundred input lines.
This means an overhead of ~235k per 1M input lines on 64bit, which
seems reasonable.

gcc/ChangeLog:

	PR preprocessor/118168
	* input.cc (file_cache_slot::get_next_line): Implement
	dynamic sizing of m_line_record based on input length.
	* params.opt: (param_file_cache_lines): Set to 0 to size
	dynamically.
parent 33acec61
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment