History log of /llvm-project/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp (Results 1 – 12 of 12)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5cd0ba30 24-Jun-2024 Nikita Popov <npopov@redhat.com>

Reapply [IR] Lazily initialize the class to pass name mapping (NFC) (#96321) (#96462)

On MSVC the `this` uses inside `decltype` require a lambda capture. On
clang they result in an unused capture w

Reapply [IR] Lazily initialize the class to pass name mapping (NFC) (#96321) (#96462)

On MSVC the `this` uses inside `decltype` require a lambda capture. On
clang they result in an unused capture warning instead. Add the capture
and suppress the warning with `(void)this`.

-----

Initializing this map is somewhat expensive (especially for O0), so we
currently only do it if certain flags are used. I would like to make use
of it for crash dumps (#96078), where we don't know in advance whether
it will be needed or not.

This patch changes the initialization to a lazy approach, where a
callback is registered that does the actual initialization. The
callbacks will be run the first time the pass name is requested.

This way there is no compile-time impact if the mapping is not used.

show more ...


# e5a41f0a 24-Jun-2024 Nikita Popov <npopov@redhat.com>

Revert "[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)"

My attempt to fix the Windows build made things worse,
revert entirely for now.

This reverts commit e7137f2fed5cfee822a

Revert "[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)"

My attempt to fix the Windows build made things worse,
revert entirely for now.

This reverts commit e7137f2fed5cfee822ae3c4c6d39188adb59a16c.
This reverts commit 6eaf204dbb0a6a81cddfd02f625c130f7bb1aae5.
This reverts commit 957dc4366dd2ce9d5d2991c3ad76bbf438e9954e.

show more ...


# 957dc436 24-Jun-2024 Nikita Popov <npopov@redhat.com>

[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)

Initializing this map is somewhat expensive (especially for O0), so we
currently only do it if certain flags are used. I would l

[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)

Initializing this map is somewhat expensive (especially for O0), so we
currently only do it if certain flags are used. I would like to make use
of it for crash dumps (#96078), where we don't know in advance whether
it will be needed or not.

This patch changes the initialization to a lazy approach, where a
callback is registered that does the actual initialization. The
callbacks will be run the first time the pass name is requested.

This way there is no compile-time impact if the mapping is not used.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 7652a594 04-Jun-2024 paperchalice <liujunchang97@outlook.com>

Reland "[NewPM][CodeGen] Port selection dag isel to new pass manager" (#94149)

- Fix build with `EXPENSIVE_CHECKS`
- Remove unused `PassName::ID` to resolve warning
- Mark `~SelectionDAGISel` virt

Reland "[NewPM][CodeGen] Port selection dag isel to new pass manager" (#94149)

- Fix build with `EXPENSIVE_CHECKS`
- Remove unused `PassName::ID` to resolve warning
- Mark `~SelectionDAGISel` virtual so AArch64 backend can work properly

show more ...


# 8917afaf 02-Jun-2024 paperchalice <liujunchang97@outlook.com>

Revert "[NewPM][CodeGen] Port selection dag isel to new pass manager" (#94146)

This reverts commit de37c06f01772e02465ccc9f538894c76d89a7a1 to
de37c06f01772e02465ccc9f538894c76d89a7a1

It still b

Revert "[NewPM][CodeGen] Port selection dag isel to new pass manager" (#94146)

This reverts commit de37c06f01772e02465ccc9f538894c76d89a7a1 to
de37c06f01772e02465ccc9f538894c76d89a7a1

It still breaks EXPENSIVE_CHECKS build. Sorry.

show more ...


# d2cdc8ab 02-Jun-2024 paperchalice <liujunchang97@outlook.com>

[NewPM][CodeGen] Port selection dag isel to new pass manager (#83567)

Port selection dag isel to new pass manager.
Only `AMDGPU` and `X86` support new pass version. `-verify-machineinstrs` in new p

[NewPM][CodeGen] Port selection dag isel to new pass manager (#83567)

Port selection dag isel to new pass manager.
Only `AMDGPU` and `X86` support new pass version. `-verify-machineinstrs` in new pass manager belongs to verify instrumentation, it is enabled by default.

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# dd4b40ff 15-Apr-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen] Let `CodeGenPassBuilder` know concrete target machine (#88614)

Many backends passes accept only `<Target>TargetMachine`, this can avoid
cast to derived type.


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2
# 9e004054 14-Mar-2024 mahesh-attarde <145317060+mahesh-attarde@users.noreply.github.com>

[CodeGen][X86] Remove Expensive option copy and delete copy assignment (#85187)

Remove Expensive option copy and delete copy assignment


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4
# ed1aabef 27-Feb-2024 mahesh-attarde <145317060+mahesh-attarde@users.noreply.github.com>

remove expensive copy of options passed (#82577)

Codegen option is passed copy by value which 138 bytes of copy and used
as read-only. Making pass by const reference.


# 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, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# 72512433 24-Jan-2024 paperchalice <liujunchang97@outlook.com>

[CodeGen][Passes] Move `CodeGenPassBuilder.h` to Passes (#79242)

`CodeGenPassBuilder` is not very tightly coupled to CodeGen, it may need
to reference some method in pass builder in future, so move

[CodeGen][Passes] Move `CodeGenPassBuilder.h` to Passes (#79242)

`CodeGenPassBuilder` is not very tightly coupled to CodeGen, it may need
to reference some method in pass builder in future, so move
`CodeGenPassBuilder.h` to Passes.

show more ...


Revision tags: llvmorg-19-init
# 7e50f006 24-Jan-2024 paperchalice <liujunchang97@outlook.com>

[NewPM][CodeGen][llc] Add NPM support (#70922)

Add new pass manager support to `llc`. Users can use
`--passes=pass1,pass2...` to run mir passes, and use `--enable-new-pm`
to run default codegen pi

[NewPM][CodeGen][llc] Add NPM support (#70922)

Add new pass manager support to `llc`. Users can use
`--passes=pass1,pass2...` to run mir passes, and use `--enable-new-pm`
to run default codegen pipeline.
This patch is taken from [D83612](https://reviews.llvm.org/D83612), the
original author is @yuanfang-chen.

---------

Co-authored-by: Yuanfang Chen <455423+yuanfang-chen@users.noreply.github.com>

show more ...