summaryrefslogtreecommitdiffstats
path: root/runtime/base/bit_vector.cc
Commit message (Collapse)AuthorAgeFilesLines
* ART: Change UnresolvedMergedType internal representationAndreas Gampe2015-08-101-9/+28
| | | | | | | | | | Squashed cherry-picks: * 067f1ed7816cf4eb5d6258ca31b387ddb2073ab7 * 750f7c2827318f6d07620f2ef0321218ea4d8670 * 2f90b3415aadc2587d26c767c6bfb235797119a8 * 2ea7b70b2347969f3735bd0ec1b462bd6d2ff1bd Bug: 22881413
* Quick: Fix DCE to mark wide register overlaps correctly.Vladimir Marko2015-05-121-5/+0
| | | | | | | | | | | Previously we missed some cases of overlap with registers coming from previous blocks. Bug: 20640451 (cherry picked from commit 83d46ef1eaa8fdecadfdb9564d80e50b42646c37) Change-Id: I1be879edfbc900b70cee411d9e31e5a4b524530a
* ART: Update loop info of all nested loops when inliningDavid Brazdil2015-04-211-0/+26
| | | | | | | | When inlining into a nested loop, the inliner would only add the new blocks into the innermost loop info object. This patch fixes that and modifies SsaChecker to verify the property. Change-Id: I21d343a6f7d972f5b7420701f816c65ab3f20566
* Disable clang optimization to boot up on arm64.Chih-Hung Hsieh2015-01-301-0/+4
| | | | | | | | | | | | | On arm64 devices, clang compiled lib64/libart.so repeatedly crashes during boot up stage. That prevents a stable adb connection. When optimization of BitVector::NumSetBits is disabled, we can boot up to Android home screen, although some Apps are still unstable. This is a temporary workaround only for clang/llvm arm64 target, to enable concurrent debugging on other bugs. BUG: 19180814 Change-Id: Id82497ce4be0b2c30d36679d15394848d826f50c
* ART: Replace COMPILE_ASSERT with static_assert (runtime)Andreas Gampe2014-11-031-2/+2
| | | | | | Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
* Fix mixed signed/unsigned arithmetic in BitVector.Ian Rogers2014-10-301-2/+3
| | | | Change-Id: I59c7f5a26e42689f77b067f4c73b086335e9273d
* ART: Fix leak in bit_vectorAndreas Gampe2014-10-241-1/+6
| | | | | | | | Resizing leaks the original storage. Let the allocator know it's free. Bug: 18120044 Change-Id: Ib95a87c3036f36377d64351173f8c04f28855663
* Merge "Tidy up logging."Ian Rogers2014-10-221-0/+2
|\
| * Tidy up logging.Ian Rogers2014-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to dex2oat rather than runtime argument "-verbose-methods:". Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc except for a forward declaration. Remove ConstDumpable as Dump methods are all const (and make this so if not currently true). Make LogSeverity an enum and improve compile time assertions and type checking. Remove log_severity.h that's only used in logging.h. With system headers gone from logging.h, go add to .cc files missing system header includes. Also, make operator new in ValueObject private for compile time instantiation checking. Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641
* | Fix bug in UnionIfNotIn.Nicolas Geoffray2014-10-221-4/+1
|/ | | | | | Bug: 18066207 Change-Id: Ib9b24802546403b3d5a4da19996034eb45601f53
* Make common BitVector operations inline-able.Ian Rogers2014-08-201-168/+43
| | | | Change-Id: Ie25de4fae56c6712539f04172c42e3eff57df7ca
* ART: BitVector not calculating number_of_bits correctlyJean Christophe Beyler2014-06-021-5/+3
| | | | | | | | The number_of_bits_ field has an unclear intent. Instead, using storage_size_ * kWordBits when relevant. Change-Id: I8c13be0d6643de37813fb154296d451f22c298c8 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
* Merge "ART: Added print indices back to BitVector Dumper"Ian Rogers2014-05-231-5/+28
|\
| * ART: Added print indices back to BitVector DumperJean Christophe Beyler2014-05-231-5/+28
| | | | | | | | | | | | | | - Added an API to get the indices set instead of 001...0 format Change-Id: I75841e41ca9b7ef77a0717715669dbe12506d6a1 Signed-Off-By: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
* | Rewrite BitVector index iterator.Vladimir Marko2014-05-231-21/+18
|/ | | | | | | | | | | | | | | | | The BitVector::Iterator was not iterating over the bits but rather over indexes of the set bits. Therefore, we rename it to IndexIterator and provide a BitVector::Indexes() to get a container-style interface with begin() and end() for range based for loops. Also, simplify InsertPhiNodes where the tmp_blocks isn't needed since the phi_nodes and input_blocks cannot lose any blocks in subsequent iterations, so we can do the Union() directly in those bit vectors and we need to repeat the loop only if we have new input_blocks, rather than on phi_nodes change. And move the temporary bit vectors to scoped arena. Change-Id: I6cb87a2f60724eeef67c6aaa34b36ed5acde6d43
* Add loop recognition and CFG simplifications in new compiler.Nicolas Geoffray2014-05-131-3/+3
| | | | | | | | | We do three simplifications: - Split critical edges, for code generation from SSA (new). - Ensure one back edge per loop, to simplify loop recognition (new). - Ensure only one pre header for a loop, to simplify SSA creation (existing). Change-Id: I9bfccd4b236a00486a261078627b091c8a68be33
* Merge "ART: BitVector and Optimization changes"Vladimir Marko2014-05-071-5/+6
|\
| * ART: BitVector and Optimization changesJean Christophe Beyler2014-05-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The BitVector has a function SameBitsSet that is a bit upside down - This patch fixes it. - Two optimizations are fixed also: - The null check pass uses now same bits set instead of equal due to a subsequent change that will make it not always the case that the compared bitvectors be of the same size. - The fused optimization supposes a predecessor will have an instruction. Change-Id: I9ef1c793964b18dc0f47baf9d1f361448bb053a3 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com> Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com> Signed-off-by: Yixin Shou <yixin.shou@intel.com> Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com> Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
* | Build live-in, live-out and kill sets for each block.Nicolas Geoffray2014-05-071-11/+68
|/ | | | | | | This information will be used when computing live ranges of instructions. Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74
* Replace CountOneBits and __builtin_popcount with POPCOUNT.Vladimir Marko2014-05-021-3/+3
| | | | | | Clean up utils.h, make some functions constexpr. Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
* ART: Bitvector extensions for dumping and size handlingJean Christophe Beyler2014-04-241-16/+64
| | | | | | | | | | | | | - Added dumping functions and the ensure size and clear function. - Fixed a bug in union where if a bit is not set in the source, an buffer overflow can occur later down. Change-Id: Iff40529f3a8970a1ce2dd5c591f659f71924dea3 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com> Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com> Signed-off-by: Yixin Shou <yixin.shou@intel.com> Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com> Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
* Avoid allocating OatFile::OatClass on the heap.Vladimir Marko2014-04-141-23/+24
| | | | | | | | | | Avoid allocating a BitVector for OatFile::OatClass::bitmap_ with kOatClassSomeCompiled methods. That makes the OatClass copy-constructible as it doesn't own any memory. We use that in OatFile::OatDexFile::GetOatClass() to return the result by value thus avoiding one or two heap allocations per call. Change-Id: Ic7098109028a5b49e39ef626f877de86e732ed18
* Fix BitVector::SetInitialBits().Vladimir Marko2014-03-111-0/+1
| | | | Change-Id: Iad3699d76ad69536aa4810329f5863bc995f6551
* Update to the BitVector ImplementationJean Christophe Beyler2014-01-171-22/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IsBitSet: - If the index requested is above the size, return false. ClearBit: - If the index requested is above the size, ignore. Added SameBitsSet: - Check the bits set disregarding size and expandable. Intersect and Union: - removed the requirement of same size. - handles case where the sizes are not the same. Added Subtract between BitVectors. SetInitialBits: - Now requests expansion if above the bits available. - Clears upper bits. Added GetHighestBitSet. ClearBit: - If we clear above the size, it is fine, it has not been set yet. Copy: - Supposes it is well allocated. - It used to just copy what was available in destination without checking source's size. - Now actually allocate the destination to make sure it holds enough space. - Set parameter to const. General: - Moved sizeof(uint32_t) to sizeof(*storage_) for future maintenance. Change-Id: Iebb214632482c46807deca957f5b6dc892a61a84
* Omit OatMethodOffsets for classes without compiled codeBrian Carlstrom2013-10-281-0/+177
Change-Id: If0d290f4aebc778ff12d8fed017c270ad2ac3220