[Openmp-commits] [PATCH] D139802: [OpenMP] Skip extra blank line when parsing /proc/cpuinfo on LoongArch64

WÁNG Xuěruì via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 12 00:15:13 PST 2022


xen0n added inline comments.


================
Comment at: openmp/runtime/src/kmp_affinity.cpp:2948-2949
+      // The parsing logic of /proc/cpuinfo in this function highly depends on
+      // the blank lines between each processor info block. But there is a
+      // disrupter on LoongArch that a blank line exists before the first
+      // processor info block (i.e. after the "system type" line). We must skip
----------------
"But on LoongArch a blank line exists before ..." so the sentence could be shorter.

Also, as one of the people behind the kernel port, I can tell you we explicitly added the blank line because the "system type" line is unrelated to any of the CPUs; it's kind of global info. Maybe you can try mentioning this design consideration for more context but I feel it's okay to not do so either. It's up to you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139802/new/

https://reviews.llvm.org/D139802



More information about the Openmp-commits mailing list