text
stringlengths
1
24.5M
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "InsertDebugInfoPass.h" #include "ControlFlow.h" #include "PassManager.h" #include "Show.h" #include "Walkers.h" void ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class InsertDebugInfoPass : public Pass { public: InsertDebugInfoPass() : Pass("InsertDebugIn...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "BlockInstrument.h" #include <boost/algorithm/string/join.hpp> #include <fstream> #include <limits> #include <map> #inc...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "Instrument.h" #include "PassManager.h" namespace instrument { class BlockInstrume...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "Instrument.h" #include <boost/algorithm/string.hpp> #include <fstream> #include <iostream> #include <mutex> #include <...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <memory> #include "DeterministicContainers.h" #include "Pass.h" #include "PassManager.h" class DexMethod...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "DexRemovalPass.h" #include "ConfigFiles.h" #include "DexClass.h" #include "DexUtil.h" #include "InterDexPass.h" #includ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ConfigFiles.h" #include "DexClass.h" #include "Pass.h" class DexRemovalPass : public Pass { public: ex...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "InterDex.h" #include <boost/algorithm/string/predicate.hpp> #include <algorithm> #include <cinttypes> #include <strin...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "AssetManager.h" #include "BaselineProfileConfig.h" #include "CrossDexRefMinimizer.h" #include "Determinis...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "InterDexPass.h" #include <vector> #include "ConfigFiles.h" #include "DexClass.h" #include "DexUtil.h" #include "JsonW...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "DexClass.h" #include "DexStructure.h" #include "InterDex.h" #include...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <vector> #include "ConfigFiles.h" #include "DexClass.h" #include "PassManager.h" #include "PluginRegistry...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "InterDexReshuffleImpl.h" #include "InterDexPass.h" #include "Model.h" #include "Show.h" #include "Trace.h" #include <a...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <cstddef> #include "ConfigFiles.h" #include "DeterministicContainers.h" #include "DexClass.h" #include "D...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "InterDexReshufflePass.h" #include "ConfigFiles.h" #include "Debug.h" #include "DeterministicContainers.h" #include "Dex...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "InterDex.h" #include "InterDexReshuffleImpl.h" #include "Pass.h" /* This pass impl...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" namespace interdex { enum DexStatus { FIRST_COLDSTART_DEX = 0, FIRST_EXT...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * This pass sorts non-perf sensitive classes according to their inheritance * hierarchies in each dex. This improves compres...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class SortRemainingClassesPass : public Pass { public: explicit SortRemainingClassesPass() : ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "IntTypePatcher.h" #include "IROpcode.h" #include "PassManager.h" #include "Show.h" #include "Trace.h" #include "TypeUti...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ConcurrentContainers.h" #include "ControlFlow.h" #include "Pass.h" #include "TypeInference.h" class IntT...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "KotlinObjectInliner.h" #include "CFGMutation.h" #include "ConcurrentContainers.h" #include "Creators.h" #include "Dete...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "Pass.h" class KotlinObjectInliner : public Pass { struct Stats { size_t kotl...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "KotlinStatelessLambdaSingletonRemovalPass.h" #include "DexUtil.h" #include "KotlinInstanceRewriter.h" #include "TypeUt...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class KotlinStatelessLambdaSingletonRemovalPass : public Pass { public: KotlinStatelessLambd...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LayoutReachabilityPass.h" #include "ConfigFiles.h" #include "DexUtil.h" #include "ReachableClasses.h" #include "Trace....
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" #include "PassManager.h" /** * This pass is meant to be run after OptimizeResourcesPass. Its pu...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LocalDcePass.h" #include "ConfigFiles.h" #include "DexClass.h" #include "DexUtil.h" #include "InitClassesWithSideEffec...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class LocalDcePass : public Pass { public: LocalDcePass() : Pass("LocalDcePass") {} redex_...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "MakePublicPass.h" #include "DexAccess.h" #include "DexUtil.h" void MakePublicPass::run_pass(DexStoresVector& stores, ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" /** * This pass currently makes things public except direct methods. * If we want to make dire...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "BridgeSynthInlinePass.h" #include "MethodInliner.h" void BridgeSynthInlinePass::run_pass(DexStoresVector& stores, ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class BridgeSynthInlinePass : public Pass { public: BridgeSynthInlinePass() : Pass("BridgeSyn...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "IntraDexInlinePass.h" #include "MethodInliner.h" void IntraDexInlinePass::bind_config() { std::string hot_cold_inli...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "Inliner.h" #include "Pass.h" class IntraDexInlinePass : public Pass { public: I...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * This pass is a variation of the inliner that makes all inlining decisions * only with local call-site specific considerati...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class LocalMethodInlinePass : public Pass { public: LocalMethodInlinePass() : Pass("LocalMeth...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "MethodInlinePass.h" void MethodInlinePass::bind_config() { size_t cost_invoke; bind("cost_invoke", (size_t)...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "MethodInliner.h" #include "Pass.h" class MethodInlinePass : public Pass { public: MethodInlinePass() ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "PerfMethodInlinePass.h" #include <boost/algorithm/string.hpp> #include <boost/range/adaptor/filtered.hpp> #include <bo...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class PerfMethodInlinePass : public Pass { public: PerfMethodInlinePass(); redex_propertie...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <boost/optional/optional.hpp> #include <fstream> #include <functional> #include <memo...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "Nopper.h" #include <vector> #include "CFGMutation.h" #include "Creators.h" #include "Show.h" namespace { bool can_in...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ControlFlow.h" #include "DeterministicContainers.h" namespace nopper_impl { struct AuxiliaryDefs { De...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "NopperPass.h" #include <cmath> #include <random> #include "ConfigFiles.h" #include "DeterministicContainers.h" #inclu...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" #include "PassManager.h" class NopperPass : public Pass { public: NopperPass() : Pass("Nopper...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "IntrinsifyNullChecksPass.h" #include "ControlFlow.h" #include "Creators.h" #include "DexAsm.h" #include "DexClass.h" #...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "Pass.h" #include "PassManager.h" #include "Trace.h" class IntrinsifyNullChecksPass...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "MaterializeNullChecksPass.h" #include "ControlFlow.h" #include "DexClass.h" #include "DexUtil.h" #include "IRCode.h" #...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "Pass.h" #include "PassManager.h" #include "Trace.h" class MaterializeNullChecksPas...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <list> #include "ClassHierarchy.h" #include "DeterministicContainers.h" #include "DexClass.h" #include "DexUtil.h" #inc...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" class ObfuscatePass : public Pass { public: ObfuscatePass() : Pass("ObfuscatePass") {} red...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ObfuscateUtils.h" #include "DexClass.h" #include "Trace.h" #include "Walkers.h" #include <algorithm> namespace obfusca...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ClassHierarchy.h" #include "DeterministicContainers.h" #include "DexAccess.h" #include "DexAnnotation.h" ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "VirtualRenamer.h" #include <map> #include <set> #include "ConcurrentContainers.h" #include "DexAccess.h" #include "De...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "Obfuscate.h" // Renames virtual methods avoiding conflicts up the c...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ObfuscateResourcesPass.h" #include <algorithm> #include <boost/algorithm/string.hpp> // NOLINT #include <boost/filesys...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <string> #include "DeterministicContainers.h" #include "Pass.h" /** * This Pass will generate a resourc...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ExpandableMethodParams.h" #include "ApiLevelChecker.h" #include "CFGMutation.h" #include "DeterministicContainers.h" #i...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <mutex> #include "ConcurrentContainers.h" #include "DeterministicContainers.h" #include "DexClass.h" #inc...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * This pass identifies tracable object allocations that don't escape, and then * attempts to inline all code interacting wit...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" struct ObjectEscapeConfig { size_t max_inline_size; int max_inline_invokes_iterations; int...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ObjectEscapeAnalysisImpl.h" #include "Walkers.h" using namespace sparta; namespace mog = method_override_graph; name...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <sparta/ConstantAbstractDomain.h> #include <sparta/PatriciaTreeMap.h> #include <spar...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <vector> #include "PluginRegistry.h" class ObjectEscapeAnalysisPlugin { public: virtual ~ObjectEscape...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ObjectSensitiveDcePass.h" #include <fstream> #include <functional> #include "CFGMutation.h" #include "ConcurrentConta...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <optional> #include "Pass.h" #include "Trace.h" class ObjectSensitiveDcePass final : public Pass { publ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "EnumAnalyzeGeneratedMethods.h" #include <array> #include "Resolver.h" #include "Show.h" #include "Trace.h" using nam...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "EnumUpcastAnalysis.h" #include "Walkers.h" namespace optimize_enums { /** * We w...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "EnumClinitAnalysis.h" #include "ConstantPropagationAnalysis.h" #include "DexUtil.h" #include "Resolver.h" #include "Tr...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "DexClass.h" namespace optimize_enums { /** * Enum instances are a...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "EnumConfig.h" #include "LocalPointersAnalysis.h" #include "Show.h" #include "Trace.h" #include "Walkers.h" #include <u...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ConcurrentContainers.h" #include "MethodOverrideGraph.h" namespace optimize_enums { /** * A summary of ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "EnumTransformer.h" #include <vector> #include "CFGMutation.h" #include "Creators.h" #include "DeterministicContainers...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DexClass.h" #include "DexStore.h" #include "EnumClinitAnalysis.h" #include "EnumConfig.h" #include "PassM...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "EnumUpcastAnalysis.h" #include "EnumClinitAnalysis.h" #include "LiveRange.h" #include "Macros.h" #include "Resolver.h"...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <functional> #include <limits> #include <sparta/PatriciaTreeMapAbstractEnvironment.h> #include <sparta/Pat...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "OptimizeEnums.h" #include <algorithm> #include <fstream> #include <ostream> #include <set> #include <sstream> #includ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" namespace optimize_enums { class OptimizeEnumsPass : public Pass { public: OptimizeEnumsPas...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "OptimizeEnumsAnalysis.h" #include "BaseIRAnalyzer.h" #include "ConstantEnvironment.h" #include "DexUtil.h" #include "E...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "DexClass.h" namespace optimize_enums { namespace impl { // Forwar...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "OptimizeEnumsUnmap.h" #include "CFGMutation.h" #include "Show.h" #include "Trace.h" /** * A switch map is initialize...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ControlFlow.h" #include "DeterministicContainers.h" #include "MatchFlow.h" namespace optimize_enums { /...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <ostream> #include <set> #include <vector> namespace optimize_enums { enum class Un...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LowerResourceConstants.h" #include "PassManager.h" #include "Walkers.h" void LowerResourceConstantsPass::run_pass(Dex...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" /** * Undo the effect of MaterializeResourceConstantsPass. */ class LowerResourceConstantsPass...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "MaterializeResourceConstants.h" #include "CFGMutation.h" #include "ConfigFiles.h" #include "FinalInlineV2.h" #include ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Pass.h" /** * Change sget instructions on known resource class fields to a special IR * opcode with th...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "OptimizeResources.h" #include <boost/format.hpp> #include <json/value.h> #include <utility> #include "ConfigFiles.h" ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "GlobalConfig.h" #include "Pass.h" #include "RedexResources.h" #inclu...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "OriginalNamePass.h" #include <vector> #include "ClassHierarchy.h" #include "ConfigFiles.h" #include "DexAnnotation.h"...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ClassHierarchy.h" #include "DeterministicContainers.h" #include "Pass.h" class OriginalNamePass : public...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ClosureAggregator.h" #include <numeric> namespace method_splitting_impl { uint64_t ClosureAggregator::ClosureInfo::g...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <array> #include "DeterministicContainers.h" #include "MethodClosures.h" #include "MutablePriorityQueue.h...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * This pass outlines common instruction sequences within a basic block, * and across tree-shaped control-flow structures for...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "DeterministicContainers.h" #include "OutliningProfileGuidance.h" #include "Pass.h" namespace outliner { ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * This pass sorts non-perf sensitive classes according to their inheritance * hierarchies in each dex. This improves compres...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <memory> #include <vector> #include "DeterministicContainers.h" #include "ReducedControlFlow.h" namespac...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "MethodSplitter.h" #include "ConcurrentContainers.h" #include "DexLimits.h" #include "InitClassesWithSideEffects.h" #in...