[all-commits] [llvm/llvm-project] fbef1f: [clang-format][NFC] Make formatting Verilog faster...

sstwcw via All-commits all-commits at lists.llvm.org
Tue Jan 14 07:37:28 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbef1f835f0381a71362199840bee9ec491e3918
      https://github.com/llvm/llvm-project/commit/fbef1f835f0381a71362199840bee9ec491e3918
  Author: sstwcw <su3e8a96kzlver at posteo.net>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    M clang/lib/Format/FormatTokenLexer.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format][NFC] Make formatting Verilog faster (#121139)

A regular expression was used in the lexing process. It made the program
take more than linear time with regards to the length of the input. It
looked like the entire buffer could be scanned for every token lexed.
Now the regular expression is replaced with code. Previously it took 20
minutes for the program to format 125 000 lines of code on my computer.
Now it takes 315 milliseconds.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list