From 4f37040e062d5326bfe28750f7683d212c6315b1 Mon Sep 17 00:00:00 2001 From: Flash Sheridan Date: Fri, 15 Dec 2023 09:52:41 -0500 Subject: [PATCH] ReadMe: metadata, SDK, appending other opt options (#985) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Also copy necessary metadata (which may be much later in the file). * Note also need for experimentation with SDK versions * Note possibility of appending other `opt` options, such as other optimizations. (This looks promising for finding unsoundness in our fork’s use of O3, though of course that can invalidate Lit pass/fail reports.) --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3f3904daa..7b09666f6 100644 --- a/README.md +++ b/README.md @@ -318,7 +318,8 @@ this is guaranteed to contain an unsoundness report. Many log files, however, contain only “Source: \” rather than a file path; the names of these files begin with “in_”. * Do a verbose run of Lit for just that file, with the `opt` option -`--print-after-all` appended, e.g.: +`--print-after-all` appended. (You may also append other `opt` options, such +as other optimizations.) E.g.: ``` $LLVM2_BUILD/bin/llvm-lit -vva "-Dopt=$ALIVE2_HOME/alive2/build/opt-alive.sh --print-after-all" $LLVM2_HOME/llvm/test/Transforms/InstCombine/insert-const-shuf.ll ``` @@ -330,7 +331,7 @@ RUN command separately may give better results. versions of the misoptimized function. The Alive2 IR function body may indicate the problem to a human, but for the Alive2 Compiler Explorer instance you will need LLVM IR. Search for the function name in the terminal output. -* Copy the first function definition and necessary declarations to +* Copy the first function definition and necessary declarations and metadata to [https://alive2.llvm.org/ce/](https://alive2.llvm.org/ce/). Without a second version of the function to compare, it just runs some standard optimizations; if it reports an error, your fork’s optimizations are not to blame. @@ -358,7 +359,7 @@ CMake files’ use of `USEDLIBS` and `LLVMLIBS` and perhaps `dd_llvm_target`. * Building for Translation Validation is tightly coupled to LLVM top of tree source. Building a fork with older source may require reverting to the corresponding Alive2 commit. This in turn may require experimentation with -Clang versions and vendors. +Clang and SDK versions and vendors. * Building older source on an up-to-date machine may require adjustments. For example, the now-deleted file `scripts/rewritepass.py` depended on the deprecated Python 2; update the shebang line to `python3`.