Skip to content

Commit 3b92ca9

Browse files
jsantillan2017sys_zuul
authored andcommitted
Adding getAnalysisUsage method
Change-Id: I88f34dc98f15b0ef5df91c3cae1dc9f1652db529
1 parent 2b8081f commit 3b92ca9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

IGC/Compiler/CustomSafeOptPass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,8 @@ TrivialLocalMemoryOpsElimination::TrivialLocalMemoryOpsElimination() : FunctionP
10451045
bool TrivialLocalMemoryOpsElimination::runOnFunction(Function& F)
10461046
{
10471047
bool change = false;
1048+
1049+
10481050
visit(F);
10491051
if (!abortPass && (m_LocalLoadsToRemove.empty() ^ m_LocalStoresToRemove.empty()))
10501052
{

IGC/Compiler/CustomSafeOptPass.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2525
======================= end_copyright_notice ==================================*/
2626
#pragma once
2727
#include "Compiler/CodeGenContextWrapper.hpp"
28+
#include "common/MDFrameWork.h"
2829

2930
#include "common/LLVMWarningsPush.hpp"
3031
#include <llvm/Pass.h>
@@ -111,6 +112,12 @@ namespace IGC
111112

112113
~TrivialLocalMemoryOpsElimination() {}
113114

115+
virtual void getAnalysisUsage(llvm::AnalysisUsage& AU) const override
116+
{
117+
AU.addRequired<CodeGenContextWrapper>();
118+
AU.setPreservesCFG();
119+
}
120+
114121
virtual bool runOnFunction(llvm::Function& F) override;
115122

116123
virtual llvm::StringRef getPassName() const override

0 commit comments

Comments
 (0)