aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorHongren Zheng <i@zenithal.me>2024-12-24 04:33:23 +0800
committerGitHub <noreply@github.com>2024-12-23 12:33:23 -0800
commita60050cf1966eb8d46253c8da13df52ac8b9ec33 (patch)
treef37dbd762a64511897fcd236403299711b3625bb /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent5b74fb75d90ef6620741af45f146cefacbd9ecef (diff)
downloadllvm-a60050cf1966eb8d46253c8da13df52ac8b9ec33.zip
llvm-a60050cf1966eb8d46253c8da13df52ac8b9ec33.tar.gz
llvm-a60050cf1966eb8d46253c8da13df52ac8b9ec33.tar.bz2
[mlir][dataflow] Allow re-run all analyses in DataFlowSolver (#120881)
In downstream (check https://github.com/google/heir/pull/1228, especially [this commit](https://github.com/ZenithalHourlyRate/heir/commit/fbf0b2733f1f60e852c757602afac65a4364e30c); also check https://github.com/google/heir/pull/1154) we often need to re-run the analysis during the transformation pass as IR get changed based on the analysis result and analysis continuously get invalidated. There are solutions to it like `getOrCreateState` for newly created `Value` (`AnchorT`), but warning is that the new state does not propagate! This is quite unexpected as user of analysis would expect it to propagate. We downstream used to use `solver->propagateIfChanged` but that turned out to be not working, see detailed writeup in https://github.com/google/heir/issues/1153. Just call `initializeAndRun` repeatedly also does not solve the problem as `analysisStates` is not cleared and the monotonicity of `AnalysisState` will make the analysis invalid as `join` will not work as expected (the first join is no longer `join(uninitialized, init value)`, instead it becomes `join(higher value, init value)`. To correctly re-run the analysis, either a new `DataFlowSolver` is created, or we can just clear the `analysisState`.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions