Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Codegen] Swap out analyzer when outlining (apache#9117)
Problem: the `analyzer_` in `CodeGenLLVM` and derived classes can generate invalid code for outlined functions. Consider code like this: let x = y in // attr compute_scope blah = x Then it gets outlined in codegen_cpu (for example): let x = y in call foo(x) foo(x) { blah = x } Now, if `analyzer_->Simplify` was run on the body of `foo`, it would produce: foo(x) { blah = y } Because the `analyzer_` knows that `x` is same as `y` (because of the `Let` statemement), but doesn't know that `y` is no longer available in the outlined function `foo`. See https://discuss.tvm.apache.org/t/compute-scope-issue-with-analyzer-invalid-simplification/11111
- Loading branch information