-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[CodeGen][NPM] Update BranchFolderLegacy make tail merge configurable via flag #135277
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
1439764
1129f40
7d8d9df
9b95974
17fcc45
73b228a
f2dd02c
fc156b5
b49d6d3
1293477
756e1a5
501a1cf
61251d3
ec4571a
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 |
|---|---|---|
|
|
@@ -707,6 +707,10 @@ void TargetPassConfig::addPass(Pass *P) { | |
| // and shouldn't reference it. | ||
| AnalysisID PassID = P->getPassID(); | ||
|
|
||
| IdentifyingPassPtr TargetID = getPassSubstitution(PassID); | ||
| if (!overridePass(PassID, TargetID).isValid()) | ||
| return; | ||
|
||
|
|
||
| if (StartBefore == PassID && StartBeforeCount++ == StartBeforeInstanceNum) | ||
| Started = true; | ||
| if (StopBefore == PassID && StopBeforeCount++ == StopBeforeInstanceNum) | ||
|
|
@@ -1514,7 +1518,7 @@ void TargetPassConfig::addMachineLateOptimization() { | |
| addPass(&MachineLateInstrsCleanupID); | ||
|
|
||
| // Branch folding must be run after regalloc and prolog/epilog insertion. | ||
| addPass(&BranchFolderPassID); | ||
| addPass(createBranchFolderPass(getEnableTailMerge())); | ||
|
|
||
| // Tail duplication. | ||
| // Note that duplicating tail just increases code size and degrades | ||
|
|
||
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.
Are you talking about the default argument? I see that
BranchFolderPassalready takes abool EnableTailMerge:llvm-project/llvm/include/llvm/CodeGen/BranchFoldingPass.h
Line 19 in b39ab7a