diff options
author | Yevgeny Rouban <yevgeny.y.rouban@intel.com> | 2014-10-15 17:32:25 +0700 |
---|---|---|
committer | Yevgeny Rouban <yevgeny.y.rouban@intel.com> | 2014-10-15 17:32:25 +0700 |
commit | 423b137214debfa066522763a8e78511d300c8c9 (patch) | |
tree | 0415a50a74aea055e5b22022a8e3a5868816ee12 /compiler/dex/compiler_enums.h | |
parent | 2df6840f68dd18d7dd8dbf53f8b6181bbfdc4fc4 (diff) | |
download | android_art-423b137214debfa066522763a8e78511d300c8c9.tar.gz android_art-423b137214debfa066522763a8e78511d300c8c9.tar.bz2 android_art-423b137214debfa066522763a8e78511d300c8c9.zip |
ART: NullCheckElimination should converge with MIR_IGNORE_NULL_CHECK
If the MIRGraph::EliminateNullChecksAndInferTypes() function managed
to prove that some regs are non-null then it sets the flag
MIR_IGNORE_NULL_CHECK and resets this flag for all the other regs.
If some previous optimizations have already set MIR_IGNORE_NULL_CHECK
then it can be reset by EliminateNullChecksAndInferTypes. This way
NullCheckElimination discards some optimization efforts.
Optimization passes should not reset MIR_IGNORE_NULL_CHECK unless
they 100% sure NullCheck is needed.
This patch makes the NCE_TypeInference pass merge its own
calculated MIR_IGNORE_NULL_CHECK with the one came from previous
optimizations. Technically NCE_TypeInference calculates the flag
in a temporary MIR_MARK-th bit by preserving MIR_IGNORE_NULL_CHECK.
Then at the end of NCE pass MIR_MARK is or-ed with
MIR_IGNORE_NULL_CHECK.
Change-Id: Ib26997c70ecf2c158f61496dee9b1fe45c812096
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
Diffstat (limited to 'compiler/dex/compiler_enums.h')
-rw-r--r-- | compiler/dex/compiler_enums.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/compiler_enums.h b/compiler/dex/compiler_enums.h index e4003bf088..78da420339 100644 --- a/compiler/dex/compiler_enums.h +++ b/compiler/dex/compiler_enums.h @@ -311,7 +311,8 @@ enum MIROptimizationFlagPositions { kMIRCallee, // Instruction is inlined from callee. kMIRIgnoreSuspendCheck, kMIRDup, - kMIRMark, // Temporary node mark. + kMIRMark, // Temporary node mark can be used by + // opt passes for their private needs. kMIRStoreNonTemporal, kMIRLastMIRFlag, }; |