Skip to content

[Pass][CodeGen] Add some necessary passes for codegen #70903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

paperchalice
Copy link
Contributor

These passes are used in TargetPassConfig.cpp, so add them here. Part of #69879.
@arsenm Thanks for reviwing.

@@ -124,6 +122,8 @@ DUMMY_FUNCTION_PASS("cfguard-check", CFGuardCheckPass, ())
DUMMY_FUNCTION_PASS("gc-info-printer", GCInfoPrinterPass, ())
DUMMY_FUNCTION_PASS("select-optimize", SelectOptimizePass, ())
DUMMY_FUNCTION_PASS("callbrprepare", CallBrPrepare, ())
DUMMY_FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass, ())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between FUNCTION_PASS and DUMMY_FUNCTION_PASS? Why do these need to move?

Copy link
Contributor Author

@paperchalice paperchalice Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DUMMY_* denotes this pass has not been ported to the new pass system, if they are ported to the new pass system, the DUMMY prefix should be removed. These codes are used by CodeGenPassBuilder.h to register necessary IR transformations/analyses.
I searched code base for these two passes, and found that ExpandLargeDivRemPass and ExpandLargeFpConvertPass are still legacy pass.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed ExpandLargeDivRem in #71022

@paperchalice
Copy link
Contributor Author

Align with upstream.

@arsenm arsenm merged commit f40da07 into llvm:main Nov 8, 2023
@paperchalice paperchalice deleted the NPM/CodeGen/Passes branch November 8, 2023 09:19
@bulbazord
Copy link
Member

Hi @paperchalice it looks like this broke building LLVM with Modules enabled so I will be reverting shortly. Please take a look: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/62369/console

You can reproduce by trying to build llvm with the CMake setting LLVM_ENABLE_MODULES=ON

bulbazord added a commit that referenced this pull request Nov 9, 2023
This change broke building LLVM with Module support enabled, i.e.
`LLVM_ENABLE_MODULES=ON`.
This reverts commit f40da07.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants