Skip to content

Commit b49d6d3

Browse files
Revert "Implemented suggested changes"
This reverts commit f2dd02c.
1 parent fc156b5 commit b49d6d3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/include/llvm/CodeGen/TargetPassConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ class TargetPassConfig : public ImmutablePass {
457457

458458
/// Add a CodeGen pass at this point in the pipeline after checking overrides.
459459
/// Return the pass that was added, or zero if no pass was added.
460-
AnalysisID addPass(IdentifyingPassPtr PassID);
460+
AnalysisID addPass(AnalysisID PassID);
461461

462462
/// Add a pass to the PassManager if that pass is supposed to be run, as
463463
/// determined by the StartAfter and StopAfter options. Takes ownership of the

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,7 @@ void TargetPassConfig::addPass(Pass *P) {
745745
///
746746
/// addPass cannot return a pointer to the pass instance because is internal the
747747
/// PassManager and the instance we create here may already be freed.
748-
AnalysisID TargetPassConfig::addPass(IdentifyingPassPtr PassPtr) {
749-
AnalysisID PassID = PassPtr.isInstance() ? PassPtr.getInstance()->getPassID()
750-
: PassPtr.getID();
748+
AnalysisID TargetPassConfig::addPass(AnalysisID PassID) {
751749
IdentifyingPassPtr TargetID = getPassSubstitution(PassID);
752750
IdentifyingPassPtr FinalPtr = overridePass(PassID, TargetID);
753751
if (!FinalPtr.isValid())
@@ -1515,7 +1513,8 @@ void TargetPassConfig::addMachineLateOptimization() {
15151513
// Cleanup of redundant immediate/address loads.
15161514
addPass(&MachineLateInstrsCleanupID);
15171515

1518-
addPass(IdentifyingPassPtr(createBranchFolderPass(getEnableTailMerge())));
1516+
// Branch folding must be run after regalloc and prolog/epilog insertion.
1517+
addPass(createBranchFolderPass(getEnableTailMerge()));
15191518

15201519
// Tail duplication.
15211520
// Note that duplicating tail just increases code size and degrades

0 commit comments

Comments
 (0)