diff options
author | 2022-12-16 19:28:47 +0000 | |
---|---|---|
committer | 2023-01-13 16:19:02 +0000 | |
commit | 74da668328e1c501742a864d23ba8c114ece5e64 (patch) | |
tree | a8e6d643230ff9bec8ae8878cd8d1021b813a3e5 /compiler/optimizing/dead_code_elimination.h | |
parent | 1f3861de4cacb51eacbb624e377b9dc7d7f96cc1 (diff) |
Update the graph flags and check consistency
Check that the flags are up to date in graph checker. Mainly a
correctness check CL but it brings slight code size reduction
(e.g. not needing vreg info if HasMonitorOperations is false).
Update loop_optimization_test to stop using `LocalRun` directly
as it meant that it was breaking assumptions (i.e. top_loop_ was
nullptr when it was expected to have a value).
Bug: 264278131
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I29765b3be46d4bd7c91ea9c80f7565a3c88fae2e
Diffstat (limited to 'compiler/optimizing/dead_code_elimination.h')
-rw-r--r-- | compiler/optimizing/dead_code_elimination.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/dead_code_elimination.h b/compiler/optimizing/dead_code_elimination.h index 1988733d75..b91006be0d 100644 --- a/compiler/optimizing/dead_code_elimination.h +++ b/compiler/optimizing/dead_code_elimination.h @@ -48,6 +48,12 @@ class HDeadCodeElimination : public HOptimization { bool SimplifyAlwaysThrows(); bool SimplifyIfs(); void ConnectSuccessiveBlocks(); + // Updates the graph flags related to instructions (e.g. HasSIMD()) since we may have eliminated + // the relevant instructions. There's no need to update `SetHasTryCatch` since we do that in + // `ComputeTryBlockInformation`. Similarly with `HasLoops` and `HasIrreducibleLoops`: They are + // cleared in `ClearLoopInformation` and then set as true as part of `HLoopInformation::Populate`, + // if needed. + void UpdateGraphFlags(); // Helper struct to eliminate tries. struct TryBelongingInformation; |