| commit | f5211d79b9edf56c08143491ccde38d480b40ab8 | [log] [tgz] |
|---|---|---|
| author | Shan Huang <52285902006@stu.ecnu.edu.cn> | Mon May 20 16:39:48 2024 +0800 |
| committer | GitHub <noreply@github.com> | Mon May 20 16:39:48 2024 +0800 |
| tree | d97a12e96c0c6eae2fa8c5a9f270854a16fa78ae | |
| parent | b60e62896e2665e1a0ac51fc9942c1c4d31c0f53 [diff] |
[DebugInfo][GVNSink] Fix #77415: GVNSink fails to optimize LLVM IR with debug info (#77602) This PR fixes issue #77415 and is revised from PR #77419 . PR #77419 breaks the newly added test in the same PR on windows, because GVNSink is non-deterministic when sorting `BasicBlock*` pointers. This is reflected in the failure report. ``` # | C:\src\llvm-project\llvm\test\Transforms\GVNSink\sink-ignore-dbg-intrinsics.ll:28:10: error: CHECK: expected string not found in input # | ; CHECK: %a.sink = phi i32 [ %a, %if.then ], [ %b, %if.else ] # | ^ # | <stdin>:24:8: note: scanning from here # | if.end: ; preds = %if.else, %if.then # | ^ # | <stdin>:25:2: note: possible intended match here # | %b.sink = phi i32 [ %b, %if.else ], [ %a, %if.then ] # | ^ # | # | Input file: <stdin> # | Check file: C:\src\llvm-project\llvm\test\Transforms\GVNSink\sink-ignore-dbg-intrinsics.ll ``` According to the report, what the CheckFile wants to match is the `%a.sink`, however there is `%b.sink`. But this mismatch does not mean that this commit is wrong, since the occurrence of either `%a.sink` or `%b.sink` is correct. The root cause of this test failure is the strict check rule in the regression test committed. So I refined the regression test with a more general check rule to only detect whether there is an instruction with suffix `.sink` in the `if.end` block. Hope this won't fail the test. If this PR still fails to build, I will close this PR and try to find another right way to fix this.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.