diff options
Diffstat (limited to 'src/passes/DeadArgumentElimination.cpp')
-rw-r--r-- | src/passes/DeadArgumentElimination.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/passes/DeadArgumentElimination.cpp b/src/passes/DeadArgumentElimination.cpp index 9d8fa5b0d..f3e3ae98c 100644 --- a/src/passes/DeadArgumentElimination.cpp +++ b/src/passes/DeadArgumentElimination.cpp @@ -327,14 +327,8 @@ struct DAE : public Pass { // affect whether an argument is used or not, it just refines the type // where possible. refineArgumentTypes(func, calls, module); - // Refine return types as well, if we can. We cannot do so if this - // function is tail-called, because then the return type must match that - // of the function doing a tail call of it - we cannot change just one of - // them. - // - // TODO: Try to optimize in a more holistic manner, see the TODO in - // refineReturnTypes() about missing a global optimum. - if (!tailCallees.count(name) && refineReturnTypes(func, calls, module)) { + // Refine return types as well. + if (refineReturnTypes(func, calls, module)) { refinedReturnTypes = true; } // Check if all calls pass the same constant for a particular argument. |