[all-commits] [llvm/llvm-project] 2ab4c2: [clang-repl] Delegate CodeGen related operations f...
Anutosh Bhat via All-commits
all-commits at lists.llvm.org
Tue Aug 26 02:44:33 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2ab4c2880db645fd9e1e2c34b6400c13a1649e54
https://github.com/llvm/llvm-project/commit/2ab4c2880db645fd9e1e2c34b6400c13a1649e54
Author: Anutosh Bhat <andersonbhat491 at gmail.com>
Date: 2025-08-26 (Tue, 26 Aug 2025)
Changed paths:
M clang/include/clang/Interpreter/Interpreter.h
M clang/lib/Interpreter/CMakeLists.txt
M clang/lib/Interpreter/DeviceOffload.cpp
M clang/lib/Interpreter/DeviceOffload.h
A clang/lib/Interpreter/IncrementalAction.cpp
A clang/lib/Interpreter/IncrementalAction.h
M clang/lib/Interpreter/IncrementalParser.cpp
M clang/lib/Interpreter/IncrementalParser.h
M clang/lib/Interpreter/Interpreter.cpp
M clang/lib/Interpreter/InterpreterValuePrinter.cpp
Log Message:
-----------
[clang-repl] Delegate CodeGen related operations for PTU to IncrementalParser (#137458)
Read discussion : https://github.com/llvm/llvm-project/pull/136404#discussion_r2059149768
and the following comments for context
Motivation
1) `IncrementalAction` is designed to keep Frontend statealive across
inputs. As per the docstring: “IncrementalAction ensures it keeps its
underlying action's objects alive as long as the IncrementalParser needs
them.”
2) To align responsibilities with that contract, the parser layer (host:
`IncrementalParser`, device: `IncrementalCUDADeviceParser`) should
manage PTU registration and module generation, while the interpreter
orchestrates at a higher level.
What this PR does
1) Moves CodeGen surfaces behind IncrementalAction:
GenModule(), getCodeGen(), and the cached “first CodeGen module” now
live in IncrementalAction.
2) Moves PTU ownership to the parser layer:
Adds IncrementalParser::RegisterPTU(…) (and device counterpart)
3) Add device-side registration in IncrementalCUDADeviceParser.
4) Remove Interpreter::{getCodeGen, GenModule, RegisterPTU}.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list