[PATCH] D150856: [lit] Add %{for-each-file} substitution
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 09:24:37 PDT 2023
jdenny added a comment.
In D150856#4428523 <https://reviews.llvm.org/D150856#4428523>, @Endill wrote:
> I don't think we're inventing //additional// iteration mechanisms here, because manual loop unrolling is anything but an iteration mechanism.
The DEFINE/REDEFINE solution I proposed is not //manual// loop unrolling. The test author manually specifies the loop body only once.
> Anyway, I went ahead and transformed `dr5xx.cpp` according to your ideas: https://gist.github.com/Endilll/d0099df11e532fb2a7ef7ee34f3cbf21/revisions?diff=split
> Line count went up from ≈1k to ≈1.5k.
For others skimming these comments, that high line count is because of the avoidance of `&&`, as discussed below. And then it nearly is manual loop unrolling.
> We're also can't chain compiler invocations via `&&`: `RUN: %{run98} && %{run11} && %{run14} && %{run17} && %{run20} && %{run23}`, because having dedicated stdout log per each language mode makes DR test debugging workflow much better.
Can you explain that a bit more or point to a reference? I find lit -vv makes it pretty easy to understand what commands are executed and what output goes with each.
> I'm sympathetic to the intent, but I don't think we should introduce interactions between split-file and lit.
Why? My recollection is that split-file was designed to be used with lit. Anyway, that suggestion is not critical to the solution. It just saves one line and a small repetition.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150856/new/
https://reviews.llvm.org/D150856
More information about the llvm-commits
mailing list