-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Make Ownership of MachineModuleInfo in Its Wrapper Pass External #110443
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
Open
matinraayai
wants to merge
21
commits into
llvm:main
Choose a base branch
from
matinraayai:mmiwp-mmi-ownership
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+230
−179
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6a78a68
Made MMIWP not have control over the lifetime of MMI.
matinraayai c2d984a
Moved the MC pass creation functions from TargetMachine to LLVMTarget…
matinraayai ed40387
Migrated BackendUtil.cpp to the new LLVMTargetMachine code emission API.
matinraayai 75dd38a
Migrated DeviceOffload.cpp to the new LLVMTargetMachine code emission…
matinraayai 00be9bf
Migrated Wasm.cpp to the new LLVMTargetMachine code emission API.
matinraayai 7bee39f
Migrated ClangLinkerWrapper.cpp to the new LLVMTargetMachine code emi…
matinraayai d9fcf48
Migrated FrontendActions.cpp to the new LLVMTargetMachine code emissi…
matinraayai 631cbb2
Migrated MCJIT.cpp to the new LLVMTargetMachine code emission API.
matinraayai e8e81db
Migrated CompileUtils.cpp to the new LLVMTargetMachine code emission …
matinraayai 4cfc73e
Moved the MC emission APIs to TargetMachine again to keep the PR chan…
matinraayai 4ca0afb
Migrated LTOBackend.cpp to use the new TargetMachine MC emission API.
matinraayai b33936c
Migrated ThinLTOCodeGenerator.cpp to use the new TargetMachine MC emi…
matinraayai e945366
Migrated NVPTXTargetMachine.h to use the new TargetMachine MC emissio…
matinraayai 737685e
Migrated the remaining test files to the new MMIWP constructor.
matinraayai 0a6575c
clang tidy.
matinraayai 753d99a
Fixed compilation issue.
matinraayai 9ba7913
Fixed default construction of MMI in the AsmPrinterDwarfTest.
matinraayai ead138a
Create LLVMTargetMachineC.cpp to implement the MC-emission related th…
matinraayai 928014d
Added missing line at the end of LLVMTargetMachineC.cpp.
matinraayai 1beda2a
Added missing line at the end of LLVMTargetMachineC.cpp.
matinraayai d4a5620
Next line issue in LLVMTargetMachineC.cpp.
matinraayai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,16 +106,18 @@ class MachineModuleInfo { | |
const Function *LastRequest = nullptr; ///< Used for shortcut/cache. | ||
MachineFunction *LastResult = nullptr; ///< Used for shortcut/cache. | ||
|
||
MachineModuleInfo &operator=(MachineModuleInfo &&MMII) = delete; | ||
/// Deleted copy constructor | ||
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. comment is not useful, I'd either say why it's deleted or just remove the comment |
||
MachineModuleInfo(MachineModuleInfo &MMI) = delete; | ||
|
||
/// Deleted copy assignment operator | ||
MachineModuleInfo &operator=(MachineModuleInfo &MMI) = delete; | ||
|
||
public: | ||
explicit MachineModuleInfo(const LLVMTargetMachine *TM = nullptr); | ||
|
||
explicit MachineModuleInfo(const LLVMTargetMachine *TM, | ||
MCContext *ExtContext); | ||
|
||
MachineModuleInfo(MachineModuleInfo &&MMII); | ||
|
||
~MachineModuleInfo(); | ||
|
||
void initialize(); | ||
|
@@ -169,14 +171,11 @@ class MachineModuleInfo { | |
}; // End class MachineModuleInfo | ||
|
||
class MachineModuleInfoWrapperPass : public ImmutablePass { | ||
MachineModuleInfo MMI; | ||
MachineModuleInfo &MMI; | ||
|
||
public: | ||
static char ID; // Pass identification, replacement for typeid | ||
explicit MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM = nullptr); | ||
|
||
explicit MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM, | ||
MCContext *ExtContext); | ||
explicit MachineModuleInfoWrapperPass(MachineModuleInfo &MMI); | ||
|
||
// Initialization and Finalization | ||
bool doInitialization(Module &) override; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this just be
MachineModuleInfo MMI;
below?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it to a normal construction with the
TM
.