summaryrefslogtreecommitdiff
path: root/compiler/utils/array_ref.h
AgeCommit message (Collapse)Author
2016-09-14Move ArrayRef to runtime/base David Brazdil
Will be used in upcoming CLs regarding VDEX and VerifierDeps. Test: m test-art-host Change-Id: I68e611a4a52246c2bdf45eab7c61f3212908afd4
2016-06-02Refactor handling of input records. Vladimir Marko
Introduce HInstruction::GetInputRecords(), a new virtual function that returns an ArrayRef<> to all input records. Implement all other functions dealing with input records as wrappers around GetInputRecords(). Rewrite functions that previously used multiple virtual calls to deal with input records, especially in loops, to prefetch the ArrayRef<> only once for each instruction. Besides avoiding all the extra calls, this also allows the compiler (clang++) to perform additional optimizations. This speeds up the Nexus 5 boot image compilation by ~0.5s (4% of "Compile Dex File", 2% of dex2oat time) on AOSP ToT. Change-Id: Id8ebe0fb9405e38d918972a11bd724146e4ca578
2015-10-08Add DCHECKs to ArenaVector and ScopedArenaVector. Vladimir Marko
Implement dchecked_vector<> template that DCHECK()s element access and insert()/emplace()/erase() positions. Change the ArenaVector<> and ScopedArenaVector<> aliases to use the new template instead of std::vector<>. Remove DCHECK()s that have now become unnecessary from the Optimizing compiler. Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
2015-09-25Optimizing: Rewrite DCE's MarkReachableBlocks(). Vladimir Marko
Replace a recursive implementation with a loop using a work list to avoid stack overflow that we would presumably hit for 702-LargeBranchOffset in host debug build with -O0, once the DCE block elimination is enabled for methods containing try-catch. Bug: 24133462 Change-Id: I41288ba368722bcb5d68259c7c147552c8928099
2015-07-14Avoid unexpected conversions to ArrayRef. Vladimir Marko
Make single-parameter constructors explicit, except for the default copy constructor. Change-Id: If7c8db643b22a4c36e244830154fc699b39c9016
2015-04-06ART: Enable Clang's -Wdeprecated Andreas Gampe
Replace throw() with noexcept. Add default copy constructors and copy assignment constructors for cases with destructors, as the implicit definition is deprecated. Change-Id: Ice306a3f510b072b00bec4d4360f7c8055135c9d
2014-12-22ART: Swap-space in the compiler Andreas Gampe
Introduce a swap-space and corresponding allocator to transparently switch native allocations to memory backed by a file. Bug: 18596910 (cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9) Change-Id: I131448f3907115054a592af73db86d2b9257ea33
2014-11-04ART: More warnings Andreas Gampe
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
2014-11-03Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags. Ian Rogers
Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
2014-09-25Implement method calls using relative BL on ARM. Vladimir Marko
Store the linker patches with each CompiledMethod instead of keeping them in CompilerDriver. Reorganize oat file creation to apply the patches as we're writing the method code. Add framework for platform-specific relative call patches in the OatWriter. Implement relative call patches for ARM. Change-Id: Ie2effb3d92b61ac8f356140eba09dc37d62290f8
2014-06-05Use std::enable_if instead of a custom helper class. Vladimir Marko
Change-Id: Iffa0f0350ccc4fce698b9a16aefd340e16654076
2014-06-05Avoid register pool allocations on the heap. Vladimir Marko
Create a helper template class ArrayRef and use it instead of std::vector<> for register pools in target_<arch>.cc to avoid these heap allocations during program startup. Change-Id: I4ab0205af9c1d28a239c0a105fcdc60ba800a70a