Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions llvm/include/llvm/IR/LegacyPassManagers.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class LLVM_ABI FPPassManager : public ModulePass, public PMDataManager {

/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.
bool runOnFunction(Function &F);
virtual bool runOnFunction(Function &F);
bool runOnModule(Module &M) override;

/// cleanup - After running all passes, clean up pass manager cache.
Expand Down Expand Up @@ -496,7 +496,7 @@ class LLVM_ABI FPPassManager : public ModulePass, public PMDataManager {
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) override;

StringRef getPassName() const override { return "Function Pass Manager"; }
StringRef getPassName() const override { return "FunctionPass Manager"; }

FunctionPass *getContainedPass(unsigned N) {
assert ( N < PassVector.size() && "Pass number out of range!");
Expand All @@ -507,6 +507,10 @@ class LLVM_ABI FPPassManager : public ModulePass, public PMDataManager {
PassManagerType getPassManagerType() const override {
return PMT_FunctionPassManager;
}

protected:
// So subclasses can pass their own ID.
explicit FPPassManager(char &ID) : ModulePass(ID) {}
};
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/IR/LegacyPassManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ void FPPassManager::cleanup() {
char FPPassManager::ID = 0;
/// Print passes managed by this manager
void FPPassManager::dumpPassStructure(unsigned Offset) {
dbgs().indent(Offset*2) << "FunctionPass Manager\n";
dbgs().indent(Offset * 2) << getPassName() << '\n';
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
FunctionPass *FP = getContainedPass(Index);
FP->dumpPassStructure(Offset + 1);
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
; please adjust accordingly.)

; HOTNESS: Freeing Pass 'Machine Outliner'
; HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
; HOTNESS-NEXT: Executing Pass 'FunctionPass Manager'
; HOTNESS-NEXT: Executing Pass 'Verify generated machine code' on Function 'empty_func'...
; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code' on Function 'empty_func'...
; HOTNESS-NEXT: Executing Pass 'AArch64 sls hardening pass' on Function 'empty_func'...
Expand Down Expand Up @@ -76,7 +76,7 @@


; NO_HOTNESS: Freeing Pass 'Machine Outliner'
; NO_HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
; NO_HOTNESS-NEXT: Executing Pass 'FunctionPass Manager'
; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code' on Function 'empty_func'...
; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code' on Function 'empty_func'...
; NO_HOTNESS-NEXT: Executing Pass 'AArch64 sls hardening pass' on Function 'empty_func'...
Expand Down