Skip to content

Commit f6a9b62

Browse files
committed
fix a typo
1 parent 12322aa commit f6a9b62

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mlir/lib/Transforms/RemoveDeadValues.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ struct RemoveDeadValues : public impl::RemoveDeadValuesBase<RemoveDeadValues> {
887887
/// }
888888
///
889889
/// Returns true if any IR changes were made, false otherwise.
890-
static bool processCallOp(CallOpInterface callOp, Operation *module,
890+
static bool processCallOp(CallOpInterface callOp, ModuleOp moduleOp,
891891
RunLivenessAnalysis &la) {
892892
Operation *callableOp = callOp.resolveCallable();
893893
auto funcOp = dyn_cast<FunctionOpInterface>(callableOp);
@@ -903,7 +903,6 @@ static bool processCallOp(CallOpInterface callOp, Operation *module,
903903
nonLiveArgs = nonLiveArgs.flip();
904904

905905
if (nonLiveArgs.count() > 0) {
906-
auto moduleOp = cast<ModuleOp>(module);
907906
OpBuilder rewriter(moduleOp.getContext());
908907

909908
// Clone function and create private version
@@ -992,11 +991,11 @@ void RemoveDeadValues::runOnOperation() {
992991
RunLivenessAnalysis *la = &am.getAnalysis<RunLivenessAnalysis>();
993992
Operation *module = getOperation();
994993

995-
// Only privatize public funciton if liveness analysis is inter-procedural.
994+
// Only privatize public functions if liveness analysis is inter-procedural.
996995
if (la->getSolverConfig().isInterprocedural()) {
997996
bool changed = false;
998997
module->walk([&](CallOpInterface callOp) {
999-
if (processCallOp(callOp, module, *la)) {
998+
if (processCallOp(callOp, cast<ModuleOp>(module), *la)) {
1000999
changed = true;
10011000
}
10021001
});
@@ -1007,7 +1006,6 @@ void RemoveDeadValues::runOnOperation() {
10071006
bool preserved = pa.isPreserved<RunLivenessAnalysis>();
10081007
la->invalidate();
10091008
am.invalidate(pa);
1010-
10111009
la = &am.getAnalysis<RunLivenessAnalysis>();
10121010
// If RunLivenessAnalysis was previously preserved, preserved the updated
10131011
// results.

0 commit comments

Comments
 (0)