Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
6ea0c0a2 |
| 30-Apr-2024 |
paperchalice <liujunchang97@outlook.com> |
[NewPM][CodeGen] Add `MachineFunctionAnalysis` (#88610)
In new pass system, `MachineFunction` could be an analysis result again,
machine module pass can now fetch them from analysis manager.
`Mach
[NewPM][CodeGen] Add `MachineFunctionAnalysis` (#88610)
In new pass system, `MachineFunction` could be an analysis result again,
machine module pass can now fetch them from analysis manager.
`MachineModuleInfo` no longer owns them.
Remove `FreeMachineFunctionPass`, replaced by
`InvalidateAnalysisPass<MachineFunctionAnalysis>`.
Now `FreeMachineFunction` is replaced by
`InvalidateAnalysisPass<MachineFunctionAnalysis>`, the workaround in
`MachineFunctionPassManager` is no longer needed, there is no difference
between `unittests/MIR/PassBuilderCallbacksTest.cpp` and
`unittests/IR/PassBuilderCallbacksTest.cpp`.
show more ...
|
Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2 |
|
#
d2dff431 |
| 08-Mar-2024 |
paperchalice <liujunchang97@outlook.com> |
[CodeGen] Skip declaration in ModuleToMachineFunctionPassAdaptor (#84417)
Like ModuleToFunctionPassAdaptor.
---------
Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4 |
|
#
91e9e317 |
| 22-Feb-2024 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM/CodeGen] Rewrite pass manager nesting (#81068)
Currently the new PM infra for codegen puts everything into a
MachineFunctionPassManager. The MachineFunctionPassManager owns both
Module pass
[NewPM/CodeGen] Rewrite pass manager nesting (#81068)
Currently the new PM infra for codegen puts everything into a
MachineFunctionPassManager. The MachineFunctionPassManager owns both
Module passes and MachineFunction passes, and batches adjacent
MachineFunction passes like a typical PassManager.
The current MachineFunctionAnalysisManager also directly references a
module and function analysis manager to get results.
The initial argument was that the codegen pipeline is relatively "flat",
meaning it's mostly machine function passes with a couple of module
passes here and there. However, there are a couple of issues with this
as compared to a more structured nesting more like the optimization
pipeline. For example, it doesn't allow running function passes then
machine function passes on a function and its machine function all at
once. It also currently requires the caller to split out the IR passes
into one pass manager and the MIR passes into another pass manager.
This patch rewrites the new pass manager infra for the codegen pipeline
to be more similar to the nesting in the optimization pipeline.
Basically, a Function contains a MachineFunction. So we can have Module
-> Function -> MachineFunction adaptors. It also rewrites the analysis
managers to have inner/outer proxies like the ones in the optimization
pipeline. The new pass managers/adaptors/analysis managers can be seen
in use in PassManagerTest.cpp.
This allows us to consolidate to just having to add to one
ModulePassManager when using the codegen pipeline.
I haven't added the Function -> MachineFunction adaptor in this patch,
but it should be added when we merge AddIRPass/AddMachinePass so that we
can run IR and MIR passes on a function before proceeding to the next
function.
The MachineFunctionProperties infra for MIR verification is still WIP.
show more ...
|
Revision tags: llvmorg-18.1.0-rc3 |
|
#
d05bd34a |
| 07-Feb-2024 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][NewPM/Codegen] Remove unused parameter from verifyMachineFunction
The MachineFunctionAnalysisManager forward declaration is messing with upcoming changes.
|
#
bb531c9a |
| 07-Feb-2024 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM/Codegen] Move MachineModuleInfo ownership outside of analysis (#80937)
With the legacy pass manager, MachineModuleInfoWrapperPass owned the
MachineModuleInfo used in the codegen pipeline. It
[NewPM/Codegen] Move MachineModuleInfo ownership outside of analysis (#80937)
With the legacy pass manager, MachineModuleInfoWrapperPass owned the
MachineModuleInfo used in the codegen pipeline. It can do this since
it's an ImmutablePass that doesn't get invalidated.
However, with the new pass manager, it is legal for the
ModuleAnalysisManager to clear all of its analyses, regardless of if the
analysis does not want to be invalidated. So we must move ownership of
the MachineModuleInfo outside of the analysis (this is similar to
PassInstrumentation). For now, make the PassBuilder user register a
MachineModuleAnalysis that returns a reference to a MachineModuleInfo
that the user owns. Perhaps we can find a better place to own the
MachineModuleInfo to make using the codegen pass manager less cumbersome
in the future.
show more ...
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1 |
|
#
12a8bc09 |
| 25-Jan-2024 |
paperchalice <liujunchang97@outlook.com> |
[CodeGen] Port FreeMachineFunction to new pass manager (#79421)
This pass should be the last machine function pass in pipeline, also
ignore `PI.runAfterPass(*P, MF, PassPA);` to avoid accessing a d
[CodeGen] Port FreeMachineFunction to new pass manager (#79421)
This pass should be the last machine function pass in pipeline, also
ignore `PI.runAfterPass(*P, MF, PassPA);` to avoid accessing a dangling
reference.
show more ...
|
Revision tags: llvmorg-19-init |
|
#
2952bc33 |
| 14-Dec-2023 |
paperchalice <liujunchang97@outlook.com> |
[MachinePass] Run instrumentation before/after module pass (#70919)
This commit adds `runBeforePass`/`runAfterPass` for machine module pass
so `llc -debug-pass-manager` can e.g., print module pass
[MachinePass] Run instrumentation before/after module pass (#70919)
This commit adds `runBeforePass`/`runAfterPass` for machine module pass
so `llc -debug-pass-manager` can e.g., print module pass names.
Part of #69879.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
f8a1c8b7 |
| 07-Sep-2023 |
kazutakahirata <57370056+kazutakahirata@users.noreply.github.com> |
[llvm] Use llvm::any_cast instead of any_cast (NFC) (#65565)
This patch replaces any_cast with llvm::any_cast. This in turn allows us
to gracefully switch to std::any in future by forwarding llvm::
[llvm] Use llvm::any_cast instead of any_cast (NFC) (#65565)
This patch replaces any_cast with llvm::any_cast. This in turn allows us
to gracefully switch to std::any in future by forwarding llvm::Any and
llvm::any_cast to:
using Any = std::any;
template <class T> T *any_cast(Any *Value) {
return std::any_cast<T>(Value);
}
respectively.
Without this patch, it's ambiguous whether any_cast refers to
std::any_cast or llvm::any_cast.
As an added bonus, this patch makes it easier to mechanically replace
llvm::any_cast with std::any_cast without affecting other occurrences of
any_cast (e.g. in libcxx).
show more ...
|
Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0 |
|
#
bfc6590e |
| 14-Mar-2023 |
Arthur Eubanks <aeubanks@google.com> |
[PassManager] Run PassInstrumentation after analysis invalidation
This allows instrumentation to inspect cached analyses to verify them.
The CGSCC PassInstrumentation previously ran `runAfterPass()
[PassManager] Run PassInstrumentation after analysis invalidation
This allows instrumentation to inspect cached analyses to verify them.
The CGSCC PassInstrumentation previously ran `runAfterPass()` on the original SCC, but really it should be running on UpdatedC when relevant since that's the relevant SCC after the pass.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D146096
show more ...
|
Revision tags: llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
bb7940e2 |
| 20-Dec-2022 |
Sebastian Neubauer <Sebastian.Neubauer@amd.com> |
[llvm] Make llvm::Any similar to std::any
This facilitates replacing llvm::Any with std::any. - Deprecate any_isa in favor of using any_cast(Any*) and checking for nullptr because C++17 has no any
[llvm] Make llvm::Any similar to std::any
This facilitates replacing llvm::Any with std::any. - Deprecate any_isa in favor of using any_cast(Any*) and checking for nullptr because C++17 has no any_isa. - Remove the assert from any_cast(Any*), so it returns nullptr if the type is not correct. This aligns it with std::any_cast(any*).
Use any_cast(Any*) throughout LLVM instead of checks with any_isa.
This is the first part outlined in https://discourse.llvm.org/t/rfc-switching-from-llvm-any-to-std-any/67176
Differential Revision: https://reviews.llvm.org/D139973
show more ...
|
#
19158eb7 |
| 08-Dec-2022 |
Sebastian Neubauer <Sebastian.Neubauer@amd.com> |
Revert "[llvm] Replace llvm::Any with std::any"
msvc fails to link when using any_cast. This seems to be fixed recently only.
https://developercommunity.visualstudio.com/t/stdany-doesnt-link-when-e
Revert "[llvm] Replace llvm::Any with std::any"
msvc fails to link when using any_cast. This seems to be fixed recently only.
https://developercommunity.visualstudio.com/t/stdany-doesnt-link-when-exceptions-are-disabled/376072
This reverts commit aeac2e4884a3ce62c920cd51806a9396da64d9f7.
show more ...
|
#
aeac2e48 |
| 08-Dec-2022 |
Sebastian Neubauer <Sebastian.Neubauer@amd.com> |
[llvm] Replace llvm::Any with std::any
llvm::Any had several bugs in the past, due to being sensitive to symbol visibility. (See D101972 and D108943)
Even with these fixes applied, I still encounte
[llvm] Replace llvm::Any with std::any
llvm::Any had several bugs in the past, due to being sensitive to symbol visibility. (See D101972 and D108943)
Even with these fixes applied, I still encounter the same issue on Windows.
Similar to llvm::Optional going away in favor of std::optional, we can use std::any from C++17.
Using std::any fixes the problem and puts the burden to do it correctly on the standard library.
Differential Revision: https://reviews.llvm.org/D139532
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
34a8a437 |
| 03-May-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose
Printing pass manager invocations is fairly verbose and not super useful.
This allows us to remove DebugLogging from pass
[NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose
Printing pass manager invocations is fairly verbose and not super useful.
This allows us to remove DebugLogging from pass managers and PassBuilder since all logging (aside from analysis managers) goes through instrumentation now.
This has the downside of never being able to print the top level pass manager via instrumentation, but that seems like a minor downside.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D101797
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
18bc400f |
| 21-Aug-2020 |
Yevgeny Rouban <yrouban@azul.com> |
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks
Both AfterPass and AfterPassInvalidated pass instrumentation callbacks get additional parameter of type Preserved
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks
Both AfterPass and AfterPassInvalidated pass instrumentation callbacks get additional parameter of type PreservedAnalyses. This patch was created by @fedor.sergeev. I have just slightly changed it.
Reviewers: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D81555
show more ...
|
Revision tags: llvmorg-11.0.0-rc2 |
|
#
a5ed20b5 |
| 13-Aug-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM][CodeGen] Add machine code verification callback
D83608 need this.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D85916
|
#
f5b5ccf2 |
| 07-Aug-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
Reland "Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager""
This relands commit 320eab2d558fde0b61437e9b9075bfd301c2c474.
The test failed because it was looking for x86-linux
Reland "Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager""
This relands commit 320eab2d558fde0b61437e9b9075bfd301c2c474.
The test failed because it was looking for x86-linux target unconditionally. Now it gets the default target.
show more ...
|
#
911565d1 |
| 07-Aug-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM][CodeGen] Introduce machine pass and machine pass manager
machine pass could define four methods: - `PreservedAnalyses run(MachineFunction &, MachineFunctionAnalysisManager &)` - `Error doIni
[NewPM][CodeGen] Introduce machine pass and machine pass manager
machine pass could define four methods: - `PreservedAnalyses run(MachineFunction &, MachineFunctionAnalysisManager &)` - `Error doInitialization(Module &, MachineFunctionAnalysisManager &)` - `Error doFinalization(Module &, MachineFunctionAnalysisManager &)` - `Error run(Module &, MachineFunctionAnalysisManager &)`
machine pass manger: - MachineFunctionAnalysisManager: Basically an AnalysisManager<MachineFunction> augmented with the ability to register and query IR analyses - MachineFunctionPassManager: support only two methods, `addPass` and `run`
Reviewed By: arsenm, asbirlea, aeubanks
Differential Revision: https://reviews.llvm.org/D67687
show more ...
|