commit | 4e1b9d34f922d3b8b04a65f29681cd95dc9ce75f | [log] [tgz] |
---|---|---|
author | Afanasyev Ivan <ivafanas@gmail.com> | Wed Oct 30 00:26:15 2024 +0700 |
committer | GitHub <noreply@github.com> | Tue Oct 29 10:26:15 2024 -0700 |
tree | 1e8b95e72241d88c2aefe0660641c63c356ec429 | |
parent | d661aea4c5668fc9b06f4b26d9fb072b1a6d7ff4 [diff] |
[mir-strip-debug] Fix debug location info strip for bundled instructions (#113676) Fix bug that `mir-strip-debug` pass does not remove debug location from bundled instructions. Problem arises during testing that debug info does not affect optimization passes output (`llvm-lit` with ` -Dllc="llc -debugify-and-strip-all-safe"`), when pass operates on MIR with bundled instructions + memory operands. Let mir test check looks like: ``` CHECK-NEXT: BUNDLE { CHECK-NEXT: $r3 = LD $r1, $r2 :: (load (s64) from %ir.a, !tbaa !2) CHECK-NEXT: } ``` So as `mir-strip-debug` pass does not process bundled instructions, running `llc -debugify-and-strip-all-safe` on the test will produce the following output: ``` BUNDLE { $r3 = LD $r1, $r2, debug-location !DILocation(line: 3, column: 1, scope: <0x608cb2b99b10>) :: (load (s64) from %ir.a, !tbaa !2) } ``` And test will fail, but it shouldn't. Seems like the root cause is that `mir-strip-debug` pass should remove debug location from bundled instructions.
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.