Skip to content

Commit

Permalink
Retire OatmealQuickening/PostLowering
Browse files Browse the repository at this point in the history
Summary: Unused.

Differential Revision: D56930278

fbshipit-source-id: e2177d30479c02ae53c10cb61ab3601aa2286efb
  • Loading branch information
adicatana authored and facebook-github-bot committed May 7, 2024
1 parent eb4ce8b commit 68342f9
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 96 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Expand Up @@ -191,7 +191,6 @@ libredex_la_SOURCES = \
libredex/PluginRegistry.cpp \
libredex/PointsToSemantics.cpp \
libredex/PointsToSemanticsUtils.cpp \
libredex/PostLowering.cpp \
libredex/PrintSeeds.cpp \
libredex/ProguardConfiguration.cpp \
libredex/ProguardLexer.cpp \
Expand Down
1 change: 0 additions & 1 deletion libredex/DexOutput.h
Expand Up @@ -19,7 +19,6 @@
#include "DexUtil.h"
#include "GlobalConfig.h"
#include "Pass.h"
#include "PostLowering.h"
#include "ProguardMap.h"
#include "Trace.h"

Expand Down
26 changes: 0 additions & 26 deletions libredex/PostLowering.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions libredex/PostLowering.h

This file was deleted.

2 changes: 0 additions & 2 deletions libredex/RedexOptions.cpp
Expand Up @@ -19,7 +19,6 @@ void RedexOptions::serialize(Json::Value& entry_data) const {
options["instrument_pass_enabled"] = instrument_pass_enabled;
options["min_sdk"] = min_sdk;
options["debug_info_kind"] = debug_info_kind_to_string(debug_info_kind);
options["post_lowering"] = post_lowering;
options["jni_summary_path"] = jni_summary_path;
}

Expand All @@ -32,7 +31,6 @@ void RedexOptions::deserialize(const Json::Value& entry_data) {
min_sdk = options_data["min_sdk"].asInt();
debug_info_kind =
parse_debug_info_kind(options_data["debug_info_kind"].asString());
post_lowering = options_data["post_lowering"].asBool();
jni_summary_path = options_data["jni_summary_path"].asString();
}

Expand Down
1 change: 0 additions & 1 deletion libredex/RedexOptions.h
Expand Up @@ -49,7 +49,6 @@ class RedexOptions {
bool is_art_build{false};
bool disable_dex_hasher{false};
bool instrument_pass_enabled{false};
bool post_lowering{false};
int32_t min_sdk{0};
Architecture arch{Architecture::UNKNOWN};
DebugInfoKind debug_info_kind{DebugInfoKind::NoCustomSymbolication};
Expand Down
1 change: 0 additions & 1 deletion libredex/Trace.h
Expand Up @@ -115,7 +115,6 @@ class DexType;
TM(PEEPHOLE) \
TM(PGR) \
TM(PM) \
TM(POST_LOWERING) \
TM(PPP) \
TM(PTA) \
TM(PURITY) \
Expand Down
9 changes: 0 additions & 9 deletions redex.py
Expand Up @@ -290,9 +290,6 @@ def run_redex_binary(
if state.args.is_art_build:
args += ["--is-art-build"]

if state.args.post_lowering:
args += ["--post-lowering"]

if state.args.disable_dex_hasher:
args += ["--disable-dex-hasher"]

Expand Down Expand Up @@ -692,12 +689,6 @@ def arg_parser(
action="store_true",
help="States that this is an art only build",
)
parser.add_argument(
"--post-lowering",
action="store_true",
default=False,
help="Specifies whether post lowering processing should be done",
)
parser.add_argument(
"--disable-dex-hasher", action="store_true", help="Disable DexHasher"
)
Expand Down
19 changes: 0 additions & 19 deletions tools/redex-all/main.cpp
Expand Up @@ -61,7 +61,6 @@
#include "NoOptimizationsMatcher.h"
#include "OptData.h"
#include "PassRegistry.h"
#include "PostLowering.h"
#include "ProguardConfiguration.h" // New ProGuard configuration
#include "ProguardMatcher.h"
#include "ProguardParser.h" // New ProGuard Parser
Expand Down Expand Up @@ -373,10 +372,6 @@ Arguments parse_args(int argc, char* argv[]) {
po::bool_switch(&args.redex_options.disable_dex_hasher)
->default_value(false),
"If specified, states that the current run disables dex hasher.\n");
od.add_options()(
"post-lowering",
po::bool_switch(&args.redex_options.post_lowering)->default_value(false),
"If specified, post lowering steps are run.\n");
od.add_options()(
"arch,A",
po::value<std::vector<std::string>>(),
Expand Down Expand Up @@ -1413,8 +1408,6 @@ void redex_backend(ConfigFiles& conf,
}();

std::set<uint32_t> signatures;
std::unique_ptr<PostLowering> post_lowering =
redex_options.post_lowering ? PostLowering::create() : nullptr;

const bool mem_stats_enabled =
traceEnabled(STATS, 1) || conf.get_json_config().get("mem_stats", true);
Expand All @@ -1437,9 +1430,6 @@ void redex_backend(ConfigFiles& conf,
bool should_preserve_input_dexes =
conf.get_json_config().get("preserve_input_dexes", false);
if (should_preserve_input_dexes) {
always_assert_log(
!post_lowering,
"post lowering should be off when preserving input dex option is on");
TRACE(MAIN, 1, "Skipping writing output dexes as configured");
} else {
redex_assert(!stores.empty());
Expand All @@ -1456,11 +1446,6 @@ void redex_backend(ConfigFiles& conf,
DexClasses* classes = &store.get_dexen()[i];
auto gtypes = std::make_shared<GatheredTypes>(classes);

if (post_lowering) {
post_lowering->load_dex_indexes(conf, min_sdk, classes, *gtypes,
store_name, i);
}

auto this_dex_stats = write_classes_to_dex(
redex::get_dex_output_name(output_dir, store, i),
classes,
Expand Down Expand Up @@ -1496,10 +1481,6 @@ void redex_backend(ConfigFiles& conf,
sanitizers::lsan_do_recoverable_leak_check();

std::vector<DexMethod*> needs_debug_line_mapping;
if (post_lowering) {
post_lowering->run(stores);
post_lowering->finalize(manager.asset_manager());
}

{
Timer t("Writing opt decisions data");
Expand Down

0 comments on commit 68342f9

Please sign in to comment.