-
Notifications
You must be signed in to change notification settings - Fork 15.7k
CodeGen: Port ExpandLargeDivRem to new pass manager #71022
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| //===- ExpandLargeDivRem.h --------------------------------------*- C++ -*-===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_CODEGEN_EXPANDLARGEDIVREM_H | ||
| #define LLVM_CODEGEN_EXPANDLARGEDIVREM_H | ||
|
|
||
| #include "llvm/IR/PassManager.h" | ||
|
|
||
| namespace llvm { | ||
|
|
||
| class TargetMachine; | ||
|
|
||
| class ExpandLargeDivRemPass : public PassInfoMixin<ExpandLargeDivRemPass> { | ||
| private: | ||
| const TargetMachine *TM; | ||
|
|
||
| public: | ||
| explicit ExpandLargeDivRemPass(const TargetMachine *TM_) : TM(TM_) {} | ||
|
|
||
| PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); | ||
| }; | ||
|
|
||
| } // end namespace llvm | ||
|
|
||
| #endif // LLVM_CODEGEN_EXPANDLARGEDIVREM_H |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -445,6 +445,7 @@ FUNCTION_PASS("transform-warning", WarnMissedTransformationsPass()) | |||
| FUNCTION_PASS("tsan", ThreadSanitizerPass()) | ||||
| FUNCTION_PASS("memprof", MemProfilerPass()) | ||||
| FUNCTION_PASS("declare-to-assign", llvm::AssignmentTrackingPass()) | ||||
| FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass(TM)); | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to already exist without the constructor argument in MachinePassRegistry.def, not sure what's going on there
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean this exists:
|
||||
| #undef FUNCTION_PASS | ||||
|
|
||||
| #ifndef FUNCTION_PASS_WITH_PARAMS | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.