summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.h
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2015-03-24 10:51:52 +0000
committerDavid Brazdil <dbrazdil@google.com>2015-03-26 14:10:03 +0000
commit8d5b8b295930aaa43255c4f0b74ece3ee8b43a47 (patch)
treec26fc49bbc74615e7f0b9657aaf3757a8282d7a9 /compiler/optimizing/builder.h
parentc8924c6ea9e83ba3832dd5551df38ab06f4aaca9 (diff)
downloadart-8d5b8b295930aaa43255c4f0b74ece3ee8b43a47.tar.gz
art-8d5b8b295930aaa43255c4f0b74ece3ee8b43a47.tar.bz2
art-8d5b8b295930aaa43255c4f0b74ece3ee8b43a47.zip
ART: Force constants into the entry block
Optimizations such as GVN and BCE make the assumption that all constants are located in the entry block of the CFG, but not all passes adhere to this rule. This patch makes constructors of constants private and only accessible to friend classes - HGraph for int/long constants and SsaBuilder for float/double - which ensure that they are placed correctly and not duplicated. Note that the ArenaAllocatorAdapter was modified to not increment the ArenaAllocator's internal reference counter in order to allow for use of ArenaSafeMap inside an arena-allocated objects. Because their destructor is not called, the counter does not get decremented. Change-Id: I36a4fa29ae34fb905cdefd482ccbf386cff14166
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r--compiler/optimizing/builder.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index b206660fdc..6a0738a7b9 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -96,8 +96,6 @@ class HGraphBuilder : public ValueObject {
void MaybeUpdateCurrentBlock(size_t index);
HBasicBlock* FindBlockStartingAt(int32_t index) const;
- HIntConstant* GetIntConstant(int32_t constant);
- HLongConstant* GetLongConstant(int64_t constant);
void InitializeLocals(uint16_t count);
HLocal* GetLocalAt(int register_index) const;
void UpdateLocal(int register_index, HInstruction* instruction) const;