| commit | aeec94500a5dbd576e5d2d16895fe00fa0b1e154 | [log] [tgz] |
|---|---|---|
| author | junfengd-nv <junfengd@nvidia.com> | Sat Apr 05 13:56:55 2025 -0700 |
| committer | GitHub <noreply@github.com> | Sat Apr 05 22:56:55 2025 +0200 |
| tree | 5a70578f9183539d2dc5fc41ccf050ccf88b73b3 | |
| parent | 70f5632cadb82b1be813d7ba688b80e22df634e2 [diff] |
[mlir][inliner] Add doClone and canHandleMultipleBlocks callbacks to Inliner Config (#131226) Current inliner disables inlining when the caller is in a region with single block trait, while the callee function contains multiple blocks. the SingleBlock trait is used in operations such as do/while loop, for example fir.do_loop, fir.iterate_while and fir.if. Typically, calls within loops are good candidates for inlining. However, functions with multiple blocks are also common. for example, any function with "if () then return" will result in multiple blocks in MLIR. This change gives the flexibility of a customized inliner to handle such cases. doClone: clones instructions and other information from the callee function into the caller function. . canHandleMultipleBlocks: checks if functions with multiple blocks can be inlined into a region with the SingleBlock trait. The default behavior of the inliner remains unchanged. --------- Co-authored-by: jeanPerier <jean.perier.polytechnique@gmail.com> Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
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.