summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-11-17 09:42:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-17 09:42:25 +0000
commitc1d4ec95c9dc69a7373e2eca0e69965e54d9cf03 (patch)
tree7ded15095ee62d471fe1455ec915c1d68fb202f6 /compiler/optimizing/code_generator.h
parent44e6d985fddb3d921f054ff64c319c86005118e9 (diff)
parentaf07bc121121d7bd7e8329c55dfe24782207b561 (diff)
downloadart-c1d4ec95c9dc69a7373e2eca0e69965e54d9cf03.tar.gz
art-c1d4ec95c9dc69a7373e2eca0e69965e54d9cf03.tar.bz2
art-c1d4ec95c9dc69a7373e2eca0e69965e54d9cf03.zip
Merge "Minor object store optimizations."
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 63bf96ca5a..1d7a5222bc 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -168,6 +168,15 @@ class CodeGenerator : public ArenaObject<kArenaAllocMisc> {
void EmitParallelMoves(Location from1, Location to1, Location from2, Location to2);
+ static bool StoreNeedsWriteBarrier(Primitive::Type type, HInstruction* value) {
+ if (kIsDebugBuild) {
+ if (type == Primitive::kPrimNot && value->IsIntConstant()) {
+ CHECK(value->AsIntConstant()->GetValue() == 0);
+ }
+ }
+ return type == Primitive::kPrimNot && !value->IsIntConstant();
+ }
+
protected:
CodeGenerator(HGraph* graph,
size_t number_of_core_registers,