summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_test.cc
AgeCommit message (Collapse)Author
2015-05-18Support InlineInfo in StackMap.Nicolas Geoffray
Change-Id: I9956091775cedc609fdae7dec1433fcb8858a477
2015-04-23Cleanup and improve stack map streamCalin Juravle
- transform AddStackMapEntry into BeginStackMapEntry/EndStackMapEntry. This allows for nicer code and less assumptions when searching for equal dex register maps. - store the components sizes and their start positions as fields to avoid re-computation. - store the current stack map entry as a field to avoid the copy semantic when updating its value in the stack maps array. - remove redundant methods and fix visibility for the remaining ones. Change-Id: Ica2d2969d7e15993bdbf8bc41d9df083cddafd24
2015-03-31Use variable encoding for StackMap.Nicolas Geoffray
dex_pc, native_pc_offset, dex_register_map_offset, inline_info_offset, and register_mask can now be encoded in 1, 2, 3, or 4 bytes. Change-Id: I15f93e8226ce374204d44c5a80a9fd89bda2687c
2015-03-31Use unique location catalogs to encode Dex register maps.Roland Levillain
- For each CodeInfo object (i.e. for each method), compute a variable index size location catalog of unique Dex register locations. In Dex register maps, instead of storing the actual location of a (live) Dex register, store the index of the location catalog entry containing that Dex register location. - Adjust art::StackMapStream, art::CheckReferenceMapVisitor::CheckOptimizedMethod, art::StackVisitor::GetVRegFromOptimizedCode, and art::StackVisitor::SetVRegFromOptimizedCode. - Add LoadBits and StoreBits methods to art::MemoryRegion to load and store a block of adjacent bits in a memory region. - Update compiler/optimizing/stack_map_test.cc. - Remove the default value for parameter EmptyFn of art::HashMap. This default value did not seem to make sense, as it would create an "empty function" for type Key by default, whereas art::HashMap expects an "empty function" for type std::pair<Key, Value>. Change-Id: Id9e49d7756c253ce41c36630cd832208d06c2e28
2015-03-25Share dex register maps between stack maps when possible.Calin Juravle
If two stack maps have the same dex register map then one of them will reference the register map from the other instead of owning an independent copy. This saves around 1.5% of space. Change-Id: Ic2c2c81210c6c45a5c5f650f7ba82a46ff6f45e4
2015-03-20Compress the StackMaps.Nicolas Geoffray
First step towards the compression of the StackMap (not the DexRegisterMap). Next step will be to just use what is needed (instead of byte -> word). Change-Id: I4f81b2d05bf5cc508585e16fbbed1bafbc850e2e
2015-03-16Update locations of registers after slow paths spilling.Nicolas Geoffray
Change-Id: Id9aafcc13c1a085c17ce65d704c67b73f9de695d
2015-03-13[optimizing] Don't record None locations in the stack maps.Nicolas Geoffray
- moved environment recording from code generator to stack map stream - added creation/loading factory methods for the DexRegisterMap (hides internal details) - added new tests Change-Id: Ic8b6d044f0d8255c6759c19a41df332ef37876fe
2015-03-12Compress the Dex register maps built by the optimizing compiler.Roland Levillain
- Replace the current list-based (fixed-size) Dex register encoding in stack maps emitted by the optimizing compiler with another list-based variable-size Dex register encoding compressing short locations on 1 byte (3 bits for the location kind, 5 bits for the value); other (large) values remain encoded on 5 bytes. - In addition, use slot offsets instead of byte offsets to encode the location of Dex registers placed in stack slots at small offsets, as it enables more values to use the short (1-byte wide) encoding instead of the large (5-byte wide) one. - Rename art::DexRegisterMap::LocationKind as art::DexRegisterLocation::Kind, turn it into a strongly-typed enum based on a uint8_t, and extend it to support new kinds (kInStackLargeOffset and kConstantLargeValue). - Move art::DexRegisterEntry from compiler/optimizing/stack_map_stream.h to runtime/stack_map.h and rename it as art::DexRegisterLocation. - Adjust art::StackMapStream, art::CodeGenerator::RecordPcInfo, art::CheckReferenceMapVisitor::CheckOptimizedMethod, art::StackVisitor::GetVRegFromOptimizedCode, and art::StackVisitor::SetVRegFromOptimizedCode. - Implement unaligned memory accesses in art::MemoryRegion. - Use them to manipulate data in Dex register maps. - Adjust oatdump to support the new Dex register encoding. - Update compiler/optimizing/stack_map_test.cc. Change-Id: Icefaa2e2b36b3c80bb1b882fe7ea2f77ba85c505
2015-03-05Extend compiler/optimizing/stack_map_test.cc.Roland Levillain
Change-Id: I6f8c3186683210a5162cbf4f15361a4c494495c9
2015-02-19Display optimizing compiler's CodeInfo objects in oatdump.Roland Levillain
A few elements are not displayed yet (stack mask, inline info) though. Change-Id: I5e51a801c580169abc5d1ef43ad581aadc110754
2014-09-08Runtime support for the new stack maps for the opt compiler.Nicolas Geoffray
Now most of the methods supported by the compiler can be optimized, instead of using the baseline. Change-Id: I80ab36a34913fa4e7dd576c7bf55af63594dc1fa
2014-07-21Add a new stack map scheme that encodes compilation info per pc.Nicolas Geoffray
Encodes stack mask, register mask, dex register values, and inlining info. The encoding is currently very straightforward: there is no clever encoding, nor compression. Change-Id: I5fd9ae28189a5513cd9e3c8d52c648463207643d