| commit | 7b91df386820aaf84b30c09d48fba110a42bdc56 | [log] [tgz] |
|---|---|---|
| author | Abid Qadeer <haqadeer@amd.com> | Fri Jul 11 09:50:05 2025 +0100 |
| committer | GitHub <noreply@github.com> | Fri Jul 11 09:50:05 2025 +0100 |
| tree | 795a07123b9a95dcc569e7bfa38c589317fb3fb0 | |
| parent | 74e3dfe389fda89b584f6e1f4b00700f54b1b1ac [diff] |
[OMPIRBuilder] Don't use invalid debug loc in reduction functions. (#147950) We have this pattern of code in OMPIRBuilder for many functions that are used in reduction operations. ``` Function *LtGRFunc = Function::Create BasicBlock *EntryBlock = BasicBlock::Create(Ctx, "entry", LtGRFunc); Builder.SetInsertPoint(EntryBlock); ``` The insertion point is moved to the new function but the debug location is not updated. This means that reduction function will use the debug location that points to another function. This problem gets hidden because these functions gets inlined but the potential for failure exists. This patch resets the debug location when insertion point is moved to new function. Some `InsertPointGuard` have been added to make sure why restore the debug location correctly when we are done with the reduction function.
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.