From 8d5b8b295930aaa43255c4f0b74ece3ee8b43a47 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 24 Mar 2015 10:51:52 +0000 Subject: 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 --- compiler/optimizing/builder.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'compiler/optimizing/builder.h') 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; -- cgit v1.2.3