chipsalliance / chipsalliance/Surelog
n2 function in ParseFile.cpp
- Dominant language
- C++
- Stars
- 475
- Forks
- 90
- Avg merge
- 1h 39m
- Merged PRs (30d)
- 37
Description
The following function is n^2, it computes the line number in the original file from the expanded post-processor version of the file:
https://github.com/chipsalliance/Surelog/blob/57c7b7478003477e504b15b2fca14a9c9cbc5927/src/SourceCompile/ParseFile.cpp#L169
It is only called once per file, then the result is cached for further use by the parser cache generator. But if the file is generated by lots of macro expansions by the preprocessor, then runtime starts to show. There is one such a large file (> 350,000 lines post preprocessor) that exhibit this problem:
https://github.com/chipsalliance/Surelog/blob/master/third_party/tests/wav-lpddr-hw/verif/sv/wddr_pkg.sv
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.