From afc6facf4175355c63942bdab4a3cbdc2322e008 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Wed, 5 Jan 2022 23:02:59 -0500 Subject: [PATCH 001/239] successfully log loops IR --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index a3dab9b93..88aaadcce 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -140,6 +140,13 @@ class LoopCounter : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); + std::error_code EC; + ToolOutputFile LoopsLog("/tmp/loops.log", EC, sys::fs::OF_None); + for (auto L : Loops) { + L->print(LoopsLog.os(), true, true); + } + LoopsLog.keep(); + return false; } }; From 0443537a262cc53f647b7715e8201df43b0aecb8 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Thu, 6 Jan 2022 00:22:37 -0500 Subject: [PATCH 002/239] loop log constructed inside pass --- .../opt_loops/opt_loops.cc | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 88aaadcce..49aba11ce 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -127,7 +127,13 @@ class LoopCounter : public llvm::FunctionPass { static char ID; std::unordered_map counts; - LoopCounter() : FunctionPass(ID) {} + LoopCounter() : LoopCounter("/tmp/loops.log") {} + + LoopCounter(StringRef Filename) : FunctionPass(ID) { + // Prepare loops log + std::error_code EC; + LoopsLog = new ToolOutputFile(Filename, EC, sys::fs::OF_None); + } virtual void getAnalysisUsage(AnalysisUsage& AU) const override { AU.addRequired(); @@ -140,15 +146,16 @@ class LoopCounter : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); - std::error_code EC; - ToolOutputFile LoopsLog("/tmp/loops.log", EC, sys::fs::OF_None); for (auto L : Loops) { - L->print(LoopsLog.os(), true, true); + L->print(LoopsLog->os(), true, true); } - LoopsLog.keep(); + LoopsLog->keep(); return false; } + + protected: + ToolOutputFile* LoopsLog; }; char LoopCounter::ID = 0; @@ -219,6 +226,10 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) INITIALIZE_PASS_END(LoopConfiguratorPass, "unroll-loops-configurator", "Configurates loop unrolling", false, false) +namespace llvm { +Pass* createLoopCounterPass(StringRef Filename) { return new LoopCounter(Filename); } +} // end namespace llvm + int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, " LLVM-Counter\n\n" @@ -245,9 +256,9 @@ int main(int argc, char** argv) { initializeLoopCounterPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; - LoopCounter* Counter = new LoopCounter(); + // LoopCounter* Counter = new LoopCounter("/tmp/loops.log"); LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); - PM.add(Counter); + PM.add(createLoopCounterPass("/tmp/loops.log")); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); PM.add(createLICMPass()); @@ -264,11 +275,6 @@ int main(int argc, char** argv) { } PM.run(*Module); - // Log loop stats - for (auto& x : Counter->counts) { - llvm::dbgs() << x.first << ": " << x.second << " loops" << '\n'; - } - Out.keep(); return 0; From 7fa785751a2d1cc1ef64b611273ada50d3139b42 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Thu, 6 Jan 2022 00:26:48 -0500 Subject: [PATCH 003/239] rename LoopCounter to LoopLog --- .../opt_loops/opt_loops.cc | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 49aba11ce..2081b69cb 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -122,14 +122,14 @@ class OptCustomPassManager : public legacy::PassManager { const DebugifyStatsMap& getDebugifyStatsMap() const { return DIStatsMap; } }; -class LoopCounter : public llvm::FunctionPass { +class LoopLog : public llvm::FunctionPass { public: static char ID; std::unordered_map counts; - LoopCounter() : LoopCounter("/tmp/loops.log") {} + LoopLog() : LoopLog("/tmp/loops.log") {} - LoopCounter(StringRef Filename) : FunctionPass(ID) { + LoopLog(StringRef Filename) : FunctionPass(ID) { // Prepare loops log std::error_code EC; LoopsLog = new ToolOutputFile(Filename, EC, sys::fs::OF_None); @@ -158,7 +158,7 @@ class LoopCounter : public llvm::FunctionPass { ToolOutputFile* LoopsLog; }; -char LoopCounter::ID = 0; +char LoopLog::ID = 0; class LoopConfiguratorPass : public llvm::FunctionPass { public: @@ -211,14 +211,14 @@ static std::unique_ptr readModule(LLVMContext& Context, StringRef Name) namespace llvm { // The INITIALIZE_PASS_XXX macros put the initialiser in the llvm namespace. -void initializeLoopCounterPass(PassRegistry& Registry); +void initializeLoopLogPass(PassRegistry& Registry); void initializeLoopConfiguratorPassPass(PassRegistry& Registry); } // namespace llvm // Initialise the pass. We have to declare the dependencies we use. -INITIALIZE_PASS_BEGIN(LoopCounter, "count-loops", "Count loops", false, false) +INITIALIZE_PASS_BEGIN(LoopLog, "count-loops", "Count loops", false, false) INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) -INITIALIZE_PASS_END(LoopCounter, "count-loops", "Count loops", false, false) +INITIALIZE_PASS_END(LoopLog, "count-loops", "Count loops", false, false) INITIALIZE_PASS_BEGIN(LoopConfiguratorPass, "unroll-loops-configurator", "Configurates loop unrolling", false, false) @@ -227,7 +227,7 @@ INITIALIZE_PASS_END(LoopConfiguratorPass, "unroll-loops-configurator", "Configurates loop unrolling", false, false) namespace llvm { -Pass* createLoopCounterPass(StringRef Filename) { return new LoopCounter(Filename); } +Pass* createLoopLogPass(StringRef Filename) { return new LoopLog(Filename); } } // end namespace llvm int main(int argc, char** argv) { @@ -254,11 +254,10 @@ int main(int argc, char** argv) { return 1; } - initializeLoopCounterPass(*PassRegistry::getPassRegistry()); + initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; - // LoopCounter* Counter = new LoopCounter("/tmp/loops.log"); LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); - PM.add(createLoopCounterPass("/tmp/loops.log")); + PM.add(createLoopLogPass("/tmp/loops.log")); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); PM.add(createLICMPass()); From 99cf62b584f2ebe0f07e104c770a966c49aab0d0 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sat, 15 Jan 2022 23:21:10 -0500 Subject: [PATCH 004/239] create yaml mapping --- .../opt_loops/opt_loops.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 2081b69cb..0e2e88947 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -38,6 +38,21 @@ #include "llvm/Transforms/Vectorize.h" using namespace llvm; +using llvm::yaml::IO; +using llvm::yaml::ScalarEnumerationTraits; + +template <> +struct llvm::yaml::MappingTraits { + static void mapping(IO& io, Loop& L) { + std::string str; + llvm::raw_string_ostream stream(str); + L.print(stream, true, true); + auto LId = L.getLoopID()->getMetadataID(); + + io.mapRequired("id", LId); + io.mapOptional("llvm", stream.str()); + } +}; namespace { /// Input LLVM module file name. From c925592cb65ee2924f46fead1422cd4ec64f1665 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 16 Jan 2022 00:28:54 -0500 Subject: [PATCH 005/239] end-to-end yaml --- .../opt_loops/opt_loops.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 0e2e88947..1b12447bc 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -38,18 +38,20 @@ #include "llvm/Transforms/Vectorize.h" using namespace llvm; + using llvm::yaml::IO; using llvm::yaml::ScalarEnumerationTraits; template <> -struct llvm::yaml::MappingTraits { - static void mapping(IO& io, Loop& L) { +struct llvm::yaml::MappingTraits { + static void mapping(IO& io, Loop*& L) { + auto name = L->getName(); + std::string str; llvm::raw_string_ostream stream(str); - L.print(stream, true, true); - auto LId = L.getLoopID()->getMetadataID(); + L->print(stream, true, true); - io.mapRequired("id", LId); + io.mapRequired("name", name); io.mapOptional("llvm", stream.str()); } }; @@ -137,6 +139,7 @@ class OptCustomPassManager : public legacy::PassManager { const DebugifyStatsMap& getDebugifyStatsMap() const { return DIStatsMap; } }; +using llvm::yaml::Output; class LoopLog : public llvm::FunctionPass { public: static char ID; @@ -161,8 +164,10 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); + Output yout(llvm::dbgs()); for (auto L : Loops) { L->print(LoopsLog->os(), true, true); + yout << L; } LoopsLog->keep(); From 4308f321cb28b138813459a2a9f3bd538f7bf667 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 16 Jan 2022 11:34:35 -0500 Subject: [PATCH 006/239] write yaml to fil --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 1b12447bc..5e7a37ca1 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -164,9 +164,9 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); - Output yout(llvm::dbgs()); + Output yout(LoopsLog->os()); for (auto L : Loops) { - L->print(LoopsLog->os(), true, true); + // L->print(LoopsLog->os(), true, true); yout << L; } LoopsLog->keep(); From 4aaa4400f17731974529cc81f6928ae8d2fbfa9a Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 16 Jan 2022 14:20:13 -0500 Subject: [PATCH 007/239] fix yaml dump to file --- .../opt_loops/opt_loops.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 5e7a37ca1..b29e6aa4b 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -45,14 +45,14 @@ using llvm::yaml::ScalarEnumerationTraits; template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { - auto name = L->getName(); + std::string name = L->getName(); std::string str; llvm::raw_string_ostream stream(str); L->print(stream, true, true); io.mapRequired("name", name); - io.mapOptional("llvm", stream.str()); + io.mapOptional("llvm", str); } }; @@ -150,7 +150,7 @@ class LoopLog : public llvm::FunctionPass { LoopLog(StringRef Filename) : FunctionPass(ID) { // Prepare loops log std::error_code EC; - LoopsLog = new ToolOutputFile(Filename, EC, sys::fs::OF_None); + LoopsLog = new raw_fd_ostream(Filename, EC); } virtual void getAnalysisUsage(AnalysisUsage& AU) const override { @@ -164,18 +164,17 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); - Output yout(LoopsLog->os()); + Output yout(*LoopsLog); for (auto L : Loops) { - // L->print(LoopsLog->os(), true, true); yout << L; } - LoopsLog->keep(); + LoopsLog->close(); return false; } protected: - ToolOutputFile* LoopsLog; + raw_fd_ostream* LoopsLog; }; char LoopLog::ID = 0; From 24272ff36c63da24a7f2cab61924f02876688c19 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 16 Jan 2022 21:28:15 -0500 Subject: [PATCH 008/239] get yaml to log file --- .../opt_loops/opt_loops.cc | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index b29e6aa4b..1302ced19 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -39,6 +39,7 @@ using namespace llvm; +using namespace llvm::yaml; using llvm::yaml::IO; using llvm::yaml::ScalarEnumerationTraits; @@ -145,13 +146,9 @@ class LoopLog : public llvm::FunctionPass { static char ID; std::unordered_map counts; - LoopLog() : LoopLog("/tmp/loops.log") {} + LoopLog() : LoopLog(*(new raw_fd_ostream("/tmp/loops.log", EC))) {} - LoopLog(StringRef Filename) : FunctionPass(ID) { - // Prepare loops log - std::error_code EC; - LoopsLog = new raw_fd_ostream(Filename, EC); - } + LoopLog(raw_fd_ostream& FileLog) : FunctionPass(ID), LoopsLog(FileLog) {} virtual void getAnalysisUsage(AnalysisUsage& AU) const override { AU.addRequired(); @@ -164,17 +161,17 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); - Output yout(*LoopsLog); + yaml::Output yout(LoopsLog); for (auto L : Loops) { yout << L; } - LoopsLog->close(); return false; } protected: - raw_fd_ostream* LoopsLog; + raw_fd_ostream& LoopsLog; + std::error_code EC; }; char LoopLog::ID = 0; @@ -246,7 +243,7 @@ INITIALIZE_PASS_END(LoopConfiguratorPass, "unroll-loops-configurator", "Configurates loop unrolling", false, false) namespace llvm { -Pass* createLoopLogPass(StringRef Filename) { return new LoopLog(Filename); } +Pass* createLoopLogPass(raw_fd_ostream& FileLog) { return new LoopLog(FileLog); } } // end namespace llvm int main(int argc, char** argv) { @@ -264,7 +261,7 @@ int main(int argc, char** argv) { if (!Module) return 1; - // Prepare output + // Prepare output IR file ToolOutputFile Out(OutputFilename, EC, sys::fs::OF_None); if (EC) { Err = SMDiagnostic(OutputFilename, SourceMgr::DK_Error, @@ -273,10 +270,13 @@ int main(int argc, char** argv) { return 1; } + // Prepare loops dump/configuration yaml file + raw_fd_ostream ToolConfigFile("/tmp/loops.log", EC); + initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); - PM.add(createLoopLogPass("/tmp/loops.log")); + PM.add(createLoopLogPass(ToolConfigFile)); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); PM.add(createLICMPass()); @@ -294,6 +294,7 @@ int main(int argc, char** argv) { PM.run(*Module); Out.keep(); + ToolConfigFile.close(); return 0; } From 1ebd873681fb5202cad80da871d947d0062b2418 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 16 Jan 2022 21:55:34 -0500 Subject: [PATCH 009/239] argument to LoopLog is yaml --- .../opt_loops/opt_loops.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 1302ced19..77876aea6 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -146,9 +146,7 @@ class LoopLog : public llvm::FunctionPass { static char ID; std::unordered_map counts; - LoopLog() : LoopLog(*(new raw_fd_ostream("/tmp/loops.log", EC))) {} - - LoopLog(raw_fd_ostream& FileLog) : FunctionPass(ID), LoopsLog(FileLog) {} + LoopLog(yaml::Output& Yaml = *(new yaml::Output(llvm::dbgs()))) : FunctionPass(ID), Yaml(Yaml) {} virtual void getAnalysisUsage(AnalysisUsage& AU) const override { AU.addRequired(); @@ -161,17 +159,15 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); - yaml::Output yout(LoopsLog); for (auto L : Loops) { - yout << L; + Yaml << L; } return false; } protected: - raw_fd_ostream& LoopsLog; - std::error_code EC; + yaml::Output& Yaml; }; char LoopLog::ID = 0; @@ -243,7 +239,7 @@ INITIALIZE_PASS_END(LoopConfiguratorPass, "unroll-loops-configurator", "Configurates loop unrolling", false, false) namespace llvm { -Pass* createLoopLogPass(raw_fd_ostream& FileLog) { return new LoopLog(FileLog); } +Pass* createLoopLogPass(yaml::Output& Yaml) { return new LoopLog(Yaml); } } // end namespace llvm int main(int argc, char** argv) { @@ -272,11 +268,12 @@ int main(int argc, char** argv) { // Prepare loops dump/configuration yaml file raw_fd_ostream ToolConfigFile("/tmp/loops.log", EC); + yaml::Output Yaml(ToolConfigFile); initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); - PM.add(createLoopLogPass(ToolConfigFile)); + PM.add(createLoopLogPass(Yaml)); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); PM.add(createLICMPass()); From 688673db5e99feb2fde0c828644bcd76532a8ce6 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 20 Jan 2022 18:36:13 +0000 Subject: [PATCH 010/239] [ci] Use TestPyPI repo for pip install tests. Switch to using the TestPyPI repository to install the compiler_gym package during CI tests because we use the install count on the main repository to track growth and usage of the project. --- .github/workflows/pip_install_test.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pip_install_test.yaml b/.github/workflows/pip_install_test.yaml index 97e7b46a8..e073536d4 100644 --- a/.github/workflows/pip_install_test.yaml +++ b/.github/workflows/pip_install_test.yaml @@ -1,8 +1,10 @@ --- -# This workflow pip install's teh compiler_gym package and checks that the -# module can be imported. The goal of this workflow is to catch failures in the -# installation process that can occur because of a breaking change in the -# dependent packages. +# This workflow pip install's the compiler_gym package and checks that the +# module can be imported. +# +# The goal of this workflow is to catch failures in the installation process +# that can occur because of a breaking change in the dependent packages, and to +# test for any import-time error. name: Pip install test on: @@ -26,7 +28,12 @@ jobs: python-version: ${{ matrix.python }} - name: Install python wheel - run: python -m pip install compiler_gym + # We use the TestPyPI repository to install the compiler_gym + # package from because we use the install count on the main + # repository to track growth and usage of the project. We also + # provide the main PyPI repo as a fallback for installing + # dependencies. + run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ compiler_gym - name: Check package version run: python -c 'import compiler_gym; print(compiler_gym.__version__)' From a88c3b3d428cc79c255cb47a62701c0760db4d1f Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Fri, 21 Jan 2022 22:51:32 -0500 Subject: [PATCH 011/239] print function and module name. and try to print id --- .../opt_loops/opt_loops.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 77876aea6..78371a8ef 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -46,12 +46,26 @@ using llvm::yaml::ScalarEnumerationTraits; template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { + Function* F = L->getLoopPreheader()->getParent(); + std::string fname = F->getName(); + + Module* M = L->getLoopPreheader()->getParent()->getParent(); + std::string mname = M->getName(); + + if (L->getLoopID() == nullptr) { + addStringMetadataToLoop(L, "llvm.loop.isvectorized", false); + } + auto id = L->getLoopID()->getMetadataID(); + L->getLoopID()->printAsOperand(llvm::dbgs(), M); std::string name = L->getName(); std::string str; llvm::raw_string_ostream stream(str); L->print(stream, true, true); + io.mapRequired("id", id); + io.mapRequired("function", fname); + io.mapRequired("module", mname); io.mapRequired("name", name); io.mapOptional("llvm", str); } From da404db988789ddfcbbffd370491e8d1c247bab4 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Fri, 21 Jan 2022 23:13:24 -0500 Subject: [PATCH 012/239] get metdata ids of all loops --- .../opt_loops/opt_loops.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 78371a8ef..8c435497f 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -52,18 +52,18 @@ struct llvm::yaml::MappingTraits { Module* M = L->getLoopPreheader()->getParent()->getParent(); std::string mname = M->getName(); - if (L->getLoopID() == nullptr) { - addStringMetadataToLoop(L, "llvm.loop.isvectorized", false); - } + std::string id_str; + llvm::raw_string_ostream id_stream(id_str); auto id = L->getLoopID()->getMetadataID(); - L->getLoopID()->printAsOperand(llvm::dbgs(), M); + L->getLoopID()->printAsOperand(id_stream, M); + std::string name = L->getName(); std::string str; llvm::raw_string_ostream stream(str); L->print(stream, true, true); - io.mapRequired("id", id); + io.mapRequired("id", id_str); io.mapRequired("function", fname); io.mapRequired("module", mname); io.mapRequired("name", name); @@ -173,6 +173,15 @@ class LoopLog : public llvm::FunctionPass { // Should really account for module, too. counts[F.getName().str()] = Loops.size(); + // ensure that all loops have metadata + for (auto L : Loops) { + if (L->getLoopID() == nullptr) { + // workaround to add metadata + // TODO: is there a better way to add metadata to aloop? + addStringMetadataToLoop(L, "llvm.loop.isvectorized", false); + } + } + for (auto L : Loops) { Yaml << L; } From 047573474aa26bb2a1c489f61b908bf5c160d2e3 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Fri, 21 Jan 2022 23:53:02 -0500 Subject: [PATCH 013/239] try to add unique name to each loop --- .../opt_loops/opt_loops.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 8c435497f..92cd33613 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -54,19 +54,30 @@ struct llvm::yaml::MappingTraits { std::string id_str; llvm::raw_string_ostream id_stream(id_str); - auto id = L->getLoopID()->getMetadataID(); L->getLoopID()->printAsOperand(id_stream, M); + // this id always prints a value of 4. Not sure if I am using it correctly + auto id_wrong = L->getLoopID()->getMetadataID(); + std::string name = L->getName(); + std::string name1 = L->getLoopPreheader()->getName(); + static int count = 0; + if (name1.length() == 0) { + name1 = "loop_" + std::to_string(count++); + L->getLoopPreheader()->setName(name1); + } + std::string str; llvm::raw_string_ostream stream(str); L->print(stream, true, true); io.mapRequired("id", id_str); + io.mapRequired("id_wrong", id_wrong); + io.mapRequired("name", name); + io.mapRequired("name1", name1); io.mapRequired("function", fname); io.mapRequired("module", mname); - io.mapRequired("name", name); io.mapOptional("llvm", str); } }; @@ -178,7 +189,7 @@ class LoopLog : public llvm::FunctionPass { if (L->getLoopID() == nullptr) { // workaround to add metadata // TODO: is there a better way to add metadata to aloop? - addStringMetadataToLoop(L, "llvm.loop.isvectorized", false); + addStringMetadataToLoop(L, "custom.label.loop", true); } } From 76fc692849d59a082473b86db619a76e1010ac5e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Fri, 21 Jan 2022 23:59:53 -0500 Subject: [PATCH 014/239] add loop depth --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 92cd33613..34b71bf4b 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -61,6 +61,8 @@ struct llvm::yaml::MappingTraits { std::string name = L->getName(); + int depth = L->getLoopDepth(); + std::string name1 = L->getLoopPreheader()->getName(); static int count = 0; if (name1.length() == 0) { @@ -78,6 +80,7 @@ struct llvm::yaml::MappingTraits { io.mapRequired("name1", name1); io.mapRequired("function", fname); io.mapRequired("module", mname); + io.mapRequired("depth", depth); io.mapOptional("llvm", str); } }; From 97cb9cbfc3539459a78286178ac495e91fb58a70 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 27 Jan 2022 15:07:59 +0000 Subject: [PATCH 015/239] [llvm] Enable the strip-optnone-attribute binary to take a list of paths. This extends the strip-optnone-attribute binary to take a list of zero or more bitcodes to modify, rather than requiring a single argument. --- .../llvm/service/StripOptNoneAttribute.cc | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/compiler_gym/envs/llvm/service/StripOptNoneAttribute.cc b/compiler_gym/envs/llvm/service/StripOptNoneAttribute.cc index e74a54d26..faed9a88e 100644 --- a/compiler_gym/envs/llvm/service/StripOptNoneAttribute.cc +++ b/compiler_gym/envs/llvm/service/StripOptNoneAttribute.cc @@ -21,18 +21,11 @@ namespace fs = boost::filesystem; using namespace compiler_gym; using namespace compiler_gym::llvm_service; -int main(int argc, char** argv) { - google::InitGoogleLogging(argv[0]); - - CHECK(argc == 2) << "Usage: compute_observation "; - - const fs::path workingDirectory{"."}; - +void stripOptNoneAttributesOrDie(const fs::path& path, BenchmarkFactory& benchmarkFactory) { compiler_gym::Benchmark request; request.set_uri("user"); - request.mutable_program()->set_uri(fmt::format("file:///{}", argv[1])); + request.mutable_program()->set_uri(fmt::format("file:///{}", path.string())); - auto& benchmarkFactory = BenchmarkFactory::getSingleton(workingDirectory); std::unique_ptr<::llvm_service::Benchmark> benchmark; { const auto status = benchmarkFactory.getBenchmark(request, &benchmark); @@ -58,9 +51,20 @@ int main(int argc, char** argv) { } } - ASSERT_OK(benchmark->writeBitcodeToFile(argv[1])); - std::cerr << "Stripped " << removedOptNoneCount << " optnone attributes from " << argv[1] + ASSERT_OK(benchmark->writeBitcodeToFile(path.string())); + std::cerr << "Stripped " << removedOptNoneCount << " optnone attributes from " << path.string() << std::endl; +} + +int main(int argc, char** argv) { + google::InitGoogleLogging(argv[0]); + + const fs::path workingDirectory{"."}; + auto& benchmarkFactory = BenchmarkFactory::getSingleton(workingDirectory); + + for (int i = 1; i < argc; ++i) { + stripOptNoneAttributesOrDie(argv[i], benchmarkFactory); + } return 0; } From 01cb0be973a594778dab59a19ce694c7e114d759 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 27 Jan 2022 15:07:59 +0000 Subject: [PATCH 016/239] [examples] Fix typo in example method override. --- examples/example_compiler_gym_service/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_compiler_gym_service/__init__.py b/examples/example_compiler_gym_service/__init__.py index 3349b9867..151cbb2fa 100644 --- a/examples/example_compiler_gym_service/__init__.py +++ b/examples/example_compiler_gym_service/__init__.py @@ -72,7 +72,7 @@ def __init__(self, *args, **kwargs): def benchmark_uris(self) -> Iterable[str]: yield from (f"benchmark://example-v0{k}" for k in self._benchmarks.keys()) - def benchmark_from_parsed_uris(self, uri: BenchmarkUri) -> Benchmark: + def benchmark_from_parsed_uri(self, uri: BenchmarkUri) -> Benchmark: if uri.path in self._benchmarks: return self._benchmarks[uri] else: From 78783a02b80a494163a5908248621068d08eba4f Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 27 Jan 2022 15:07:59 +0000 Subject: [PATCH 017/239] [datasets] Add startswith() and endswith() to Benchmark class. This provides methods to forward startswith() and endswith() calls to the underlying string representation. --- compiler_gym/datasets/uri.py | 6 ++++++ tests/datasets/uri_test.py | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/compiler_gym/datasets/uri.py b/compiler_gym/datasets/uri.py index fe788c2e2..3c661fedb 100644 --- a/compiler_gym/datasets/uri.py +++ b/compiler_gym/datasets/uri.py @@ -130,6 +130,12 @@ def from_string(cls, uri: str) -> "BenchmarkUri": fragment=components.fragment, ) + def startswith(self, *args): + return str(self).startswith(*args) + + def endswith(self, *args): + return str(self).endswith(*args) + def __repr__(self): return urlunparse( ParseResult( diff --git a/tests/datasets/uri_test.py b/tests/datasets/uri_test.py index f781e5eac..471ba27c8 100644 --- a/tests/datasets/uri_test.py +++ b/tests/datasets/uri_test.py @@ -95,5 +95,19 @@ def test_canonicalize_1(): assert BenchmarkUri.canonicalize("test-v0") == "benchmark://test-v0" +def test_startswith(): + uri = BenchmarkUri.from_string("benchmark://test-v0/foo") + assert not uri.startswith("!!!") + assert uri.startswith("b") + assert uri.startswith("benchmark://test-v0/fo") + + +def test_endswith(): + uri = BenchmarkUri.from_string("benchmark://test-v0/foo") + assert not uri.endswith("!!!") + assert uri.endswith("o") + assert uri.endswith("mark://test-v0/foo") + + if __name__ == "__main__": main() From adb9feaec3c74ed0bd6acb461534ec63a7f8fd38 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sat, 29 Jan 2022 23:25:54 -0500 Subject: [PATCH 018/239] log loop metadata --- .../opt_loops/opt_loops.cc | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 34b71bf4b..ca9116d23 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -43,6 +43,16 @@ using namespace llvm::yaml; using llvm::yaml::IO; using llvm::yaml::ScalarEnumerationTraits; +std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { + Optional Value = findStringMetadataForLoop(L, MDString); + if (!Value) + return "None"; + + const MDOperand* Op = *Value; + assert(Op && mdconst::hasa(*Op) && "invalid metadata"); + return std::to_string(mdconst::extract(*Op)->getZExtValue()); +} + template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { @@ -63,17 +73,28 @@ struct llvm::yaml::MappingTraits { int depth = L->getLoopDepth(); - std::string name1 = L->getLoopPreheader()->getName(); + // TODO: find a way to provide a name to the loop that will remain consisten across multiple + // `opt` calls + std::string name1 = L->getHeader()->getName(); static int count = 0; if (name1.length() == 0) { name1 = "loop_" + std::to_string(count++); - L->getLoopPreheader()->setName(name1); + L->getHeader()->setName(name1); } std::string str; llvm::raw_string_ostream stream(str); L->print(stream, true, true); + std::string MetaLoopUnrollEnable = getStringMetadataFromLoop(L, "llvm.loop.unroll.enable"); + std::string MetaLoopUnrollDisable = getStringMetadataFromLoop(L, "llvm.loop.unroll.disable"); + std::string MetaLoopUnrollCount = getStringMetadataFromLoop(L, "llvm.loop.unroll.count"); + std::string MetaLoopIsUnrolled = getStringMetadataFromLoop(L, "llvm.loop.isunrolled"); + std::string MetaLoopVectorEnable = getStringMetadataFromLoop(L, "llvm.loop.vector.enable"); + std::string MetaLoopVectorDisable = getStringMetadataFromLoop(L, "llvm.loop.vector.disable"); + std::string MetaLoopVectorWidth = getStringMetadataFromLoop(L, "llvm.loop.vector.width"); + std::string MetaLoopIsVectorized = getStringMetadataFromLoop(L, "llvm.loop.isvectorized"); + io.mapRequired("id", id_str); io.mapRequired("id_wrong", id_wrong); io.mapRequired("name", name); @@ -82,6 +103,14 @@ struct llvm::yaml::MappingTraits { io.mapRequired("module", mname); io.mapRequired("depth", depth); io.mapOptional("llvm", str); + io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); + io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); + io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); + io.mapOptional("llvm.loop.isunrolled", MetaLoopIsUnrolled); + io.mapOptional("llvm.loop.vectorize.enable", MetaLoopVectorEnable); + io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); + io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); + io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); } }; @@ -197,6 +226,7 @@ class LoopLog : public llvm::FunctionPass { } for (auto L : Loops) { + // this will invoke mapping(IO& io, Loop*& L) in llvm::yaml::MappingTraits Yaml << L; } From e13d14dcbad3b6934f07ef786cb36d54252349aa Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 00:18:18 -0500 Subject: [PATCH 019/239] log each variable after deducing it --- .../opt_loops/opt_loops.cc | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index ca9116d23..8981ffb50 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -65,13 +65,19 @@ struct llvm::yaml::MappingTraits { std::string id_str; llvm::raw_string_ostream id_stream(id_str); L->getLoopID()->printAsOperand(id_stream, M); + io.mapRequired("id", id_str); + io.mapRequired("function", fname); + io.mapRequired("module", mname); // this id always prints a value of 4. Not sure if I am using it correctly auto id_wrong = L->getLoopID()->getMetadataID(); + io.mapRequired("id_wrong", id_wrong); std::string name = L->getName(); + io.mapRequired("name", name); int depth = L->getLoopDepth(); + io.mapRequired("depth", depth); // TODO: find a way to provide a name to the loop that will remain consisten across multiple // `opt` calls @@ -81,36 +87,37 @@ struct llvm::yaml::MappingTraits { name1 = "loop_" + std::to_string(count++); L->getHeader()->setName(name1); } - - std::string str; - llvm::raw_string_ostream stream(str); - L->print(stream, true, true); + io.mapRequired("name1", name1); std::string MetaLoopUnrollEnable = getStringMetadataFromLoop(L, "llvm.loop.unroll.enable"); + io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); + std::string MetaLoopUnrollDisable = getStringMetadataFromLoop(L, "llvm.loop.unroll.disable"); + io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); + std::string MetaLoopUnrollCount = getStringMetadataFromLoop(L, "llvm.loop.unroll.count"); + io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); + std::string MetaLoopIsUnrolled = getStringMetadataFromLoop(L, "llvm.loop.isunrolled"); + io.mapOptional("llvm.loop.isunrolled", MetaLoopIsUnrolled); + std::string MetaLoopVectorEnable = getStringMetadataFromLoop(L, "llvm.loop.vector.enable"); + io.mapOptional("llvm.loop.vectorize.enable", MetaLoopVectorEnable); + std::string MetaLoopVectorDisable = getStringMetadataFromLoop(L, "llvm.loop.vector.disable"); + io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); + std::string MetaLoopVectorWidth = getStringMetadataFromLoop(L, "llvm.loop.vector.width"); + io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); + std::string MetaLoopIsVectorized = getStringMetadataFromLoop(L, "llvm.loop.isvectorized"); + io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); - io.mapRequired("id", id_str); - io.mapRequired("id_wrong", id_wrong); - io.mapRequired("name", name); - io.mapRequired("name1", name1); - io.mapRequired("function", fname); - io.mapRequired("module", mname); - io.mapRequired("depth", depth); + // dump the IR of the loop + std::string str; + llvm::raw_string_ostream stream(str); + L->print(stream, true, true); io.mapOptional("llvm", str); - io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); - io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); - io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); - io.mapOptional("llvm.loop.isunrolled", MetaLoopIsUnrolled); - io.mapOptional("llvm.loop.vectorize.enable", MetaLoopVectorEnable); - io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); - io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); - io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); } }; From 1465d370425e87da2c8ff73f2e77e8e8fcdaccbd Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 00:45:47 -0500 Subject: [PATCH 020/239] avoid segmentation fault when no preheader is in loop --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 8981ffb50..7a6dba25e 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -56,10 +56,10 @@ std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { - Function* F = L->getLoopPreheader()->getParent(); + Function* F = L->getBlocks()[0]->getParent(); std::string fname = F->getName(); - Module* M = L->getLoopPreheader()->getParent()->getParent(); + Module* M = F->getParent(); std::string mname = M->getName(); std::string id_str; From 2bb87c8cb5065edf72dbf3c9599b27c5acb13bca Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 20:59:25 -0500 Subject: [PATCH 021/239] use getOptionalBoolLoopAttribute --- .../opt_loops/opt_loops.cc | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 7a6dba25e..4fa403ab7 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -43,6 +43,26 @@ using namespace llvm::yaml; using llvm::yaml::IO; using llvm::yaml::ScalarEnumerationTraits; +static Optional getOptionalBoolLoopAttribute(const Loop* TheLoop, StringRef Name) { + MDNode* MD = findOptionMDForLoop(TheLoop, Name); + if (!MD) + return None; + switch (MD->getNumOperands()) { + case 1: + // When the value is absent it is interpreted as 'attribute set'. + return true; + case 2: + if (ConstantInt* IntMD = mdconst::extract_or_null(MD->getOperand(1).get())) + return IntMD->getZExtValue(); + return true; + } + llvm_unreachable("unexpected number of options"); +} + +static bool getBooleanLoopAttribute(const Loop* TheLoop, StringRef Name) { + return getOptionalBoolLoopAttribute(TheLoop, Name).getValueOr(false); +} + std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { Optional Value = findStringMetadataForLoop(L, MDString); if (!Value) @@ -92,7 +112,7 @@ struct llvm::yaml::MappingTraits { std::string MetaLoopUnrollEnable = getStringMetadataFromLoop(L, "llvm.loop.unroll.enable"); io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); - std::string MetaLoopUnrollDisable = getStringMetadataFromLoop(L, "llvm.loop.unroll.disable"); + bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); std::string MetaLoopUnrollCount = getStringMetadataFromLoop(L, "llvm.loop.unroll.count"); From cd146f33d96ec13e205aa15f15dae965dbe72edc Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 21:02:04 -0500 Subject: [PATCH 022/239] use getBooleanLoopAttribute for all boolean attributes --- .../loop_optimizations_service/opt_loops/opt_loops.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 4fa403ab7..b5375060a 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -109,7 +109,7 @@ struct llvm::yaml::MappingTraits { } io.mapRequired("name1", name1); - std::string MetaLoopUnrollEnable = getStringMetadataFromLoop(L, "llvm.loop.unroll.enable"); + bool MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); @@ -118,19 +118,19 @@ struct llvm::yaml::MappingTraits { std::string MetaLoopUnrollCount = getStringMetadataFromLoop(L, "llvm.loop.unroll.count"); io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); - std::string MetaLoopIsUnrolled = getStringMetadataFromLoop(L, "llvm.loop.isunrolled"); + bool MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); io.mapOptional("llvm.loop.isunrolled", MetaLoopIsUnrolled); - std::string MetaLoopVectorEnable = getStringMetadataFromLoop(L, "llvm.loop.vector.enable"); + bool MetaLoopVectorEnable = getBooleanLoopAttribute(L, "llvm.loop.vector.enable"); io.mapOptional("llvm.loop.vectorize.enable", MetaLoopVectorEnable); - std::string MetaLoopVectorDisable = getStringMetadataFromLoop(L, "llvm.loop.vector.disable"); + bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); std::string MetaLoopVectorWidth = getStringMetadataFromLoop(L, "llvm.loop.vector.width"); io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); - std::string MetaLoopIsVectorized = getStringMetadataFromLoop(L, "llvm.loop.isvectorized"); + bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); // dump the IR of the loop From 1d8c2dc458fd0adbf845d04e2638335d0c42f34e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 21:11:20 -0500 Subject: [PATCH 023/239] use getOptionalIntLoopAttribute for numeric attributes --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index b5375060a..24d612755 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -115,7 +115,7 @@ struct llvm::yaml::MappingTraits { bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); - std::string MetaLoopUnrollCount = getStringMetadataFromLoop(L, "llvm.loop.unroll.count"); + auto MetaLoopUnrollCount = getOptionalIntLoopAttribute(L, "llvm.loop.unroll.count"); io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); bool MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); @@ -127,7 +127,7 @@ struct llvm::yaml::MappingTraits { bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); - std::string MetaLoopVectorWidth = getStringMetadataFromLoop(L, "llvm.loop.vector.width"); + auto MetaLoopVectorWidth = getOptionalIntLoopAttribute(L, "llvm.loop.vector.width"); io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); From c3c999767b64084e203e20f028d3bef9c3ff6eab Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 22:35:11 -0500 Subject: [PATCH 024/239] add option for Yaml log path, and run Yaml after all optimizations --- .../opt_loops/opt_loops.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 24d612755..d0fb03f4c 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -149,6 +149,13 @@ cl::opt InputFilename(cl::Positional, cl::desc("Specify input filen cl::opt OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename"), cl::init("-")); +/// Output YAML log file name. +cl::opt OutputYAMLFile("emit-yaml", cl::desc("Specify output YAML log filename"), + cl::value_desc("filename"), cl::init("/tmp/loops.log")); + +// TODO: add other features like "read-yaml", "print-yaml-after-all", "print-yaml-before-all", +// "print-yaml-after=", "print-yaml-before=" etc. + /// Loop Optimizations static cl::opt UnrollEnable("floop-unroll", cl::desc("Enable loop unrolling"), cl::init(false)); @@ -361,13 +368,12 @@ int main(int argc, char** argv) { } // Prepare loops dump/configuration yaml file - raw_fd_ostream ToolConfigFile("/tmp/loops.log", EC); + raw_fd_ostream ToolConfigFile(OutputYAMLFile, EC); yaml::Output Yaml(ToolConfigFile); initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); - PM.add(createLoopLogPass(Yaml)); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); PM.add(createLICMPass()); @@ -376,6 +382,8 @@ int main(int argc, char** argv) { Builder.LoopVectorize = VectorizeEnable; Builder.populateModulePassManager(PM); + PM.add(createLoopLogPass(Yaml)); + // PM to output the module if (OutputAssembly) { PM.add(createPrintModulePass(Out.os(), "", PreserveAssemblyUseListOrder)); From 093c739c12f36011feb7917e01ccf8c579aec2aa Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 23:43:41 -0500 Subject: [PATCH 025/239] use camel case for variables --- .../opt_loops/opt_loops.cc | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index d0fb03f4c..eb17f9a4e 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -77,37 +77,37 @@ template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { Function* F = L->getBlocks()[0]->getParent(); - std::string fname = F->getName(); + std::string FName = F->getName(); Module* M = F->getParent(); - std::string mname = M->getName(); + std::string MName = M->getName(); - std::string id_str; - llvm::raw_string_ostream id_stream(id_str); - L->getLoopID()->printAsOperand(id_stream, M); - io.mapRequired("id", id_str); - io.mapRequired("function", fname); - io.mapRequired("module", mname); + std::string IDStr; + llvm::raw_string_ostream IDStream(IDStr); + L->getLoopID()->printAsOperand(IDStream, M); + io.mapRequired("ID", IDStr); + io.mapRequired("Function", FName); + io.mapRequired("Module", MName); // this id always prints a value of 4. Not sure if I am using it correctly - auto id_wrong = L->getLoopID()->getMetadataID(); - io.mapRequired("id_wrong", id_wrong); + auto MetadataID = L->getLoopID()->getMetadataID(); + io.mapRequired("MetadataID", MetadataID); - std::string name = L->getName(); - io.mapRequired("name", name); + std::string Name = L->getName(); + io.mapRequired("Name", Name); - int depth = L->getLoopDepth(); - io.mapRequired("depth", depth); + int Depth = L->getLoopDepth(); + io.mapRequired("Depth", Depth); - // TODO: find a way to provide a name to the loop that will remain consisten across multiple + // TODO: find a way to provide a Name to the loop that will remain consisten across multiple // `opt` calls - std::string name1 = L->getHeader()->getName(); - static int count = 0; - if (name1.length() == 0) { - name1 = "loop_" + std::to_string(count++); - L->getHeader()->setName(name1); + std::string HeaderName = L->getHeader()->getName(); + static int Count = 0; + if (HeaderName.length() == 0) { + HeaderName = "loop_" + std::to_string(Count++); + L->getHeader()->setName(HeaderName); } - io.mapRequired("name1", name1); + io.mapRequired("HeaderName", HeaderName); bool MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); @@ -134,10 +134,10 @@ struct llvm::yaml::MappingTraits { io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); // dump the IR of the loop - std::string str; - llvm::raw_string_ostream stream(str); + std::string IR; + llvm::raw_string_ostream stream(IR); L->print(stream, true, true); - io.mapOptional("llvm", str); + io.mapOptional("llvm", IR); } }; @@ -292,7 +292,7 @@ class LoopConfiguratorPass : public llvm::FunctionPass { if (UnrollEnable) addStringMetadataToLoop(ALoop, "llvm.loop.unroll.enable", UnrollEnable); if (UnrollCount) - addStringMetadataToLoop(ALoop, "llvm.loop.unroll.count", UnrollCount); + addStringMetadataToLoop(ALoop, "llvm.loop.unroll.Count", UnrollCount); if (VectorizeEnable) addStringMetadataToLoop(ALoop, "llvm.loop.vectorize.enable", VectorizeEnable); if (VectorizationFactor) @@ -309,7 +309,7 @@ char LoopConfiguratorPass::ID = 1; /// On error, messages are written to stderr and null is returned. /// /// \param Context LLVM Context for the module. -/// \param Name Input file name. +/// \param Name Input file Name. static std::unique_ptr readModule(LLVMContext& Context, StringRef Name) { SMDiagnostic Diag; std::unique_ptr Module = parseIRFile(Name, Diag, Context); From 24288c188bdd069b610f5b6c734983374b4f6d0e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 23:52:23 -0500 Subject: [PATCH 026/239] fix typo and add comment --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index eb17f9a4e..bd408641f 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -93,7 +93,7 @@ struct llvm::yaml::MappingTraits { auto MetadataID = L->getLoopID()->getMetadataID(); io.mapRequired("MetadataID", MetadataID); - std::string Name = L->getName(); + std::string Name = L->getName(); // NOTE: actually L->getName calls L->getHeader()->getName() io.mapRequired("Name", Name); int Depth = L->getLoopDepth(); @@ -292,7 +292,7 @@ class LoopConfiguratorPass : public llvm::FunctionPass { if (UnrollEnable) addStringMetadataToLoop(ALoop, "llvm.loop.unroll.enable", UnrollEnable); if (UnrollCount) - addStringMetadataToLoop(ALoop, "llvm.loop.unroll.Count", UnrollCount); + addStringMetadataToLoop(ALoop, "llvm.loop.unroll.count", UnrollCount); if (VectorizeEnable) addStringMetadataToLoop(ALoop, "llvm.loop.vectorize.enable", VectorizeEnable); if (VectorizationFactor) From 9ec34134a26fdbb09a6f83160d6516119af76509 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 30 Jan 2022 23:58:02 -0500 Subject: [PATCH 027/239] use camel case for counts --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index bd408641f..85636a73c 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -235,7 +235,7 @@ using llvm::yaml::Output; class LoopLog : public llvm::FunctionPass { public: static char ID; - std::unordered_map counts; + std::unordered_map Counts; LoopLog(yaml::Output& Yaml = *(new yaml::Output(llvm::dbgs()))) : FunctionPass(ID), Yaml(Yaml) {} @@ -248,7 +248,7 @@ class LoopLog : public llvm::FunctionPass { auto Loops = LI.getLoopsInPreorder(); // Should really account for module, too. - counts[F.getName().str()] = Loops.size(); + Counts[F.getName().str()] = Loops.size(); // ensure that all loops have metadata for (auto L : Loops) { From 0a7c9df1f6a3fe6e8287fd501fea594c397a790e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 31 Jan 2022 00:48:59 -0500 Subject: [PATCH 028/239] update README file --- examples/example_unrolling_service/README.md | 4 ++-- examples/loop_optimizations_service/README.md | 14 ++++++++++++++ .../opt_loops/README.md | 15 ++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/examples/example_unrolling_service/README.md b/examples/example_unrolling_service/README.md index f4871ceaa..0756d8397 100644 --- a/examples/example_unrolling_service/README.md +++ b/examples/example_unrolling_service/README.md @@ -37,8 +37,8 @@ a standalone script without using the bazel build system. 1. Build the `loop_unroller` custom tool that modifies the unrolling factor of each loop in a LLVM IR file: Follow the [Building from source using CMake](../../INSTALL.md#building-from-source-with-cmake) instructions with `-DCOMPILER_GYM_BUILD_EXAMPLES=ON` added to the `cmake` command. -2. Run the example +2. Run the example from the `examples` directory of the repo ```sh $ cd examples -$ python3 example_compiler_gym_service/demo_without_bazel.py +$ python3 example_unrolling_service/demo_without_bazel.py ``` diff --git a/examples/loop_optimizations_service/README.md b/examples/loop_optimizations_service/README.md index 2f2ccf2e8..3746b7982 100644 --- a/examples/loop_optimizations_service/README.md +++ b/examples/loop_optimizations_service/README.md @@ -28,3 +28,17 @@ Run `env_tests.py` unit tests: ```sh $ bazel test //examples/loop_optimizations_service:env_tests ``` + +### Using the python service without bazel + +Because the python service contains no compiled code, it can be run directly as +a standalone script without using the bazel build system. + +1. Build the `opt_loops` custom tool that modifies and configures optimization parameters of each loop in a LLVM IR file: +Follow the [Building from source using CMake](../../INSTALL.md#building-from-source-with-cmake) instructions with `-DCOMPILER_GYM_BUILD_EXAMPLES=ON` added to the `cmake` command. + +2. Run the example from the `examples` directory of the repo +```sh +$ cd examples +$ python3 loop_optimizations_service/demo_without_bazel.py +``` diff --git a/examples/loop_optimizations_service/opt_loops/README.md b/examples/loop_optimizations_service/opt_loops/README.md index 5118c8d3d..42cb77dae 100644 --- a/examples/loop_optimizations_service/opt_loops/README.md +++ b/examples/loop_optimizations_service/opt_loops/README.md @@ -1,6 +1,19 @@ LLVM's opt does not always enforce the unrolling or vectorization options passed as cli arguments. Hence, we created our own exeutable with custom unrolling pass in examples/loop_optimizations_service/loop_unroller that enforces the unrolling factors passed in its cli. +## Usage + To run the custom unroller: ``` -bazel run //examples/loop_optimizations_service/opt_loops:opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll +bazel run //examples/loop_optimizations_service/opt_loops:opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll -emit-yaml= +``` + +### Using the python service without bazel + +1. Build the `opt_loops` custom tool that modifies and configures optimization parameters of each loop in a LLVM IR file: +Follow the [Building from source using CMake](../../INSTALL.md#building-from-source-with-cmake) instructions with `-DCOMPILER_GYM_BUILD_EXAMPLES=ON` added to the `cmake` command. + +2. Run the example from the `examples` directory of the repo +```sh +$ cd examples +$ loop_optimizations_service/opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll -emit-yaml= ``` From dec4195449f3fb2d623bc1595ebebfb965de4f9e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 31 Jan 2022 00:50:04 -0500 Subject: [PATCH 029/239] fix initial value of loop-vectorize --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 85636a73c..762a62f86 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -165,7 +165,7 @@ static cl::opt UnrollCount( "unroll_count pragma values, for testing purposes")); static cl::opt VectorizeEnable("floop-vectorize", cl::desc("Enable loop vectorize"), - cl::init("false")); + cl::init(false)); static cl::opt VectorizationFactor("fforce-vector-width", cl::desc("Sets the SIMD width. Zero is autoselect.")); From de0cad34c5b14d3e7c47888e67391ce91c82ab4d Mon Sep 17 00:00:00 2001 From: Boian Petkantchin Date: Tue, 28 Dec 2021 09:38:43 -0800 Subject: [PATCH 030/239] gRPC refactoring of actions and observations --- build_tools/cmake/grpc.cmake | 2 + build_tools/cmake/protobuf.cmake | 3 + compiler_gym/envs/compiler_env.py | 30 +- compiler_gym/envs/gcc/service/gcc_service.py | 135 +- compiler_gym/envs/llvm/compute_observation.py | 4 +- compiler_gym/envs/llvm/service/ActionSpace.cc | 24 +- compiler_gym/envs/llvm/service/Benchmark.cc | 14 +- compiler_gym/envs/llvm/service/Benchmark.h | 4 +- .../envs/llvm/service/ComputeObservation.cc | 2 +- compiler_gym/envs/llvm/service/LlvmSession.cc | 15 +- compiler_gym/envs/llvm/service/LlvmSession.h | 6 +- compiler_gym/envs/llvm/service/Observation.cc | 52 +- compiler_gym/envs/llvm/service/Observation.h | 2 +- .../envs/llvm/service/ObservationSpaces.cc | 203 +-- .../service/loop_tool_compilation_session.py | 96 +- compiler_gym/service/CompilationSession.h | 4 +- compiler_gym/service/compilation_session.py | 11 +- compiler_gym/service/proto/BUILD | 3 + compiler_gym/service/proto/CMakeLists.txt | 2 + compiler_gym/service/proto/__init__.py | 85 +- .../service/proto/compiler_gym_service.proto | 327 +++-- compiler_gym/service/proto/py_converters.py | 896 ++++++++++-- .../service/runtime/compiler_gym_service.py | 6 +- compiler_gym/spaces/BUILD | 10 + compiler_gym/spaces/CMakeLists.txt | 9 + compiler_gym/spaces/common.py | 28 + compiler_gym/spaces/scalar.py | 10 +- compiler_gym/spaces/sequence.py | 17 +- compiler_gym/views/observation_space_spec.py | 174 +-- docs/source/rpc.rst | 85 +- examples/RandomSearch.cc | 16 +- .../example_compiler_gym_service/env_tests.py | 4 +- .../service_cc/ExampleService.cc | 43 +- .../service_py/example_service.py | 83 +- .../example_unrolling_service/env_tests.py | 7 +- .../service_py/example_service.py | 93 +- .../loop_optimizations_service/env_tests.py | 4 +- .../service_py/BUILD | 7 + .../service_py/loops_opt_service.py | 98 +- external/absl/CMakeLists.txt | 3 + external/boost/CMakeLists.txt | 2 + external/cpuinfo/CMakeLists.txt | 3 + external/csmith/CMakeLists.txt | 3 + external/gflags/CMakeLists.txt | 3 + external/llvm/CMakeLists.txt | 3 + external/programl/CMakeLists.txt | 1 + external/protobuf/CMakeLists.txt | 1 + external/subprocess/CMakeLists.txt | 3 + prototool.yaml | 7 + tests/gcc/gcc_env_test.py | 4 +- tests/llvm/observation_spaces_test.py | 23 +- tests/llvm/service/ActionSpaceTest.cc | 8 +- tests/service/proto/CMakeLists.txt | 2 +- tests/service/proto/py_converters_test.py | 1202 ++++++++++++----- tests/views/observation_test.py | 43 +- 55 files changed, 2690 insertions(+), 1235 deletions(-) create mode 100644 compiler_gym/spaces/common.py create mode 100644 prototool.yaml diff --git a/build_tools/cmake/grpc.cmake b/build_tools/cmake/grpc.cmake index 2818e2c0f..a8284fd54 100644 --- a/build_tools/cmake/grpc.cmake +++ b/build_tools/cmake/grpc.cmake @@ -59,6 +59,7 @@ function(cc_grpc_library) --descriptor_set_in "${_DESCRIPTOR_SET_FILE}" --grpc_out "${_HEADER_DST_DIR}" --plugin "protoc-gen-grpc=${_GRPC_CPP_PLUGIN_EXECUTABLE}" + --experimental_allow_proto3_optional "${_RELATIVE_PROTO_FILE}" DEPENDS "${Protobuf_PROTOC_EXECUTABLE}" "${_DESCRIPTOR_SET_FILE}" "${_PROTO_FILE}" ${_DEPS} VERBATIM) @@ -112,6 +113,7 @@ function(py_grpc_library) --proto_path "${CMAKE_SOURCE_DIR}" --descriptor_set_in "${_DESCRIPTOR_SET_FILE}" --grpc_python_out "${CMAKE_BINARY_DIR}" + --experimental_allow_proto3_optional "${_RELATIVE_PROTO_FILE}" DEPENDS "${Python3_EXECUTABLE}" "${_DESCRIPTOR_SET_FILE}" "${_PROTO_FILE}" ${_DEPS} VERBATIM) diff --git a/build_tools/cmake/protobuf.cmake b/build_tools/cmake/protobuf.cmake index ce4526303..760416cc1 100644 --- a/build_tools/cmake/protobuf.cmake +++ b/build_tools/cmake/protobuf.cmake @@ -34,6 +34,7 @@ function(proto_library) COMMAND "${Protobuf_PROTOC_EXECUTABLE}" --proto_path "${CMAKE_SOURCE_DIR}" --descriptor_set_out "${_DST_FILE}" + --experimental_allow_proto3_optional "${_RELATIVE_PROTO_FILE}" DEPENDS "${Protobuf_PROTOC_EXECUTABLE}" "${_SRC_FILE}" ${_RULE_DEPS} VERBATIM) @@ -85,6 +86,7 @@ function(cc_proto_library) --proto_path "${CMAKE_SOURCE_DIR}" --descriptor_set_in "${_DESCRIPTOR_SET_FILE}" --cpp_out "${_HEADER_DST_DIR}" + --experimental_allow_proto3_optional "${_RELATIVE_PROTO_FILE}" DEPENDS "${Protobuf_PROTOC_EXECUTABLE}" @@ -139,6 +141,7 @@ function(py_proto_library) --proto_path "${CMAKE_SOURCE_DIR}" --descriptor_set_in "${_DESCRIPTOR_SET_FILE}" --python_out "${CMAKE_BINARY_DIR}" + --experimental_allow_proto3_optional "${_RELATIVE_PROTO_FILE}" DEPENDS "${Protobuf_PROTOC_EXECUTABLE}" diff --git a/compiler_gym/envs/compiler_env.py b/compiler_gym/envs/compiler_env.py index 383287cce..2c72d26cc 100644 --- a/compiler_gym/envs/compiler_env.py +++ b/compiler_gym/envs/compiler_env.py @@ -11,7 +11,7 @@ from math import isclose from pathlib import Path from time import time -from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union +from typing import Any, Dict, Iterable, List, Optional, Tuple, Union import gym import numpy as np @@ -30,12 +30,12 @@ SessionNotFound, ) from compiler_gym.service.connection import ServiceIsClosed -from compiler_gym.service.proto import Action, AddBenchmarkRequest +from compiler_gym.service.proto import AddBenchmarkRequest from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import ( - Choice, EndSessionReply, EndSessionRequest, + Event, ForkSessionReply, ForkSessionRequest, GetVersionReply, @@ -255,9 +255,11 @@ def __init__( rewards = rewards or [ DefaultRewardFromObservation(obs.name) for obs in self.service.observation_spaces - if obs.default_value.WhichOneof("value") + if obs.default_observation.WhichOneof("value") and isinstance( - getattr(obs.default_value, obs.default_value.WhichOneof("value")), + getattr( + obs.default_observation, obs.default_observation.WhichOneof("value") + ), numbers.Number, ) ] @@ -294,11 +296,9 @@ def __init__( pass # Process the available action, observation, and reward spaces. - action_spaces = [ + self.action_spaces = [ proto_to_action_space(space) for space in self.service.action_spaces ] - self.action_spaces = [a.space for a in action_spaces] - self._make_actions = [a.make_action for a in action_spaces] self.observation = self._observation_view_type( raw_step=self.raw_step, @@ -315,7 +315,6 @@ def __init__( self._versions: Optional[GetVersionReply] = None self.action_space: Optional[Space] = None - self._make_action: Optional[Callable[[Any], Action]] = None self.observation_space: Optional[Space] = None # Mutable state initialized in reset(). @@ -429,7 +428,6 @@ def action_space(self, action_space: Optional[str]): else 0 ) self._action_space: NamedDiscrete = self.action_spaces[index] - self._make_actions: Callable[[Any], Action] = self._make_actions[index] @property def benchmark(self) -> Benchmark: @@ -852,9 +850,7 @@ def _call_with_error( # If the action space has changed, update it. if reply.HasField("new_action_space"): - self.action_space, self._make_action = proto_to_action_space( - reply.new_action_space - ) + self.action_space = proto_to_action_space(reply.new_action_space) self.reward.reset(benchmark=self.benchmark, observation_view=self.observation) if self.reward_space: @@ -926,9 +922,7 @@ def raw_step( # Send the request to the backend service. request = StepRequest( session_id=self._session_id, - action=[ - Action(choice=[Choice(named_discrete_value_index=a)]) for a in actions - ], + action=[Event(int64_value=a) for a in actions], observation_space=[ observation_space.index for observation_space in observations_to_compute ], @@ -972,9 +966,7 @@ def raw_step( # If the action space has changed, update it. if reply.HasField("new_action_space"): - self.action_space, self._make_action = proto_to_action_space( - reply.action_space - ) + self.action_space = proto_to_action_space(reply.new_action_space) # Translate observations to python representations. if len(reply.observation) != len(observations_to_compute): diff --git a/compiler_gym/envs/gcc/service/gcc_service.py b/compiler_gym/envs/gcc/service/gcc_service.py index df78f866d..0366aa9e6 100755 --- a/compiler_gym/envs/gcc/service/gcc_service.py +++ b/compiler_gym/envs/gcc/service/gcc_service.py @@ -19,17 +19,19 @@ from compiler_gym.envs.gcc import Gcc, Option from compiler_gym.service import CompilationSession -from compiler_gym.service.proto import Action as ActionProto from compiler_gym.service.proto import ( ActionSpace, Benchmark, - ChoiceSpace, + ByteSequenceSpace, + ByteTensor, + Event, + Int64Range, + Int64Tensor, + ListSpace, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) logger = logging.getLogger(__name__) @@ -71,97 +73,96 @@ def make_gcc_compilation_session(gcc_bin: str): action_spaces_ = [ ActionSpace( name="default", - choice=[ - ChoiceSpace( - name="default", - named_discrete_space=NamedDiscreteSpace( - value=[str(a) for a in actions] - ), - ) - ], - ) + space=Space( + named_discrete=NamedDiscreteSpace(name=[str(a) for a in actions]), + ), + ), ] observation_spaces_ = [ # A string of the source code ObservationSpace( name="source", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(string_value=StringSpace(length_range=Int64Range(min=0))), deterministic=True, platform_dependent=False, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # A string of the rtl code ObservationSpace( name="rtl", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(string_value=StringSpace(length_range=Int64Range(min=0))), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # A string of the assembled code ObservationSpace( name="asm", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(string_value=StringSpace(length_range=Int64Range(min=0))), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # The size of the assembled code ObservationSpace( name="asm_size", - scalar_int64_range=ScalarRange(min=ScalarLimit(value=-1)), + space=Space(int64_value=Int64Range(min=-1)), deterministic=True, platform_dependent=True, - default_value=Observation( - scalar_int64=-1, + default_observation=Event( + int64_value=-1, ), ), # The hash of the assembled code ObservationSpace( name="asm_hash", - string_size_range=ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=200) + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0, max=200)), ), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # Asm instruction counts - Counter as a JSON string ObservationSpace( name="instruction_counts", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0)), + ), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # A bytes of the object code ObservationSpace( name="obj", - binary_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + byte_sequence=ByteSequenceSpace(length_range=Int64Range(min=0)), + ), deterministic=True, platform_dependent=False, - default_value=Observation(binary_value=b""), + default_observation=Event(byte_tensor=ByteTensor(shape=[0], value=b"")), ), # The size of the object code ObservationSpace( name="obj_size", - scalar_int64_range=ScalarRange(min=ScalarLimit(value=-1)), + space=Space(int64_value=Int64Range(min=-1)), deterministic=True, platform_dependent=True, - default_value=Observation( - scalar_int64=-1, + default_observation=Event( + int64_value=-1, ), ), # The hash of the object code ObservationSpace( name="obj_hash", - string_size_range=ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=200) + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0, max=200)), ), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), # A list of the choices. Each element corresponds to an option in the spec. # '-1' indicates that this is empty on the command line (e.g. if the choice @@ -170,24 +171,24 @@ def make_gcc_compilation_session(gcc_bin: str): # (e.g. for the -O flag, 5 means use '-Ofast' on the command line.) ObservationSpace( name="choices", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=len(option) - 1) - ) - for option in gcc.spec.options - ] + space=Space( + space_list=ListSpace( + space=[ + Space(int64_value=Int64Range(min=0, max=len(option) - 1)) + for option in gcc.spec.options + ] + ), ), ), # The command line for compiling the object file as a string ObservationSpace( name="command_line", - string_size_range=ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=200) + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0, max=200)), ), deterministic=True, platform_dependent=True, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), ] @@ -233,7 +234,7 @@ def __init__( @property def num_actions(self) -> int: - return len(self.action_spaces[0].choice[0].named_discrete_space.value) + return len(self.action_spaces[0].space.named_discrete.name) @property def choices(self) -> List[int]: @@ -471,13 +472,13 @@ def reset_cached(self): self._asm_hash = None def apply_action( - self, action_proto: ActionProto + self, action_proto: Event ) -> Tuple[bool, Optional[ActionSpace], bool]: """Apply an action.""" - if len(action_proto.choice) != 1: - raise ValueError("Invalid choice count") + if not action_proto.HasField("int64_value"): + raise ValueError("Invalid action, int64_value expected.") - choice_index = action_proto.choice[0].named_discrete_value_index + choice_index = action_proto.int64_value if choice_index < 0 or choice_index >= self.num_actions: raise ValueError("Out-of-range") @@ -497,32 +498,36 @@ def apply_action( # observation is taken return False, None, False - def get_observation(self, observation_space: ObservationSpace) -> Observation: + def get_observation(self, observation_space: ObservationSpace) -> Event: """Get one of the observations""" if observation_space.name == "source": - return Observation(string_value=self.source or "") + return Event(string_value=self.source or "") elif observation_space.name == "rtl": - return Observation(string_value=self.rtl or "") + return Event(string_value=self.rtl or "") elif observation_space.name == "asm": - return Observation(string_value=self.asm or "") + return Event(string_value=self.asm or "") elif observation_space.name == "asm_size": - return Observation(scalar_int64=self.asm_size or -1) + return Event(int64_value=self.asm_size or -1) elif observation_space.name == "asm_hash": - return Observation(string_value=self.asm_hash or "") + return Event(string_value=self.asm_hash or "") elif observation_space.name == "instruction_counts": - return Observation(string_value=self.instruction_counts or "{}") + return Event(string_value=self.instruction_counts or "{}") elif observation_space.name == "obj": - return Observation(binary_value=self.obj or b"") + value = self.obj or b"" + return Event(byte_tensor=ByteTensor(shape=[len(value)], value=value)) elif observation_space.name == "obj_size": - return Observation(scalar_int64=self.obj_size or -1) + return Event(int64_value=self.obj_size or -1) elif observation_space.name == "obj_hash": - return Observation(string_value=self.obj_hash or "") + return Event(string_value=self.obj_hash or "") elif observation_space.name == "choices": - observation = Observation() - observation.int64_list.value[:] = self.choices + observation = Event( + int64_tensor=Int64Tensor( + shape=[len(self.choices)], value=self.choices + ) + ) return observation elif observation_space.name == "command_line": - return Observation( + return Event( string_value=gcc.bin + " " + " ".join(map(str, self.obj_command_line("src.c", "obj.o"))) diff --git a/compiler_gym/envs/llvm/compute_observation.py b/compiler_gym/envs/llvm/compute_observation.py index 14c36c55e..3e745b325 100644 --- a/compiler_gym/envs/llvm/compute_observation.py +++ b/compiler_gym/envs/llvm/compute_observation.py @@ -9,7 +9,7 @@ import google.protobuf.text_format -from compiler_gym.service.proto import Observation +from compiler_gym.service.proto import Event from compiler_gym.util.commands import Popen from compiler_gym.util.gym_type_hints import ObservationType from compiler_gym.util.runfiles_path import runfiles_path @@ -105,7 +105,7 @@ def compute_observation( f"Failed to parse {observation_space.id} observation: {e}" ) from e - observation = Observation() + observation = Event() try: google.protobuf.text_format.Parse(stdout, observation) except google.protobuf.text_format.ParseError as e: diff --git a/compiler_gym/envs/llvm/service/ActionSpace.cc b/compiler_gym/envs/llvm/service/ActionSpace.cc index 2448f3fa9..73808851b 100644 --- a/compiler_gym/envs/llvm/service/ActionSpace.cc +++ b/compiler_gym/envs/llvm/service/ActionSpace.cc @@ -16,26 +16,24 @@ namespace compiler_gym::llvm_service { std::vector getLlvmActionSpaceList() { std::vector spaces; spaces.reserve(magic_enum::enum_count()); - for (const auto& value : magic_enum::enum_values()) { - ActionSpace space; - space.set_name(util::enumNameToPascalCase(value)); - switch (value) { + for (const auto& enumValue : magic_enum::enum_values()) { + ActionSpace actionSpace; + actionSpace.set_name(util::enumNameToPascalCase(enumValue)); + Space& space = *actionSpace.mutable_space(); + switch (enumValue) { case LlvmActionSpace::PASSES_ALL: { - ChoiceSpace* flagChoice = space.add_choice(); - flagChoice->set_name("flag"); - - NamedDiscreteSpace* flagChoiceSpace = flagChoice->mutable_named_discrete_space(); - flagChoiceSpace->set_is_commandline(true); - for (const auto& value : magic_enum::enum_values()) { - flagChoiceSpace->add_value(util::enumNameToCommandlineFlag(value)); + CommandlineSpace flagValue; + for (const auto& enumValue : magic_enum::enum_values()) { + flagValue.add_name(util::enumNameToCommandlineFlag(enumValue)); } + space.mutable_any_value()->PackFrom(flagValue); } break; default: UNREACHABLE(fmt::format("Unknown LLVM action space {}", - util::enumNameToPascalCase(value))); + util::enumNameToPascalCase(enumValue))); } - spaces.push_back(space); + spaces.push_back(actionSpace); } return spaces; } diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index 93ae45207..f4d989c41 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -221,7 +221,7 @@ Status Benchmark::writeBitcodeToFile(const fs::path& path) { return writeBitcodeFile(module(), path); } -Status Benchmark::computeRuntime(Observation& observation) { +Status Benchmark::computeRuntime(Event& observation) { const RealizedBenchmarkDynamicConfig& cfg = dynamicConfig(); if (!cfg.isRunnable()) { @@ -253,14 +253,15 @@ Status Benchmark::computeRuntime(Observation& observation) { // Run the binary. VLOG(3) << "Running " << getRuntimesPerObservationCount() << " iterations of binary"; + *observation.mutable_double_tensor()->mutable_shape()->Add() = getRuntimesPerObservationCount(); for (int i = 0; i < getRuntimesPerObservationCount(); ++i) { const auto startTime = std::chrono::steady_clock::now(); RETURN_IF_ERROR(cfg.runCommand().checkCall()); const auto endTime = std::chrono::steady_clock::now(); const auto elapsedMicroseconds = std::chrono::duration_cast(endTime - startTime).count(); - observation.mutable_double_list()->add_value(static_cast(elapsedMicroseconds) / - 1000000); + *observation.mutable_double_tensor()->mutable_value()->Add() = + static_cast(elapsedMicroseconds) / 1000000; } RETURN_IF_ERROR(cfg.runCommand().checkOutfiles()); @@ -275,15 +276,16 @@ Status Benchmark::computeRuntime(Observation& observation) { return Status::OK; } -Status Benchmark::computeBuildtime(Observation& observation) { +Status Benchmark::computeBuildtime(Event& observation) { if (!dynamicConfig().isBuildable()) { return Status::OK; } RETURN_IF_ERROR(compile()); - observation.mutable_double_list()->add_value(static_cast(lastBuildTimeMicroseconds()) / - 1000000); + *observation.mutable_double_tensor()->mutable_shape()->Add() = 1; + *observation.mutable_double_tensor()->mutable_value()->Add() = + static_cast(lastBuildTimeMicroseconds()) / 1000000; return Status::OK; } diff --git a/compiler_gym/envs/llvm/service/Benchmark.h b/compiler_gym/envs/llvm/service/Benchmark.h index b0f034398..5be168938 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.h +++ b/compiler_gym/envs/llvm/service/Benchmark.h @@ -165,14 +165,14 @@ class Benchmark { * * If the benchmark is not runnable, the list is empty. */ - grpc::Status computeRuntime(Observation& observation); + grpc::Status computeRuntime(Event& observation); /** * Compute a list of buildtimes. * * If the benchmark is not buildable, the list is empty. */ - grpc::Status computeBuildtime(Observation& observation); + grpc::Status computeBuildtime(Event& observation); grpc::Status compile(); diff --git a/compiler_gym/envs/llvm/service/ComputeObservation.cc b/compiler_gym/envs/llvm/service/ComputeObservation.cc index a0b38d3ab..c0376d695 100644 --- a/compiler_gym/envs/llvm/service/ComputeObservation.cc +++ b/compiler_gym/envs/llvm/service/ComputeObservation.cc @@ -46,7 +46,7 @@ int main(int argc, char** argv) { CHECK(status.ok()) << "Failed to compute observation: " << status.error_message(); } - Observation observation; + Event observation; { const auto status = setObservation(observationSpace, workingDirectory, *benchmark, observation); CHECK(status.ok()) << "Failed to compute observation: " << status.error_message(); diff --git a/compiler_gym/envs/llvm/service/LlvmSession.cc b/compiler_gym/envs/llvm/service/LlvmSession.cc index 4bf2778bd..e7e1fc4d0 100644 --- a/compiler_gym/envs/llvm/service/LlvmSession.cc +++ b/compiler_gym/envs/llvm/service/LlvmSession.cc @@ -113,7 +113,7 @@ Status LlvmSession::init(const LlvmActionSpace& actionSpace, std::unique_ptr& newActionSpace, bool& actionHadNoEffect) { DCHECK(benchmark_) << "Calling applyAction() before init()"; @@ -122,12 +122,13 @@ Status LlvmSession::applyAction(const Action& action, bool& endOfEpisode, switch (actionSpace()) { case LlvmActionSpace::PASSES_ALL: LlvmAction actionEnum; - if (action.choice_size() != 1) { - return Status( - StatusCode::INVALID_ARGUMENT, - fmt::format("Invalid choice count. Expected 1, received {}", action.choice_size())); + if (action.value_case() != Event::ValueCase::kInt64Value) { + return Status(StatusCode::INVALID_ARGUMENT, + fmt::format("Invalid action. Expected {}, received {}.", + magic_enum::enum_name(Event::ValueCase::kInt64Value), + magic_enum::enum_name(action.value_case()))); } - RETURN_IF_ERROR(util::intToEnum(action.choice(0).named_discrete_value_index(), &actionEnum)); + RETURN_IF_ERROR(util::intToEnum(action.int64_value(), &actionEnum)); RETURN_IF_ERROR(applyPassAction(actionEnum, actionHadNoEffect)); } @@ -144,7 +145,7 @@ Status LlvmSession::endOfStep(bool actionHadNoEffect, bool& endOfEpisode, } Status LlvmSession::computeObservation(const ObservationSpace& observationSpace, - Observation& observation) { + Event& observation) { DCHECK(benchmark_) << "Calling computeObservation() before init()"; const auto& it = observationSpaceNames_.find(observationSpace.name()); diff --git a/compiler_gym/envs/llvm/service/LlvmSession.h b/compiler_gym/envs/llvm/service/LlvmSession.h index 5cb024225..45ab3388a 100644 --- a/compiler_gym/envs/llvm/service/LlvmSession.h +++ b/compiler_gym/envs/llvm/service/LlvmSession.h @@ -51,7 +51,7 @@ class LlvmSession final : public CompilationSession { [[nodiscard]] grpc::Status init(CompilationSession* other) final override; - [[nodiscard]] grpc::Status applyAction(const Action& action, bool& endOfEpisode, + [[nodiscard]] grpc::Status applyAction(const Event& action, bool& endOfEpisode, std::optional& newActionSpace, bool& actionHadNoEffect) final override; @@ -59,7 +59,7 @@ class LlvmSession final : public CompilationSession { std::optional& newActionSpace) final override; [[nodiscard]] grpc::Status computeObservation(const ObservationSpace& observationSpace, - Observation& observation) final override; + Event& observation) final override; [[nodiscard]] virtual grpc::Status handleSessionParameter( const std::string& key, const std::string& value, @@ -69,7 +69,7 @@ class LlvmSession final : public CompilationSession { private: [[nodiscard]] grpc::Status computeObservation(LlvmObservationSpace observationSpace, - Observation& observation); + Event& observation); [[nodiscard]] grpc::Status init(const LlvmActionSpace& actionSpace, std::unique_ptr benchmark); diff --git a/compiler_gym/envs/llvm/service/Observation.cc b/compiler_gym/envs/llvm/service/Observation.cc index 7e3f7f363..f668aae65 100644 --- a/compiler_gym/envs/llvm/service/Observation.cc +++ b/compiler_gym/envs/llvm/service/Observation.cc @@ -37,13 +37,14 @@ using nlohmann::json; const programl::ProgramGraphOptions programlOptions; Status setObservation(LlvmObservationSpace space, const fs::path& workingDirectory, - Benchmark& benchmark, Observation& reply) { + Benchmark& benchmark, Event& reply) { switch (space) { case LlvmObservationSpace::IR: { // Serialize the LLVM module to an IR string. std::string ir; llvm::raw_string_ostream rso(ir); benchmark.module().print(rso, /*AAW=*/nullptr); + rso.flush(); reply.set_string_value(ir); break; } @@ -63,7 +64,9 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto std::string bitcode; llvm::raw_string_ostream outbuffer(bitcode); llvm::WriteBitcodeToFile(benchmark.module(), outbuffer); - reply.set_binary_value(outbuffer.str()); + outbuffer.flush(); + *reply.mutable_byte_tensor()->mutable_shape()->Add() = bitcode.size(); + *reply.mutable_byte_tensor()->mutable_value() = bitcode; break; } case LlvmObservationSpace::BITCODE_FILE: { @@ -75,12 +78,14 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto } case LlvmObservationSpace::INST_COUNT: { const auto features = InstCount::getFeatureVector(benchmark.module()); - *reply.mutable_int64_list()->mutable_value() = {features.begin(), features.end()}; + *reply.mutable_int64_tensor()->mutable_shape()->Add() = features.size(); + *reply.mutable_int64_tensor()->mutable_value() = {features.begin(), features.end()}; break; } case LlvmObservationSpace::AUTOPHASE: { const auto features = autophase::InstCount::getFeatureVector(benchmark.module()); - *reply.mutable_int64_list()->mutable_value() = {features.begin(), features.end()}; + *reply.mutable_int64_tensor()->mutable_shape()->Add() = features.size(); + *reply.mutable_int64_tensor()->mutable_value() = {features.begin(), features.end()}; break; } case LlvmObservationSpace::PROGRAML: @@ -99,7 +104,11 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto if (!status.ok()) { return Status(StatusCode::INTERNAL, status.error_message()); } - *reply.mutable_string_value() = nodeLinkGraph.dump(); + Opaque opaque; + opaque.set_format(space == LlvmObservationSpace::PROGRAML ? "json://networkx/MultiDiGraph" + : "json://"); + *opaque.mutable_data() = nodeLinkGraph.dump(); + reply.mutable_any_value()->PackFrom(opaque); break; } case LlvmObservationSpace::CPU_INFO: { @@ -124,57 +133,60 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto hwinfo["cores_count"] = cpuinfo_get_cores_count(); auto cpu = cpuinfo_get_packages(); hwinfo["name"] = cpu->name; - *reply.mutable_string_value() = hwinfo.dump(); + Opaque opaque; + opaque.set_format("json://"); + *opaque.mutable_data() = hwinfo.dump(); + reply.mutable_any_value()->PackFrom(opaque); break; } case LlvmObservationSpace::IR_INSTRUCTION_COUNT: { double cost; RETURN_IF_ERROR(setCost(LlvmCostFunction::IR_INSTRUCTION_COUNT, benchmark.module(), workingDirectory, &cost)); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::IR_INSTRUCTION_COUNT_O0: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O0, LlvmCostFunction::IR_INSTRUCTION_COUNT); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::IR_INSTRUCTION_COUNT_O3: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O3, LlvmCostFunction::IR_INSTRUCTION_COUNT); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::IR_INSTRUCTION_COUNT_OZ: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::Oz, LlvmCostFunction::IR_INSTRUCTION_COUNT); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::OBJECT_TEXT_SIZE_BYTES: { double cost; RETURN_IF_ERROR(setCost(LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES, benchmark.module(), workingDirectory, &cost)); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::OBJECT_TEXT_SIZE_O0: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O0, LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::OBJECT_TEXT_SIZE_O3: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O3, LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::OBJECT_TEXT_SIZE_OZ: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::Oz, LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } #ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST @@ -182,25 +194,25 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto double cost; RETURN_IF_ERROR( setCost(LlvmCostFunction::TEXT_SIZE_BYTES, benchmark.module(), workingDirectory, &cost)); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::TEXT_SIZE_O0: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O0, LlvmCostFunction::TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::TEXT_SIZE_O3: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::O3, LlvmCostFunction::TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } case LlvmObservationSpace::TEXT_SIZE_OZ: { const auto cost = getBaselineCost(benchmark.baselineCosts(), LlvmBaselinePolicy::Oz, LlvmCostFunction::TEXT_SIZE_BYTES); - reply.set_scalar_int64(static_cast(cost)); + reply.set_int64_value(static_cast(cost)); break; } #endif @@ -208,11 +220,11 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto return benchmark.computeRuntime(reply); } case LlvmObservationSpace::IS_BUILDABLE: { - reply.set_scalar_int64(benchmark.isBuildable() ? 1 : 0); + reply.set_boolean_value(benchmark.isBuildable()); break; } case LlvmObservationSpace::IS_RUNNABLE: { - reply.set_scalar_int64(benchmark.isRunnable() ? 1 : 0); + reply.set_boolean_value(benchmark.isRunnable()); break; } case LlvmObservationSpace::BUILDTIME: { diff --git a/compiler_gym/envs/llvm/service/Observation.h b/compiler_gym/envs/llvm/service/Observation.h index a83169567..f1eebf832 100644 --- a/compiler_gym/envs/llvm/service/Observation.h +++ b/compiler_gym/envs/llvm/service/Observation.h @@ -24,6 +24,6 @@ namespace compiler_gym::llvm_service { */ grpc::Status setObservation(LlvmObservationSpace space, const boost::filesystem::path& workingDirectory, Benchmark& benchmark, - Observation& reply); + Event& reply); } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/ObservationSpaces.cc b/compiler_gym/envs/llvm/service/ObservationSpaces.cc index 110dcbae0..950dc5d6f 100644 --- a/compiler_gym/envs/llvm/service/ObservationSpaces.cc +++ b/compiler_gym/envs/llvm/service/ObservationSpaces.cc @@ -5,7 +5,9 @@ #include "compiler_gym/envs/llvm/service/ObservationSpaces.h" #include +#include +#include #include #include "compiler_gym/envs/llvm/service/Benchmark.h" @@ -25,126 +27,154 @@ static constexpr size_t kAutophaseFeatureDim = 56; static constexpr size_t kMaximumPathLength = 4096; std::vector getLlvmObservationSpaceList() { - std::vector spaces; - spaces.reserve(magic_enum::enum_count()); + std::vector observationSpaces; + observationSpaces.reserve(magic_enum::enum_count()); for (const auto& value : magic_enum::enum_values()) { - ObservationSpace space; - space.set_name(util::enumNameToPascalCase(value)); + ObservationSpace observationSpace; + observationSpace.set_name(util::enumNameToPascalCase(value)); + Space& space = *observationSpace.mutable_space(); switch (value) { case LlvmObservationSpace::IR: { - space.mutable_string_size_range()->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(false); + space.mutable_string_value()->mutable_length_range()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); break; } case LlvmObservationSpace::IR_SHA1: { - space.mutable_string_size_range()->mutable_min()->set_value(40); - space.mutable_string_size_range()->mutable_max()->set_value(40); - space.set_deterministic(true); - space.set_platform_dependent(false); + space.mutable_string_value()->mutable_length_range()->set_min(40); + space.mutable_string_value()->mutable_length_range()->set_max(40); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); break; } case LlvmObservationSpace::BITCODE: { - space.mutable_binary_size_range()->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(false); + space.mutable_byte_sequence()->mutable_length_range()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); break; } case LlvmObservationSpace::BITCODE_FILE: { - space.mutable_string_size_range()->mutable_min()->set_value(0); + space.mutable_string_value()->mutable_length_range()->set_min(0); // 4096 is the maximum path length for most filesystems. - space.mutable_string_size_range()->mutable_max()->set_value(kMaximumPathLength); + space.mutable_string_value()->mutable_length_range()->set_max(kMaximumPathLength); // A random file path is generated, so the returned value is not // deterministic. - space.set_deterministic(false); - space.set_platform_dependent(false); + observationSpace.set_deterministic(false); + observationSpace.set_platform_dependent(false); break; } case LlvmObservationSpace::INST_COUNT: { - ScalarRange featureSize; - featureSize.mutable_min()->set_value(0); - std::vector featureSizes(kInstCountFeatureDimensionality, featureSize); - *space.mutable_int64_range_list()->mutable_range() = {featureSizes.begin(), - featureSizes.end()}; - space.set_deterministic(true); - space.set_platform_dependent(false); - std::vector defaultValue(kInstCountFeatureDimensionality, 0); - *space.mutable_default_value()->mutable_int64_list()->mutable_value() = { - defaultValue.begin(), defaultValue.end()}; + Int64Box& featureSizes = *space.mutable_int64_box(); + + Int64Tensor& featureSizesLow = *featureSizes.mutable_low(); + *featureSizesLow.mutable_shape()->Add() = kInstCountFeatureDimensionality; + std::vector low(kInstCountFeatureDimensionality, 0); + featureSizesLow.mutable_value()->Add(low.begin(), low.end()); + + Int64Tensor& featureSizesHigh = *featureSizes.mutable_high(); + *featureSizesHigh.mutable_shape()->Add() = kInstCountFeatureDimensionality; + std::vector high(kInstCountFeatureDimensionality, + std::numeric_limits::max()); + featureSizesHigh.mutable_value()->Add(high.begin(), high.end()); + + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); + + *observationSpace.mutable_default_observation() + ->mutable_int64_tensor() + ->mutable_shape() + ->Add() = kInstCountFeatureDimensionality; + observationSpace.mutable_default_observation() + ->mutable_int64_tensor() + ->mutable_value() + ->Add(low.begin(), low.end()); break; } case LlvmObservationSpace::AUTOPHASE: { - ScalarRange featureSize; - featureSize.mutable_min()->set_value(0); - std::vector featureSizes; - featureSizes.reserve(kAutophaseFeatureDim); - for (size_t i = 0; i < kAutophaseFeatureDim; ++i) { - featureSizes.push_back(featureSize); - } - *space.mutable_int64_range_list()->mutable_range() = {featureSizes.begin(), - featureSizes.end()}; - space.set_deterministic(true); - space.set_platform_dependent(false); - std::vector defaultValue(kAutophaseFeatureDim, 0); - *space.mutable_default_value()->mutable_int64_list()->mutable_value() = { - defaultValue.begin(), defaultValue.end()}; + Int64Box& featureSizes = *space.mutable_int64_box(); + + Int64Tensor& featureSizesLow = *featureSizes.mutable_low(); + *featureSizesLow.mutable_shape()->Add() = kAutophaseFeatureDim; + std::vector low(kAutophaseFeatureDim, 0); + featureSizesLow.mutable_value()->Add(low.begin(), low.end()); + + Int64Tensor& featureSizesHigh = *featureSizes.mutable_high(); + *featureSizesHigh.mutable_shape()->Add() = kAutophaseFeatureDim; + std::vector high(kAutophaseFeatureDim, std::numeric_limits::max()); + featureSizesHigh.mutable_value()->Add(high.begin(), high.end()); + + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); + + *observationSpace.mutable_default_observation() + ->mutable_int64_tensor() + ->mutable_shape() + ->Add() = kAutophaseFeatureDim; + observationSpace.mutable_default_observation() + ->mutable_int64_tensor() + ->mutable_value() + ->Add(low.begin(), low.end()); break; } case LlvmObservationSpace::PROGRAML: { // ProGraML serializes the graph to JSON. - space.set_opaque_data_format("json://networkx/MultiDiGraph"); - space.mutable_string_size_range()->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(false); + space.mutable_string_value()->mutable_length_range()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); programl::ProgramGraph graph; json nodeLinkGraph; CHECK(programl::graph::format::ProgramGraphToNodeLinkGraph(graph, &nodeLinkGraph).ok()) << "Failed to serialize default ProGraML graph"; - *space.mutable_default_value()->mutable_string_value() = nodeLinkGraph.dump(); + Opaque opaque; + opaque.set_format("json://networkx/MultiDiGraph"); + *opaque.mutable_data() = nodeLinkGraph.dump(); + observationSpace.mutable_default_observation()->mutable_any_value()->PackFrom(opaque); break; } case LlvmObservationSpace::PROGRAML_JSON: { // ProGraML serializes the graph to JSON. - space.set_opaque_data_format("json://"); - space.mutable_string_size_range()->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(false); + space.mutable_string_value()->mutable_length_range()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); programl::ProgramGraph graph; json nodeLinkGraph; CHECK(programl::graph::format::ProgramGraphToNodeLinkGraph(graph, &nodeLinkGraph).ok()) << "Failed to serialize default ProGraML graph"; - *space.mutable_default_value()->mutable_string_value() = nodeLinkGraph.dump(); + Opaque opaque; + opaque.set_format("json://"); + *opaque.mutable_data() = nodeLinkGraph.dump(); + observationSpace.mutable_default_observation()->mutable_any_value()->PackFrom(opaque); break; } case LlvmObservationSpace::CPU_INFO: { // Hardware info is returned as a JSON - space.set_opaque_data_format("json://"); - space.mutable_string_size_range()->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(true); - *space.mutable_default_value()->mutable_string_value() = "{}"; + space.mutable_string_value()->mutable_length_range()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(true); + Opaque opaque; + opaque.set_format("json://"); + *opaque.mutable_data() = "{}"; + observationSpace.mutable_default_observation()->mutable_any_value()->PackFrom(opaque); break; } case LlvmObservationSpace::IR_INSTRUCTION_COUNT: case LlvmObservationSpace::IR_INSTRUCTION_COUNT_O0: case LlvmObservationSpace::IR_INSTRUCTION_COUNT_O3: case LlvmObservationSpace::IR_INSTRUCTION_COUNT_OZ: { - auto featureSize = space.mutable_scalar_int64_range(); - featureSize->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(false); - space.mutable_default_value()->set_scalar_int64(0); + space.mutable_int64_value()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); + observationSpace.mutable_default_observation()->set_int64_value(0); break; } case LlvmObservationSpace::OBJECT_TEXT_SIZE_BYTES: case LlvmObservationSpace::OBJECT_TEXT_SIZE_O0: case LlvmObservationSpace::OBJECT_TEXT_SIZE_O3: case LlvmObservationSpace::OBJECT_TEXT_SIZE_OZ: { - auto featureSize = space.mutable_scalar_int64_range(); - featureSize->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(true); - space.mutable_default_value()->set_scalar_int64(0); + space.mutable_int64_value()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(true); + observationSpace.mutable_default_observation()->set_int64_value(0); break; } #ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST @@ -152,42 +182,33 @@ std::vector getLlvmObservationSpaceList() { case LlvmObservationSpace::TEXT_SIZE_O0: case LlvmObservationSpace::TEXT_SIZE_O3: case LlvmObservationSpace::TEXT_SIZE_OZ: { - auto featureSize = space.mutable_scalar_int64_range(); - featureSize->mutable_min()->set_value(0); - space.set_deterministic(true); - space.set_platform_dependent(true); - space.mutable_default_value()->set_scalar_int64(0); + space.mutable_int64_value()->set_min(0); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(false); + observationSpace.mutable_default_observation()->set_int64_value(0); break; } #endif - case LlvmObservationSpace::RUNTIME: { - space.mutable_double_sequence()->mutable_length_range()->mutable_min()->set_value(0); - space.mutable_double_sequence()->mutable_scalar_range()->mutable_min()->set_value(0); - space.set_deterministic(false); - space.set_platform_dependent(true); - break; - } + case LlvmObservationSpace::RUNTIME: case LlvmObservationSpace::BUILDTIME: { - space.mutable_double_sequence()->mutable_length_range()->mutable_min()->set_value(0); - space.mutable_double_sequence()->mutable_scalar_range()->mutable_min()->set_value(0); - space.set_deterministic(false); - space.set_platform_dependent(true); + space.mutable_double_sequence()->mutable_length_range()->set_min(0); + space.mutable_double_sequence()->mutable_scalar_range()->set_min(0); + observationSpace.set_deterministic(false); + observationSpace.set_platform_dependent(true); break; } case LlvmObservationSpace::IS_BUILDABLE: case LlvmObservationSpace::IS_RUNNABLE: { - auto featureSize = space.mutable_scalar_int64_range(); - featureSize->mutable_min()->set_value(0); - featureSize->mutable_max()->set_value(1); - space.set_deterministic(true); - space.set_platform_dependent(true); - space.mutable_default_value()->set_scalar_int64(0); + space.mutable_boolean_value(); + observationSpace.set_deterministic(true); + observationSpace.set_platform_dependent(true); + observationSpace.mutable_default_observation()->set_int64_value(0); break; } } - spaces.push_back(space); + observationSpaces.push_back(observationSpace); } - return spaces; + return observationSpaces; } } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/loop_tool/service/loop_tool_compilation_session.py b/compiler_gym/envs/loop_tool/service/loop_tool_compilation_session.py index dfb64b265..a3084bc96 100644 --- a/compiler_gym/envs/loop_tool/service/loop_tool_compilation_session.py +++ b/compiler_gym/envs/loop_tool/service/loop_tool_compilation_session.py @@ -15,17 +15,17 @@ from compiler_gym.service import CompilationSession, EnvironmentNotSupported from compiler_gym.service.proto import ( - Action, ActionSpace, Benchmark, - ChoiceSpace, - Int64List, + DoubleRange, + Event, + Int64Box, + Int64Range, + Int64Tensor, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) logger = logging.getLogger(__name__) @@ -39,64 +39,58 @@ class LoopToolCompilationSession(CompilationSession): # keep it simple for now: 1 variable, 1 nest action_spaces = [ ActionSpace( - # shift around a single pre-split order, changing the size of splits name="simple", - choice=[ - ChoiceSpace( - name="controls", - named_discrete_space=NamedDiscreteSpace( - value=["toggle_mode", "up", "down", "toggle_thread"], - ), - ) - ], + space=Space( + # shift around a single pre-split order, changing the size of splits + named_discrete=NamedDiscreteSpace( + name=["toggle_mode", "up", "down", "toggle_thread"], + ), + ), ), ActionSpace( - # potentially define new splits name="split", - choice=[ - ChoiceSpace( - name="controls", - named_discrete_space=NamedDiscreteSpace( - value=["toggle_mode", "up", "down", "toggle_thread", "split"], - ), - ) - ], + space=Space( + # potentially define new splits + named_discrete=NamedDiscreteSpace( + name=["toggle_mode", "up", "down", "toggle_thread", "split"], + ), + ), ), ] observation_spaces = [ ObservationSpace( name="flops", - scalar_double_range=ScalarRange(), + space=Space(double_value=DoubleRange()), deterministic=False, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ObservationSpace( name="loop_tree", - string_size_range=ScalarRange(), + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0)), + ), deterministic=True, platform_dependent=False, - default_value=Observation( + default_observation=Event( string_value="", ), ), ObservationSpace( name="action_state", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange( - min=ScalarLimit(value=0), - max=ScalarLimit(value=2 ** 36), - ), - ] + space=Space( + int64_box=Int64Box( + low=Int64Tensor(shape=[1], value=[0]), + high=Int64Tensor(shape=[1], value=[2 ** 36]), + ), ), deterministic=True, platform_dependent=False, - default_value=Observation( - int64_list=Int64List(value=[0]), + default_observation=Event( + int64_tensor=Int64Tensor(shape=[1], value=[0]), ), ), ] @@ -211,19 +205,19 @@ def lam(v, x): end_size == self.size ), f"{end_size} != {self.size} ({a}, {b}), ({x}, {y}) -> ({a_}, {b_}), ({x + increment}, 0)" - def apply_action(self, action: Action) -> Tuple[bool, Optional[ActionSpace], bool]: - if len(action.choice) != 1: - raise ValueError("Invalid choice count") + def apply_action(self, action: Event) -> Tuple[bool, Optional[ActionSpace], bool]: + if not action.HasField("int64_value"): + raise ValueError("Invalid action. int64_value expected.") - choice_index = action.choice[0].named_discrete_value_index + choice_index = action.int64_value if choice_index < 0 or choice_index >= len( - self.action_space.choice[0].named_discrete_space.value + self.action_space.space.named_discrete.name ): raise ValueError("Out-of-range") logger.info("Applied action %d", choice_index) - act = self.action_space.choice[0].named_discrete_space.value[choice_index] + act = self.action_space.space.named_discrete.name[choice_index] if self.mode not in ["size", "select"]: raise RuntimeError("Invalid mode set: {}".format(self.mode)) if act == "toggle_mode": @@ -290,18 +284,18 @@ def flops(self): flops = self.size * iters / (t_ - t) / 1e9 return flops - def get_observation(self, observation_space: ObservationSpace) -> Observation: + def get_observation(self, observation_space: ObservationSpace) -> Event: if observation_space.name == "action_state": - observation = Observation() # cursor, (size, tail) o = self.order[self.cursor] - observation.int64_list.value[:] = [self.cursor, o[0], o[1]] - return observation + return Event( + int64_tensor=Int64Tensor(shape=[3], value=[self.cursor, o[0], o[1]]) + ) elif observation_space.name == "flops": - return Observation(scalar_double=self.flops()) + return Event(double_value=self.flops()) elif observation_space.name == "loop_tree": loop_tree, parallel = self.lower() - return Observation( + return Event( string_value=loop_tree.dump( lambda x: "[thread]" if x in parallel else "" ) diff --git a/compiler_gym/service/CompilationSession.h b/compiler_gym/service/CompilationSession.h index 524f2360c..d15d87ece 100644 --- a/compiler_gym/service/CompilationSession.h +++ b/compiler_gym/service/CompilationSession.h @@ -93,7 +93,7 @@ class CompilationSession { * @param actionHadNoEffect If the action had no effect, set this to true. * @return `OK` on success, else an errro code and message. */ - [[nodiscard]] virtual grpc::Status applyAction(const Action& action, bool& endOfEpisode, + [[nodiscard]] virtual grpc::Status applyAction(const Event& action, bool& endOfEpisode, std::optional& newActionSpace, bool& actionHadNoEffect) = 0; @@ -103,7 +103,7 @@ class CompilationSession { * @return `OK` on success, else an errro code and message. */ [[nodiscard]] virtual grpc::Status computeObservation(const ObservationSpace& observationSpace, - Observation& observation) = 0; + Event& observation) = 0; /** * Optional. This will be called after all applyAction() and diff --git a/compiler_gym/service/compilation_session.py b/compiler_gym/service/compilation_session.py index 22ee90f7a..0ddf5687a 100644 --- a/compiler_gym/service/compilation_session.py +++ b/compiler_gym/service/compilation_session.py @@ -5,13 +5,10 @@ from pathlib import Path from typing import List, Optional, Tuple -from compiler_gym.service.proto import ( - Action, - ActionSpace, - Benchmark, - Observation, - ObservationSpace, -) +from compiler_gym.service.proto import ActionSpace, Benchmark +from compiler_gym.service.proto import Event as Action +from compiler_gym.service.proto import Event as Observation +from compiler_gym.service.proto import ObservationSpace class CompilationSession: diff --git a/compiler_gym/service/proto/BUILD b/compiler_gym/service/proto/BUILD index b52c869f5..946eecdc3 100644 --- a/compiler_gym/service/proto/BUILD +++ b/compiler_gym/service/proto/BUILD @@ -18,11 +18,13 @@ py_library( deps = [ ":compiler_gym_service_py", ":compiler_gym_service_py_grpc", + "//compiler_gym/spaces:box", "//compiler_gym/spaces:commandline", "//compiler_gym/spaces:dict", "//compiler_gym/spaces:discrete", "//compiler_gym/spaces:named_discrete", "//compiler_gym/spaces:scalar", + "//compiler_gym/spaces:sequence", "//compiler_gym/spaces:tuple", ], ) @@ -31,6 +33,7 @@ proto_library( name = "compiler_gym_service", srcs = ["compiler_gym_service.proto"], visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:any_proto"], ) py_proto_library( diff --git a/compiler_gym/service/proto/CMakeLists.txt b/compiler_gym/service/proto/CMakeLists.txt index 015d87b70..152a8add5 100644 --- a/compiler_gym/service/proto/CMakeLists.txt +++ b/compiler_gym/service/proto/CMakeLists.txt @@ -14,11 +14,13 @@ cg_py_library( DEPS "::compiler_gym_service_py" "::compiler_gym_service_py_grpc" + compiler_gym::spaces::box compiler_gym::spaces::commandline compiler_gym::spaces::dict compiler_gym::spaces::discrete compiler_gym::spaces::named_discrete compiler_gym::spaces::scalar + compiler_gym::spaces::sequence compiler_gym::spaces::tuple ) diff --git a/compiler_gym/service/proto/__init__.py b/compiler_gym/service/proto/__init__.py index 21e7837f6..747ce9eda 100644 --- a/compiler_gym/service/proto/__init__.py +++ b/compiler_gym/service/proto/__init__.py @@ -3,39 +3,62 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from compiler_gym.service.proto.compiler_gym_service_pb2 import ( - Action, ActionSpace, AddBenchmarkReply, AddBenchmarkRequest, Benchmark, BenchmarkDynamicConfig, - Choice, - ChoiceSpace, + BooleanBox, + BooleanRange, + BooleanSequenceSpace, + BooleanTensor, + ByteBox, + ByteSequenceSpace, + BytesSequenceSpace, + ByteTensor, Command, - DoubleList, + CommandlineSpace, + DictEvent, + DictSpace, + DiscreteSpace, + DoubleBox, + DoubleRange, + DoubleSequenceSpace, + DoubleTensor, EndSessionReply, EndSessionRequest, + Event, File, + FloatBox, + FloatRange, + FloatSequenceSpace, + FloatTensor, ForkSessionReply, ForkSessionRequest, GetSpacesReply, GetSpacesRequest, GetVersionReply, GetVersionRequest, - Int64List, + Int64Box, + Int64Range, + Int64SequenceSpace, + Int64Tensor, + ListEvent, + ListSpace, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Opaque, SendSessionParameterReply, SendSessionParameterRequest, SessionParameter, + Space, StartSessionReply, StartSessionRequest, StepReply, StepRequest, + StringSequenceSpace, + StringSpace, + StringTensor, ) from compiler_gym.service.proto.compiler_gym_service_pb2_grpc import ( CompilerGymServiceServicer, @@ -44,37 +67,58 @@ from compiler_gym.service.proto.py_converters import proto_to_action_space __all__ = [ - "proto_to_action_space", - "Action", "ActionSpace", "AddBenchmarkReply", "AddBenchmarkRequest", "Benchmark", "BenchmarkDynamicConfig", - "Choice", - "ChoiceSpace", + "BooleanBox", + "BooleanRange", + "BooleanSequenceSpace", + "BooleanTensor", + "ByteBox", + "ByteSequenceSpace", + "ByteTensor", + "BytesSequenceSpace", "Command", + "CommandlineSpace", "CompilerGymServiceConnection", "CompilerGymServiceServicer", "CompilerGymServiceStub", "ConnectionOpts", - "DoubleList", + "DictEvent", + "DictSpace", + "DiscreteSpace", + "DoubleBox", + "DoubleRange", + "DoubleRange", + "DoubleSequenceSpace", + "DoubleTensor", "EndSessionReply", "EndSessionRequest", + "Event", "File", + "FloatBox", + "FloatRange", + "FloatSequenceSpace", + "FloatTensor", "ForkSessionReply", "ForkSessionRequest", "GetSpacesReply", "GetSpacesRequest", "GetVersionReply", "GetVersionRequest", + "Int64Box", "Int64List", + "Int64Range", + "Int64SequenceSpace", + "Int64Tensor", + "ListEvent", + "ListSpace", + "NamedDiscreteSpace", "NamedDiscreteSpace", - "Observation", "ObservationSpace", - "ScalarLimit", - "ScalarRange", - "ScalarRangeList", + "Opaque", "SendSessionParameterReply", "SendSessionParameterRequest", "ServiceError", @@ -82,8 +126,13 @@ "ServiceIsClosed", "ServiceTransportError", "SessionParameter", + "Space", "StartSessionReply", "StartSessionRequest", "StepReply", "StepRequest", + "StringSequenceSpace", + "StringSpace", + "StringTensor", + "proto_to_action_space", ] diff --git a/compiler_gym/service/proto/compiler_gym_service.proto b/compiler_gym/service/proto/compiler_gym_service.proto index 53cc59a5d..cd834a442 100644 --- a/compiler_gym/service/proto/compiler_gym_service.proto +++ b/compiler_gym/service/proto/compiler_gym_service.proto @@ -15,6 +15,8 @@ option java_multiple_files = true; option java_outer_classname = "CompilerGymServiceProto"; option java_package = "com.compiler_gym"; +import "google/protobuf/any.proto"; + // The CompilerGymService is the interface that exposes the incremental // optimization of a program as an interactive environment. service CompilerGymService { @@ -88,7 +90,7 @@ message StartSessionReply { // unchanged. ActionSpace new_action_space = 3; // Observed states after completing the action. - repeated Observation observation = 4; + repeated Event observation = 4; } // A Step() request. @@ -96,7 +98,7 @@ message StepRequest { // The ID of the session. int64 session_id = 1; // A list of actions to execute, in order. - repeated Action action = 2; + repeated Event action = 2; // A list of indices into the GetSpacesReply.observation_space_list repeated int32 observation_space = 3; } @@ -119,53 +121,130 @@ message StepReply { // remains unchanged. ActionSpace new_action_space = 3; // Observed states after completing the action. - repeated Observation observation = 4; + repeated Event observation = 4; } -// A description of an action space. An action space consists of one or more -// choices that can be made by an agent in a call to Step(). An action space -// with a single choice is scalar; an action-space with `n` choices represents -// an `n`-dimensional action space. -message ActionSpace { - // The name of the action space. - string name = 1; - // The list of choices that comprise this action. - repeated ChoiceSpace choice = 2; - // An optional list of names for the choices. - bool named_choices = 3; +message BooleanTensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + repeated bool value = 2; } -// An action. -message Action { - // A list of choices that corresponds to the ActionSpace's choice list. - repeated Choice choice = 1; +message ByteTensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + bytes value = 2; } -// The space for a single choice. An Action comprises one or more choices. -message ChoiceSpace { - // An optional name for this choice. Only required if - // ActionSpace.named_choices is set. - string name = 1; - // The choice space. - oneof space { - // A bounded integer choice. - ScalarRange int64_range = 2; - // A possibly bounded real-valued choice. - ScalarRange double_range = 3; - // A discrete space in which every point in the space is named. - NamedDiscreteSpace named_discrete_space = 4; +message Int64Tensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + repeated sint64 value = 2; +} + +message FloatTensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + repeated float value = 2; +} + +message DoubleTensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + repeated double value = 2; +} + +message StringTensor { + repeated uint64 shape = 1; + // Flattened tensor of shape `shape` with C-like index order. + repeated string value = 2; +} + +// The [min, max] range of a boolean scalar. +message BooleanRange { + // The minimum value (inclusive). If not set, the value is 0 (false). + oneof optional_min { + bool min = 1; + } + // The maximum value (inclusive). If not set, the value is 1 (true). + oneof optional_max { + bool max = 2; } } -// A single choice. An Action comprises one or more Choices. -message Choice { - // The value of the choice, corresponding to the ChoiceSpace from the - // ActionSpace.choice list. - oneof value { - int64 int64_value = 1; - double double_value = 2; - int64 named_discrete_value_index = 3; +// The [min, max] range of an int64 scalar. +message Int64Range { + // The minimum value (inclusive). If not set, the value is -2^63. + oneof optional_min { + sint64 min = 1; } + // The maximum value (inclusive). If not set, the value is 2^63 - 1. + oneof optional_max { + sint64 max = 2; + } +} + +// The [min, max] range of an double scalar. +message FloatRange { + // The minimum value (inclusive). If not set, the value is -inf. + oneof optional_min { + float min = 1; + } + // The maximum value (inclusive). If not set, the value is +inf. + oneof optional_max { + float max = 2; + } +} + +// The [min, max] range of an double scalar. +message DoubleRange { + // The minimum value (inclusive). If not set, the value is -inf. + oneof optional_min { + double min = 1; + } + // The maximum value (inclusive). If not set, the value is +inf. + oneof optional_max { + double max = 2; + } +} + +message BooleanBox { + BooleanTensor low = 1; + BooleanTensor high = 2; +} + +message ByteBox { + ByteTensor low = 1; + ByteTensor high = 2; +} + +message Int64Box { + Int64Tensor low = 1; + Int64Tensor high = 2; +} + +message FloatBox { + FloatTensor low = 1; + FloatTensor high = 2; +} + +message DoubleBox { + DoubleTensor low = 1; + DoubleTensor high = 2; +} + +// A list of spaces. +message ListSpace { + repeated Space space = 1; +} + +message DictSpace { + map space = 1; +} + +// A discrete space in :math:`{ 0, 1, \\dots, n-1 }`. +message DiscreteSpace { + int64 n = 1; } // A discrete space in which every point in the space is named. This can be used @@ -173,95 +252,133 @@ message Choice { message NamedDiscreteSpace { // A list of names for every value in the space. The order in which these // values are returned is used. - repeated string value = 1; - // If true, the set of space can be interpreted as a list of command line - // flags. - bool is_commandline = 2; + repeated string name = 1; } -// An observations from a compiler. -message Observation { - // A point in an ObservationSpace is _either_ a scalar or vector of integers - // or real values, a string, or an opaque byte array. - oneof value { - Int64List int64_list = 1; - DoubleList double_list = 2; - string string_value = 3; - bytes binary_value = 4; - int64 scalar_int64 = 5; - double scalar_double = 6; - } +message BooleanSequenceSpace { + Int64Range length_range = 1; + BooleanRange scalar_range = 2; } -// A list of 64 bit integers. -message Int64List { - repeated int64 value = 1; +message ByteSequenceSpace { + Int64Range length_range = 1; + Int64Range scalar_range = 2; } -// A list of doubles. -message DoubleList { - repeated double value = 1; +message BytesSequenceSpace { + // Number of byte arrays in the sequence. + Int64Range length_range = 1; } -// The [min, max] range of a scalar. -message ScalarRange { - // The minimum value (inclusive). If not set, the value is -inf. - ScalarLimit min = 1; - // The maximum value (inclusive). If not set, the value is +inf. - ScalarLimit max = 2; +message Int64SequenceSpace { + Int64Range length_range = 1; + Int64Range scalar_range = 2; +} + +message FloatSequenceSpace { + Int64Range length_range = 1; + FloatRange scalar_range = 2; +} + +message DoubleSequenceSpace { + Int64Range length_range = 1; + DoubleRange scalar_range = 2; +} + +message StringSequenceSpace { + // The number of strings in the sequence. + Int64Range length_range = 1; } -// Representation of the upper or lower limit of a scalar. -message ScalarLimit { - double value = 1; +message StringSpace { + Int64Range length_range = 1; } -// A list of scalar ranges. -message ScalarRangeList { - repeated ScalarRange range = 1; +// Can be used in Space.any_value or Event.any_value to describe an opaque +// serialized data. +message Opaque { + string format = 1; + bytes data = 2; } -message SequenceSpace { - ScalarRange length_range = 1; - ScalarRange scalar_range = 2; +message CommandlineSpace { + repeated string name = 1; +} + +message Space { + string type_id = 2; + oneof value { + ListSpace space_list = 3; + DictSpace space_dict = 4; + DiscreteSpace discrete = 5; + NamedDiscreteSpace named_discrete = 6; + BooleanRange boolean_value = 7; + Int64Range int64_value = 8; + FloatRange float_value = 9; + DoubleRange double_value = 10; + StringSpace string_value = 11; + BooleanSequenceSpace boolean_sequence = 12; + ByteSequenceSpace byte_sequence = 13; + BytesSequenceSpace bytes_sequence = 14; + Int64SequenceSpace int64_sequence = 15; + FloatSequenceSpace float_sequence = 16; + DoubleSequenceSpace double_sequence = 17; + StringSequenceSpace string_sequence = 18; + BooleanBox boolean_box = 19; + ByteBox byte_box = 20; + Int64Box int64_box = 21; + FloatBox float_box = 22; + DoubleBox double_box = 23; + google.protobuf.Any any_value = 24; + } } -// The description of a space of observations. message ObservationSpace { - // The name of the observation space. string name = 1; - // The shape of the observation space. All Observations - // from an ObservationSpace have the same shape. - oneof shape { - ScalarRangeList int64_range_list = 2; - ScalarRangeList double_range_list = 3; - // For character and byte arrays, the _size_range field describes the range of - // possible sizes, e.g. a string_size_range of [10, +inf] means that - // observations are strings of at least 10 characters in length. - ScalarRange string_size_range = 4; - ScalarRange binary_size_range = 5; - // For scalar values, the _range field describes the bounds of the scalar - // value. - ScalarRange scalar_int64_range = 10; - ScalarRange scalar_double_range = 11; - // A variable-length sequence of elements. - SequenceSpace double_sequence = 12; - } - // An optional string describing an opaque data format, e.g. a data structure - // that is serialized to a string/binary array for transmission back to the - // client. It is up to the client and service to agree on how to decode - // observations using this value. For example, an opaque_data_format of - // "string_json" could be used to indicate that the observation is a - // string-serialized JSON value. - string opaque_data_format = 6; + Space space = 2; // Whether the observation space is deterministic. - bool deterministic = 7; + bool deterministic = 3; // Whether the observations depend on the service execution environment. - bool platform_dependent = 8; + bool platform_dependent = 4; // A default observation. This value should be used by the client in lieu // of a true observation if the compiler service terminates abruptly, such as // a crash while applying an action. - Observation default_value = 9; + Event default_observation = 5; +} + +message ActionSpace { + string name = 1; + Space space = 2; +} + +message ListEvent { + repeated Event event = 1; +} + +message DictEvent { + map event = 1; +} + +// Common structure shared between actions and observations. +message Event { + string type_id = 1; + oneof value { + ListEvent event_list = 2; + DictEvent event_dict = 3; + bool boolean_value = 4; + sint64 int64_value = 5; + float float_value = 6; + double double_value = 7; + string string_value = 8; + // Fixed and variable length sequences are represented as one-dimensional tensor. + BooleanTensor boolean_tensor = 9; + ByteTensor byte_tensor = 10; + Int64Tensor int64_tensor = 11; + FloatTensor float_tensor = 12; + DoubleTensor double_tensor = 13; + StringTensor string_tensor = 14; + google.protobuf.Any any_value = 15; + } } // A Fork() request. diff --git a/compiler_gym/service/proto/py_converters.py b/compiler_gym/service/proto/py_converters.py index 882f73308..42ec57927 100644 --- a/compiler_gym/service/proto/py_converters.py +++ b/compiler_gym/service/proto/py_converters.py @@ -2,151 +2,833 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +"""This module contains converters to/from protobuf messages. + +For example / <-> , +or <-> actions/observation. + +When defining new environments +and +can be used as a starting point for custom converters. +""" +import json +from builtins import getattr from typing import Any, Callable from typing import Dict as DictType -from typing import List, NamedTuple +from typing import List, Type, Union -import gym +import google.protobuf.any_pb2 as any_pb2 +import networkx as nx +import numpy as np +from google.protobuf.message import Message +from gym.spaces import Space as GymSpace from compiler_gym.service.proto.compiler_gym_service_pb2 import ( - Action, ActionSpace, - Choice, - ChoiceSpace, + BooleanBox, + BooleanRange, + BooleanSequenceSpace, + BooleanTensor, + ByteBox, + ByteSequenceSpace, + BytesSequenceSpace, + ByteTensor, + CommandlineSpace, + DictEvent, + DictSpace, + DiscreteSpace, + DoubleBox, + DoubleRange, + DoubleSequenceSpace, + DoubleTensor, + Event, + FloatBox, + FloatRange, + FloatSequenceSpace, + FloatTensor, + Int64Box, + Int64Range, + Int64SequenceSpace, + Int64Tensor, + ListEvent, + ListSpace, + NamedDiscreteSpace, + ObservationSpace, + Opaque, + Space, + StringSequenceSpace, + StringSpace, + StringTensor, ) +from compiler_gym.spaces.box import Box from compiler_gym.spaces.commandline import Commandline, CommandlineFlag from compiler_gym.spaces.dict import Dict from compiler_gym.spaces.discrete import Discrete from compiler_gym.spaces.named_discrete import NamedDiscrete from compiler_gym.spaces.scalar import Scalar +from compiler_gym.spaces.sequence import Sequence from compiler_gym.spaces.tuple import Tuple -class PyChoiceSpace(NamedTuple): - """An choice space with a callback to construction Choice messages.""" +def proto_to_action_space(space: ActionSpace): + return message_default_converter(space) + + +class TypeBasedConverter: + """Converter that dispatches based on the exact type of the parameter. + + >>> converter = TypeBasedConverter({ int: lambda x: float(x)}) + >>> val: float = converter(5) + """ + + conversion_map: DictType[Type, Callable[[Any], Any]] + + def __init__(self, conversion_map: DictType[Type, Callable[[Any], Any]] = None): + self.conversion_map = {} if conversion_map is None else conversion_map + + def __call__(self, val: Any) -> Any: + return self.conversion_map[type(val)](val) + + +proto_type_to_dtype_map = { + BooleanTensor: bool, + ByteTensor: np.int8, + Int64Tensor: np.int64, + FloatTensor: np.float32, + DoubleTensor: np.float64, + StringTensor: object, + BooleanBox: bool, + ByteBox: np.int8, + Int64Box: np.int64, + FloatBox: np.float32, + DoubleBox: float, + BooleanRange: bool, + Int64Range: np.int64, + FloatRange: np.float32, + DoubleRange: float, + BooleanSequenceSpace: bool, + BytesSequenceSpace: bytes, + ByteSequenceSpace: np.int8, + Int64SequenceSpace: np.int64, + FloatSequenceSpace: np.float32, + DoubleSequenceSpace: float, + StringSpace: str, +} + - space: gym.Space - make_choice: Callable[[Any], Choice] +def convert_standard_tensor_message_to_numpy( + tensor: Union[BooleanTensor, Int64Tensor, FloatTensor, DoubleTensor, StringTensor] +): + res = np.array(tensor.value, dtype=proto_type_to_dtype_map[type(tensor)]) + res = res.reshape(tensor.shape) + return res -class PyActionSpace(NamedTuple): - """An action space with a callback to construction Action messages.""" +def convert_numpy_to_boolean_tensor_message(tensor: np.ndarray): + return BooleanTensor(value=tensor.flatten().tolist(), shape=tensor.shape) - space: gym.Space - make_action: Callable[[Any], Action] +def convert_byte_tensor_message_to_numpy(tensor: ByteTensor): + res = np.frombuffer(tensor.value, dtype=np.byte) + res = res.reshape(tensor.shape) + return res -def proto_to_action_space(proto: ActionSpace) -> PyActionSpace: - """Convert a ActionSpace message to a gym.Space and action callback. - :param proto: An ActionSpace message. +def convert_numpy_to_byte_tensor_message(tensor: np.ndarray): + return ByteTensor(value=tensor.tobytes(), shape=tensor.shape) + + +def convert_numpy_to_int64_tensor_message(tensor: np.ndarray): + return Int64Tensor(value=tensor.flatten(), shape=tensor.shape) + + +def convert_numpy_to_float_tensor_message(tensor: np.ndarray): + return FloatTensor(value=tensor.flatten(), shape=tensor.shape) + + +def convert_numpy_to_double_tensor_message(tensor: np.ndarray): + return DoubleTensor(value=tensor.flatten(), shape=tensor.shape) + + +def convert_numpy_to_string_tensor_message(tensor: np.ndarray): + return StringTensor(value=tensor.flatten(), shape=tensor.shape) + + +convert_tensor_message_to_numpy = TypeBasedConverter( + conversion_map={ + BooleanTensor: convert_standard_tensor_message_to_numpy, + ByteTensor: convert_byte_tensor_message_to_numpy, + Int64Tensor: convert_standard_tensor_message_to_numpy, + FloatTensor: convert_standard_tensor_message_to_numpy, + DoubleTensor: convert_standard_tensor_message_to_numpy, + StringTensor: convert_standard_tensor_message_to_numpy, + } +) - :returns: A PyActionSpace tuple, comprising a gym.Space space, and a - callback that formats its input as an Action message. + +def convert_bytes_to_numpy(arr: bytes) -> np.ndarray: + return np.frombuffer(arr, dtype=np.int8) + + +class NumpyToTensorMessageConverter: + dtype_conversion_map: DictType[Type, Callable[[Any], Message]] + + def __init__(self): + self.dtype_conversion_map = { + np.bool_: convert_numpy_to_boolean_tensor_message, + np.int8: convert_numpy_to_byte_tensor_message, + np.int64: convert_numpy_to_int64_tensor_message, + np.float32: convert_numpy_to_float_tensor_message, + np.float64: convert_numpy_to_double_tensor_message, + np.dtype(object): convert_numpy_to_string_tensor_message, + } + + def __call__( + self, tensor: np.ndarray + ) -> Union[ + BooleanTensor, ByteTensor, Int64Tensor, FloatTensor, DoubleTensor, StringTensor + ]: + return self.dtype_conversion_map[tensor.dtype.type](tensor) + + +convert_numpy_to_tensor_message = NumpyToTensorMessageConverter() + + +def convert_trivial(val: Any): + return val + + +class FromMessageConverter: + """Convert a protobuf message to an object. + + The conversion function is chosen based on the message descriptor. """ - if proto.named_choices: - # Convert a list of named choices to a dictionary space. - choices = [proto_to_choice_space(choice) for choice in proto.choice] - - def compose_choice_dict(action: DictType[str, Any]): - return Action( - choice=[ - choice.make_choice(action[choice.space.name]) for choice in choices - ] + + conversion_map: DictType[str, Callable[[Message], Any]] + + def __init__(self, conversion_map: DictType[str, Callable[[Message], Any]] = None): + self.conversion_map = {} if conversion_map is None else conversion_map + + def __call__(self, message: Message) -> Any: + return self.conversion_map[message.DESCRIPTOR.full_name](message) + + +class EventMessageConverter: + message_converter: TypeBasedConverter + + def __init__(self, message_converter: TypeBasedConverter): + self.message_converter = message_converter + + def __call__(self, event: Event): + field = event.WhichOneof("value") + if field is None: + return None + + return self.message_converter(getattr(event, field)) + + +class ToEventMessageConverter: + converter: TypeBasedConverter + type_field_map: DictType[Type, str] + + def __init__(self, converter: TypeBasedConverter): + self.converter = converter + self.type_field_map = { + ListEvent: "event_list", + DictEvent: "event_dict", + bool: "boolean_value", + int: "int64_value", + np.float32: "float_value", + float: "double_value", + str: "string_value", + BooleanTensor: "boolean_tensor", + ByteTensor: "byte_tensor", + Int64Tensor: "int64_tensor", + FloatTensor: "float_tensor", + DoubleTensor: "double_tensor", + StringTensor: "string_tensor", + any_pb2.Any: "any_value", + } + + def __call__(self, val: Any) -> Event: + converted_val = self.converter(val) + res = Event() + if isinstance(converted_val, Message): + getattr(res, self.type_field_map[type(converted_val)]).CopyFrom( + converted_val ) + else: + setattr(res, self.type_field_map[type(converted_val)], converted_val) + return res + + +class ListEventMessageConverter: + event_message_converter: EventMessageConverter + + def __init__(self, event_message_converter: EventMessageConverter): + self.event_message_converter = event_message_converter + + def __call__(self, list_event: ListEvent) -> List[Any]: + return [self.event_message_converter(event) for event in list_event.event] + + +class ToListEventMessageConverter: + to_event_converter: ToEventMessageConverter + + def __init__(self, to_event_converter: ToEventMessageConverter): + self.to_event_converter = to_event_converter + + def __call__(self, event_list: List) -> ListEvent: + return ListEvent(event=[self.to_event_converter(event) for event in event_list]) + - return PyActionSpace( - space=Dict( - spaces={ - choice.name: space.space - for choice, space in zip(proto.choice, choices) - }, - name=proto.name, - ), - make_action=compose_choice_dict, +class DictEventMessageConverter: + event_message_converter: EventMessageConverter + + def __init__(self, event_message_converter: EventMessageConverter): + self.event_message_converter = event_message_converter + + def __call__(self, dict_event: DictEvent) -> DictType[str, Any]: + return { + key: self.event_message_converter(event) + for key, event in dict_event.event.items() + } + + +class ToDictEventMessageConverter: + to_event_converter: ToEventMessageConverter + + def __init__(self, to_event_converter: ToEventMessageConverter): + self.to_event_converter = to_event_converter + + def __call__(self, d: DictType) -> DictEvent: + return DictEvent( + event={key: self.to_event_converter(val) for key, val in d.items()} ) - elif len(proto.choice) > 1: - # Convert an unnamed list of choices to a tuple space. - choices = [proto_to_choice_space(choice) for choice in proto.choice] - def compose_choice_list(action: List[Any]) -> Action: - return Action( - choice=[choice.make_choice(a) for a, choice in zip(action, choices)] + +class ProtobufAnyUnpacker: + # message type string to message class map + type_str_to_class_map: DictType[str, Type] + + def __init__(self, type_str_to_class_map: DictType[str, Type] = None): + self.type_str_to_class_map = ( + { + "compiler_gym.Opaque": Opaque, + "compiler_gym.CommandlineSpace": CommandlineSpace, + } + if type_str_to_class_map is None + else type_str_to_class_map + ) + + def __call__(self, msg: any_pb2.Any) -> Message: + message_cls = self.type_str_to_class_map[msg.TypeName()] + unpacked_message = message_cls() + status = msg.Unpack(unpacked_message) + if not status: + raise ValueError( + f'Failed unpacking prtobuf Any message with type url "{msg.TypeName()}".' ) + return unpacked_message + + +class ProtobufAnyConverter: + unpacker: ProtobufAnyUnpacker + message_converter: TypeBasedConverter + + def __init__( + self, unpacker: ProtobufAnyUnpacker, message_converter: TypeBasedConverter + ): + self.unpacker = unpacker + self.message_converter = message_converter + + def __call__(self, msg: any_pb2.Any) -> Any: + unpacked_message = self.unpacker(msg) + return self.message_converter(unpacked_message) + + +class ActionSpaceMessageConverter: + message_converter: Callable[[Any], Any] + + def __init__(self, message_converter: Callable[[Any], Any]): + self.message_converter = message_converter + + def __call__(self, message: ActionSpace) -> GymSpace: + res = self.message_converter(message.space) + res.name = message.name + return res + + +class ObservationSpaceMessageConverter: + message_converter: Callable[[Any], Any] + + def __init__(self, message_converter: Callable[[Any], Any]): + self.message_converter = message_converter + + def __call__(self, message: ObservationSpace) -> GymSpace: + res = self.message_converter(message.space) + res.name = message.name + return res + + +def make_message_default_converter() -> TypeBasedConverter: + conversion_map = { + bool: convert_trivial, + int: convert_trivial, + float: convert_trivial, + str: convert_trivial, + bytes: convert_bytes_to_numpy, + BooleanTensor: convert_tensor_message_to_numpy, + ByteTensor: convert_tensor_message_to_numpy, + Int64Tensor: convert_tensor_message_to_numpy, + FloatTensor: convert_tensor_message_to_numpy, + DoubleTensor: convert_tensor_message_to_numpy, + StringTensor: convert_tensor_message_to_numpy, + DiscreteSpace: convert_discrete_space_message, + NamedDiscreteSpace: convert_named_discrete_space_message, + CommandlineSpace: convert_commandline_space_message, + BooleanRange: convert_range_message, + Int64Range: convert_range_message, + FloatRange: convert_range_message, + DoubleRange: convert_range_message, + StringSpace: convert_string_space, + BooleanSequenceSpace: convert_sequence_space, + ByteSequenceSpace: convert_sequence_space, + BytesSequenceSpace: convert_sequence_space, + Int64SequenceSpace: convert_sequence_space, + FloatSequenceSpace: convert_sequence_space, + DoubleSequenceSpace: convert_sequence_space, + StringSequenceSpace: convert_sequence_space, + BooleanBox: convert_box_message, + ByteBox: convert_box_message, + Int64Box: convert_box_message, + FloatBox: convert_box_message, + DoubleBox: convert_box_message, + } + + res = TypeBasedConverter(conversion_map) + conversion_map[Event] = EventMessageConverter(res) + conversion_map[ListEvent] = ListEventMessageConverter(conversion_map[Event]) + conversion_map[DictEvent] = DictEventMessageConverter(conversion_map[Event]) + + conversion_map[Space] = SpaceMessageConverter(res) + conversion_map[ListSpace] = ListSpaceMessageConverter(conversion_map[Space]) + conversion_map[DictSpace] = DictSpaceMessageConverter(conversion_map[Space]) + conversion_map[ActionSpace] = ActionSpaceMessageConverter(res) + conversion_map[ObservationSpace] = ObservationSpaceMessageConverter(res) + + conversion_map[any_pb2.Any] = ProtobufAnyConverter( + unpacker=ProtobufAnyUnpacker(), message_converter=res + ) + + conversion_map[Opaque] = make_opaque_message_default_converter() + return res + + +def to_event_message_default_converter() -> ToEventMessageConverter: + conversion_map = { + bool: convert_trivial, + int: convert_trivial, + float: convert_trivial, + str: convert_trivial, + np.ndarray: NumpyToTensorMessageConverter(), + } + type_based_converter = TypeBasedConverter(conversion_map) + res = ToEventMessageConverter(type_based_converter) + conversion_map[list] = ToListEventMessageConverter(res) + conversion_map[dict] = ToDictEventMessageConverter(res) + return res + + +range_type_default_min_map: DictType[Type, Any] = { + BooleanRange: False, + Int64Range: np.iinfo(np.int64).min, + FloatRange: np.float32(np.NINF), + DoubleRange: np.float64(np.NINF), +} - return PyActionSpace( - space=Tuple(spaces=[choice.space for choice in choices], name=proto.name), - make_action=compose_choice_list, +range_type_default_max_map: DictType[Type, Any] = { + BooleanRange: True, + Int64Range: np.iinfo(np.int64).max, + FloatRange: np.float32(np.PINF), + DoubleRange: np.float64(np.PINF), +} + + +def convert_range_message( + range: Union[BooleanRange, Int64Range, FloatRange, DoubleRange] +) -> Scalar: + range_type = type(range) + min = range.min if range.HasField("min") else range_type_default_min_map[range_type] + max = range.max if range.HasField("max") else range_type_default_max_map[range_type] + return Scalar( + name=None, min=min, max=max, dtype=proto_type_to_dtype_map[range_type] + ) + + +class ToRangeMessageConverter: + dtype_to_type_map: DictType[Type, Type] + + def __init__(self): + self.dtype_to_type_map = { + np.bool_: BooleanRange, + np.int8: Int64Range, + np.int64: Int64Range, + np.float32: FloatRange, + np.float64: DoubleRange, + } + + def __call__( + self, scalar: Scalar + ) -> Union[BooleanRange, Int64Range, FloatRange, DoubleRange]: + return self.dtype_to_type_map[np.dtype(scalar.dtype).type]( + min=scalar.min, max=scalar.max ) - elif proto.choice: - # Convert a single choice into an action space. - space, make_choice = proto_to_choice_space(proto.choice[0]) - # When there is only a single choice, use the name of the parent space. - space.name = proto.name - return PyActionSpace( - space=space, make_action=lambda a: Action(choice=[make_choice(a)]) + + +convert_to_range_message = ToRangeMessageConverter() + + +def convert_box_message( + box: Union[BooleanBox, ByteBox, Int64Box, FloatBox, DoubleBox] +) -> Box: + return Box( + low=convert_tensor_message_to_numpy(box.low), + high=convert_tensor_message_to_numpy(box.high), + name=None, + dtype=proto_type_to_dtype_map[type(box)], + ) + + +class ToBoxMessageConverter: + dtype_to_type_map: DictType[Type, Type] + + def __init__(self): + self.dtype_to_type_map = { + np.bool_: BooleanBox, + np.int8: ByteBox, + np.int64: Int64Box, + np.float32: FloatBox, + np.float64: DoubleBox, + } + + def __call__( + self, box: Box + ) -> Union[BooleanBox, ByteBox, Int64Box, FloatBox, DoubleBox]: + return self.dtype_to_type_map[np.dtype(box.dtype).type]( + low=convert_numpy_to_tensor_message(box.low), + high=convert_numpy_to_tensor_message(box.high), ) - raise ValueError("No choices set for ActionSpace") -def proto_to_choice_space(choice: ChoiceSpace) -> PyChoiceSpace: - """Convert a ChoiceSpace message to a gym.Space and choice callback. +convert_to_box_message = ToBoxMessageConverter() - :param proto: A ChoiceSpace message. - :returns: A PyChoiceSpace tuple, comprising a gym.Space space, and a - callback that wraps an input in a Choice message. - """ - choice_type = choice.WhichOneof("space") - if choice_type == "int64_range": - # The Discrete class defines a discrete space as integers in the range - # [0,n]. For spaces that aren't zero-based there is a Scalar class. - # Prefer Discrete if possible since it is part of the core gym library, - # else fallback to Scalar. - if choice.int64_range.min.value: - return PyChoiceSpace( - space=Scalar( - min=choice.int64_range.min.value, - max=choice.int64_range.max.value, - dtype=int, - name=choice.name, - ), - make_choice=lambda a: Choice(int64_value=a), +def convert_discrete_space_message(message: DiscreteSpace) -> Discrete: + return Discrete(n=message.n, name=None) + + +def convert_to_discrete_space_message(space: Discrete) -> DiscreteSpace: + return DiscreteSpace(n=space.n) + + +def convert_named_discrete_space_message(message: NamedDiscreteSpace) -> NamedDiscrete: + return NamedDiscrete(items=message.name, name=None) + + +def convert_commandline_space_message(message: CommandlineSpace) -> Commandline: + return Commandline( + items=[ + CommandlineFlag(name=name, flag=name, description="") + for name in message.name + ], + name=None, + ) + + +def convert_to_named_discrete_space_message(space: NamedDiscrete) -> NamedDiscreteSpace: + return NamedDiscreteSpace(name=space.names) + + +def convert_sequence_space( + seq: Union[ + BooleanSequenceSpace, + Int64SequenceSpace, + FloatSequenceSpace, + DoubleSequenceSpace, + BytesSequenceSpace, + StringSequenceSpace, + ] +) -> Sequence: + scalar_range = ( + convert_range_message(seq.scalar_range) + if hasattr(seq, "scalar_range") + else None + ) + length_range = convert_range_message(seq.length_range) + return Sequence( + name=None, + size_range=(length_range.min, length_range.max), + dtype=proto_type_to_dtype_map[type(seq)], + scalar_range=scalar_range, + ) + + +class ToRangedSequenceMessageConverter: + dtype_to_type_map: DictType[Type, Type] + + def __init__(self): + self.dtype_to_type_map = { + np.bool_: BooleanSequenceSpace, + np.int8: ByteSequenceSpace, + np.int64: Int64SequenceSpace, + np.float32: FloatSequenceSpace, + np.float64: DoubleSequenceSpace, + } + + def __call__( + self, seq: Sequence + ) -> Union[ + BooleanSequenceSpace, + Int64SequenceSpace, + FloatSequenceSpace, + DoubleSequenceSpace, + ]: + return self.dtype_to_type_map[np.dtype(seq.dtype).type]( + length_range=Int64Range(min=seq.size_range[0], max=seq.size_range[1]), + scalar_range=convert_to_range_message(seq.scalar_range), + ) + + +convert_to_ranged_sequence_space = ToRangedSequenceMessageConverter() + + +def convert_to_string_sequence_space(seq: Sequence) -> StringSequenceSpace: + return StringSpace( + length_range=Int64Range(min=seq.size_range[0], max=seq.size_range[1]) + ) + + +def convert_to_bytes_sequence_space(seq: Sequence) -> BytesSequenceSpace: + return BytesSequenceSpace( + length_range=Int64Range(min=seq.size_range[0], max=seq.size_range[1]) + ) + + +def convert_string_space(s: StringSpace) -> Sequence: + return convert_sequence_space(s) + + +def convert_to_string_space(s: Sequence) -> StringSpace: + return StringSpace( + length_range=Int64Range(min=s.size_range[0], max=s.size_range[1]) + ) + + +class ToSequenceSpaceMessageConverter: + dtype_map: DictType[ + Type, + Callable[ + [Sequence], + Union[ + BooleanSequenceSpace, + BytesSequenceSpace, + Int64SequenceSpace, + FloatSequenceSpace, + DoubleSequenceSpace, + StringSequenceSpace, + ], + ], + ] + + def __init__(self): + self.dtype_map = { + bool: convert_to_ranged_sequence_space, + np.bool_: convert_to_ranged_sequence_space, + np.int8: convert_to_bytes_sequence_space, + np.int64: convert_to_ranged_sequence_space, + int: convert_to_ranged_sequence_space, + np.float32: convert_to_ranged_sequence_space, + np.float64: convert_to_ranged_sequence_space, + float: convert_to_ranged_sequence_space, + str: convert_to_string_space, + } + + def __call__( + self, seq: Sequence + ) -> Union[ + BooleanSequenceSpace, + BytesSequenceSpace, + Int64SequenceSpace, + FloatSequenceSpace, + DoubleSequenceSpace, + StringSequenceSpace, + ]: + return self.dtype_map[seq.dtype](seq) + + +convert_to_sequence_space_message = ToSequenceSpaceMessageConverter() + + +class SpaceMessageConverter: + message_converter: TypeBasedConverter + + def __init__(self, message_converter: TypeBasedConverter): + self.message_converter = message_converter + + def __call__( + self, space: Space + ) -> Union[Dict, Discrete, NamedDiscrete, Scalar, Tuple, Box, Sequence]: + field = space.WhichOneof("value") + if field is None: + return None + + res = self.message_converter(getattr(space, field)) + return res + + +class ToSpaceMessageConverter: + converter: TypeBasedConverter + type_field_map: DictType[Type, str] + + def __init__(self, converter: TypeBasedConverter): + self.converter = converter + self.type_field_map = { + ListSpace: "space_list", + DictSpace: "space_dict", + DiscreteSpace: "discrete", + NamedDiscreteSpace: "named_discrete", + BooleanRange: "boolean_value", + Int64Range: "int64_value", + FloatRange: "float_value", + DoubleRange: "double_value", + StringSpace: "string_value", + BooleanSequenceSpace: "boolean_sequence", + BytesSequenceSpace: "bytes_sequence", + ByteSequenceSpace: "byte_sequence", + Int64SequenceSpace: "int64_sequence", + FloatSequenceSpace: "float_sequence", + DoubleSequenceSpace: "double_sequence", + StringSequenceSpace: "string_sequence", + BooleanBox: "boolean_box", + ByteBox: "byte_box", + Int64Box: "int64_box", + FloatBox: "float_box", + DoubleBox: "double_box", + any_pb2.Any: "any_value", + } + + def __call__( + self, space: Union[Tuple, Dict, Discrete, NamedDiscrete, Sequence, Box, Scalar] + ) -> Space: + converted_space = self.converter(space) + res = Space() + if isinstance(converted_space, Message): + getattr(res, self.type_field_map[type(converted_space)]).CopyFrom( + converted_space ) else: - return PyChoiceSpace( - space=Discrete(n=choice.int64_range.max.value, name=choice.name), - make_choice=lambda a: Choice(int64_value=a), - ) - elif choice_type == "double_range": - return PyChoiceSpace( - space=Scalar( - min=choice.double_range.min.value, - max=choice.double_range.max.value, - dtype=float, - name=choice.name, - ), - make_choice=lambda a: Choice(double_value=a), + setattr(res, self.type_field_map[type(converted_space)], converted_space) + return res + + +class ListSpaceMessageConverter: + space_message_converter: SpaceMessageConverter + + def __init__(self, space_message_converter: SpaceMessageConverter): + self.space_message_converter = space_message_converter + + def __call__(self, list_space: ListSpace) -> Tuple: + return Tuple( + spaces=[self.space_message_converter(space) for space in list_space.space], + name=None, ) - elif ( - choice_type == "named_discrete_space" - and choice.named_discrete_space.is_commandline - ): - return PyChoiceSpace( - space=Commandline( - items=[ - CommandlineFlag(name=x, flag=x, description="") - for x in choice.named_discrete_space.value - ], - name=choice.name, - ), - make_choice=lambda a: Choice(named_discrete_value_index=a), + + +class ToListSpaceMessageConverter: + to_space_converter: ToSpaceMessageConverter + + def __init__(self, to_space_converter: ToSpaceMessageConverter): + self.to_space_converter = to_space_converter + + def __call__(self, spaces: Tuple) -> ListSpace: + return ListSpace( + space=[self.to_space_converter(space) for space in spaces.spaces] ) - elif choice_type == "named_discrete_space": - return PyChoiceSpace( - space=NamedDiscrete( - items=choice.named_discrete_space.value, name=choice.name - ), - make_choice=lambda a: Choice(named_discrete_value_index=a), + + +class DictSpaceMessageConverter: + space_message_converter: SpaceMessageConverter + + def __init__(self, space_message_converter: SpaceMessageConverter): + self.space_message_converter = space_message_converter + + def __call__(self, dict_space: DictSpace) -> Dict: + return Dict( + spaces={ + key: self.space_message_converter(space) + for key, space in dict_space.space.items() + }, + name=None, + ) + + +class ToDictSpaceMessageConverter: + to_space_converter: ToSpaceMessageConverter + + def __init__(self, to_space_converter: ToSpaceMessageConverter): + self.to_space_converter = to_space_converter + + def __call__(self, d: Dict) -> DictSpace: + return DictSpace( + space={key: self.to_space_converter(val) for key, val in d.spaces.items()} + ) + + +def to_space_message_default_converter() -> ToSpaceMessageConverter: + conversion_map = { + Discrete: convert_to_discrete_space_message, + NamedDiscrete: convert_to_named_discrete_space_message, + Scalar: convert_to_range_message, + Sequence: convert_to_sequence_space_message, + Box: convert_to_box_message, + } + type_based_converter = TypeBasedConverter(conversion_map) + res = ToSpaceMessageConverter(type_based_converter) + conversion_map[Tuple] = ToListSpaceMessageConverter(res) + conversion_map[Dict] = ToDictSpaceMessageConverter(res) + return res + + +class OpaqueMessageConverter: + """Converts message based on its format descriptor.""" + + format_coverter_map: DictType[str, Callable[[bytes], Any]] + + def __init__(self, format_coverter_map=None): + self.format_coverter_map = ( + {} if format_coverter_map is None else format_coverter_map ) - raise ValueError(f"Invalid ChoiceSpace: {choice}") + + def __call__(self, message: Opaque) -> Any: + return self.format_coverter_map[message.format](message.data) + + +def make_opaque_message_default_converter(): + return OpaqueMessageConverter( + {"json://networkx/MultiDiGraph": _json2nx, "json://": bytes_to_json} + ) + + +def bytes_to_json(data: bytes): + return json.loads(data.decode("utf-8")) + + +def _json2nx(data: bytes): + json_data = json.loads(data.decode("utf-8")) + return nx.readwrite.json_graph.node_link_graph( + json_data, multigraph=True, directed=True + ) + + +message_default_converter: TypeBasedConverter = make_message_default_converter() diff --git a/compiler_gym/service/runtime/compiler_gym_service.py b/compiler_gym/service/runtime/compiler_gym_service.py index ed5114eb5..a1e41d8b0 100644 --- a/compiler_gym/service/runtime/compiler_gym_service.py +++ b/compiler_gym/service/runtime/compiler_gym_service.py @@ -3,6 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging +import traceback from contextlib import contextmanager from pathlib import Path from threading import Lock @@ -44,7 +45,10 @@ @contextmanager def exception_to_grpc_status(context): # pragma: no cover def handle_exception_as(exception, code): - logger.warning("%s: %s", type(exception).__name__, exception) + exception_trace = "".join( + traceback.TracebackException.from_exception(exception).format() + ) + logger.warning("%s", exception_trace) context.set_code(code) context.set_details(str(exception)) diff --git a/compiler_gym/spaces/BUILD b/compiler_gym/spaces/BUILD index bd42df3a8..0a77e981b 100644 --- a/compiler_gym/spaces/BUILD +++ b/compiler_gym/spaces/BUILD @@ -13,6 +13,7 @@ py_library( deps = [ ":box", ":commandline", + ":common", ":dict", ":discrete", ":named_discrete", @@ -23,6 +24,12 @@ py_library( ], ) +py_library( + name = "common", + srcs = ["common.py"], + visibility = ["//compiler_gym:__subpackages__"], +) + py_library( name = "box", srcs = ["box.py"], @@ -71,12 +78,15 @@ py_library( name = "scalar", srcs = ["scalar.py"], visibility = ["//compiler_gym:__subpackages__"], + deps = [":common"], ) py_library( name = "sequence", srcs = ["sequence.py"], + visibility = ["//compiler_gym:__subpackages__"], deps = [ + ":common", ":scalar", ], ) diff --git a/compiler_gym/spaces/CMakeLists.txt b/compiler_gym/spaces/CMakeLists.txt index f209fbc96..763a996b6 100644 --- a/compiler_gym/spaces/CMakeLists.txt +++ b/compiler_gym/spaces/CMakeLists.txt @@ -11,6 +11,7 @@ cg_py_library( SRCS "__init__.py" DEPS + ::common ::box ::commandline ::dict @@ -23,6 +24,11 @@ cg_py_library( PUBLIC ) +cg_py_library( + NAME common + SRCS "common.py" +) + cg_py_library( NAME box SRCS box.py @@ -75,6 +81,8 @@ cg_py_library( scalar SRCS "scalar.py" + DEPS + ::common PUBLIC ) @@ -85,6 +93,7 @@ cg_py_library( "sequence.py" DEPS ::scalar + ::common PUBLIC ) diff --git a/compiler_gym/spaces/common.py b/compiler_gym/spaces/common.py new file mode 100644 index 000000000..205d020a5 --- /dev/null +++ b/compiler_gym/spaces/common.py @@ -0,0 +1,28 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +from inspect import isclass +from numbers import Integral, Real + +import numpy as np + + +def issubdtype(subtype, supertype): + if isclass(subtype) and isclass(supertype) and issubclass(subtype, supertype): + return True + subdtype = np.dtype(subtype) + superdtype = np.dtype(supertype) + if np.dtype(subdtype) == np.dtype(superdtype): + return True + + common_dtype = np.find_common_type([], [subdtype, superdtype]) + if not np.issubdtype(common_dtype, superdtype): + return False + if ( + issubclass(common_dtype.type, Real) + and issubclass(subdtype.type, Integral) + and 2 ** np.finfo(common_dtype).nmant < np.iinfo(subdtype).max + ): + return False + return True diff --git a/compiler_gym/spaces/scalar.py b/compiler_gym/spaces/scalar.py index 61c49ccad..ec7d91266 100644 --- a/compiler_gym/spaces/scalar.py +++ b/compiler_gym/spaces/scalar.py @@ -8,6 +8,8 @@ import numpy as np from gym.spaces import Space +from compiler_gym.spaces.common import issubdtype + class Scalar(Space): """A scalar value.""" @@ -44,7 +46,7 @@ def sample(self): return self.dtype(random.uniform(min, max)) def contains(self, x): - if not isinstance(x, self.dtype): + if not issubdtype(type(x), self.dtype): return False min = -float("inf") if self.min is None else self.min max = float("inf") if self.max is None else self.max @@ -61,4 +63,8 @@ def __eq__(self, rhs): """Equality test.""" if not isinstance(rhs, Scalar): return False - return self.min == rhs.min and self.max == rhs.max and self.dtype == rhs.dtype + return ( + self.min == rhs.min + and self.max == rhs.max + and np.dtype(self.dtype) == np.dtype(rhs.dtype) + ) diff --git a/compiler_gym/spaces/sequence.py b/compiler_gym/spaces/sequence.py index b3a547c2f..7bb4fa71f 100644 --- a/compiler_gym/spaces/sequence.py +++ b/compiler_gym/spaces/sequence.py @@ -4,8 +4,10 @@ # LICENSE file in the root directory of this source tree. from typing import Optional, Tuple +import numpy as np from gym.spaces import Space +from compiler_gym.spaces.common import issubdtype from compiler_gym.spaces.scalar import Scalar @@ -94,15 +96,18 @@ def contains(self, x): if self.dtype in {str, bytes}: if not isinstance(x, self.dtype): return False - else: - for element in x: - if not isinstance(element, self.dtype): - return False + elif hasattr(x, "dtype"): + if not issubdtype(x.dtype, self.dtype): + return False # Run the bounds check on every scalar element, if there is a scalar # range specified. - if self.scalar_range: + elif self.scalar_range: return all(self.scalar_range.contains(s) for s in x) + else: + for element in x: + if not issubdtype(type(element), self.dtype): + return False return True @@ -120,6 +125,6 @@ def __eq__(self, other): return False return ( self.size_range == other.size_range - and self.dtype == other.dtype + and np.dtype(self.dtype) == np.dtype(other.dtype) and self.opaque_data_format == other.opaque_data_format ) diff --git a/compiler_gym/views/observation_space_spec.py b/compiler_gym/views/observation_space_spec.py index a321ee5c4..4ca0c1964 100644 --- a/compiler_gym/views/observation_space_spec.py +++ b/compiler_gym/views/observation_space_spec.py @@ -2,35 +2,16 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -import json -from typing import Callable, Optional, Union +from typing import Any, Callable, ClassVar, Optional, Union -import networkx as nx -import numpy as np +# import networkx as nx +# import numpy as np from gym.spaces import Space -from compiler_gym.service.proto import Observation, ObservationSpace, ScalarRange -from compiler_gym.spaces.box import Box -from compiler_gym.spaces.scalar import Scalar -from compiler_gym.spaces.sequence import Sequence +from compiler_gym.service.proto import Event, ObservationSpace, py_converters from compiler_gym.util.gym_type_hints import ObservationType -def _json2nx(observation): - json_data = json.loads(observation.string_value) - return nx.readwrite.json_graph.node_link_graph( - json_data, multigraph=True, directed=True - ) - - -def _scalar_range2tuple(sr: ScalarRange, defaults=(-np.inf, np.inf)): - """Convert a ScalarRange to a tuple of (min, max) bounds.""" - return ( - sr.min.value if sr.HasField("min") else defaults[0], - sr.max.value if sr.HasField("max") else defaults[1], - ) - - class ObservationSpaceSpec: """Specification of an observation space. @@ -57,12 +38,16 @@ class ObservationSpaceSpec: is set and the service terminates. """ + message_converter: ClassVar[ + Callable[[Any], Any] + ] = py_converters.make_message_default_converter() + def __init__( self, id: str, index: int, space: Space, - translate: Callable[[Union[ObservationType, Observation]], ObservationType], + translate: Callable[[Union[ObservationType, Event]], ObservationType], to_string: Callable[[ObservationType], str], deterministic: bool, platform_dependent: bool, @@ -110,146 +95,17 @@ def __eq__(self, rhs) -> bool: @classmethod def from_proto(cls, index: int, proto: ObservationSpace): - """Construct a space from an ObservationSpace message.""" - shape_type = proto.WhichOneof("shape") - - def make_box(scalar_range_list, dtype, defaults): - bounds = [_scalar_range2tuple(r, defaults) for r in scalar_range_list] - return Box( - name=proto.name, - low=np.array([b[0] for b in bounds], dtype=dtype), - high=np.array([b[1] for b in bounds], dtype=dtype), - dtype=dtype, - ) - - def make_scalar(scalar_range, dtype, defaults): - scalar_range_tuple = _scalar_range2tuple(scalar_range, defaults) - return Scalar( - name=proto.name, - min=dtype(scalar_range_tuple[0]), - max=dtype(scalar_range_tuple[1]), - dtype=dtype, - ) - - def make_seq(size_range, dtype, defaults, scalar_range=None): - return Sequence( - name=proto.name, - size_range=_scalar_range2tuple(size_range, defaults), - dtype=dtype, - opaque_data_format=proto.opaque_data_format, - scalar_range=scalar_range, - ) - - # Translate from protocol buffer specification to python. There are - # three variables to derive: - # (1) space: the gym.Space instance describing the space. - # (2) translate: is a callback that translates from an Observation - # message to a python type. - # (3) to_string: is a callback that translates from a python type to a - # string for printing. - if proto.opaque_data_format == "json://networkx/MultiDiGraph": - # TODO(cummins): Add a Graph space. - space = make_seq(proto.string_size_range, str, (0, None)) - - def translate(observation): - return nx.readwrite.json_graph.node_link_graph( - json.loads(observation.string_value), multigraph=True, directed=True - ) - - def to_string(observation): - return json.dumps( - nx.readwrite.json_graph.node_link_data(observation), indent=2 - ) - - elif proto.opaque_data_format == "json://": - space = make_seq(proto.string_size_range, str, (0, None)) - - def translate(observation): - return json.loads(observation.string_value) - - def to_string(observation): - return json.dumps(observation, indent=2) - - elif shape_type == "int64_range_list": - space = make_box( - proto.int64_range_list.range, - np.int64, - (np.iinfo(np.int64).min, np.iinfo(np.int64).max), - ) - - def translate(observation): - return np.array(observation.int64_list.value, dtype=np.int64) - - to_string = str - elif shape_type == "double_range_list": - space = make_box( - proto.double_range_list.range, np.float64, (-np.inf, np.inf) - ) - - def translate(observation): - return np.array(observation.double_list.value, dtype=np.float64) - - to_string = str - elif shape_type == "string_size_range": - space = make_seq(proto.string_size_range, str, (0, None)) - - def translate(observation): - return observation.string_value - - to_string = str - elif shape_type == "binary_size_range": - space = make_seq(proto.binary_size_range, bytes, (0, None)) - - def translate(observation): - return observation.binary_value - - to_string = str - elif shape_type == "scalar_int64_range": - space = make_scalar( - proto.scalar_int64_range, - int, - (np.iinfo(np.int64).min, np.iinfo(np.int64).max), - ) - - def translate(observation): - return int(observation.scalar_int64) - - to_string = str - elif shape_type == "scalar_double_range": - space = make_scalar(proto.scalar_double_range, float, (-np.inf, np.inf)) - - def translate(observation): - return float(observation.scalar_double) - - to_string = str - elif shape_type == "double_sequence": - space = make_seq( - proto.double_sequence.length_range, - np.float64, - (-np.inf, np.inf), - make_scalar( - proto.double_sequence.scalar_range, np.float64, (-np.inf, np.inf) - ), - ) - - def translate(observation): - return np.array(observation.double_list.value, dtype=np.float64) - - to_string = str - else: - raise TypeError( - f"Unknown shape '{shape_type}' for ObservationSpace:\n{proto}" - ) - return cls( id=proto.name, index=index, - space=space, - translate=translate, - to_string=to_string, + space=ObservationSpaceSpec.message_converter(proto.space), + translate=ObservationSpaceSpec.message_converter, + to_string=str, deterministic=proto.deterministic, platform_dependent=proto.platform_dependent, - default_value=translate(proto.default_value), + default_value=ObservationSpaceSpec.message_converter( + proto.default_observation + ), ) def make_derived_space( diff --git a/docs/source/rpc.rst b/docs/source/rpc.rst index 4877efa98..f525a1b0d 100644 --- a/docs/source/rpc.rst +++ b/docs/source/rpc.rst @@ -95,40 +95,103 @@ Core Message Types .. doxygenstruct:: ActionSpace :members: -.. doxygenstruct:: Action +.. doxygenstruct:: ObservationSpace :members: -.. doxygenstruct:: ChoiceSpace +.. doxygenstruct:: Event :members: -.. doxygenstruct:: Choice +.. doxygenstruct:: BooleanTensor :members: -.. doxygenstruct:: ObservationSpace +.. doxygenstruct:: ByteTensor + :members: + +.. doxygenstruct:: Int64Tensor + :members: + +.. doxygenstruct:: FloatTensor + :members: + +.. doxygenstruct:: DoubleTensor + :members: + +.. doxygenstruct:: StringTensor + :members: + +.. doxygenstruct:: BooleanRange + :members: + +.. doxygenstruct:: Int64Range + :members: + +.. doxygenstruct:: FloatRange + :members: + +.. doxygenstruct:: DoubleRange + :members: + +.. doxygenstruct:: BooleanBox + :members: + +.. doxygenstruct:: ByteBox :members: -.. doxygenstruct:: Observation +.. doxygenstruct:: Int64Box + :members: + +.. doxygenstruct:: FloatBox + :members: + +.. doxygenstruct:: DoubleBox + :members: + +.. doxygenstruct:: ListSpace + :members: + +.. doxygenstruct:: DictSpace + :members: + +.. doxygenstruct:: DiscreteSpace :members: .. doxygenstruct:: NamedDiscreteSpace :members: -.. doxygenstruct:: Int64List +.. doxygenstruct:: BooleanSequenceSpace + :members: + +.. doxygenstruct:: ByteSequenceSpace + :members: + +.. doxygenstruct:: BytesSequenceSpace + :members: + +.. doxygenstruct:: Int64SequenceSpace + :members: + +.. doxygenstruct:: FloatSequenceSpace + :members: + +.. doxygenstruct:: DoubleSequenceSpace + :members: + +.. doxygenstruct:: StringSequenceSpace :members: -.. doxygenstruct:: DoubleList +.. doxygenstruct:: StringSpace :members: -.. doxygenstruct:: ScalarRange +.. doxygenstruct:: Opaque :members: -.. doxygenstruct:: ScalarLimit +.. doxygenstruct:: CommandlineSpace :members: -.. doxygenstruct:: ScalarRangeList +.. doxygenstruct:: ListEvent :members: -.. doxygenstruct:: SequenceSpace +.. doxygenstruct:: DictEvent :members: .. doxygenstruct:: Benchmark diff --git a/examples/RandomSearch.cc b/examples/RandomSearch.cc index 0073cd9d6..b89a8fc77 100644 --- a/examples/RandomSearch.cc +++ b/examples/RandomSearch.cc @@ -51,7 +51,7 @@ class Environment { : service_(workingDir), benchmark_(benchmark) {} // Reset the environment and compute the initial observation. - [[nodiscard]] Status reset(Observation* observation) { + [[nodiscard]] Status reset(Event* observation) { if (inEpisode_) { RETURN_IF_ERROR(close()); } @@ -85,12 +85,12 @@ class Environment { } // Apply the given action and compute an observation. - [[nodiscard]] Status step(LlvmAction action, Observation* observation) { + [[nodiscard]] Status step(LlvmAction action, Event* observation) { StepRequest request; StepReply reply; request.set_session_id(sessionId_); - request.add_action()->add_choice()->set_named_discrete_value_index(static_cast(action)); + request.add_action()->set_int64_value(static_cast(action)); request.add_observation_space(static_cast(observationSpace)); RETURN_IF_ERROR(service_.Step(nullptr, &request, &reply)); CHECK(reply.observation_size() == 1); @@ -109,9 +109,9 @@ Status runSearch(const fs::path& workingDir, std::vector* bestActions, int6 Environment environment(workingDir, FLAGS_benchmark); // Reset the environment. - Observation init; - RETURN_IF_ERROR(environment.reset(&init)); - *bestCost = init.scalar_int64(); + Event observation; + RETURN_IF_ERROR(environment.reset(&observation)); + *bestCost = observation.int64_value(); // Run a bunch of actions randomly. srand(time(NULL)); @@ -120,9 +120,9 @@ Status runSearch(const fs::path& workingDir, std::vector* bestActions, int6 int action = rand() % magic_enum::enum_count(); actions.push_back(action); - Observation obs; + Event obs; RETURN_IF_ERROR(environment.step(static_cast(action), &obs)); - int64_t cost = obs.scalar_int64(); + int64_t cost = obs.int64_value(); if (cost < *bestCost) { *bestCost = cost; diff --git a/examples/example_compiler_gym_service/env_tests.py b/examples/example_compiler_gym_service/env_tests.py index cbb1e543b..4b2259bc7 100644 --- a/examples/example_compiler_gym_service/env_tests.py +++ b/examples/example_compiler_gym_service/env_tests.py @@ -84,7 +84,9 @@ def test_observation_spaces(env: CompilerEnv): env.reset() assert env.observation.spaces.keys() == {"ir", "features", "runtime"} assert env.observation.spaces["ir"].space == Sequence( - name="test", size_range=(0, None), dtype=str, opaque_data_format="" + name="test", + size_range=(0, np.iinfo(np.int64).max), + dtype=str, ) assert env.observation.spaces["features"].space == Box( name="test", shape=(3,), low=-100, high=100, dtype=int diff --git a/examples/example_compiler_gym_service/service_cc/ExampleService.cc b/examples/example_compiler_gym_service/service_cc/ExampleService.cc index a3b028faf..99cacb769 100644 --- a/examples/example_compiler_gym_service/service_cc/ExampleService.cc +++ b/examples/example_compiler_gym_service/service_cc/ExampleService.cc @@ -39,14 +39,9 @@ class ExampleCompilationSession final : public CompilationSession { ActionSpace space; space.set_name("default"); - ChoiceSpace* choice = space.add_choice(); - choice->set_name("optimization_choice"); - - NamedDiscreteSpace* namedDiscreteChoice = choice->mutable_named_discrete_space(); - - namedDiscreteChoice->add_value("a"); - namedDiscreteChoice->add_value("b"); - namedDiscreteChoice->add_value("c"); + space.mutable_space()->mutable_named_discrete()->add_name("a"); + space.mutable_space()->mutable_named_discrete()->add_name("b"); + space.mutable_space()->mutable_named_discrete()->add_name("c"); return {space}; } @@ -54,25 +49,22 @@ class ExampleCompilationSession final : public CompilationSession { std::vector getObservationSpaces() const override { ObservationSpace ir; ir.set_name("ir"); - ScalarRange irSizeRange; - irSizeRange.mutable_min()->set_value(0); - *ir.mutable_string_size_range() = irSizeRange; + ir.mutable_space()->mutable_string_value()->mutable_length_range()->set_min(0); ir.set_deterministic(true); ir.set_platform_dependent(false); ObservationSpace features; features.set_name("features"); + *features.mutable_space()->mutable_int64_box()->mutable_low()->mutable_shape()->Add() = 3; + *features.mutable_space()->mutable_int64_box()->mutable_high()->mutable_shape()->Add() = 3; for (int i = 0; i < 3; ++i) { - ScalarRange* featureSizeRange = features.mutable_int64_range_list()->add_range(); - featureSizeRange->mutable_min()->set_value(-100); - featureSizeRange->mutable_max()->set_value(100); + *features.mutable_space()->mutable_int64_box()->mutable_low()->mutable_value()->Add() = -100; + *features.mutable_space()->mutable_int64_box()->mutable_high()->mutable_value()->Add() = 100; } ObservationSpace runtime; runtime.set_name("runtime"); - ScalarRange runtimeRange; - runtimeRange.mutable_min()->set_value(0); - *runtime.mutable_scalar_double_range() = runtimeRange; + runtime.mutable_space()->mutable_double_value()->set_min(0); runtime.set_deterministic(false); runtime.set_platform_dependent(true); @@ -90,18 +82,14 @@ class ExampleCompilationSession final : public CompilationSession { return Status::OK; } - [[nodiscard]] grpc::Status applyAction(const Action& action, bool& endOfEpisode, + [[nodiscard]] grpc::Status applyAction(const Event& action, bool& endOfEpisode, std::optional& newActionSpace, bool& actionHadNoEffect) final override { - const int numChoices = getActionSpaces()[0].choice(0).named_discrete_space().value_size(); - - if (action.choice_size() != 1) { - return Status(StatusCode::INVALID_ARGUMENT, "Missing choice"); - } + const int numChoices = getActionSpaces()[0].space().named_discrete().name_size(); // This is the index into the action space's values ("a", "b", "c") that the // user selected, e.g. 0 -> "a", 1 -> "b", 2 -> "c". - const int choiceIndex = action.choice(0).named_discrete_value_index(); + const int choiceIndex = action.int64_value(); LOG(INFO) << "Applying action " << choiceIndex; if (choiceIndex < 0 || choiceIndex >= numChoices) { @@ -115,7 +103,7 @@ class ExampleCompilationSession final : public CompilationSession { } [[nodiscard]] grpc::Status computeObservation(const ObservationSpace& observationSpace, - Observation& observation) final override { + Event& observation) final override { std::cerr << "COMPUTING OBSERVATION" << std::endl; LOG(INFO) << "Computing observation " << observationSpace.name(); std::cerr << "CP2" << std::endl; @@ -125,12 +113,13 @@ class ExampleCompilationSession final : public CompilationSession { observation.set_string_value("Hello, world!"); } else if (observationSpace.name() == "features") { std::cerr << "IR" << std::endl; + *observation.mutable_int64_tensor()->mutable_shape()->Add() = 3; for (int i = 0; i < 3; ++i) { - observation.mutable_int64_list()->add_value(0); + *observation.mutable_int64_tensor()->mutable_value()->Add() = 0; } } else if (observationSpace.name() == "runtime") { std::cerr << "IR" << std::endl; - observation.set_scalar_double(0); + observation.set_double_value(0); } else { UNREACHABLE(fmt::format("Unhandled observation space: {}", observationSpace.name())); } diff --git a/examples/example_compiler_gym_service/service_py/example_service.py b/examples/example_compiler_gym_service/service_py/example_service.py index 0558c8e68..4498d4991 100755 --- a/examples/example_compiler_gym_service/service_py/example_service.py +++ b/examples/example_compiler_gym_service/service_py/example_service.py @@ -11,16 +11,17 @@ from compiler_gym.service import CompilationSession from compiler_gym.service.proto import ( - Action, ActionSpace, Benchmark, - ChoiceSpace, + DoubleRange, + Event, + Int64Box, + Int64Range, + Int64Tensor, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) from compiler_gym.service.runtime import create_and_run_compiler_gym_service @@ -36,18 +37,15 @@ class ExampleCompilationSession(CompilationSession): action_spaces = [ ActionSpace( name="default", - choice=[ - ChoiceSpace( - name="optimization_choice", - named_discrete_space=NamedDiscreteSpace( - value=[ - "a", - "b", - "c", - ], - ), - ) - ], + space=Space( + named_discrete=NamedDiscreteSpace( + name=[ + "a", + "b", + "c", + ], + ), + ), ) ] @@ -56,34 +54,31 @@ class ExampleCompilationSession(CompilationSession): observation_spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0)), + ), deterministic=True, platform_dependent=False, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), ObservationSpace( name="features", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange( - min=ScalarLimit(value=-100), max=ScalarLimit(value=100) - ), - ScalarRange( - min=ScalarLimit(value=-100), max=ScalarLimit(value=100) - ), - ScalarRange( - min=ScalarLimit(value=-100), max=ScalarLimit(value=100) - ), - ] + space=Space( + int64_box=Int64Box( + low=Int64Tensor(shape=[3], value=[-100, -100, -100]), + high=Int64Tensor(shape=[3], value=[100, 100, 100]), + ), ), ), ObservationSpace( name="runtime", - scalar_double_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + double_value=DoubleRange(min=0), + ), deterministic=False, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ] @@ -94,15 +89,12 @@ def __init__( super().__init__(working_directory, action_space, benchmark) logging.info("Started a compilation session for %s", benchmark.uri) - def apply_action(self, action: Action) -> Tuple[bool, Optional[ActionSpace], bool]: - num_choices = len(self.action_spaces[0].choice[0].named_discrete_space.value) - - if len(action.choice) != 1: - raise ValueError("Invalid choice count") + def apply_action(self, action: Event) -> Tuple[bool, Optional[ActionSpace], bool]: + num_choices = len(self.action_spaces[0].space.named_discrete.name) # This is the index into the action space's values ("a", "b", "c") that # the user selected, e.g. 0 -> "a", 1 -> "b", 2 -> "c". - choice_index = action.choice[0].named_discrete_value_index + choice_index = action.int64_value logging.info("Applying action %d", choice_index) if choice_index < 0 or choice_index >= num_choices: @@ -113,16 +105,15 @@ def apply_action(self, action: Action) -> Tuple[bool, Optional[ActionSpace], boo return False, None, False - def get_observation(self, observation_space: ObservationSpace) -> Observation: + def get_observation(self, observation_space: ObservationSpace) -> Event: logging.info("Computing observation from space %s", observation_space) if observation_space.name == "ir": - return Observation(string_value="Hello, world!") + return Event(string_value="Hello, world!") elif observation_space.name == "features": - observation = Observation() - observation.int64_list.value[:] = [0, 0, 0] + observation = Event(int64_tensor=Int64Tensor(shape=[3], value=[0, 0, 0])) return observation elif observation_space.name == "runtime": - return Observation(scalar_double=0) + return Event(double_value=0) else: raise KeyError(observation_space.name) diff --git a/examples/example_unrolling_service/env_tests.py b/examples/example_unrolling_service/env_tests.py index c1be88223..fba1ec4ab 100644 --- a/examples/example_unrolling_service/env_tests.py +++ b/examples/example_unrolling_service/env_tests.py @@ -79,10 +79,13 @@ def test_observation_spaces(env: CompilerEnv): env.reset() assert env.observation.spaces.keys() == {"ir", "features", "runtime", "size"} assert env.observation.spaces["ir"].space == Sequence( - name="ir", size_range=(0, None), dtype=str, opaque_data_format="" + name="ir", + size_range=(0, np.iinfo(np.int64).max), + dtype=str, + opaque_data_format=None, ) assert env.observation.spaces["features"].space == Box( - name="features", shape=(3,), low=0, high=1e5, dtype=int + name="features", shape=(3,), low=0, high=100000, dtype=int ) assert env.observation.spaces["runtime"].space == Scalar( name="runtime", min=0, max=np.inf, dtype=float diff --git a/examples/example_unrolling_service/service_py/example_service.py b/examples/example_unrolling_service/service_py/example_service.py index e115c5de5..ec83e5ac2 100755 --- a/examples/example_unrolling_service/service_py/example_service.py +++ b/examples/example_unrolling_service/service_py/example_service.py @@ -18,16 +18,17 @@ import compiler_gym.third_party.llvm as llvm from compiler_gym.service import CompilationSession from compiler_gym.service.proto import ( - Action, ActionSpace, Benchmark, - ChoiceSpace, + DoubleRange, + Event, + Int64Box, + Int64Range, + Int64Tensor, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) from compiler_gym.service.runtime import create_and_run_compiler_gym_service from compiler_gym.util.commands import run_command @@ -42,18 +43,15 @@ class UnrollingCompilationSession(CompilationSession): action_spaces = [ ActionSpace( name="unrolling", - choice=[ - ChoiceSpace( - name="unroll_choice", - named_discrete_space=NamedDiscreteSpace( - value=[ - "-loop-unroll -unroll-count=2", - "-loop-unroll -unroll-count=4", - "-loop-unroll -unroll-count=8", - ], - ), - ) - ], + space=Space( + named_discrete=NamedDiscreteSpace( + name=[ + "-loop-unroll -unroll-count=2", + "-loop-unroll -unroll-count=4", + "-loop-unroll -unroll-count=8", + ], + ), + ), ) ] @@ -62,37 +60,42 @@ class UnrollingCompilationSession(CompilationSession): observation_spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + string_value=StringSpace(length_range=Int64Range(min=0)), + ), deterministic=True, platform_dependent=False, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), ObservationSpace( name="features", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ] + space=Space( + int64_box=Int64Box( + low=Int64Tensor(shape=[3], value=[0, 0, 0]), + high=Int64Tensor(shape=[3], value=[100000, 100000, 100000]), + ), ), ), ObservationSpace( name="runtime", - scalar_double_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + double_value=DoubleRange(min=0), + ), deterministic=False, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ObservationSpace( name="size", - scalar_double_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space( + double_value=DoubleRange(min=0), + ), deterministic=True, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ] @@ -142,19 +145,16 @@ def __init__( timeout=30, ) - def apply_action(self, action: Action) -> Tuple[bool, Optional[ActionSpace], bool]: - num_choices = len(self._action_space.choice[0].named_discrete_space.value) - - if len(action.choice) != 1: - raise ValueError("Invalid choice count") + def apply_action(self, action: Event) -> Tuple[bool, Optional[ActionSpace], bool]: + num_choices = len(self._action_space.space.named_discrete.name) # This is the index into the action space's values ("a", "b", "c") that # the user selected, e.g. 0 -> "a", 1 -> "b", 2 -> "c". - choice_index = action.choice[0].named_discrete_value_index + choice_index = action.int64_value if choice_index < 0 or choice_index >= num_choices: raise ValueError("Out-of-range") - args = self._action_space.choice[0].named_discrete_space.value[choice_index] + args = self._action_space.space.named_discrete.name[choice_index] logging.info( "Applying action %d, equivalent command-line arguments: '%s'", choice_index, @@ -217,14 +217,17 @@ def ir(self) -> str: with open(self._llvm_path) as f: return f.read() - def get_observation(self, observation_space: ObservationSpace) -> Observation: + def get_observation(self, observation_space: ObservationSpace) -> Event: logging.info("Computing observation from space %s", observation_space.name) if observation_space.name == "ir": - return Observation(string_value=self.ir) + return Event(string_value=self.ir) elif observation_space.name == "features": stats = utils.extract_statistics_from_ir(self.ir) - observation = Observation() - observation.int64_list.value[:] = list(stats.values()) + observation = Event( + int64_tensor=Int64Tensor( + shape=[len(list(stats.values()))], value=list(stats.values()) + ) + ) return observation elif observation_space.name == "runtime": # compile LLVM to object file @@ -269,7 +272,7 @@ def get_observation(self, observation_space: ObservationSpace) -> Observation: ) exec_times = np.sort(exec_times) avg_exec_time = np.mean(exec_times[1:4]) - return Observation(scalar_double=avg_exec_time) + return Event(double_value=avg_exec_time) elif observation_space.name == "size": # compile LLVM to object file run_command( @@ -295,7 +298,7 @@ def get_observation(self, observation_space: ObservationSpace) -> Observation: timeout=30, ) binary_size = os.path.getsize(self._exe_path) - return Observation(scalar_double=binary_size) + return Event(double_value=binary_size) else: raise KeyError(observation_space.name) diff --git a/examples/loop_optimizations_service/env_tests.py b/examples/loop_optimizations_service/env_tests.py index d7afea80f..525a13368 100644 --- a/examples/loop_optimizations_service/env_tests.py +++ b/examples/loop_optimizations_service/env_tests.py @@ -85,7 +85,9 @@ def test_observation_spaces(env: CompilerEnv): env.reset() assert env.observation.spaces.keys() == {"ir", "features", "runtime", "size"} assert env.observation.spaces["ir"].space == Sequence( - name="ir", size_range=(0, None), dtype=str, opaque_data_format="" + name="ir", + size_range=(0, np.iinfo(int).max), + dtype=str, ) assert env.observation.spaces["features"].space == Box( name="features", shape=(3,), low=0, high=1e5, dtype=int diff --git a/examples/loop_optimizations_service/service_py/BUILD b/examples/loop_optimizations_service/service_py/BUILD index 44f3a5b2c..117235f77 100644 --- a/examples/loop_optimizations_service/service_py/BUILD +++ b/examples/loop_optimizations_service/service_py/BUILD @@ -13,9 +13,16 @@ py_binary( main = "loops_opt_service.py", visibility = ["//visibility:public"], deps = [ + ":utils", "//compiler_gym/service", "//compiler_gym/service/proto", "//compiler_gym/service/runtime", "//compiler_gym/third_party/llvm", ], ) + +py_library( + name = "utils", + srcs = ["utils.py"], + visibility = ["//visibility:public"], +) diff --git a/examples/loop_optimizations_service/service_py/loops_opt_service.py b/examples/loop_optimizations_service/service_py/loops_opt_service.py index 2242bdda2..94156b733 100755 --- a/examples/loop_optimizations_service/service_py/loops_opt_service.py +++ b/examples/loop_optimizations_service/service_py/loops_opt_service.py @@ -13,21 +13,22 @@ from typing import Optional, Tuple import numpy as np -import utils import compiler_gym.third_party.llvm as llvm +import examples.loop_optimizations_service.service_py.utils as utils from compiler_gym.service import CompilationSession from compiler_gym.service.proto import ( - Action, ActionSpace, Benchmark, - ChoiceSpace, + DoubleRange, + Event, + Int64Box, + Int64Range, + Int64Tensor, NamedDiscreteSpace, - Observation, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) from compiler_gym.service.runtime import create_and_run_compiler_gym_service from compiler_gym.util.commands import run_command @@ -42,25 +43,22 @@ class LoopsOptCompilationSession(CompilationSession): action_spaces = [ ActionSpace( name="loop-opt", - choice=[ - ChoiceSpace( - name="loop-opt", - named_discrete_space=NamedDiscreteSpace( - value=[ - "--loop-unroll --unroll-count=2", - "--loop-unroll --unroll-count=4", - "--loop-unroll --unroll-count=8", - "--loop-unroll --unroll-count=16", - "--loop-unroll --unroll-count=32", - "--loop-vectorize -force-vector-width=2", - "--loop-vectorize -force-vector-width=4", - "--loop-vectorize -force-vector-width=8", - "--loop-vectorize -force-vector-width=16", - "--loop-vectorize -force-vector-width=32", - ] - ), + space=Space( + named_discrete=NamedDiscreteSpace( + name=[ + "--loop-unroll --unroll-count=2", + "--loop-unroll --unroll-count=4", + "--loop-unroll --unroll-count=8", + "--loop-unroll --unroll-count=16", + "--loop-unroll --unroll-count=32", + "--loop-vectorize -force-vector-width=2", + "--loop-vectorize -force-vector-width=4", + "--loop-vectorize -force-vector-width=8", + "--loop-vectorize -force-vector-width=16", + "--loop-vectorize -force-vector-width=32", + ] ), - ], + ), ) ] @@ -69,37 +67,36 @@ class LoopsOptCompilationSession(CompilationSession): observation_spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(string_value=StringSpace(length_range=Int64Range(min=0))), deterministic=True, platform_dependent=False, - default_value=Observation(string_value=""), + default_observation=Event(string_value=""), ), ObservationSpace( name="features", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ScalarRange(min=ScalarLimit(value=0), max=ScalarLimit(value=1e5)), - ] + space=Space( + int64_box=Int64Box( + low=Int64Tensor(shape=[3], value=[0, 0, 0]), + high=Int64Tensor(shape=[3], value=[int(1e5), int(1e5), int(1e5)]), + ) ), ), ObservationSpace( name="runtime", - scalar_double_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(double_value=DoubleRange(min=0)), deterministic=False, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ObservationSpace( name="size", - scalar_double_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(double_value=DoubleRange(min=0)), deterministic=True, platform_dependent=True, - default_value=Observation( - scalar_double=0, + default_observation=Event( + double_value=0, ), ), ] @@ -150,19 +147,16 @@ def __init__( timeout=30, ) - def apply_action(self, action: Action) -> Tuple[bool, Optional[ActionSpace], bool]: - num_choices = len(self._action_space.choice[0].named_discrete_space.value) - - if len(action.choice) != 1: - raise ValueError("Currently we support one choice at a time") + def apply_action(self, action: Event) -> Tuple[bool, Optional[ActionSpace], bool]: + num_choices = len(self._action_space.space.named_discrete.name) # This is the index into the action space's values ("a", "b", "c") that # the user selected, e.g. 0 -> "a", 1 -> "b", 2 -> "c". - choice_index = action.choice[0].named_discrete_value_index + choice_index = action.int64_value if choice_index < 0 or choice_index >= num_choices: raise ValueError("Out-of-range") - args = self._action_space.choice[0].named_discrete_space.value[choice_index] + args = self._action_space.space.named_discrete.name[choice_index] logging.info( "Applying action %d, equivalent command-line arguments: '%s'", choice_index, @@ -225,14 +219,14 @@ def ir(self) -> str: with open(self._llvm_path) as f: return f.read() - def get_observation(self, observation_space: ObservationSpace) -> Observation: + def get_observation(self, observation_space: ObservationSpace) -> Event: logging.info("Computing observation from space %s", observation_space.name) if observation_space.name == "ir": - return Observation(string_value=self.ir) + return Event(string_value=self.ir) elif observation_space.name == "features": stats = utils.extract_statistics_from_ir(self.ir) - observation = Observation() - observation.int64_list.value[:] = list(stats.values()) + vals = stats.values() + observation = Event(int64_tensor=Int64Tensor(shape=[len(vals)], value=vals)) return observation elif observation_space.name == "runtime": # compile LLVM to object file @@ -277,7 +271,7 @@ def get_observation(self, observation_space: ObservationSpace) -> Observation: ) exec_times = np.sort(exec_times) avg_exec_time = np.mean(exec_times[1:4]) - return Observation(scalar_double=avg_exec_time) + return Event(double_value=avg_exec_time) elif observation_space.name == "size": # compile LLVM to object file run_command( @@ -303,7 +297,7 @@ def get_observation(self, observation_space: ObservationSpace) -> Observation: timeout=30, ) binary_size = os.path.getsize(self._exe_path) - return Observation(scalar_double=binary_size) + return Event(double_value=binary_size) else: raise KeyError(observation_space.name) diff --git a/external/absl/CMakeLists.txt b/external/absl/CMakeLists.txt index 0aa5c47c7..a1bf1f432 100644 --- a/external/absl/CMakeLists.txt +++ b/external/absl/CMakeLists.txt @@ -17,4 +17,7 @@ ExternalProject_Add( -C "${CMAKE_CURRENT_BINARY_DIR}/absl_initial_cache.cmake" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" -DCMAKE_POSITION_INDEPENDENT_CODE=ON + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE ) diff --git a/external/boost/CMakeLists.txt b/external/boost/CMakeLists.txt index d889dc661..d542c3af0 100644 --- a/external/boost/CMakeLists.txt +++ b/external/boost/CMakeLists.txt @@ -45,4 +45,6 @@ ExternalProject_Add( cxxstd=${CMAKE_CXX_STANDARD} install INSTALL_COMMAND "" + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE ) diff --git a/external/cpuinfo/CMakeLists.txt b/external/cpuinfo/CMakeLists.txt index 090095318..41fbba6cc 100644 --- a/external/cpuinfo/CMakeLists.txt +++ b/external/cpuinfo/CMakeLists.txt @@ -16,4 +16,7 @@ ExternalProject_Add( CMAKE_ARGS -C "${CMAKE_CURRENT_BINARY_DIR}/cpuinfo_initial_cache.cmake" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE ) diff --git a/external/csmith/CMakeLists.txt b/external/csmith/CMakeLists.txt index bd58189fc..331287dc0 100644 --- a/external/csmith/CMakeLists.txt +++ b/external/csmith/CMakeLists.txt @@ -17,4 +17,7 @@ ExternalProject_Add( -C "${CMAKE_CURRENT_BINARY_DIR}/csmith_initial_cache.cmake" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" "-DCOMPILE_DEFINITIONS=_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES" + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE ) diff --git a/external/gflags/CMakeLists.txt b/external/gflags/CMakeLists.txt index 48a1e1a20..0f7a0e2cc 100644 --- a/external/gflags/CMakeLists.txt +++ b/external/gflags/CMakeLists.txt @@ -18,4 +18,7 @@ ExternalProject_Add( CMAKE_ARGS -C "${CMAKE_CURRENT_BINARY_DIR}/gflags_initial_cache.cmake" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE ) diff --git a/external/llvm/CMakeLists.txt b/external/llvm/CMakeLists.txt index ce3465463..fe2fddbe8 100644 --- a/external/llvm/CMakeLists.txt +++ b/external/llvm/CMakeLists.txt @@ -50,4 +50,7 @@ ExternalProject_Add( -DLLVM_TARGETS_TO_BUILD=host BUILD_COMMAND ${_BUILD_COMMAND} INSTALL_COMMAND ${_INSTALL_COMMAND} + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_INSTALL TRUE + USES_TERMINAL_BUILD TRUE ) diff --git a/external/programl/CMakeLists.txt b/external/programl/CMakeLists.txt index 525a392b6..8356b5be9 100644 --- a/external/programl/CMakeLists.txt +++ b/external/programl/CMakeLists.txt @@ -44,4 +44,5 @@ ExternalProject_Add_Step(programl build_programl @labm8//labm8/cpp:stringpiece DEPENDEES update WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/programl/src/programl" + USES_TERMINAL TRUE ) diff --git a/external/protobuf/CMakeLists.txt b/external/protobuf/CMakeLists.txt index 5467dec36..85656bbae 100644 --- a/external/protobuf/CMakeLists.txt +++ b/external/protobuf/CMakeLists.txt @@ -36,4 +36,5 @@ ExternalProject_Add_Step(protobuf build_protobuf -P "${CMAKE_CURRENT_SOURCE_DIR}/build_protobuf.cmake" DEPENDEES update WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf" + USES_TERMINAL TRUE ) diff --git a/external/subprocess/CMakeLists.txt b/external/subprocess/CMakeLists.txt index d5aad65b6..6e8cab5a7 100644 --- a/external/subprocess/CMakeLists.txt +++ b/external/subprocess/CMakeLists.txt @@ -17,4 +17,7 @@ ExternalProject_Add( -C "${CMAKE_CURRENT_BINARY_DIR}/subprocess_initial_cache.cmake" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" "-DCMAKE_CXX_FLAGS=-pthread" + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE ) diff --git a/prototool.yaml b/prototool.yaml new file mode 100644 index 000000000..766fc28de --- /dev/null +++ b/prototool.yaml @@ -0,0 +1,7 @@ +--- +protoc: + version: 3.13.0 + includes: + - compiler_gym/service/proto +lint: + group: uber1 diff --git a/tests/gcc/gcc_env_test.py b/tests/gcc/gcc_env_test.py index 90f719a3e..c0baf9bd6 100644 --- a/tests/gcc/gcc_env_test.py +++ b/tests/gcc/gcc_env_test.py @@ -71,7 +71,7 @@ def test_observation_spaces_failing_because_of_bug(gcc_bin: str): name="obj_size", min=-1, max=np.iinfo(np.int64).max, dtype=int ) assert env.observation.spaces["asm"].space == Sequence( - name="asm", size_range=(0, None), dtype=str, opaque_data_format="" + name="asm", size_range=(0, np.iinfo(np.int64).max), dtype=str ) @@ -290,7 +290,7 @@ def test_obj_observation(): """Test observation spaces.""" with gym.make("gcc-v0") as env: env.reset() - assert env.obj[:5] == b"\x7fELF\x02" + assert env.obj[:5].tobytes() == b"\x7fELF\x02" @with_docker diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index 2d1751aaf..67bf9b5f1 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -77,7 +77,7 @@ def test_ir_observation_space(env: LlvmEnv): space = env.observation.spaces[key] assert isinstance(space.space, Sequence) assert space.space.dtype == str - assert space.space.size_range == (0, None) + assert space.space.size_range == (0, np.iinfo(np.int64).max) value: str = env.observation[key] print(value) # For debugging in case of error. @@ -111,15 +111,16 @@ def test_bitcode_observation_space(env: LlvmEnv): key = "Bitcode" space = env.observation.spaces[key] assert isinstance(space.space, Sequence) - assert space.space.dtype == bytes - assert space.space.size_range == (0, None) + assert space.space.dtype == np.int8 + assert space.space.size_range == (0, np.iinfo(np.int64).max) assert space.deterministic assert not space.platform_dependent value: str = env.observation[key] print(value) # For debugging in case of error. - assert isinstance(value, bytes) + assert isinstance(value, np.ndarray) + assert value.dtype == np.int8 assert space.space.contains(value) @@ -157,7 +158,7 @@ def test_bitcode_file_equivalence(env: LlvmEnv, benchmark_uri: str): with open(bitcode_file, "rb") as f: bitcode_from_file = f.read() - assert bitcode == bitcode_from_file + assert bitcode.tobytes() == bitcode_from_file finally: os.unlink(bitcode_file) @@ -1279,12 +1280,7 @@ def test_runtime_observation_space_not_runnable(env: LlvmEnv): key = "Runtime" space = env.observation.spaces[key] assert isinstance(space.space, Sequence) - - value: np.ndarray = env.observation[key] - print(value.tolist()) # For debugging in case of error. - assert isinstance(value, np.ndarray) - assert value.shape == (0,) - assert space.space.contains(value) + assert env.observation[key] is None @pytest.mark.xfail( @@ -1318,10 +1314,7 @@ def test_buildtime_observation_space_not_runnable(env: LlvmEnv): assert not space.deterministic assert space.platform_dependent - value: np.ndarray = env.observation[key] - print(value) # For debugging in case of error. - assert value.shape == (0,) - assert space.space.contains(value) + assert env.observation[key] is None def test_is_runnable_observation_space(env: LlvmEnv): diff --git a/tests/llvm/service/ActionSpaceTest.cc b/tests/llvm/service/ActionSpaceTest.cc index 19ee65296..ccaa84c94 100644 --- a/tests/llvm/service/ActionSpaceTest.cc +++ b/tests/llvm/service/ActionSpaceTest.cc @@ -18,10 +18,10 @@ TEST(ActionSpacesTest, getLlvmActionSpace) { const auto spaces = getLlvmActionSpaceList(); ASSERT_EQ(spaces.size(), 1); ASSERT_EQ(spaces[0].name(), "PassesAll"); - ASSERT_EQ(spaces[0].choice_size(), 1); - ASSERT_TRUE(spaces[0].choice(0).named_discrete_space().is_commandline()); - EXPECT_EQ(spaces[0].choice(0).named_discrete_space().value_size(), - magic_enum::enum_count()); + ASSERT_EQ(spaces[0].space().value_case(), Space::ValueCase::kAnyValue); + CommandlineSpace cmdSpace; + spaces[0].space().any_value().UnpackTo(&cmdSpace); + EXPECT_EQ(cmdSpace.name_size(), magic_enum::enum_count()); } } // anonymous namespace diff --git a/tests/service/proto/CMakeLists.txt b/tests/service/proto/CMakeLists.txt index 92f2026cf..5fbea4ec6 100644 --- a/tests/service/proto/CMakeLists.txt +++ b/tests/service/proto/CMakeLists.txt @@ -5,7 +5,7 @@ cg_add_all_subdirs() -py_test( +cg_py_test( NAME py_converters_test SRCS "py_converters_test.py" DEPS diff --git a/tests/service/proto/py_converters_test.py b/tests/service/proto/py_converters_test.py index adb15d6a4..72e63bb79 100644 --- a/tests/service/proto/py_converters_test.py +++ b/tests/service/proto/py_converters_test.py @@ -3,325 +3,907 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Unit tests for //compiler_gym:validate.""" +from collections.abc import Collection, Mapping + +import google.protobuf.any_pb2 as any_pb2 +import numpy as np import pytest -from gym.spaces import Dict, Tuple from compiler_gym.service.proto import ( - ActionSpace, - ChoiceSpace, + BooleanBox, + BooleanRange, + BooleanSequenceSpace, + BooleanTensor, + ByteBox, + ByteSequenceSpace, + BytesSequenceSpace, + ByteTensor, + CommandlineSpace, + DictEvent, + DictSpace, + DiscreteSpace, + DoubleBox, + DoubleRange, + DoubleSequenceSpace, + DoubleTensor, + Event, + FloatBox, + FloatRange, + FloatSequenceSpace, + FloatTensor, + Int64Box, + Int64Range, + Int64SequenceSpace, + Int64Tensor, + ListEvent, + ListSpace, NamedDiscreteSpace, - ScalarLimit, - ScalarRange, + Opaque, + Space, + StringSpace, + StringTensor, py_converters, ) -from compiler_gym.spaces import Commandline, Discrete, NamedDiscrete, Scalar +from compiler_gym.spaces import ( + Box, + Commandline, + Dict, + Discrete, + NamedDiscrete, + Scalar, + Sequence, + Tuple, +) from tests.test_main import main -def test_proto_to_action_space_no_choices(): - with pytest.raises(ValueError, match=r"^No choices set for ActionSpace$"): - py_converters.proto_to_action_space(ActionSpace(name="test", choice=[])) - - -def test_proto_to_action_space_empty_choice(): - with pytest.raises(ValueError, match=r'^Invalid ChoiceSpace: name: "invalid"'): - py_converters.proto_to_action_space( - ActionSpace(name="test", choice=[ChoiceSpace(name="invalid")]) - ) - - -def test_proto_to_action_space_bounded_scalar_int_choice(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="unnamed", - int64_range=ScalarRange( - min=ScalarLimit(value=-1), max=ScalarLimit(value=1) - ), - ) - ], - ) - ) - - assert isinstance(space, Scalar) - assert space.name == "test" - assert space.contains(1) - assert space.contains(0) - assert space.contains(-1) - - assert not space.contains(2) - assert not space.contains(-2) - assert not space.contains("abc") - assert not space.contains(1.5) - - action = to_action(1) - assert len(action.choice) == 1 - assert action.choice[0].int64_value == 1 - - action = to_action(0) - assert len(action.choice) == 1 - assert action.choice[0].int64_value == 0 - - with pytest.raises(TypeError): - to_action(1.5) - - with pytest.raises(TypeError): - to_action("abc") - - -def test_proto_to_action_space_discrete_choice(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="unnamed", - int64_range=ScalarRange(max=ScalarLimit(value=2)), - ) - ], - ) - ) - - assert isinstance(space, Discrete) - assert space.name == "test" - assert space.contains(1) - assert space.contains(0) - - assert not space.contains(2) - assert not space.contains(-2) - assert not space.contains("abc") - assert not space.contains(1.5) - - action = to_action(1) - assert len(action.choice) == 1 - assert action.choice[0].int64_value == 1 - - action = to_action(0) - assert len(action.choice) == 1 - assert action.choice[0].int64_value == 0 - - with pytest.raises(TypeError): - to_action(1.5) - - with pytest.raises(TypeError): - to_action("abc") - - -def test_proto_to_action_space_bounded_scalar_double_choice(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="unnamed", - double_range=ScalarRange( - min=ScalarLimit(value=-1), max=ScalarLimit(value=1) - ), - ) - ], - ) - ) - - assert isinstance(space, Scalar) - assert space.name == "test" - assert space.contains(1.0) - assert space.contains(0.0) - assert space.contains(-1.0) - - assert not space.contains(2.0) - assert not space.contains(-2.0) - assert not space.contains("abc") - assert not space.contains(1) - - action = to_action(1) - assert len(action.choice) == 1 - assert action.choice[0].double_value == 1 - - action = to_action(0.5) - assert len(action.choice) == 1 - assert action.choice[0].double_value == 0.5 - - with pytest.raises(TypeError): - to_action("abc") - - -def test_proto_to_action_space_named_discrete_choice(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="unnamed", - named_discrete_space=NamedDiscreteSpace(value=["a", "b", "c"]), - ) - ], - ) - ) - - assert isinstance(space, NamedDiscrete) - assert space.name == "test" - assert space.contains(0) - assert space.contains(1) - assert space.contains(2) - - assert not space.contains(-1) - assert not space.contains(3) - assert not space.contains("a") - assert not space.contains(1.5) - - action = to_action(1) - assert len(action.choice) == 1 - assert action.choice[0].named_discrete_value_index == 1 - - action = to_action(2) - assert len(action.choice) == 1 - assert action.choice[0].named_discrete_value_index == 2 - - with pytest.raises(TypeError): - to_action(1.5) - - with pytest.raises(TypeError): - to_action("abc") - - -def test_proto_to_action_space_commandline(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="unnamed", - named_discrete_space=NamedDiscreteSpace( - value=["a", "b", "c"], is_commandline=True - ), - ) - ], - ) - ) - - assert isinstance(space, Commandline) - assert space.name == "test" - assert space.contains(0) - assert space.contains(1) - assert space.contains(2) - - assert not space.contains(-1) - assert not space.contains(3) - assert not space.contains("a") - assert not space.contains(1.5) - - action = to_action(1) - assert len(action.choice) == 1 - assert action.choice[0].named_discrete_value_index == 1 - - action = to_action(2) - assert len(action.choice) == 1 - assert action.choice[0].named_discrete_value_index == 2 - - with pytest.raises(TypeError): - to_action(2.5) - - with pytest.raises(TypeError): - to_action("abc") - - -def test_proto_to_action_space_tuple_int_choices(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="a", - int64_range=ScalarRange( - min=ScalarLimit(value=-1), max=ScalarLimit(value=1) - ), - ), - ChoiceSpace( - name="b", - int64_range=ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=2) - ), - ), - ], - ) - ) - - assert isinstance(space, Tuple) - assert space.name == "test" - - assert len(space.spaces) == 2 - assert isinstance(space.spaces[0], Scalar) - assert isinstance(space.spaces[1], Discrete) - - assert space.contains((1, 0)) - assert space.contains((-1, 1)) - - assert not space.contains((2, 0)) - assert not space.contains((-2, 0)) - assert not space.contains(2) - assert not space.contains("abc") - assert not space.contains(1.5) - - action = to_action((1, 0)) - assert len(action.choice) == 2 - assert action.choice[0].int64_value == 1 - assert action.choice[1].int64_value == 0 - - with pytest.raises(TypeError): - to_action(1) - - with pytest.raises(TypeError): - to_action("abs") - - -def test_proto_to_action_space_dict_int_choices(): - space, to_action = py_converters.proto_to_action_space( - ActionSpace( - name="test", - choice=[ - ChoiceSpace( - name="a", - int64_range=ScalarRange( - min=ScalarLimit(value=-1), max=ScalarLimit(value=1) - ), - ), - ChoiceSpace( - name="b", - int64_range=ScalarRange( - min=ScalarLimit(value=0), max=ScalarLimit(value=2) - ), - ), - ], - named_choices=True, - ) - ) - - assert isinstance(space, Dict) - assert space.name == "test" - - assert len(space.spaces) == 2 - assert isinstance(space.spaces["a"], Scalar) - assert isinstance(space.spaces["b"], Discrete) - - assert space.contains({"a": 1, "b": 0}) - - assert not space.contains({"a": 2, "b": 0}) - assert not space.contains({"a": -2, "b": 0}) - assert not space.contains((1, 0)) - assert not space.contains("ab") - - action = to_action({"a": 1, "b": 0}) - assert len(action.choice) == 2 - assert action.choice[0].int64_value == 1 - assert action.choice[1].int64_value == 0 - - with pytest.raises(TypeError): - to_action(1) - - with pytest.raises(TypeError): - to_action("abs") +def test_convert_boolean_tensor_message_to_numpy(): + shape = [1, 2, 3] + values = [True, False, True, True, False, False] + tensor_message = BooleanTensor(shape=shape, value=values) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == bool + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_boolean_tensor_message(): + tensor = np.array([[True], [False]], dtype=bool) + tensor_message = py_converters.convert_numpy_to_boolean_tensor_message(tensor) + assert isinstance(tensor_message, BooleanTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_convert_byte_tensor_message_to_numpy(): + shape = [1, 2, 3] + values = [1, 2, 3, 4, 5, 6] + tensor_message = ByteTensor(shape=shape, value=bytes(values)) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == np.byte + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_byte_tensor_message(): + tensor = np.array([[1], [2]], dtype=np.int8) + tensor_message = py_converters.convert_numpy_to_byte_tensor_message(tensor) + assert isinstance(tensor_message, ByteTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert tensor.tobytes() == tensor_message.value + + +def test_convert_int64_tensor_message_to_numpy(): + shape = [1, 2, 3] + values = [1, 2, 3, 4, 5, 6] + tensor_message = Int64Tensor(shape=shape, value=values) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == np.int64 + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_int64_tensor_message(): + tensor = np.array([[1], [2]], dtype=np.int64) + tensor_message = py_converters.convert_numpy_to_int64_tensor_message(tensor) + assert isinstance(tensor_message, Int64Tensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_convert_float_tensor_message_to_numpy(): + shape = [1, 2, 3] + values = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] + tensor_message = FloatTensor(shape=shape, value=values) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == np.float32 + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_float_tensor_message(): + tensor = np.array([[1], [2]], dtype=np.float32) + tensor_message = py_converters.convert_numpy_to_float_tensor_message(tensor) + assert isinstance(tensor_message, FloatTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_convert_double_tensor_message_to_numpy(): + shape = [1, 2, 3] + values = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] + tensor_message = DoubleTensor(shape=shape, value=values) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == np.float64 + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_double_tensor_message(): + tensor = np.array([[1], [2]], dtype=float) + tensor_message = py_converters.convert_numpy_to_double_tensor_message(tensor) + assert isinstance(tensor_message, DoubleTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_convert_string_tensor_message_to_numpy(): + shape = [1, 2] + values = ["a", "b"] + tensor_message = StringTensor(shape=shape, value=values) + np_array = py_converters.convert_tensor_message_to_numpy(tensor_message) + assert np_array.dtype == object + assert np.array_equal(np_array.shape, shape) + flat_np_array = np_array.flatten() + assert np.array_equal(flat_np_array, values) + + +def test_convert_numpy_to_string_tensor_message(): + tensor = np.array([["a"], ["b"]], dtype=object) + tensor_message = py_converters.convert_numpy_to_string_tensor_message(tensor) + assert isinstance(tensor_message, StringTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_numpy_to_tensor_message_converter(): + converter = py_converters.NumpyToTensorMessageConverter() + tensor = np.array([[1], [2]], dtype=float) + tensor_message = converter(tensor) + assert isinstance(tensor_message, DoubleTensor) + assert np.array_equal(tensor.shape, tensor_message.shape) + assert np.array_equal(tensor.flatten(), tensor_message.value) + + +def test_type_based_converter(): + converter = py_converters.TypeBasedConverter( + conversion_map={FloatTensor: py_converters.convert_tensor_message_to_numpy} + ) + tensor_message = FloatTensor(shape=[1], value=[1]) + numpy_array = converter(tensor_message) + assert isinstance(numpy_array, np.ndarray) + + +def test_event_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={FloatTensor: py_converters.convert_tensor_message_to_numpy} + ) + event_converter = py_converters.EventMessageConverter(message_converter) + tensor_message = FloatTensor(shape=[1], value=[1]) + event_message = Event(float_tensor=tensor_message) + numpy_array = event_converter(event_message) + assert isinstance(numpy_array, np.ndarray) + + +def test_list_event_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={FloatTensor: py_converters.convert_tensor_message_to_numpy} + ) + event_converter = py_converters.EventMessageConverter(message_converter) + list_converter = py_converters.ListEventMessageConverter(event_converter) + tensor_message = FloatTensor(shape=[1], value=[1]) + event_message = Event(float_tensor=tensor_message) + list_message = ListEvent(event=[event_message]) + converted_list = list_converter(list_message) + assert isinstance(converted_list, Collection) + assert len(converted_list) == 1 + assert isinstance(converted_list[0], np.ndarray) + + +def test_to_list_event_message_converter(): + converter = py_converters.TypeBasedConverter( + conversion_map={int: lambda x: Event(int64_value=x)} + ) + list_converter = py_converters.ToListEventMessageConverter(converter) + original_list = [1, 2] + converted_list = list_converter(original_list) + assert isinstance(converted_list, ListEvent) + assert len(converted_list.event) == len(original_list) + assert converted_list.event[0].int64_value == original_list[0] + assert converted_list.event[1].int64_value == original_list[1] + + +def test_to_dict_event_message_converter(): + converter = py_converters.TypeBasedConverter( + conversion_map={int: lambda x: Event(int64_value=x)} + ) + dict_converter = py_converters.ToDictEventMessageConverter(converter) + original_dict = {"a": 1} + converted_dict = dict_converter(original_dict) + assert isinstance(converted_dict, DictEvent) + assert len(converted_dict.event) == len(original_dict) + assert converted_dict.event["a"].int64_value == original_dict["a"] + + +def test_dict_event_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={FloatTensor: py_converters.convert_tensor_message_to_numpy} + ) + event_converter = py_converters.EventMessageConverter(message_converter) + dict_converter = py_converters.DictEventMessageConverter(event_converter) + tensor_message = FloatTensor(shape=[1], value=[1]) + event_message = Event(float_tensor=tensor_message) + dict_message = DictEvent(event={"event_message_key": event_message}) + converted_list = dict_converter(dict_message) + assert isinstance(converted_list, Mapping) + assert len(converted_list) == 1 + assert "event_message_key" in converted_list + assert isinstance(converted_list["event_message_key"], np.ndarray) + + +def test_protobuf_any_unpacker(): + unpacker = py_converters.ProtobufAnyUnpacker( + {"compiler_gym.FloatTensor": FloatTensor} + ) + any_msg = any_pb2.Any() + tensor_message = FloatTensor(shape=[1], value=[1]) + any_msg.Pack(tensor_message) + unpacked_tensor_message = unpacker(any_msg) + assert tensor_message == unpacked_tensor_message + + +def test_protobuf_any_unpacker_value_error(): + unpacker = py_converters.ProtobufAnyUnpacker( + {"IntentionallyWrongType": FloatTensor} + ) + any_msg = any_pb2.Any() + tensor_message = FloatTensor(shape=[1], value=[1]) + any_msg.Pack(tensor_message) + any_msg.type_url = "IntentionallyWrongType" + with pytest.raises(ValueError): + unpacker(any_msg) + + +def test_protobuf_any_converter(): + unpacker = py_converters.ProtobufAnyUnpacker( + {"compiler_gym.FloatTensor": FloatTensor} + ) + type_based_converter = py_converters.TypeBasedConverter( + conversion_map={FloatTensor: py_converters.convert_tensor_message_to_numpy} + ) + converter = py_converters.ProtobufAnyConverter( + unpacker=unpacker, message_converter=type_based_converter + ) + any_msg = any_pb2.Any() + tensor_message = FloatTensor(shape=[1], value=[1]) + any_msg.Pack(tensor_message) + tensor = converter(any_msg) + assert isinstance(tensor, np.ndarray) + + +def test_message_default_converter(): + value = 5 + converter = py_converters.make_message_default_converter() + message = Event(int64_value=value) + converted = converter(message) + assert type(converted) == int + assert value == converted + + +def test_to_event_message_default_converter(): + converter = py_converters.to_event_message_default_converter() + val = [{"a": 1}] + converted_val = converter(val) + assert isinstance(converted_val, Event) + assert isinstance(converted_val.event_list, ListEvent) + assert len(converted_val.event_list.event) == 1 + assert isinstance(converted_val.event_list.event[0], Event) + assert isinstance(converted_val.event_list.event[0].event_dict, DictEvent) + assert ( + converted_val.event_list.event[0].event_dict.event["a"].int64_value + == val[0]["a"] + ) + + +def test_convert_boolean_range_message(): + range = BooleanRange(min=False, max=True) + converted_range = py_converters.convert_range_message(range) + assert converted_range.dtype == bool + assert converted_range.min == range.min + assert converted_range.max == range.max + + range_default = BooleanRange() + converted_range_default = py_converters.convert_range_message(range_default) + assert converted_range_default.min == False # noqa: E712 + assert converted_range_default.max == True # noqa: E712 + + +def test_convert_to_boolean_range_message(): + scalar = Scalar(min=False, max=True, dtype=bool, name=None) + range = py_converters.convert_to_range_message(scalar) + assert isinstance(range, BooleanRange) + assert range.min == scalar.min + assert range.max == scalar.max + + +def test_convert_int64_range_message(): + range = Int64Range(min=2, max=3) + converted_range = py_converters.convert_range_message(range) + assert converted_range.dtype == np.int64 + assert converted_range.min == range.min + assert converted_range.max == range.max + + range_default = Int64Range() + converted_range_default = py_converters.convert_range_message(range_default) + assert converted_range_default.min == np.iinfo(np.int64).min + assert converted_range_default.max == np.iinfo(np.int64).max + + +def test_convert_to_int64_range_message(): + scalar = Scalar(min=2, max=3, dtype=np.int64, name=None) + range = py_converters.convert_to_range_message(scalar) + assert isinstance(range, Int64Range) + assert range.min == 2 + assert range.max == 3 + + +def test_convert_float_range_message(): + range = FloatRange(min=2, max=3) + converted_range = py_converters.convert_range_message(range) + assert converted_range.dtype == np.float32 + assert converted_range.min == range.min + assert converted_range.max == range.max + + range_default = DoubleRange() + converted_range_default = py_converters.convert_range_message(range_default) + assert np.isneginf(converted_range_default.min) + assert np.isposinf(converted_range_default.max) + + +def test_convert_to_float_range_message(): + scalar = Scalar(min=2, max=3, dtype=np.float32, name=None) + range = py_converters.convert_to_range_message(scalar) + assert isinstance(range, FloatRange) + assert range.min == 2 + assert range.max == 3 + + +def test_convert_double_range_message(): + range = DoubleRange(min=2, max=3) + converted_range = py_converters.convert_range_message(range) + assert converted_range.dtype == float + assert converted_range.min == range.min + assert converted_range.max == range.max + + range_default = DoubleRange() + converted_range_default = py_converters.convert_range_message(range_default) + assert np.isneginf(converted_range_default.min) + assert np.isposinf(converted_range_default.max) + + +def test_convert_to_double_range_message(): + scalar = Scalar(min=2, max=3, dtype=np.float64, name=None) + range = py_converters.convert_to_range_message(scalar) + assert isinstance(range, DoubleRange) + assert range.min == 2 + assert range.max == 3 + + +def test_convert_boolean_box_message(): + box = BooleanBox( + low=BooleanTensor(value=[1, 2], shape=[1, 2]), + high=BooleanTensor(value=[2, 3], shape=[1, 2]), + ) + converted_box = py_converters.convert_box_message(box) + assert isinstance(converted_box, Box) + assert converted_box.dtype == bool + assert np.array_equal(box.low.shape, converted_box.shape) + assert np.array_equal(box.high.shape, converted_box.shape) + assert np.array_equal(box.low.value, converted_box.low.flatten()) + assert np.array_equal(box.high.value, converted_box.high.flatten()) + + +def test_convert_to_boolean_box_message(): + box = Box( + low=np.array([[False], [True]]), + high=np.array([[False], [True]]), + name=None, + dtype=bool, + ) + converted_box = py_converters.convert_to_box_message(box) + assert isinstance(converted_box, BooleanBox) + assert isinstance(converted_box.low, BooleanTensor) + assert np.array_equal(converted_box.low.shape, box.shape) + assert np.array_equal(converted_box.low.value, box.low.flatten()) + assert isinstance(converted_box.high, BooleanTensor) + assert np.array_equal(converted_box.high.shape, box.shape) + assert np.array_equal(converted_box.high.value, box.high.flatten()) + + +def test_convert_byte_box_message(): + box = ByteBox( + low=ByteTensor(value=bytes([1, 2]), shape=[1, 2]), + high=ByteTensor(value=bytes([2, 3]), shape=[1, 2]), + ) + converted_box = py_converters.convert_box_message(box) + assert isinstance(converted_box, Box) + assert converted_box.dtype == np.int8 + assert np.array_equal(box.low.shape, converted_box.shape) + assert np.array_equal(box.high.shape, converted_box.shape) + assert np.array_equal(box.low.value, bytes(converted_box.low.flatten())) + assert np.array_equal(box.high.value, bytes(converted_box.high.flatten())) + + +def test_convert_to_byte_box_message(): + box = Box( + low=np.array([[1], [2]]), high=np.array([[3], [4]]), name=None, dtype=np.int8 + ) + converted_box = py_converters.convert_to_box_message(box) + assert isinstance(converted_box, ByteBox) + assert isinstance(converted_box.low, ByteTensor) + assert np.array_equal(converted_box.low.shape, box.shape) + assert np.array_equal( + np.frombuffer(converted_box.low.value, dtype=np.int8), box.low.flatten() + ) + assert isinstance(converted_box.high, ByteTensor) + assert np.array_equal(converted_box.high.shape, box.shape) + assert np.array_equal( + np.frombuffer(converted_box.high.value, dtype=np.int8), box.high.flatten() + ) + + +def test_convert_int64_box_message(): + box = Int64Box( + low=Int64Tensor(value=[1, 2], shape=[1, 2]), + high=Int64Tensor(value=[2, 3], shape=[1, 2]), + ) + converted_box = py_converters.convert_box_message(box) + assert isinstance(converted_box, Box) + assert converted_box.dtype == np.int64 + assert np.array_equal(box.low.shape, converted_box.shape) + assert np.array_equal(box.high.shape, converted_box.shape) + assert np.array_equal(box.low.value, converted_box.low.flatten()) + assert np.array_equal(box.high.value, converted_box.high.flatten()) + + +def test_convert_to_int64_box_message(): + box = Box( + low=np.array([[1], [2]]), high=np.array([[3], [4]]), name=None, dtype=np.int64 + ) + converted_box = py_converters.convert_to_box_message(box) + assert isinstance(converted_box, Int64Box) + assert isinstance(converted_box.low, Int64Tensor) + assert np.array_equal(converted_box.low.shape, box.shape) + assert np.array_equal(converted_box.low.value, box.low.flatten()) + assert isinstance(converted_box.high, Int64Tensor) + assert np.array_equal(converted_box.high.shape, box.shape) + assert np.array_equal(converted_box.high.value, box.high.flatten()) + + +def test_convert_float_box_message(): + box = FloatBox( + low=FloatTensor(value=[1, 2], shape=[1, 2]), + high=FloatTensor(value=[2, 3], shape=[1, 2]), + ) + converted_box = py_converters.convert_box_message(box) + assert isinstance(converted_box, Box) + assert converted_box.dtype == np.float32 + assert np.array_equal(box.low.shape, converted_box.shape) + assert np.array_equal(box.high.shape, converted_box.shape) + assert np.array_equal(box.low.value, converted_box.low.flatten()) + assert np.array_equal(box.high.value, converted_box.high.flatten()) + + +def test_convert_to_float_box_message(): + box = Box( + low=np.array([[1], [2]], dtype=np.float32), + high=np.array([[3], [4]], dtype=np.float32), + name=None, + dtype=np.float32, + ) + converted_box = py_converters.convert_to_box_message(box) + assert isinstance(converted_box, FloatBox) + assert isinstance(converted_box.low, FloatTensor) + assert np.array_equal(converted_box.low.shape, box.shape) + assert np.array_equal(converted_box.low.value, box.low.flatten()) + assert isinstance(converted_box.high, FloatTensor) + assert np.array_equal(converted_box.high.shape, box.shape) + assert np.array_equal(converted_box.high.value, box.high.flatten()) + + +def test_convert_double_box_message(): + box = DoubleBox( + low=DoubleTensor(value=[1, 2], shape=[1, 2]), + high=DoubleTensor(value=[2, 3], shape=[1, 2]), + ) + converted_box = py_converters.convert_box_message(box) + assert isinstance(converted_box, Box) + assert converted_box.dtype == float + assert np.array_equal(box.low.shape, converted_box.shape) + assert np.array_equal(box.high.shape, converted_box.shape) + assert np.array_equal(box.low.value, converted_box.low.flatten()) + assert np.array_equal(box.high.value, converted_box.high.flatten()) + + +def test_convert_to_double_box_message(): + box = Box( + low=np.array([[1.0], [2.0]]), + high=np.array([[3.0], [4.0]]), + name=None, + dtype=np.float64, + ) + converted_box = py_converters.convert_to_box_message(box) + assert isinstance(converted_box, DoubleBox) + assert isinstance(converted_box.low, DoubleTensor) + assert np.array_equal(converted_box.low.shape, box.shape) + assert np.array_equal(converted_box.low.value, box.low.flatten()) + assert isinstance(converted_box.high, DoubleTensor) + assert np.array_equal(converted_box.high.shape, box.shape) + assert np.array_equal(converted_box.high.value, box.high.flatten()) + + +def test_convert_discrete_space_message(): + message = DiscreteSpace(n=5) + converted_message = py_converters.convert_discrete_space_message(message) + assert message.n == converted_message.n + + +def test_convert_to_discrete_space_message(): + space = Discrete(name=None, n=5) + converted_space = py_converters.convert_to_discrete_space_message(space) + assert isinstance(converted_space, DiscreteSpace) + assert converted_space.n == 5 + + +def test_convert_to_named_discrete_space_message(): + space = NamedDiscrete(name=None, items=["a", "b"]) + converted_space = py_converters.convert_to_named_discrete_space_message(space) + assert isinstance(converted_space, NamedDiscreteSpace) + assert np.array_equal(space.names, converted_space.name) + + +def test_convert_named_discrete_space_message(): + message = NamedDiscreteSpace(name=["a", "b", "c"]) + converted_message = py_converters.convert_named_discrete_space_message(message) + assert isinstance(converted_message, NamedDiscrete) + assert np.array_equal(message.name, converted_message.names) + + +def test_convert_commandline_space_message(): + message = CommandlineSpace(name=["a", "b", "c"]) + converted_message = py_converters.convert_commandline_space_message(message) + assert isinstance(converted_message, Commandline) + assert np.array_equal(message.name, converted_message.names) + + +def test_convert_boolean_sequence_space(): + seq = BooleanSequenceSpace( + length_range=Int64Range(min=1, max=2), + scalar_range=BooleanRange(min=True, max=False), + ) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == bool + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + assert isinstance(converted_seq.scalar_range, Scalar) + assert converted_seq.scalar_range.min == True # noqa: E712 + assert converted_seq.scalar_range.max == False # noqa: E712 + + +def test_convert_to_boolean_sequence_space(): + seq = Sequence( + name=None, + dtype=bool, + size_range=(1, 2), + scalar_range=Scalar(name=None, min=True, max=False, dtype=bool), + ) + converted_seq = py_converters.convert_to_ranged_sequence_space(seq) + assert isinstance(converted_seq, BooleanSequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + assert isinstance(converted_seq.scalar_range, BooleanRange) + assert converted_seq.scalar_range.min == True # noqa: E712 + assert converted_seq.scalar_range.max == False # noqa: E712 + + +def test_convert_bytes_sequence_space(): + seq = BytesSequenceSpace(length_range=Int64Range(min=1, max=2)) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == bytes + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + + +def test_convert_to_bytes_sequence_space(): + seq = Sequence(name=None, dtype=bytes, size_range=(1, 2)) + converted_seq = py_converters.convert_to_bytes_sequence_space(seq) + assert isinstance(converted_seq, BytesSequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + + +def test_convert_byte_sequence_space(): + seq = ByteSequenceSpace( + length_range=Int64Range(min=1, max=2), scalar_range=Int64Range(min=3, max=4) + ) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == np.int8 + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + assert isinstance(converted_seq.scalar_range, Scalar) + assert converted_seq.scalar_range.min == 3 + assert converted_seq.scalar_range.max == 4 + + +def test_convert_to_byte_sequence_space(): + seq = Sequence( + name=None, + dtype=np.int8, + size_range=(1, 2), + scalar_range=Scalar(name=None, min=4, max=5, dtype=np.int8), + ) + converted_seq = py_converters.convert_to_ranged_sequence_space(seq) + assert isinstance(converted_seq, ByteSequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + assert isinstance(converted_seq.scalar_range, Int64Range) + assert converted_seq.scalar_range.min == 4 + assert converted_seq.scalar_range.max == 5 + + +def test_convert_int64_sequence_space(): + seq = Int64SequenceSpace( + length_range=Int64Range(min=1, max=2), scalar_range=Int64Range(min=3, max=4) + ) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == np.int64 + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + assert isinstance(converted_seq.scalar_range, Scalar) + assert converted_seq.scalar_range.min == 3 + assert converted_seq.scalar_range.max == 4 + + +def test_convert_to_int64_sequence_space(): + seq = Sequence( + name=None, + dtype=np.int64, + size_range=(1, 2), + scalar_range=Scalar(name=None, min=4, max=5, dtype=np.int64), + ) + converted_seq = py_converters.convert_to_ranged_sequence_space(seq) + assert isinstance(converted_seq, Int64SequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + assert isinstance(converted_seq.scalar_range, Int64Range) + assert converted_seq.scalar_range.min == 4 + assert converted_seq.scalar_range.max == 5 + + +def test_convert_float_sequence_space(): + seq = FloatSequenceSpace( + length_range=Int64Range(min=1, max=2), scalar_range=FloatRange(min=3.1, max=4) + ) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == np.float32 + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + assert isinstance(converted_seq.scalar_range, Scalar) + assert np.isclose(converted_seq.scalar_range.min, 3.1) + assert converted_seq.scalar_range.max == 4 + + +def test_convert_to_float_sequence_space(): + seq = Sequence( + name=None, + dtype=np.float32, + size_range=(1, 2), + scalar_range=Scalar(name=None, min=4, max=5, dtype=np.float32), + ) + converted_seq = py_converters.convert_to_ranged_sequence_space(seq) + assert isinstance(converted_seq, FloatSequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + assert isinstance(converted_seq.scalar_range, FloatRange) + assert np.isclose(converted_seq.scalar_range.min, 4) + assert np.isclose(converted_seq.scalar_range.max, 5) + + +def test_convert_double_sequence_space(): + seq = DoubleSequenceSpace( + length_range=Int64Range(min=1, max=2), scalar_range=DoubleRange(min=3.1, max=4) + ) + converted_seq = py_converters.convert_sequence_space(seq) + assert isinstance(converted_seq, Sequence) + assert converted_seq.dtype == float + assert converted_seq.size_range[0] == 1 + assert converted_seq.size_range[1] == 2 + assert isinstance(converted_seq.scalar_range, Scalar) + assert converted_seq.scalar_range.min == 3.1 + assert converted_seq.scalar_range.max == 4 + + +def test_convert_to_double_sequence_space(): + seq = Sequence( + name=None, + dtype=np.float64, + size_range=(1, 2), + scalar_range=Scalar(name=None, min=4.0, max=5.0, dtype=np.float64), + ) + converted_seq = py_converters.convert_to_ranged_sequence_space(seq) + assert isinstance(converted_seq, DoubleSequenceSpace) + assert converted_seq.length_range.min == 1 + assert converted_seq.length_range.max == 2 + assert isinstance(converted_seq.scalar_range, DoubleRange) + assert converted_seq.scalar_range.min == 4.0 + assert converted_seq.scalar_range.max == 5.0 + + +def test_convert_string_space(): + space = StringSpace(length_range=Int64Range(min=1, max=2)) + converted_space = py_converters.convert_sequence_space(space) + assert isinstance(converted_space, Sequence) + assert converted_space.dtype == str + assert converted_space.size_range[0] == 1 + assert converted_space.size_range[1] == 2 + + +def test_convert_to_string_space(): + space = Sequence(name=None, size_range=(1, 2), dtype=str) + converted_space = py_converters.convert_to_string_space(space) + assert isinstance(converted_space, StringSpace) + assert converted_space.length_range.min == 1 + assert converted_space.length_range.max == 2 + + +def test_space_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={StringSpace: py_converters.convert_sequence_space} + ) + space_converter = py_converters.SpaceMessageConverter(message_converter) + val = StringSpace(length_range=Int64Range(min=1, max=2)) + space_message = Space(string_value=val) + converted_space = space_converter(space_message) + assert isinstance(converted_space, Sequence) + assert converted_space.dtype == str + assert converted_space.size_range[0] == 1 + assert converted_space.size_range[1] == 2 + + +def test_list_space_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={StringSpace: py_converters.convert_sequence_space} + ) + space_converter = py_converters.SpaceMessageConverter(message_converter) + list_converter = py_converters.ListSpaceMessageConverter(space_converter) + space_message = ListSpace( + space=[ + Space( + string_value=StringSpace(length_range=Int64Range(min=1, max=2)), + ) + ] + ) + converted_space = list_converter(space_message) + assert isinstance(converted_space, Tuple) + assert len(converted_space.spaces) == 1 + assert converted_space.spaces[0].dtype == str + assert converted_space.spaces[0].size_range[0] == 1 + assert converted_space.spaces[0].size_range[1] == 2 + + +def test_tuple_to_list_space_message_converter(): + to_message_converter = py_converters.TypeBasedConverter( + conversion_map={Discrete: py_converters.convert_to_discrete_space_message} + ) + to_space_converter = py_converters.ToSpaceMessageConverter(to_message_converter) + to_list_converter = py_converters.ToListSpaceMessageConverter(to_space_converter) + space = Tuple(name=None, spaces=[Discrete(name=None, n=5)]) + converted_space = to_list_converter(space) + assert isinstance(converted_space, ListSpace) + assert len(converted_space.space) == 1 + assert isinstance(converted_space.space[0], Space) + assert hasattr(converted_space.space[0], "discrete") + assert converted_space.space[0].discrete.n == 5 + + +def test_to_list_space_message_converter(): + to_message_converter = py_converters.TypeBasedConverter( + conversion_map={Discrete: py_converters.convert_to_discrete_space_message} + ) + to_space_converter = py_converters.ToSpaceMessageConverter(to_message_converter) + to_list_converter = py_converters.ToListSpaceMessageConverter(to_space_converter) + space = Tuple(name=None, spaces=[Discrete(name=None, n=5)]) + converted_space = to_list_converter(space) + assert isinstance(converted_space, ListSpace) + assert len(converted_space.space) == 1 + assert isinstance(converted_space.space[0], Space) + assert hasattr(converted_space.space[0], "discrete") + assert converted_space.space[0].discrete.n == 5 + + +def test_dict_space_message_converter(): + message_converter = py_converters.TypeBasedConverter( + conversion_map={StringSpace: py_converters.convert_sequence_space} + ) + space_converter = py_converters.SpaceMessageConverter(message_converter) + dict_converter = py_converters.DictSpaceMessageConverter(space_converter) + space_message = DictSpace( + space={ + "key": Space( + string_value=StringSpace(length_range=Int64Range(min=1, max=2)), + ) + } + ) + converted_space = dict_converter(space_message) + assert isinstance(converted_space, Dict) + assert len(converted_space.spaces) == 1 + assert "key" in converted_space.spaces + assert converted_space.spaces["key"].dtype == str + assert converted_space.spaces["key"].size_range[0] == 1 + assert converted_space.spaces["key"].size_range[1] == 2 + + +def test_to_dict_space_message_converter(): + to_message_converter = py_converters.TypeBasedConverter( + conversion_map={Discrete: py_converters.convert_to_discrete_space_message} + ) + to_space_converter = py_converters.ToSpaceMessageConverter(to_message_converter) + to_dict_converter = py_converters.ToDictSpaceMessageConverter(to_space_converter) + space = Dict(name=None, spaces={"key": Discrete(name=None, n=5)}) + converted_space = to_dict_converter(space) + assert isinstance(converted_space, DictSpace) + assert len(converted_space.space) == 1 + assert "key" in converted_space.space + assert isinstance(converted_space.space["key"], Space) + assert hasattr(converted_space.space["key"], "discrete") + assert converted_space.space["key"].discrete.n == 5 + + +def test_to_space_message_default_converter(): + space = Tuple( + name=None, + spaces=[ + Dict( + name=None, + spaces={"key": Box(name=None, low=0, high=1, shape=[1, 2])}, + ) + ], + ) + converted_space = py_converters.to_space_message_default_converter()(space) + assert isinstance(converted_space, Space) + assert isinstance( + converted_space.space_list.space[0].space_dict.space["key"].float_box, + FloatBox, + ) + + +def test_opaque_json_message_converter(): + message = Opaque(format="json://", data='{"key": "val"}'.encode("utf-8")) + converted_message = py_converters.message_default_converter(message) + assert isinstance(converted_message, Mapping) + assert len(converted_message) == 1 + assert "key" in converted_message + assert converted_message["key"] == "val" if __name__ == "__main__": diff --git a/tests/views/observation_test.py b/tests/views/observation_test.py index 6658f2cb4..2d73e27d9 100644 --- a/tests/views/observation_test.py +++ b/tests/views/observation_test.py @@ -8,10 +8,14 @@ from compiler_gym.service.connection import ServiceError from compiler_gym.service.proto import ( + DoubleBox, + DoubleTensor, + Int64Box, + Int64Range, + Int64Tensor, ObservationSpace, - ScalarLimit, - ScalarRange, - ScalarRangeList, + Space, + StringSpace, ) from compiler_gym.views import ObservationView from tests.test_main import main @@ -44,34 +48,29 @@ def test_observed_value_types(): spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(string_value=StringSpace(length_range=Int64Range(min=0))), ), ObservationSpace( name="features", - int64_range_list=ScalarRangeList( - range=[ - ScalarRange( - min=ScalarLimit(value=-100), max=ScalarLimit(value=100) - ), - ScalarRange( - min=ScalarLimit(value=-100), max=ScalarLimit(value=100) - ), - ] + space=Space( + int64_box=Int64Box( + low=Int64Tensor(shape=[2], value=[-100, -100]), + high=Int64Tensor(shape=[2], value=[100, 100]), + ), ), ), ObservationSpace( name="dfeat", - double_range_list=ScalarRangeList( - range=[ - ScalarRange(min=ScalarLimit(value=0.5), max=ScalarLimit(value=2.5)) - ] + space=Space( + double_box=DoubleBox( + low=DoubleTensor(shape=[1], value=[0.5]), + high=DoubleTensor(shape=[1], value=[2.5]), + ), ), ), ObservationSpace( name="binary", - binary_size_range=ScalarRange( - min=ScalarLimit(value=5), max=ScalarLimit(value=5) - ), + space=Space(int64_value=Int64Range(min=5, max=5)), ), ] mock = MockRawStep( @@ -139,7 +138,7 @@ def failing_raw_step(*args, **kwargs): spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(int64_value=Int64Range(min=0)), ) ] @@ -172,7 +171,7 @@ def failing_raw_step(*args, **kwargs): spaces = [ ObservationSpace( name="ir", - string_size_range=ScalarRange(min=ScalarLimit(value=0)), + space=Space(int64_value=Int64Range(min=0)), ) ] From 5f90f2b84992908c118613abb0666df079cf3656 Mon Sep 17 00:00:00 2001 From: Zeyi Wang Date: Fri, 4 Feb 2022 20:52:49 -0700 Subject: [PATCH 031/239] Update statistics.py #562 --- compiler_gym/util/statistics.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler_gym/util/statistics.py b/compiler_gym/util/statistics.py index c7d17e35c..066543746 100644 --- a/compiler_gym/util/statistics.py +++ b/compiler_gym/util/statistics.py @@ -5,9 +5,9 @@ import numpy as np -def geometric_mean(iterable): +def geometric_mean(array_like): """Zero-length-safe geometric mean.""" - values = np.asarray(iterable) + values = np.asarray(array_like) if not values.size: return 0 # Shortcut to return 0 when any element of the input is not positive. @@ -17,17 +17,17 @@ def geometric_mean(iterable): return np.exp(a.sum() / len(a)) -def arithmetic_mean(iterable): +def arithmetic_mean(array_like): """Zero-length-safe arithmetic mean.""" - values = np.asarray(iterable) + values = np.asarray(array_like) if not values.size: return 0 return values.mean() -def stdev(iterable): +def stdev(array_like): """Zero-length-safe standard deviation.""" - values = np.asarray(iterable) + values = np.asarray(array_like) if not values.size: return 0 return values.std() From 70e7ded54fcf40a57ba9f51ace23e6f1d8c4caef Mon Sep 17 00:00:00 2001 From: Parth Chadha Date: Sun, 6 Feb 2022 14:49:54 -0500 Subject: [PATCH 032/239] Rename id attribute for rewards to name such that it's consistent with other classes --- compiler_gym/bin/manual_env.py | 2 +- compiler_gym/bin/validate.py | 2 +- compiler_gym/envs/compiler_env.py | 4 ++-- compiler_gym/envs/gcc/gcc_rewards.py | 4 ++-- compiler_gym/envs/llvm/llvm_env.py | 16 +++++++-------- compiler_gym/envs/loop_tool/__init__.py | 2 +- compiler_gym/leaderboard/llvm_instcount.py | 2 +- compiler_gym/random_search.py | 2 +- compiler_gym/spaces/reward.py | 20 +++++++++---------- compiler_gym/views/reward.py | 10 +++++----- compiler_gym/wrappers/llvm.py | 2 +- .../example_compiler_gym_service/__init__.py | 2 +- .../demo_without_bazel.py | 2 +- .../example_unrolling_service/__init__.py | 4 ++-- .../example_without_bazel.py | 4 ++-- .../loop_optimizations_service/__init__.py | 4 ++-- .../example_without_bazel.py | 4 ++-- tests/compiler_env_test.py | 2 +- tests/llvm/reward_spaces_test.py | 2 +- tests/views/reward_test.py | 14 ++++++------- tests/wrappers/core_wrappers_test.py | 4 ++-- tests/wrappers/llvm_test.py | 2 +- 22 files changed, 54 insertions(+), 56 deletions(-) diff --git a/compiler_gym/bin/manual_env.py b/compiler_gym/bin/manual_env.py index ffb72dee7..d90a689ed 100644 --- a/compiler_gym/bin/manual_env.py +++ b/compiler_gym/bin/manual_env.py @@ -684,7 +684,7 @@ def do_reward(self, arg): Tab completion will be used if available. """ if arg == "" and self.env.reward_space: - arg = self.env.reward_space.id + arg = self.env.reward_space.name if self.rewards.count(arg): with Timer(f"Reward {arg}"): diff --git a/compiler_gym/bin/validate.py b/compiler_gym/bin/validate.py index 131158172..94612324c 100644 --- a/compiler_gym/bin/validate.py +++ b/compiler_gym/bin/validate.py @@ -169,7 +169,7 @@ def reward_aggregation(a): ) if env.reward_space: - reward_name = f"{reward_aggregation_name} {env.reward_space.id}" + reward_name = f"{reward_aggregation_name} {env.reward_space.name}" else: reward_name = "" diff --git a/compiler_gym/envs/compiler_env.py b/compiler_gym/envs/compiler_env.py index 2c72d26cc..e500367c1 100644 --- a/compiler_gym/envs/compiler_env.py +++ b/compiler_gym/envs/compiler_env.py @@ -485,7 +485,7 @@ def reward_space(self) -> Optional[Reward]: def reward_space(self, reward_space: Optional[Union[str, Reward]]) -> None: # Coerce the observation space into a string. reward_space: Optional[str] = ( - reward_space.id if isinstance(reward_space, Reward) else reward_space + reward_space.name if isinstance(reward_space, Reward) else reward_space ) if reward_space: @@ -633,7 +633,7 @@ def fork(self) -> "CompilerEnv": if self.observation_space: new_env.observation_space = self.observation_space_spec.id if self.reward_space: - new_env.reward_space = self.reward_space.id + new_env.reward_space = self.reward_space.name # Copy over the mutable episode state. new_env.episode_reward = self.episode_reward diff --git a/compiler_gym/envs/gcc/gcc_rewards.py b/compiler_gym/envs/gcc/gcc_rewards.py index ebc361ab6..cf4ff0a46 100644 --- a/compiler_gym/envs/gcc/gcc_rewards.py +++ b/compiler_gym/envs/gcc/gcc_rewards.py @@ -12,7 +12,7 @@ class AsmSizeReward(Reward): def __init__(self): super().__init__( - id="asm_size", + name="asm_size", observation_spaces=["asm_size"], default_value=0, default_negates_returns=True, @@ -43,7 +43,7 @@ class ObjSizeReward(Reward): def __init__(self): super().__init__( - id="obj_size", + name="obj_size", observation_spaces=["obj_size"], default_value=0, default_negates_returns=True, diff --git a/compiler_gym/envs/llvm/llvm_env.py b/compiler_gym/envs/llvm/llvm_env.py index a8bf29878..e9504520f 100644 --- a/compiler_gym/envs/llvm/llvm_env.py +++ b/compiler_gym/envs/llvm/llvm_env.py @@ -77,7 +77,7 @@ def __init__( datasets=_get_llvm_datasets(site_data_base=datasets_site_path), rewards=[ CostFunctionReward( - id="IrInstructionCount", + name="IrInstructionCount", cost_function="IrInstructionCount", init_cost_function="IrInstructionCountO0", default_negates_returns=True, @@ -85,7 +85,7 @@ def __init__( platform_dependent=False, ), NormalizedReward( - id="IrInstructionCountNorm", + name="IrInstructionCountNorm", cost_function="IrInstructionCount", init_cost_function="IrInstructionCountO0", max=1, @@ -94,7 +94,7 @@ def __init__( platform_dependent=False, ), BaselineImprovementNormalizedReward( - id="IrInstructionCountO3", + name="IrInstructionCountO3", cost_function="IrInstructionCount", baseline_cost_function="IrInstructionCountO3", init_cost_function="IrInstructionCountO0", @@ -104,7 +104,7 @@ def __init__( platform_dependent=False, ), BaselineImprovementNormalizedReward( - id="IrInstructionCountOz", + name="IrInstructionCountOz", cost_function="IrInstructionCount", baseline_cost_function="IrInstructionCountOz", init_cost_function="IrInstructionCountO0", @@ -114,7 +114,7 @@ def __init__( platform_dependent=False, ), CostFunctionReward( - id="ObjectTextSizeBytes", + name="ObjectTextSizeBytes", cost_function="ObjectTextSizeBytes", init_cost_function="ObjectTextSizeO0", default_negates_returns=True, @@ -122,7 +122,7 @@ def __init__( platform_dependent=True, ), NormalizedReward( - id="ObjectTextSizeNorm", + name="ObjectTextSizeNorm", cost_function="ObjectTextSizeBytes", init_cost_function="ObjectTextSizeO0", max=1, @@ -131,7 +131,7 @@ def __init__( platform_dependent=True, ), BaselineImprovementNormalizedReward( - id="ObjectTextSizeO3", + name="ObjectTextSizeO3", cost_function="ObjectTextSizeBytes", init_cost_function="ObjectTextSizeO0", baseline_cost_function="ObjectTextSizeO3", @@ -141,7 +141,7 @@ def __init__( platform_dependent=True, ), BaselineImprovementNormalizedReward( - id="ObjectTextSizeOz", + name="ObjectTextSizeOz", cost_function="ObjectTextSizeBytes", init_cost_function="ObjectTextSizeO0", baseline_cost_function="ObjectTextSizeOz", diff --git a/compiler_gym/envs/loop_tool/__init__.py b/compiler_gym/envs/loop_tool/__init__.py index 247c73f31..69532fcf4 100644 --- a/compiler_gym/envs/loop_tool/__init__.py +++ b/compiler_gym/envs/loop_tool/__init__.py @@ -25,7 +25,7 @@ class FLOPSReward(Reward): def __init__(self): super().__init__( - id="flops", + name="flops", observation_spaces=["flops"], default_value=0, default_negates_returns=True, diff --git a/compiler_gym/leaderboard/llvm_instcount.py b/compiler_gym/leaderboard/llvm_instcount.py index 9dde6eaa8..7a9c079a0 100644 --- a/compiler_gym/leaderboard/llvm_instcount.py +++ b/compiler_gym/leaderboard/llvm_instcount.py @@ -124,7 +124,7 @@ def run(self): ), "Policy changed environment benchmark" assert self.env.reward_space, "Policy unset environment reward space" assert ( - self.env.reward_space.id == "IrInstructionCountOz" + self.env.reward_space.name == "IrInstructionCountOz" ), "Policy changed environment reward space" # Override walltime in the generated state. diff --git a/compiler_gym/random_search.py b/compiler_gym/random_search.py index 7cec5c356..7b86dc7d3 100644 --- a/compiler_gym/random_search.py +++ b/compiler_gym/random_search.py @@ -163,7 +163,7 @@ def random_search( if not env.reward_space: raise ValueError("A reward space must be specified for random search") - reward_space_name = env.reward_space.id + reward_space_name = env.reward_space.name action_space_names = list(env.action_space.names) diff --git a/compiler_gym/spaces/reward.py b/compiler_gym/spaces/reward.py index 5bc85af96..a5952d193 100644 --- a/compiler_gym/spaces/reward.py +++ b/compiler_gym/spaces/reward.py @@ -27,7 +27,7 @@ class Reward(Scalar): """ __slots__ = [ - "id", + "name", "observation_spaces", "default_value", "default_negates_returns", @@ -38,9 +38,7 @@ class Reward(Scalar): def __init__( self, - # TODO(github.com/facebookresearch/CompilerGym/issues/381): Rename `id` - # to `name` for consistency with the other space classes. - id: str, + name: str, observation_spaces: Optional[List[str]] = None, default_value: RewardType = 0, min: Optional[RewardType] = None, @@ -52,7 +50,7 @@ def __init__( ): """Constructor. - :param id: The ID of the reward space. This is a unique name used to + :param name: The name of the reward space. This is a unique name used to represent the reward. :param observation_spaces: A list of observation space IDs (:class:`space.id ` values) @@ -79,12 +77,12 @@ def __init__( execution environment of the service. """ super().__init__( - name=id, + name=name, min=-np.inf if min is None else min, max=np.inf if max is None else max, dtype=np.float64, ) - self.id = id + self.name = name self.observation_spaces = observation_spaces or [] self.default_value: RewardType = default_value self.default_negates_returns: bool = default_negates_returns @@ -142,13 +140,13 @@ def range(self) -> Tuple[RewardType, RewardType]: return (self.min, self.max) def __repr__(self): - return self.id + return self.name def __eq__(self, other: Union["Reward", str]) -> bool: if isinstance(other, str): - return self.id == other + return self.name == other elif isinstance(other, Reward): - return self.id == other.id + return self.name == other.name else: return False @@ -156,7 +154,7 @@ def __eq__(self, other: Union["Reward", str]) -> bool: class DefaultRewardFromObservation(Reward): def __init__(self, observation_name: str, **kwargs): super().__init__( - observation_spaces=[observation_name], id=observation_name, **kwargs + observation_spaces=[observation_name], name=observation_name, **kwargs ) self.previous_value: Optional[ObservationType] = None diff --git a/compiler_gym/views/reward.py b/compiler_gym/views/reward.py index afe2d15cf..dc995ce04 100644 --- a/compiler_gym/views/reward.py +++ b/compiler_gym/views/reward.py @@ -75,14 +75,14 @@ def add_space(self, space: Reward) -> None: :param space: The reward space to be added. """ - if space.id in self.spaces: - warnings.warn(f"Replacing existing reward space '{space.id}'") + if space.name in self.spaces: + warnings.warn(f"Replacing existing reward space '{space.name}'") self._add_space(space) def _add_space(self, space: Reward): """Register a new space.""" - self.spaces[space.id] = space + self.spaces[space.name] = space # Bind a new method to this class that is a callback to compute the - # given reward space. E.g. if a new space is added with ID `FooBar`, + # given reward space. E.g. if a new space is added with name `FooBar`, # this reward can be computed using env.reward.FooBar(). - setattr(self, space.id, lambda: self[space.id]) + setattr(self, space.name, lambda: self[space.name]) diff --git a/compiler_gym/wrappers/llvm.py b/compiler_gym/wrappers/llvm.py index 3b2b22784..08174ed9a 100644 --- a/compiler_gym/wrappers/llvm.py +++ b/compiler_gym/wrappers/llvm.py @@ -32,7 +32,7 @@ def __init__( estimator: Callable[[Iterable[float]], float], ): super().__init__( - id="runtime", + name="runtime", observation_spaces=["Runtime"], default_value=0, min=None, diff --git a/examples/example_compiler_gym_service/__init__.py b/examples/example_compiler_gym_service/__init__.py index 3349b9867..fbf1005e5 100644 --- a/examples/example_compiler_gym_service/__init__.py +++ b/examples/example_compiler_gym_service/__init__.py @@ -28,7 +28,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, diff --git a/examples/example_compiler_gym_service/demo_without_bazel.py b/examples/example_compiler_gym_service/demo_without_bazel.py index 7d070fe1e..305c2bf22 100644 --- a/examples/example_compiler_gym_service/demo_without_bazel.py +++ b/examples/example_compiler_gym_service/demo_without_bazel.py @@ -34,7 +34,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, diff --git a/examples/example_unrolling_service/__init__.py b/examples/example_unrolling_service/__init__.py index 50c7e36ed..a6960ee78 100644 --- a/examples/example_unrolling_service/__init__.py +++ b/examples/example_unrolling_service/__init__.py @@ -33,7 +33,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, @@ -59,7 +59,7 @@ class SizeReward(Reward): def __init__(self): super().__init__( - id="size", + name="size", observation_spaces=["size"], default_value=0, default_negates_returns=True, diff --git a/examples/example_unrolling_service/example_without_bazel.py b/examples/example_unrolling_service/example_without_bazel.py index 5004f1aad..7abef8230 100644 --- a/examples/example_unrolling_service/example_without_bazel.py +++ b/examples/example_unrolling_service/example_without_bazel.py @@ -45,7 +45,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, @@ -71,7 +71,7 @@ class SizeReward(Reward): def __init__(self): super().__init__( - id="size", + name="size", observation_spaces=["size"], default_value=0, default_negates_returns=True, diff --git a/examples/loop_optimizations_service/__init__.py b/examples/loop_optimizations_service/__init__.py index 82614f995..41195cfc2 100644 --- a/examples/loop_optimizations_service/__init__.py +++ b/examples/loop_optimizations_service/__init__.py @@ -32,7 +32,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, @@ -58,7 +58,7 @@ class SizeReward(Reward): def __init__(self): super().__init__( - id="size", + name="size", observation_spaces=["size"], default_value=0, default_negates_returns=True, diff --git a/examples/loop_optimizations_service/example_without_bazel.py b/examples/loop_optimizations_service/example_without_bazel.py index e87781a2e..0dc1eac3c 100644 --- a/examples/loop_optimizations_service/example_without_bazel.py +++ b/examples/loop_optimizations_service/example_without_bazel.py @@ -43,7 +43,7 @@ class RuntimeReward(Reward): def __init__(self): super().__init__( - id="runtime", + name="runtime", observation_spaces=["runtime"], default_value=0, default_negates_returns=True, @@ -69,7 +69,7 @@ class SizeReward(Reward): def __init__(self): super().__init__( - id="size", + name="size", observation_spaces=["size"], default_value=0, default_negates_returns=True, diff --git a/tests/compiler_env_test.py b/tests/compiler_env_test.py index 41352ba6d..15845961c 100644 --- a/tests/compiler_env_test.py +++ b/tests/compiler_env_test.py @@ -116,7 +116,7 @@ def test_gym_make_kwargs(): "llvm-v0", observation_space="Autophase", reward_space="IrInstructionCount" ) as env: assert env.observation_space_spec.id == "Autophase" - assert env.reward_space.id == "IrInstructionCount" + assert env.reward_space.name == "IrInstructionCount" def test_step_session_id_not_found(env: LlvmEnv): diff --git a/tests/llvm/reward_spaces_test.py b/tests/llvm/reward_spaces_test.py index b7f5b3ddd..cde889c43 100644 --- a/tests/llvm/reward_spaces_test.py +++ b/tests/llvm/reward_spaces_test.py @@ -40,7 +40,7 @@ def test_instruction_count_reward(env: LlvmEnv): def test_reward_space(env: LlvmEnv): env.reward_space = "IrInstructionCount" - assert env.reward_space.id == "IrInstructionCount" + assert env.reward_space.name == "IrInstructionCount" env.reward_space = None assert env.reward_space is None diff --git a/tests/views/reward_test.py b/tests/views/reward_test.py index eb7e48123..efb522468 100644 --- a/tests/views/reward_test.py +++ b/tests/views/reward_test.py @@ -10,8 +10,8 @@ class MockReward: - def __init__(self, id, ret=None): - self.id = id + def __init__(self, name, ret=None): + self.name = name self.ret = list(reversed(ret or [])) self.observation_spaces = [] @@ -33,15 +33,15 @@ def test_empty_space(): def test_invalid_reward_name(): - reward = RewardView([MockReward(id="foo")], MockObservationView()) + reward = RewardView([MockReward(name="foo")], MockObservationView()) with pytest.raises(KeyError): _ = reward["invalid"] def test_reward_values(): spaces = [ - MockReward(id="codesize", ret=[-5]), - MockReward(id="runtime", ret=[10]), + MockReward(name="codesize", ret=[-5]), + MockReward(name="runtime", ret=[10]), ] reward = RewardView(spaces, MockObservationView()) @@ -54,8 +54,8 @@ def test_reward_values(): def test_reward_values_bound_methods(): spaces = [ - MockReward(id="codesize", ret=[-5]), - MockReward(id="runtime", ret=[10]), + MockReward(name="codesize", ret=[-5]), + MockReward(name="runtime", ret=[10]), ] reward = RewardView(spaces, MockObservationView()) diff --git a/tests/wrappers/core_wrappers_test.py b/tests/wrappers/core_wrappers_test.py index 8dc2a18b8..a682fe7d2 100644 --- a/tests/wrappers/core_wrappers_test.py +++ b/tests/wrappers/core_wrappers_test.py @@ -190,7 +190,7 @@ def observation(self, observation): env = MyWrapper(env) assert env.observation_space.shape == (56,) assert env.observation_space_spec.id == "Autophase" - assert env.reward_space.id == "IrInstructionCount" + assert env.reward_space.name == "IrInstructionCount" observation = env.reset() assert env.observation_space.contains(observation) @@ -210,7 +210,7 @@ def observation(self, observation): assert env.observation_space.shape == (56,) assert env.observation_space_spec.id == "Autophase" - assert env.reward_space.id == "IrInstructionCount" + assert env.reward_space.name == "IrInstructionCount" def test_wrapped_action(env: LlvmEnv): diff --git a/tests/wrappers/llvm_test.py b/tests/wrappers/llvm_test.py index 5a8cfe39a..f40a8dbaf 100644 --- a/tests/wrappers/llvm_test.py +++ b/tests/wrappers/llvm_test.py @@ -66,7 +66,7 @@ def test_reward_range_not_runnable_benchmark(env: LlvmEnv): def test_fork(env: LlvmEnv): env = RuntimePointEstimateReward(env) with env.fork() as fkd: - assert fkd.reward_space_spec.id == "runtime" + assert fkd.reward_space_spec.name == "runtime" @pytest.mark.xfail( From b2ff5956ae6f5b830311bbc3a7bba5f12f544d40 Mon Sep 17 00:00:00 2001 From: Parth Chadha Date: Sun, 6 Feb 2022 20:06:19 -0500 Subject: [PATCH 033/239] Fix use of reward name in brute_force.py --- examples/brute_force.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/brute_force.py b/examples/brute_force.py index 497df84db..50f809a64 100644 --- a/examples/brute_force.py +++ b/examples/brute_force.py @@ -178,7 +178,7 @@ def run_brute_force( if not env.reward_space: raise ValueError("A reward space must be specified for random search") - reward_space_name = env.reward_space.id + reward_space_name = env.reward_space.name actions = [env.action_space.names.index(a) for a in action_names] benchmark_uri = str(env.benchmark) From a1e2364c91ba84ae8ef7df77f0370c284194d384 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 21:03:16 -0500 Subject: [PATCH 034/239] add json support --- .../opt_loops/BUILD | 1 + .../opt_loops/opt_loops.cc | 111 +++++++++++++++++- 2 files changed, 107 insertions(+), 5 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/BUILD b/examples/loop_optimizations_service/opt_loops/BUILD index b320e469b..b14ae1de9 100644 --- a/examples/loop_optimizations_service/opt_loops/BUILD +++ b/examples/loop_optimizations_service/opt_loops/BUILD @@ -19,5 +19,6 @@ cc_binary( visibility = ["//visibility:public"], deps = [ "@llvm//10.0.0", + "@nlohmann_json//:json", ], ) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 762a62f86..f5ed7e0f6 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -36,6 +36,7 @@ #include "llvm/Transforms/Utils/Debugify.h" #include "llvm/Transforms/Utils/LoopUtils.h" #include "llvm/Transforms/Vectorize.h" +#include "nlohmann/json.hpp" using namespace llvm; @@ -43,6 +44,22 @@ using namespace llvm::yaml; using llvm::yaml::IO; using llvm::yaml::ScalarEnumerationTraits; +using json = nlohmann::json; + +// a version of LLVM's getOptionalIntLoopAttribute(...) that accepts `const` Loop as argument +// this is required to invoke in to_json(...) +llvm::Optional getOptionalIntLoopAttribute1(const Loop* TheLoop, StringRef Name) { + const MDOperand* AttrMD = findStringMetadataForLoop(TheLoop, Name).getValueOr(nullptr); + if (!AttrMD) + return None; + + ConstantInt* IntMD = mdconst::extract_or_null(AttrMD->get()); + if (!IntMD) + return None; + + return IntMD->getSExtValue(); +} + static Optional getOptionalBoolLoopAttribute(const Loop* TheLoop, StringRef Name) { MDNode* MD = findOptionMDForLoop(TheLoop, Name); if (!MD) @@ -73,6 +90,76 @@ std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { return std::to_string(mdconst::extract(*Op)->getZExtValue()); } +namespace llvm { +void to_json(json& j, const Loop& Lobj) { + auto L = &Lobj; + Function* F = L->getBlocks()[0]->getParent(); + std::string FName = F->getName(); + + Module* M = F->getParent(); + std::string MName = M->getName(); + + std::string IDStr; + llvm::raw_string_ostream IDStream(IDStr); + L->getLoopID()->printAsOperand(IDStream, M); + j["ID"] = IDStr; + j["Function"] = FName; + j["Module"] = MName; + + // this id always prints a value of 4. Not sure if I am using it correctly + auto MetadataID = L->getLoopID()->getMetadataID(); + j["MetadataID"] = MetadataID; + + std::string Name = L->getName(); // NOTE: actually L->getName calls L->getHeader()->getName() + j["Name"] = L->getName(); + + int Depth = L->getLoopDepth(); + j["Depth"] = Depth; + + // TODO: find a way to provide a Name to the loop that will remain consisten across multiple + // `opt` calls + std::string HeaderName = L->getHeader()->getName(); + static int Count = 0; + if (HeaderName.length() == 0) { + HeaderName = "loop_" + std::to_string(Count++); + L->getHeader()->setName(HeaderName); + } + j["HeaderName"] = HeaderName; + + bool MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); + j["llvm.loop.unroll.enable"] = MetaLoopUnrollEnable; + + bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); + j["llvm.loop.unroll.disable"] = MetaLoopUnrollDisable; + + auto MetaLoopUnrollCount = getOptionalIntLoopAttribute1(L, "llvm.loop.unroll.count"); + if (MetaLoopUnrollCount.hasValue()) + j["llvm.loop.unroll.count"] = MetaLoopUnrollCount.getValue(); + + bool MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); + j["llvm.loop.isunrolled"] = MetaLoopIsUnrolled; + + bool MetaLoopVectorEnable = getBooleanLoopAttribute(L, "llvm.loop.vector.enable"); + j["llvm.loop.vectorize.enable"] = MetaLoopVectorEnable; + + bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); + j["llvm.loop.vectorize.disable"] = MetaLoopVectorDisable; + + /*auto MetaLoopVectorWidth = getOptionalIntLoopAttribute(L, "llvm.loop.vector.width"); + if (MetaLoopVectorWidth.hasValue()) + j["llvm.loop.vectorize.width"] = MetaLoopVectorWidth.getValue();*/ + + bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); + j["llvm.loop.isvectorized"] = MetaLoopIsVectorized; + + // dump the IR of the loop + std::string IR; + llvm::raw_string_ostream stream(IR); + L->print(stream, true, true); + j["llvm"] = IR; +} +} // namespace llvm + template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { @@ -149,9 +236,12 @@ cl::opt InputFilename(cl::Positional, cl::desc("Specify input filen cl::opt OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename"), cl::init("-")); -/// Output YAML log file name. +/// Output Loop Configuration/Features file in various formats. cl::opt OutputYAMLFile("emit-yaml", cl::desc("Specify output YAML log filename"), - cl::value_desc("filename"), cl::init("/tmp/loops.log")); + cl::value_desc("filename"), cl::init("/tmp/loops.yaml")); + +cl::opt OutputJSONFile("emit-json", cl::desc("Specify output JSON log filename"), + cl::value_desc("filename"), cl::init("/tmp/loops.json")); // TODO: add other features like "read-yaml", "print-yaml-after-all", "print-yaml-before-all", // "print-yaml-after=", "print-yaml-before=" etc. @@ -243,6 +333,7 @@ class LoopLog : public llvm::FunctionPass { AU.addRequired(); } +#include bool runOnFunction(llvm::Function& F) override { LoopInfo& LI = getAnalysis().getLoopInfo(); auto Loops = LI.getLoopsInPreorder(); @@ -264,6 +355,13 @@ class LoopLog : public llvm::FunctionPass { Yaml << L; } + auto jsonObjects = json::array(); + for (auto L : Loops) { + json j = *L; + jsonObjects.push_back(j); + } + std::cout << jsonObjects << std::endl; + return false; } @@ -368,8 +466,11 @@ int main(int argc, char** argv) { } // Prepare loops dump/configuration yaml file - raw_fd_ostream ToolConfigFile(OutputYAMLFile, EC); - yaml::Output Yaml(ToolConfigFile); + raw_fd_ostream ToolYAMLFile(OutputYAMLFile, EC); + yaml::Output Yaml(ToolYAMLFile); + + // Prepare loops dump/configuration json file + raw_fd_ostream ToolJSONFile(OutputJSONFile, EC); initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; @@ -393,7 +494,7 @@ int main(int argc, char** argv) { PM.run(*Module); Out.keep(); - ToolConfigFile.close(); + ToolYAMLFile.close(); return 0; } From e657a373d080d7fbb9556bd1fb1619460525aa93 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 21:05:49 -0500 Subject: [PATCH 035/239] add one more attribute --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index f5ed7e0f6..d018edb07 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -145,9 +145,9 @@ void to_json(json& j, const Loop& Lobj) { bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); j["llvm.loop.vectorize.disable"] = MetaLoopVectorDisable; - /*auto MetaLoopVectorWidth = getOptionalIntLoopAttribute(L, "llvm.loop.vector.width"); + auto MetaLoopVectorWidth = getOptionalIntLoopAttribute1(L, "llvm.loop.vector.width"); if (MetaLoopVectorWidth.hasValue()) - j["llvm.loop.vectorize.width"] = MetaLoopVectorWidth.getValue();*/ + j["llvm.loop.vectorize.width"] = MetaLoopVectorWidth.getValue(); bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); j["llvm.loop.isvectorized"] = MetaLoopIsVectorized; From 076045804c8a7176a715bded176eb1411eda5566 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 21:21:04 -0500 Subject: [PATCH 036/239] dedicated structure to store loop config --- .../opt_loops/opt_loops.cc | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index d018edb07..6b9c0c28e 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -228,6 +228,63 @@ struct llvm::yaml::MappingTraits { } }; +struct LoopConfig { + std::string FName; + std::string MName; + std::string IDStr; + unsigned int MetadataID; + std::string Name; + int Depth; + std::string HeaderName; + bool MetaLoopUnrollEnable; + bool MetaLoopUnrollDisable; + llvm::Optional MetaLoopUnrollCount; + bool MetaLoopIsUnrolled; + bool MetaLoopVectorEnable; + bool MetaLoopVectorDisable; + llvm::Optional MetaLoopVectorWidth; + bool MetaLoopIsVectorized; + std::string IR; + + LoopConfig(Loop*& L) { + Function* F = L->getBlocks()[0]->getParent(); + FName = F->getName(); + + Module* M = F->getParent(); + MName = M->getName(); + + llvm::raw_string_ostream IDStream(IDStr); + L->getLoopID()->printAsOperand(IDStream, M); + + MetadataID = L->getLoopID()->getMetadataID(); // this id always prints a value of 4. Not sure + // if I am using it correctly + Name = L->getName(); // NOTE: actually L->getName calls L->getHeader()->getName() + Depth = L->getLoopDepth(); + + // TODO: find a way to provide a Name to the loop that will remain consisten across multiple + // `opt` calls + HeaderName = L->getHeader()->getName(); + static int Count = 0; + if (HeaderName.length() == 0) { + HeaderName = "loop_" + std::to_string(Count++); + L->getHeader()->setName(HeaderName); + } + + MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); + MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); + MetaLoopUnrollCount = getOptionalIntLoopAttribute(L, "llvm.loop.unroll.count"); + MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); + MetaLoopVectorEnable = getBooleanLoopAttribute(L, "llvm.loop.vector.enable"); + MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); + MetaLoopVectorWidth = getOptionalIntLoopAttribute(L, "llvm.loop.vector.width"); + MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); + + // dump the IR of the loop + llvm::raw_string_ostream stream(IR); + L->print(stream, true, true); + } +}; + namespace { /// Input LLVM module file name. cl::opt InputFilename(cl::Positional, cl::desc("Specify input filename"), From 64ede8dc20c588c70c10fb25f9cf5edcd167b2a6 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 21:52:23 -0500 Subject: [PATCH 037/239] refactor: Loop* to LoopConfig to json --- .../opt_loops/opt_loops.cc | 94 +++++-------------- 1 file changed, 23 insertions(+), 71 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 6b9c0c28e..32fa2624c 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -90,76 +90,6 @@ std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { return std::to_string(mdconst::extract(*Op)->getZExtValue()); } -namespace llvm { -void to_json(json& j, const Loop& Lobj) { - auto L = &Lobj; - Function* F = L->getBlocks()[0]->getParent(); - std::string FName = F->getName(); - - Module* M = F->getParent(); - std::string MName = M->getName(); - - std::string IDStr; - llvm::raw_string_ostream IDStream(IDStr); - L->getLoopID()->printAsOperand(IDStream, M); - j["ID"] = IDStr; - j["Function"] = FName; - j["Module"] = MName; - - // this id always prints a value of 4. Not sure if I am using it correctly - auto MetadataID = L->getLoopID()->getMetadataID(); - j["MetadataID"] = MetadataID; - - std::string Name = L->getName(); // NOTE: actually L->getName calls L->getHeader()->getName() - j["Name"] = L->getName(); - - int Depth = L->getLoopDepth(); - j["Depth"] = Depth; - - // TODO: find a way to provide a Name to the loop that will remain consisten across multiple - // `opt` calls - std::string HeaderName = L->getHeader()->getName(); - static int Count = 0; - if (HeaderName.length() == 0) { - HeaderName = "loop_" + std::to_string(Count++); - L->getHeader()->setName(HeaderName); - } - j["HeaderName"] = HeaderName; - - bool MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); - j["llvm.loop.unroll.enable"] = MetaLoopUnrollEnable; - - bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); - j["llvm.loop.unroll.disable"] = MetaLoopUnrollDisable; - - auto MetaLoopUnrollCount = getOptionalIntLoopAttribute1(L, "llvm.loop.unroll.count"); - if (MetaLoopUnrollCount.hasValue()) - j["llvm.loop.unroll.count"] = MetaLoopUnrollCount.getValue(); - - bool MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); - j["llvm.loop.isunrolled"] = MetaLoopIsUnrolled; - - bool MetaLoopVectorEnable = getBooleanLoopAttribute(L, "llvm.loop.vector.enable"); - j["llvm.loop.vectorize.enable"] = MetaLoopVectorEnable; - - bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); - j["llvm.loop.vectorize.disable"] = MetaLoopVectorDisable; - - auto MetaLoopVectorWidth = getOptionalIntLoopAttribute1(L, "llvm.loop.vector.width"); - if (MetaLoopVectorWidth.hasValue()) - j["llvm.loop.vectorize.width"] = MetaLoopVectorWidth.getValue(); - - bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); - j["llvm.loop.isvectorized"] = MetaLoopIsVectorized; - - // dump the IR of the loop - std::string IR; - llvm::raw_string_ostream stream(IR); - L->print(stream, true, true); - j["llvm"] = IR; -} -} // namespace llvm - template <> struct llvm::yaml::MappingTraits { static void mapping(IO& io, Loop*& L) { @@ -285,6 +215,27 @@ struct LoopConfig { } }; +void to_json(json& j, const LoopConfig& LC) { + j["ID"] = LC.IDStr; + j["Function"] = LC.FName; + j["Module"] = LC.MName; + j["MetadataID"] = LC.MetadataID; + j["Name"] = LC.Name; + j["Depth"] = LC.Depth; + j["HeaderName"] = LC.HeaderName; + j["llvm.loop.unroll.enable"] = LC.MetaLoopUnrollEnable; + j["llvm.loop.unroll.disable"] = LC.MetaLoopUnrollDisable; + if (LC.MetaLoopUnrollCount.hasValue()) + j["llvm.loop.unroll.count"] = LC.MetaLoopUnrollCount.getValue(); + j["llvm.loop.isunrolled"] = LC.MetaLoopIsUnrolled; + j["llvm.loop.vectorize.enable"] = LC.MetaLoopVectorEnable; + j["llvm.loop.vectorize.disable"] = LC.MetaLoopVectorDisable; + if (LC.MetaLoopVectorWidth.hasValue()) + j["llvm.loop.vectorize.width"] = LC.MetaLoopVectorWidth.getValue(); + j["llvm.loop.isvectorized"] = LC.MetaLoopIsVectorized; + j["llvm"] = LC.IR; +} + namespace { /// Input LLVM module file name. cl::opt InputFilename(cl::Positional, cl::desc("Specify input filename"), @@ -414,7 +365,8 @@ class LoopLog : public llvm::FunctionPass { auto jsonObjects = json::array(); for (auto L : Loops) { - json j = *L; + LoopConfig LC(L); + json j = LC; jsonObjects.push_back(j); } std::cout << jsonObjects << std::endl; From 868f2207671fac87a4c6d955737684aaae88f596 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 22:01:51 -0500 Subject: [PATCH 038/239] refactor YAML to use LoopConfig --- .../opt_loops/opt_loops.cc | 98 +++++-------------- 1 file changed, 24 insertions(+), 74 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 32fa2624c..7375e9c07 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -90,74 +90,6 @@ std::string getStringMetadataFromLoop(Loop*& L, const char* MDString) { return std::to_string(mdconst::extract(*Op)->getZExtValue()); } -template <> -struct llvm::yaml::MappingTraits { - static void mapping(IO& io, Loop*& L) { - Function* F = L->getBlocks()[0]->getParent(); - std::string FName = F->getName(); - - Module* M = F->getParent(); - std::string MName = M->getName(); - - std::string IDStr; - llvm::raw_string_ostream IDStream(IDStr); - L->getLoopID()->printAsOperand(IDStream, M); - io.mapRequired("ID", IDStr); - io.mapRequired("Function", FName); - io.mapRequired("Module", MName); - - // this id always prints a value of 4. Not sure if I am using it correctly - auto MetadataID = L->getLoopID()->getMetadataID(); - io.mapRequired("MetadataID", MetadataID); - - std::string Name = L->getName(); // NOTE: actually L->getName calls L->getHeader()->getName() - io.mapRequired("Name", Name); - - int Depth = L->getLoopDepth(); - io.mapRequired("Depth", Depth); - - // TODO: find a way to provide a Name to the loop that will remain consisten across multiple - // `opt` calls - std::string HeaderName = L->getHeader()->getName(); - static int Count = 0; - if (HeaderName.length() == 0) { - HeaderName = "loop_" + std::to_string(Count++); - L->getHeader()->setName(HeaderName); - } - io.mapRequired("HeaderName", HeaderName); - - bool MetaLoopUnrollEnable = getBooleanLoopAttribute(L, "llvm.loop.unroll.enable"); - io.mapOptional("llvm.loop.unroll.enable", MetaLoopUnrollEnable); - - bool MetaLoopUnrollDisable = getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"); - io.mapOptional("llvm.loop.unroll.disable", MetaLoopUnrollDisable); - - auto MetaLoopUnrollCount = getOptionalIntLoopAttribute(L, "llvm.loop.unroll.count"); - io.mapOptional("llvm.loop.unroll.count", MetaLoopUnrollCount); - - bool MetaLoopIsUnrolled = getBooleanLoopAttribute(L, "llvm.loop.isunrolled"); - io.mapOptional("llvm.loop.isunrolled", MetaLoopIsUnrolled); - - bool MetaLoopVectorEnable = getBooleanLoopAttribute(L, "llvm.loop.vector.enable"); - io.mapOptional("llvm.loop.vectorize.enable", MetaLoopVectorEnable); - - bool MetaLoopVectorDisable = getBooleanLoopAttribute(L, "llvm.loop.vector.disable"); - io.mapOptional("llvm.loop.vectorize.disable", MetaLoopVectorDisable); - - auto MetaLoopVectorWidth = getOptionalIntLoopAttribute(L, "llvm.loop.vector.width"); - io.mapOptional("llvm.loop.vectorize.width", MetaLoopVectorWidth); - - bool MetaLoopIsVectorized = getBooleanLoopAttribute(L, "llvm.loop.isvectorized"); - io.mapOptional("llvm.loop.isvectorized", MetaLoopIsVectorized); - - // dump the IR of the loop - std::string IR; - llvm::raw_string_ostream stream(IR); - L->print(stream, true, true); - io.mapOptional("llvm", IR); - } -}; - struct LoopConfig { std::string FName; std::string MName; @@ -236,6 +168,28 @@ void to_json(json& j, const LoopConfig& LC) { j["llvm"] = LC.IR; } +template <> +struct llvm::yaml::MappingTraits { + static void mapping(IO& io, LoopConfig& LC) { + io.mapRequired("ID", LC.IDStr); + io.mapRequired("Function", LC.FName); + io.mapRequired("Module", LC.MName); + io.mapRequired("MetadataID", LC.MetadataID); + io.mapRequired("Name", LC.Name); + io.mapRequired("Depth", LC.Depth); + io.mapRequired("HeaderName", LC.HeaderName); + io.mapOptional("llvm.loop.unroll.enable", LC.MetaLoopUnrollEnable); + io.mapOptional("llvm.loop.unroll.disable", LC.MetaLoopUnrollDisable); + io.mapOptional("llvm.loop.unroll.count", LC.MetaLoopUnrollCount); + io.mapOptional("llvm.loop.isunrolled", LC.MetaLoopIsUnrolled); + io.mapOptional("llvm.loop.vectorize.enable", LC.MetaLoopVectorEnable); + io.mapOptional("llvm.loop.vectorize.disable", LC.MetaLoopVectorDisable); + io.mapOptional("llvm.loop.vectorize.width", LC.MetaLoopVectorWidth); + io.mapOptional("llvm.loop.isvectorized", LC.MetaLoopIsVectorized); + io.mapOptional("llvm", LC.IR); + } +}; + namespace { /// Input LLVM module file name. cl::opt InputFilename(cl::Positional, cl::desc("Specify input filename"), @@ -358,15 +312,11 @@ class LoopLog : public llvm::FunctionPass { } } - for (auto L : Loops) { - // this will invoke mapping(IO& io, Loop*& L) in llvm::yaml::MappingTraits - Yaml << L; - } - auto jsonObjects = json::array(); for (auto L : Loops) { LoopConfig LC(L); - json j = LC; + Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in + json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) jsonObjects.push_back(j); } std::cout << jsonObjects << std::endl; From d0569d086d0c8039ff44b165986774cb7cd2d2ad Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 22:31:15 -0500 Subject: [PATCH 039/239] write yaml and json outside passes --- .../opt_loops/opt_loops.cc | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 7375e9c07..e7c23f11f 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -283,19 +283,19 @@ class OptCustomPassManager : public legacy::PassManager { const DebugifyStatsMap& getDebugifyStatsMap() const { return DIStatsMap; } }; +std::vector LCs; using llvm::yaml::Output; class LoopLog : public llvm::FunctionPass { public: static char ID; std::unordered_map Counts; - LoopLog(yaml::Output& Yaml = *(new yaml::Output(llvm::dbgs()))) : FunctionPass(ID), Yaml(Yaml) {} + LoopLog() : FunctionPass(ID) {} virtual void getAnalysisUsage(AnalysisUsage& AU) const override { AU.addRequired(); } -#include bool runOnFunction(llvm::Function& F) override { LoopInfo& LI = getAnalysis().getLoopInfo(); auto Loops = LI.getLoopsInPreorder(); @@ -312,20 +312,15 @@ class LoopLog : public llvm::FunctionPass { } } - auto jsonObjects = json::array(); for (auto L : Loops) { LoopConfig LC(L); - Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in - json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) - jsonObjects.push_back(j); + LCs.push_back(LC); } - std::cout << jsonObjects << std::endl; return false; } protected: - yaml::Output& Yaml; }; char LoopLog::ID = 0; @@ -386,24 +381,25 @@ void initializeLoopConfiguratorPassPass(PassRegistry& Registry); } // namespace llvm // Initialise the pass. We have to declare the dependencies we use. -INITIALIZE_PASS_BEGIN(LoopLog, "count-loops", "Count loops", false, false) +INITIALIZE_PASS_BEGIN(LoopLog, "log-loops", "Log loops IR and configuration", false, false) INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) -INITIALIZE_PASS_END(LoopLog, "count-loops", "Count loops", false, false) +INITIALIZE_PASS_END(LoopLog, "log-loops", "Log loops IR and configuration", false, false) -INITIALIZE_PASS_BEGIN(LoopConfiguratorPass, "unroll-loops-configurator", - "Configurates loop unrolling", false, false) +INITIALIZE_PASS_BEGIN(LoopConfiguratorPass, "loops-configurator", "Configurates loop optimization", + false, false) INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) -INITIALIZE_PASS_END(LoopConfiguratorPass, "unroll-loops-configurator", - "Configurates loop unrolling", false, false) +INITIALIZE_PASS_END(LoopConfiguratorPass, "loops-configurator", "Configurates loop optimization", + false, false) namespace llvm { -Pass* createLoopLogPass(yaml::Output& Yaml) { return new LoopLog(Yaml); } +Pass* createLoopLogPass() { return new LoopLog(); } } // end namespace llvm +#include int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, - " LLVM-Counter\n\n" - " Count the loops in a bitcode file.\n"); + " opt_loops\n\n" + " Fine grain loop optimizer and configuration logger.\n"); LLVMContext Context; SMDiagnostic Err; @@ -442,7 +438,7 @@ int main(int argc, char** argv) { Builder.LoopVectorize = VectorizeEnable; Builder.populateModulePassManager(PM); - PM.add(createLoopLogPass(Yaml)); + PM.add(createLoopLogPass()); // PM to output the module if (OutputAssembly) { @@ -453,6 +449,16 @@ int main(int argc, char** argv) { PM.run(*Module); Out.keep(); + + // Log loop configuration + auto jsonObjects = json::array(); + for (auto LC : LCs) { + Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in + json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) + jsonObjects.push_back(LC); + } + std::cout << jsonObjects << std::endl; + ToolYAMLFile.close(); return 0; From f129924ce53af7be6a2a0dddf1638b5f40106537 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 23:09:55 -0500 Subject: [PATCH 040/239] write json to file --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index e7c23f11f..7b7b685e7 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -3,6 +3,7 @@ // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. #include +#include #include #include #include @@ -425,7 +426,7 @@ int main(int argc, char** argv) { yaml::Output Yaml(ToolYAMLFile); // Prepare loops dump/configuration json file - raw_fd_ostream ToolJSONFile(OutputJSONFile, EC); + std::fstream ToolJSONFile(OutputJSONFile, std::fstream::in | std::fstream::out); initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; @@ -457,9 +458,10 @@ int main(int argc, char** argv) { json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) jsonObjects.push_back(LC); } - std::cout << jsonObjects << std::endl; + ToolJSONFile << jsonObjects; ToolYAMLFile.close(); + ToolJSONFile.close(); return 0; } From 534c12ee28e42fca9ea6dd31098c57ad59d02a09 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 23:38:58 -0500 Subject: [PATCH 041/239] dump yaml directly from list --- .../loop_optimizations_service/opt_loops/opt_loops.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 7b7b685e7..ed8f0e197 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -43,8 +43,8 @@ using namespace llvm; using namespace llvm::yaml; using llvm::yaml::IO; +using llvm::yaml::Output; using llvm::yaml::ScalarEnumerationTraits; - using json = nlohmann::json; // a version of LLVM's getOptionalIntLoopAttribute(...) that accepts `const` Loop as argument @@ -109,6 +109,8 @@ struct LoopConfig { bool MetaLoopIsVectorized; std::string IR; + LoopConfig() {} + LoopConfig(Loop*& L) { Function* F = L->getBlocks()[0]->getParent(); FName = F->getName(); @@ -285,7 +287,6 @@ class OptCustomPassManager : public legacy::PassManager { }; std::vector LCs; -using llvm::yaml::Output; class LoopLog : public llvm::FunctionPass { public: static char ID; @@ -396,7 +397,8 @@ namespace llvm { Pass* createLoopLogPass() { return new LoopLog(); } } // end namespace llvm -#include +LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(LoopConfig) + int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, " opt_loops\n\n" @@ -454,10 +456,11 @@ int main(int argc, char** argv) { // Log loop configuration auto jsonObjects = json::array(); for (auto LC : LCs) { - Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in + // Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) jsonObjects.push_back(LC); } + Yaml << LCs; ToolJSONFile << jsonObjects; ToolYAMLFile.close(); From 7bd1b9fb71553fb1220382df2e3611f98b2f288d Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Sun, 6 Feb 2022 23:45:38 -0500 Subject: [PATCH 042/239] log json without for loop --- .../loop_optimizations_service/opt_loops/opt_loops.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index ed8f0e197..66f734bcd 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -455,12 +455,8 @@ int main(int argc, char** argv) { // Log loop configuration auto jsonObjects = json::array(); - for (auto LC : LCs) { - // Yaml << LC; // this invokes mapping(IO& io, LoopConfig& LC) in - json j = LC; // this invokes to_json(json& j, const LoopConfig& LC) - jsonObjects.push_back(LC); - } - Yaml << LCs; + jsonObjects = LCs; // this invokes to_json(json& j, const LoopConfig& LC) + Yaml << LCs; // this invokes mapping(IO& io, LoopConfig& LC) ToolJSONFile << jsonObjects; ToolYAMLFile.close(); From 228457ab9da464c3423073c825bb4777ffcb6c83 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 00:09:47 -0500 Subject: [PATCH 043/239] get json dump to work again --- .../loop_optimizations_service/opt_loops/opt_loops.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 66f734bcd..f4d6bf488 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -399,6 +399,7 @@ Pass* createLoopLogPass() { return new LoopLog(); } LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(LoopConfig) +#include int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, " opt_loops\n\n" @@ -428,7 +429,7 @@ int main(int argc, char** argv) { yaml::Output Yaml(ToolYAMLFile); // Prepare loops dump/configuration json file - std::fstream ToolJSONFile(OutputJSONFile, std::fstream::in | std::fstream::out); + std::fstream ToolJSONFile(OutputJSONFile, std::fstream::out); initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; @@ -451,16 +452,15 @@ int main(int argc, char** argv) { } PM.run(*Module); - Out.keep(); - // Log loop configuration auto jsonObjects = json::array(); jsonObjects = LCs; // this invokes to_json(json& j, const LoopConfig& LC) - Yaml << LCs; // this invokes mapping(IO& io, LoopConfig& LC) ToolJSONFile << jsonObjects; - ToolYAMLFile.close(); + Yaml << LCs; // this invokes mapping(IO& io, LoopConfig& LC) and writes to file ToolJSONFile.close(); + ToolYAMLFile.close(); + Out.keep(); return 0; } From d4871f653729549bb8fc88a053f45f057b4a8059 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 00:13:19 -0500 Subject: [PATCH 044/239] some clean up --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index f4d6bf488..de5944bb8 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -399,7 +399,6 @@ Pass* createLoopLogPass() { return new LoopLog(); } LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(LoopConfig) -#include int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, " opt_loops\n\n" @@ -451,6 +450,7 @@ int main(int argc, char** argv) { PM.add(createBitcodeWriterPass(Out.os(), PreserveBitcodeUseListOrder)); } PM.run(*Module); + Out.keep(); // Log loop configuration auto jsonObjects = json::array(); @@ -458,9 +458,7 @@ int main(int argc, char** argv) { ToolJSONFile << jsonObjects; Yaml << LCs; // this invokes mapping(IO& io, LoopConfig& LC) and writes to file - ToolJSONFile.close(); ToolYAMLFile.close(); - Out.keep(); return 0; } From cc6402e38ef2f14fa2778059c8286e102713261e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 00:20:35 -0500 Subject: [PATCH 045/239] TODOs should be blameable Co-authored-by: Chris Cummins --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index de5944bb8..a19e26935 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -208,7 +208,7 @@ cl::opt OutputYAMLFile("emit-yaml", cl::desc("Specify output YAML l cl::opt OutputJSONFile("emit-json", cl::desc("Specify output JSON log filename"), cl::value_desc("filename"), cl::init("/tmp/loops.json")); -// TODO: add other features like "read-yaml", "print-yaml-after-all", "print-yaml-before-all", +// TODO(mostafaelhoushi): add other features like "read-yaml", "print-yaml-after-all", "print-yaml-before-all", // "print-yaml-after=", "print-yaml-before=" etc. /// Loop Optimizations From e14c20043b5ed21b0b936086c039e667f3930ebe Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 00:51:58 -0500 Subject: [PATCH 046/239] add IRCanonicalizer --- .../opt_loops/BUILD | 19 + .../opt_loops/IRCanonicalizer.cc | 557 ++++++++++++++++++ .../opt_loops/IRCanonicalizer.h | 77 +++ .../opt_loops/opt_loops.cc | 22 + 4 files changed, 675 insertions(+) create mode 100644 examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc create mode 100644 examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h diff --git a/examples/loop_optimizations_service/opt_loops/BUILD b/examples/loop_optimizations_service/opt_loops/BUILD index b14ae1de9..2316a4285 100644 --- a/examples/loop_optimizations_service/opt_loops/BUILD +++ b/examples/loop_optimizations_service/opt_loops/BUILD @@ -18,7 +18,26 @@ cc_binary( ], visibility = ["//visibility:public"], deps = [ + ":IRCanonicalizer", "@llvm//10.0.0", "@nlohmann_json//:json", ], ) + +cc_library( + name = "IRCanonicalizer", + srcs = [ + "IRCanonicalizer.cc", + ], + hdrs = [ + "IRCanonicalizer.h", + ], + copts = [ + "-Wall", + "-fdiagnostics-color=always", + "-fno-rtti", + ], + deps = [ + "@llvm//10.0.0", + ], +) diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc new file mode 100644 index 000000000..a423d5ec0 --- /dev/null +++ b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc @@ -0,0 +1,557 @@ +#include "IRCanonicalizer.h" + +#include +#include + +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/BasicBlock.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/InstIterator.h" +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; + +char IRCanonicalizer::ID = 0; + +/// Entry method to the IRCanonicalizer. +/// +/// \param M Module to canonicalize. +bool IRCanonicalizer::runOnFunction(Function& F) { + nameFunctionArguments(F); + nameBasicBlocks(F); + + SmallVector Outputs = collectOutputInstructions(F); + + if (!PreserveOrder) + reorderInstructions(Outputs); + + nameInstructions(Outputs); + + for (auto& I : instructions(F)) { + if (!PreserveOrder) { + if (ReorderOperands && I.isCommutative()) + reorderInstructionOperandsByNames(&I); + + if (auto* PN = dyn_cast(&I)) + reorderPHIIncomingValues(PN); + } + + foldInstructionName(&I); + } + + return true; +} + +/// Numbers arguments. +/// +/// \param F Function whose arguments will be renamed. +void IRCanonicalizer::nameFunctionArguments(Function& F) { + int ArgumentCounter = 0; + for (auto& A : F.args()) { + if (RenameAll || A.getName().empty()) { + A.setName("a" + Twine(ArgumentCounter)); + ++ArgumentCounter; + } + } +} + +/// Names basic blocks using a generated hash for each basic block in +/// a function considering the opcode and the order of output instructions. +/// +/// \param F Function containing basic blocks to rename. +void IRCanonicalizer::nameBasicBlocks(Function& F) { + for (auto& B : F) { + // Initialize to a magic constant, so the state isn't zero. + uint64_t Hash = MagicHashConstant; + + // Hash considering output instruction opcodes. + for (auto& I : B) + if (isOutput(&I)) + Hash = hashing::detail::hash_16_bytes(Hash, I.getOpcode()); + + if (RenameAll || B.getName().empty()) { + // Name basic block. Substring hash to make diffs more readable. + B.setName("bb" + std::to_string(Hash).substr(0, 5)); + } + } +} + +/// Names instructions graphically. +/// This method is a wrapper for recursive nameInstruction(). +/// +/// \see nameInstruction() +/// \param Outputs Vector of pointers to output instructions collected top-down. +void IRCanonicalizer::nameInstructions(SmallVector& Outputs) { + // Keeping track of visited instructions while naming (even depth first) is + // necessary only to avoid infinite loops on PHI nodes. + SmallPtrSet Visited; + + for (auto& I : Outputs) nameInstruction(I, Visited); +} + +/// Names instructions graphically (recursive) in accordance with the +/// def-use tree, starting from the initial instructions (defs), finishing at +/// the output (top-most user) instructions (depth-first). +/// +/// \param I Instruction to be renamed. +void IRCanonicalizer::nameInstruction(Instruction* I, + SmallPtrSet& Visited) { + // Keeping track of visited instructions while naming (even depth first) is + // necessary only to avoid infinite loops on PHI nodes. + if (!Visited.count(I)) { + Visited.insert(I); + + // Determine the type of instruction to name. + if (isInitialInstruction(I)) { + // This is an initial instruction. + nameAsInitialInstruction(I); + } else { + // This must be a regular instruction. + nameAsRegularInstruction(I, Visited); + } + } +} + +/// Names instruction following the scheme: +/// vl00000Callee(Operands) +/// +/// Where 00000 is a hash calculated considering instruction's opcode and output +/// footprint. Callee's name is only included when instruction's type is +/// CallInst. In cases where instruction is commutative, operands list is also +/// sorted. +/// +/// Renames instruction only when RenameAll flag is raised or instruction is +/// unnamed. +/// +/// \see getOutputFootprint() +/// \param I Instruction to be renamed. +void IRCanonicalizer::nameAsInitialInstruction(Instruction* I) { + if (I->getType()->isVoidTy() || (!I->getName().empty() && !RenameAll)) + return; + + // Instruction operands for further sorting. + SmallVector, 4> Operands; + + // Collect operands. + for (auto& OP : I->operands()) { + if (!isa(OP)) { + std::string TextRepresentation; + raw_string_ostream Stream(TextRepresentation); + OP->printAsOperand(Stream, false); + Operands.push_back(StringRef(Stream.str())); + } + } + + if (I->isCommutative()) + llvm::sort(Operands); + + // Initialize to a magic constant, so the state isn't zero. + uint64_t Hash = MagicHashConstant; + + // Consider instruction's opcode in the hash. + Hash = hashing::detail::hash_16_bytes(Hash, I->getOpcode()); + + SmallPtrSet Visited; + // Get output footprint for I. + SetVector OutputFootprint = getOutputFootprint(I, Visited); + + // Consider output footprint in the hash. + for (const int& Output : OutputFootprint) Hash = hashing::detail::hash_16_bytes(Hash, Output); + + // Base instruction name. + SmallString<256> Name; + Name.append("vl" + std::to_string(Hash).substr(0, 5)); + + // In case of CallInst, consider callee in the instruction name. + if (const auto* CI = dyn_cast(I)) { + Function* F = CI->getCalledFunction(); + + if (F != nullptr) { + Name.append(F->getName()); + } + } + + Name.append("("); + for (unsigned long i = 0; i < Operands.size(); ++i) { + Name.append(Operands[i]); + + if (i < Operands.size() - 1) + Name.append(", "); + } + Name.append(")"); + + I->setName(Name); +} + +/// Names instruction following the scheme: +/// op00000Callee(Operands) +/// +/// Where 00000 is a hash calculated considering instruction's opcode, its +/// operands' opcodes and order. Callee's name is only included when +/// instruction's type is CallInst. In cases where instruction is commutative, +/// operand list is also sorted. +/// +/// Names instructions recursively in accordance with the def-use tree, +/// starting from the initial instructions (defs), finishing at +/// the output (top-most user) instructions (depth-first). +/// +/// Renames instruction only when RenameAll flag is raised or instruction is +/// unnamed. +/// +/// \see getOutputFootprint() +/// \param I Instruction to be renamed. +void IRCanonicalizer::nameAsRegularInstruction(Instruction* I, + SmallPtrSet& Visited) { + // Instruction operands for further sorting. + SmallVector, 4> Operands; + + // The name of a regular instruction depends + // on the names of its operands. Hence, all + // operands must be named first in the use-def + // walk. + + // Collect operands. + for (auto& OP : I->operands()) { + if (auto* IOP = dyn_cast(OP)) { + // Walk down the use-def chain. + nameInstruction(IOP, Visited); + Operands.push_back(IOP->getName()); + } else if (isa(OP) && !isa(OP)) { + // This must be an immediate value. + std::string TextRepresentation; + raw_string_ostream Stream(TextRepresentation); + OP->printAsOperand(Stream, false); + Operands.push_back(StringRef(Stream.str())); + } + } + + if (I->isCommutative()) + llvm::sort(Operands.begin(), Operands.end()); + + // Initialize to a magic constant, so the state isn't zero. + uint64_t Hash = MagicHashConstant; + + // Consider instruction opcode in the hash. + Hash = hashing::detail::hash_16_bytes(Hash, I->getOpcode()); + + // Operand opcodes for further sorting (commutative). + SmallVector OperandsOpcodes; + + // Collect operand opcodes for hashing. + for (auto& OP : I->operands()) + if (auto* IOP = dyn_cast(OP)) + OperandsOpcodes.push_back(IOP->getOpcode()); + + if (I->isCommutative()) + llvm::sort(OperandsOpcodes.begin(), OperandsOpcodes.end()); + + // Consider operand opcodes in the hash. + for (const int Code : OperandsOpcodes) Hash = hashing::detail::hash_16_bytes(Hash, Code); + + // Base instruction name. + SmallString<512> Name; + Name.append("op" + std::to_string(Hash).substr(0, 5)); + + // In case of CallInst, consider callee in the instruction name. + if (const auto* CI = dyn_cast(I)) + if (const Function* F = CI->getCalledFunction()) + Name.append(F->getName()); + + Name.append("("); + for (unsigned long i = 0; i < Operands.size(); ++i) { + Name.append(Operands[i]); + + if (i < Operands.size() - 1) + Name.append(", "); + } + Name.append(")"); + + if ((I->getName().empty() || RenameAll) && !I->getType()->isVoidTy()) + I->setName(Name); +} + +/// Shortens instruction's name. This method removes called function name from +/// the instruction name and substitutes the call chain with a corresponding +/// list of operands. +/// +/// Examples: +/// op00000Callee(op00001Callee(...), vl00000Callee(1, 2), ...) -> +/// op00000(op00001, vl00000, ...) vl00000Callee(1, 2) -> vl00000(1, 2) +/// +/// This method omits output instructions and pre-output (instructions directly +/// used by an output instruction) instructions (by default). By default it also +/// does not affect user named instructions. +/// +/// \param I Instruction whose name will be folded. +void IRCanonicalizer::foldInstructionName(Instruction* I) { + // If this flag is raised, fold all regular + // instructions (including pre-outputs). + if (!FoldPreoutputs) { + // Don't fold if one of the users is an output instruction. + for (auto* U : I->users()) + if (auto* IU = dyn_cast(U)) + if (isOutput(IU)) + return; + } + + // Don't fold if it is an output instruction or has no op prefix. + if (isOutput(I) || I->getName().substr(0, 2) != "op") + return; + + // Instruction operands. + SmallVector, 4> Operands; + + for (auto& OP : I->operands()) { + if (const Instruction* IOP = dyn_cast(OP)) { + bool HasCanonicalName = + I->getName().substr(0, 2) == "op" || I->getName().substr(0, 2) == "vl"; + + Operands.push_back(HasCanonicalName ? IOP->getName().substr(0, 7) : IOP->getName()); + } + } + + if (I->isCommutative()) + llvm::sort(Operands.begin(), Operands.end()); + + SmallString<256> Name; + Name.append(I->getName().substr(0, 7)); + + Name.append("("); + for (unsigned long i = 0; i < Operands.size(); ++i) { + Name.append(Operands[i]); + + if (i < Operands.size() - 1) + Name.append(", "); + } + Name.append(")"); + + I->setName(Name); +} + +/// Reorders instructions by walking up the tree from each operand of an output +/// instruction and reducing the def-use distance. +/// This method assumes that output instructions were collected top-down, +/// otherwise the def-use chain may be broken. +/// This method is a wrapper for recursive reorderInstruction(). +/// +/// \see reorderInstruction() +/// \param Outputs Vector of pointers to output instructions collected top-down. +void IRCanonicalizer::reorderInstructions(SmallVector& Outputs) { + // This method assumes output instructions were collected top-down, + // otherwise the def-use chain may be broken. + + SmallPtrSet Visited; + + // Walk up the tree. + for (auto& I : Outputs) + for (auto& OP : I->operands()) + if (auto* IOP = dyn_cast(OP)) + reorderInstruction(IOP, I, Visited); +} + +/// Reduces def-use distance or places instruction at the end of the basic +/// block. Continues to walk up the def-use tree recursively. Used by +/// reorderInstructions(). +/// +/// \see reorderInstructions() +/// \param Used Pointer to the instruction whose value is used by the \p User. +/// \param User Pointer to the instruction which uses the \p Used. +/// \param Visited Set of visited instructions. +void IRCanonicalizer::reorderInstruction(Instruction* Used, Instruction* User, + SmallPtrSet& Visited) { + if (!Visited.count(Used)) { + Visited.insert(Used); + + if (!isa(Used) && !Used->isEHPad()) { + // Do not move PHI nodes and 'pad' instructions to ensure they are first + // in a basic block. Also do not move their operands before them. + + if (Used->getParent() == User->getParent()) { + // If Used and User share the same basic block move Used just before + // User. + Used->moveBefore(User); + } else { + // Otherwise move Used to the end of the basic block before the + // terminator. + Used->moveBefore(&Used->getParent()->back()); + } + + for (auto& OP : Used->operands()) { + if (auto* IOP = dyn_cast(OP)) { + // Walk up the def-use tree. + reorderInstruction(IOP, Used, Visited); + } + } + } + } +} + +/// Reorders instruction's operands alphabetically. This method assumes +/// that passed instruction is commutative. Changing the operand order +/// in other instructions may change the semantics. +/// +/// \param I Instruction whose operands will be reordered. +void IRCanonicalizer::reorderInstructionOperandsByNames(Instruction* I) { + // This method assumes that passed I is commutative, + // changing the order of operands in other instructions + // may change the semantics. + + // Instruction operands for further sorting. + SmallVector, 4> Operands; + + // Collect operands. + for (auto& OP : I->operands()) { + if (auto* VOP = dyn_cast(OP)) { + if (isa(VOP)) { + // This is an an instruction. + Operands.push_back(std::pair(VOP->getName(), VOP)); + } else { + std::string TextRepresentation; + raw_string_ostream Stream(TextRepresentation); + OP->printAsOperand(Stream, false); + Operands.push_back(std::pair(Stream.str(), VOP)); + } + } + } + + // Sort operands. + llvm::sort(Operands.begin(), Operands.end(), llvm::less_first()); + + // Reorder operands. + unsigned Position = 0; + for (auto& OP : I->operands()) { + OP.set(Operands[Position].second); + Position++; + } +} + +/// Reorders PHI node's values according to the names of corresponding basic +/// blocks. +/// +/// \param PN PHI node to canonicalize. +void IRCanonicalizer::reorderPHIIncomingValues(PHINode* PN) { + // Values for further sorting. + SmallVector, 2> Values; + + // Collect blocks and corresponding values. + for (auto& BB : PN->blocks()) { + Value* V = PN->getIncomingValueForBlock(BB); + Values.push_back(std::pair(V, BB)); + } + + // Sort values according to the name of a basic block. + llvm::sort(Values, [](const std::pair& LHS, + const std::pair& RHS) { + return LHS.second->getName() < RHS.second->getName(); + }); + + // Swap. + for (unsigned i = 0; i < Values.size(); ++i) { + PN->setIncomingBlock(i, Values[i].second); + PN->setIncomingValue(i, Values[i].first); + } +} + +/// Returns a vector of output instructions. An output is an instruction which +/// has side-effects or is a terminator instruction. Uses isOutput(). +/// +/// \see isOutput() +/// \param F Function to collect outputs from. +SmallVector IRCanonicalizer::collectOutputInstructions(Function& F) { + // Output instructions are collected top-down in each function, + // any change may break the def-use chain in reordering methods. + SmallVector Outputs; + + for (auto& I : instructions(F)) + if (isOutput(&I)) + Outputs.push_back(&I); + + return Outputs; +} + +/// Helper method checking whether the instruction may have side effects or is +/// a terminator instruction. +/// +/// \param I Considered instruction. +bool IRCanonicalizer::isOutput(const Instruction* I) { + // Outputs are such instructions which may have side effects or are a + // terminator. + if (I->mayHaveSideEffects() || I->isTerminator()) + return true; + + return false; +} + +/// Helper method checking whether the instruction has users and only +/// immediate operands. +/// +/// \param I Considered instruction. +bool IRCanonicalizer::isInitialInstruction(const Instruction* I) { + // Initial instructions are such instructions whose values are used by + // other instructions, yet they only depend on immediate values. + return !I->user_empty() && hasOnlyImmediateOperands(I); +} + +/// Helper method checking whether the instruction has only immediate operands. +/// +/// \param I Considered instruction. +bool IRCanonicalizer::hasOnlyImmediateOperands(const Instruction* I) { + for (const auto& OP : I->operands()) + if (isa(OP)) + return false; // Found non-immediate operand (instruction). + + return true; +} + +/// Helper method returning indices (distance from the beginning of the basic +/// block) of outputs using the \p I (eliminates repetitions). Walks down the +/// def-use tree recursively. +/// +/// \param I Considered instruction. +/// \param Visited Set of visited instructions. +SetVector IRCanonicalizer::getOutputFootprint(Instruction* I, + SmallPtrSet& Visited) { + // Vector containing indexes of outputs (no repetitions), + // which use I in the order of walking down the def-use tree. + SetVector Outputs; + + if (!Visited.count(I)) { + Visited.insert(I); + + if (isOutput(I)) { + // Gets output instruction's parent function. + Function* Func = I->getParent()->getParent(); + + // Finds and inserts the index of the output to the vector. + unsigned Count = 0; + for (const auto& B : *Func) { + for (const auto& E : B) { + if (&E == I) + Outputs.insert(Count); + Count++; + } + } + + // Returns to the used instruction. + return Outputs; + } + + for (auto* U : I->users()) { + if (auto* UI = dyn_cast(U)) { + // Vector for outputs which use UI. + SetVector OutputsUsingUI = getOutputFootprint(UI, Visited); + + // Insert the indexes of outputs using UI. + Outputs.insert(OutputsUsingUI.begin(), OutputsUsingUI.end()); + } + } + } + + // Return to the used instruction. + return Outputs; +} diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h new file mode 100644 index 000000000..a4e14b517 --- /dev/null +++ b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h @@ -0,0 +1,77 @@ +#pragma once + +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" + +/// IRCanonicalizer aims to transform LLVM IR into canonical form. +class IRCanonicalizer : public llvm::FunctionPass { + public: + static char ID; + + /// Constructor for the IRCanonicalizer. + /// + /// \param PreserveOrder Preserves original order of instructions. + /// \param RenameAll Renames all instructions (including user-named). + /// \param FoldPreoutputs Folds all regular instructions (including pre-outputs). + /// \param ReorderOperands Sorts and reorders operands in commutative instructions. + IRCanonicalizer(bool PreserveOrder, bool RenameAll, bool FoldPreoutputs, bool ReorderOperands) + : FunctionPass(ID), + PreserveOrder(PreserveOrder), + RenameAll(RenameAll), + FoldPreoutputs(FoldPreoutputs), + ReorderOperands(ReorderOperands) {} + + bool runOnFunction(llvm::Function& F) override; + + private: + // Random constant for hashing, so the state isn't zero. + const uint64_t MagicHashConstant = 0x6acaa36bef8325c5ULL; + + /// \name Canonicalizer flags. + /// @{ + /// Preserves original order of instructions. + bool PreserveOrder; + /// Renames all instructions (including user-named). + bool RenameAll; + /// Folds all regular instructions (including pre-outputs). + bool FoldPreoutputs; + /// Sorts and reorders operands in commutative instructions. + bool ReorderOperands; + /// @} + + /// \name Naming. + /// @{ + void nameFunctionArguments(llvm::Function& F); + void nameBasicBlocks(llvm::Function& F); + void nameInstructions(llvm::SmallVector& Outputs); + void nameInstruction(llvm::Instruction* I, + llvm::SmallPtrSet& Visited); + void nameAsInitialInstruction(llvm::Instruction* I); + void nameAsRegularInstruction(llvm::Instruction* I, + llvm::SmallPtrSet& Visited); + void foldInstructionName(llvm::Instruction* I); + /// @} + + /// \name Reordering. + /// @{ + void reorderInstructions(llvm::SmallVector& Outputs); + void reorderInstruction(llvm::Instruction* Used, llvm::Instruction* User, + llvm::SmallPtrSet& Visited); + void reorderInstructionOperandsByNames(llvm::Instruction* I); + void reorderPHIIncomingValues(llvm::PHINode* PN); + /// @} + + /// \name Utility methods. + /// @{ + llvm::SmallVector collectOutputInstructions(llvm::Function& F); + bool isOutput(const llvm::Instruction* I); + bool isInitialInstruction(const llvm::Instruction* I); + bool hasOnlyImmediateOperands(const llvm::Instruction* I); + llvm::SetVector getOutputFootprint(llvm::Instruction* I, + llvm::SmallPtrSet& Visited); + /// @} +}; diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index a19e26935..1e7c925a1 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -9,6 +9,7 @@ #include #include +#include "IRCanonicalizer.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" @@ -244,6 +245,20 @@ static cl::opt PreserveAssemblyUseListOrder( static cl::opt DebugifyEach( "debugify-each", cl::desc("Start each pass with debugify and end it with check-debugify")); +/// \name Canonicalizer flags. +/// @{ +/// Preserves original order of instructions. +cl::opt PreserveOrder("preserve-order", cl::desc("Preserves original instruction order")); +/// Renames all instructions (including user-named). +cl::opt RenameAll("rename-all", cl::desc("Renames all instructions (including user-named)")); +/// Folds all regular instructions (including pre-outputs). +cl::opt FoldPreoutputs("fold-all", + cl::desc("Folds all regular instructions (including pre-outputs)")); +/// Sorts and reorders operands in commutative instructions. +cl::opt ReorderOperands("reorder-operands", + cl::desc("Sorts and reorders operands in commutative instructions")); +/// @} + class OptCustomPassManager : public legacy::PassManager { DebugifyStatsMap DIStatsMap; @@ -423,6 +438,13 @@ int main(int argc, char** argv) { return 1; } + // Canonicalize IR + IRCanonicalizer Canonicalizer(PreserveOrder, RenameAll, FoldPreoutputs, ReorderOperands); + + for (auto& Function : *Module) { + Canonicalizer.runOnFunction(Function); + } + // Prepare loops dump/configuration yaml file raw_fd_ostream ToolYAMLFile(OutputYAMLFile, EC); yaml::Output Yaml(ToolYAMLFile); From 84e76f758ff78324bae83cc9aa12fd5f0194128e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 01:02:43 -0500 Subject: [PATCH 047/239] move canonicalizer opts to IRCanonicalizer --- .../opt_loops/IRCanonicalizer.cc | 14 ++++++++++++++ .../opt_loops/IRCanonicalizer.h | 13 +++++++++++++ .../opt_loops/opt_loops.cc | 19 +++---------------- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc index a423d5ec0..cbc5131c3 100644 --- a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc +++ b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc @@ -16,6 +16,20 @@ using namespace llvm; +/// \name Canonicalizer flags. +/// @{ +/// Preserves original order of instructions. +cl::opt PreserveOrder("preserve-order", cl::desc("Preserves original instruction order")); +/// Renames all instructions (including user-named). +cl::opt RenameAll("rename-all", cl::desc("Renames all instructions (including user-named)")); +/// Folds all regular instructions (including pre-outputs). +cl::opt FoldPreoutputs("fold-all", + cl::desc("Folds all regular instructions (including pre-outputs)")); +/// Sorts and reorders operands in commutative instructions. +cl::opt ReorderOperands("reorder-operands", + cl::desc("Sorts and reorders operands in commutative instructions")); +/// @} + char IRCanonicalizer::ID = 0; /// Entry method to the IRCanonicalizer. diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h index a4e14b517..7478cecec 100644 --- a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h +++ b/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h @@ -6,6 +6,19 @@ #include "llvm/IR/Function.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" +#include "llvm/Support/CommandLine.h" + +/// \name Canonicalizer flags. +/// @{ +/// Preserves original order of instructions. +extern llvm::cl::opt PreserveOrder; +/// Renames all instructions (including user-named). +extern llvm::cl::opt RenameAll; +/// Folds all regular instructions (including pre-outputs). +extern llvm::cl::opt FoldPreoutputs; +/// Sorts and reorders operands in commutative instructions. +extern llvm::cl::opt ReorderOperands; +/// @} /// IRCanonicalizer aims to transform LLVM IR into canonical form. class IRCanonicalizer : public llvm::FunctionPass { diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 1e7c925a1..6ba0fa6cb 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -209,8 +209,9 @@ cl::opt OutputYAMLFile("emit-yaml", cl::desc("Specify output YAML l cl::opt OutputJSONFile("emit-json", cl::desc("Specify output JSON log filename"), cl::value_desc("filename"), cl::init("/tmp/loops.json")); -// TODO(mostafaelhoushi): add other features like "read-yaml", "print-yaml-after-all", "print-yaml-before-all", -// "print-yaml-after=", "print-yaml-before=" etc. +// TODO(mostafaelhoushi): add other features like "read-yaml", "print-yaml-after-all", +// "print-yaml-before-all", "print-yaml-after=", "print-yaml-before=" etc. /// Loop Optimizations static cl::opt UnrollEnable("floop-unroll", cl::desc("Enable loop unrolling"), @@ -245,20 +246,6 @@ static cl::opt PreserveAssemblyUseListOrder( static cl::opt DebugifyEach( "debugify-each", cl::desc("Start each pass with debugify and end it with check-debugify")); -/// \name Canonicalizer flags. -/// @{ -/// Preserves original order of instructions. -cl::opt PreserveOrder("preserve-order", cl::desc("Preserves original instruction order")); -/// Renames all instructions (including user-named). -cl::opt RenameAll("rename-all", cl::desc("Renames all instructions (including user-named)")); -/// Folds all regular instructions (including pre-outputs). -cl::opt FoldPreoutputs("fold-all", - cl::desc("Folds all regular instructions (including pre-outputs)")); -/// Sorts and reorders operands in commutative instructions. -cl::opt ReorderOperands("reorder-operands", - cl::desc("Sorts and reorders operands in commutative instructions")); -/// @} - class OptCustomPassManager : public legacy::PassManager { DebugifyStatsMap DIStatsMap; From f835fb741ca324879d7e0d1e82c8a0b7716d2908 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 01:05:02 -0500 Subject: [PATCH 048/239] canonicalize becomes optional --- .../loop_optimizations_service/opt_loops/opt_loops.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 6ba0fa6cb..d40b5cf0b 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -233,6 +233,9 @@ static cl::opt Force("f", cl::desc("Enable binary output on terminals")); // Output assembly static cl::opt OutputAssembly("S", cl::desc("Write output as LLVM assembly")); +// Canonicalize the IR +static cl::opt Canonicalize("canonicalize", cl::desc("Canonicalize the IR"), cl::init(false)); + // Preserve use list order static cl::opt PreserveBitcodeUseListOrder( "preserve-bc-uselistorder", cl::desc("Preserve use-list order when writing LLVM bitcode."), @@ -426,10 +429,12 @@ int main(int argc, char** argv) { } // Canonicalize IR - IRCanonicalizer Canonicalizer(PreserveOrder, RenameAll, FoldPreoutputs, ReorderOperands); + if (Canonicalize) { + IRCanonicalizer Canonicalizer(PreserveOrder, RenameAll, FoldPreoutputs, ReorderOperands); - for (auto& Function : *Module) { - Canonicalizer.runOnFunction(Function); + for (auto& Function : *Module) { + Canonicalizer.runOnFunction(Function); + } } // Prepare loops dump/configuration yaml file From 783628d9149a756659d30f4927f56012960ab406 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 01:07:36 -0500 Subject: [PATCH 049/239] call canonicalize using PM --- .../opt_loops/opt_loops.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index d40b5cf0b..ede9e216c 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -428,15 +428,6 @@ int main(int argc, char** argv) { return 1; } - // Canonicalize IR - if (Canonicalize) { - IRCanonicalizer Canonicalizer(PreserveOrder, RenameAll, FoldPreoutputs, ReorderOperands); - - for (auto& Function : *Module) { - Canonicalizer.runOnFunction(Function); - } - } - // Prepare loops dump/configuration yaml file raw_fd_ostream ToolYAMLFile(OutputYAMLFile, EC); yaml::Output Yaml(ToolYAMLFile); @@ -446,6 +437,14 @@ int main(int argc, char** argv) { initializeLoopLogPass(*PassRegistry::getPassRegistry()); OptCustomPassManager PM; + + // Canonicalize IR + if (Canonicalize) { + IRCanonicalizer* Canonicalizer = + new IRCanonicalizer(PreserveOrder, RenameAll, FoldPreoutputs, ReorderOperands); + + PM.add(Canonicalizer); + } LoopConfiguratorPass* LoopConfigurator = new LoopConfiguratorPass(); PM.add(LoopConfigurator); PM.add(createLoopUnrollPass()); From dc386b8b29764ab153bcebfa9306ac49a6337613 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 01:34:48 -0500 Subject: [PATCH 050/239] move IRCanonicalizer to separate directory --- compiler_gym/third_party/LLVM-Canon/BUILD | 26 +++++++++++++++++++ .../LLVM-Canon}/IRCanonicalizer.cc | 0 .../third_party/LLVM-Canon}/IRCanonicalizer.h | 0 .../opt_loops/BUILD | 20 +------------- .../opt_loops/opt_loops.cc | 2 +- 5 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 compiler_gym/third_party/LLVM-Canon/BUILD rename {examples/loop_optimizations_service/opt_loops => compiler_gym/third_party/LLVM-Canon}/IRCanonicalizer.cc (100%) rename {examples/loop_optimizations_service/opt_loops => compiler_gym/third_party/LLVM-Canon}/IRCanonicalizer.h (100%) diff --git a/compiler_gym/third_party/LLVM-Canon/BUILD b/compiler_gym/third_party/LLVM-Canon/BUILD new file mode 100644 index 000000000..21e938f46 --- /dev/null +++ b/compiler_gym/third_party/LLVM-Canon/BUILD @@ -0,0 +1,26 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the LICENSE file +# in the root directory of this source tree. +# +# This package exposes the LLVM optimization pipeline as a CompilerGym service. +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") + +cc_library( + name = "IRCanonicalizer", + srcs = [ + "IRCanonicalizer.cc", + ], + hdrs = [ + "IRCanonicalizer.h", + ], + copts = [ + "-Wall", + "-fdiagnostics-color=always", + "-fno-rtti", + ], + visibility = ["//visibility:public"], + deps = [ + "@llvm//10.0.0", + ], +) diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc b/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc similarity index 100% rename from examples/loop_optimizations_service/opt_loops/IRCanonicalizer.cc rename to compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc diff --git a/examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h b/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.h similarity index 100% rename from examples/loop_optimizations_service/opt_loops/IRCanonicalizer.h rename to compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.h diff --git a/examples/loop_optimizations_service/opt_loops/BUILD b/examples/loop_optimizations_service/opt_loops/BUILD index 2316a4285..7bbb7af82 100644 --- a/examples/loop_optimizations_service/opt_loops/BUILD +++ b/examples/loop_optimizations_service/opt_loops/BUILD @@ -18,26 +18,8 @@ cc_binary( ], visibility = ["//visibility:public"], deps = [ - ":IRCanonicalizer", + "//compiler_gym/third_party/LLVM-Canon:IRCanonicalizer", "@llvm//10.0.0", "@nlohmann_json//:json", ], ) - -cc_library( - name = "IRCanonicalizer", - srcs = [ - "IRCanonicalizer.cc", - ], - hdrs = [ - "IRCanonicalizer.h", - ], - copts = [ - "-Wall", - "-fdiagnostics-color=always", - "-fno-rtti", - ], - deps = [ - "@llvm//10.0.0", - ], -) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index ede9e216c..2c97d74bf 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -9,7 +9,7 @@ #include #include -#include "IRCanonicalizer.h" +#include "compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" From cf378a9661cf78391e96b2466335dae0ea19c83c Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 01:37:34 -0500 Subject: [PATCH 051/239] add license and README --- .../third_party/LLVM-Canon/IRCanonicalizer.cc | 4 + .../third_party/LLVM-Canon/LICENSE.txt | 201 ++++++++++++++++++ compiler_gym/third_party/LLVM-Canon/README.md | 2 + 3 files changed, 207 insertions(+) create mode 100644 compiler_gym/third_party/LLVM-Canon/LICENSE.txt create mode 100644 compiler_gym/third_party/LLVM-Canon/README.md diff --git a/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc b/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc index cbc5131c3..fbd3cf57f 100644 --- a/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc +++ b/compiler_gym/third_party/LLVM-Canon/IRCanonicalizer.cc @@ -1,3 +1,7 @@ +/* Adapted from: + * https://github.com/michalpaszkowski/LLVM-Canon + */ + #include "IRCanonicalizer.h" #include diff --git a/compiler_gym/third_party/LLVM-Canon/LICENSE.txt b/compiler_gym/third_party/LLVM-Canon/LICENSE.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/compiler_gym/third_party/LLVM-Canon/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/compiler_gym/third_party/LLVM-Canon/README.md b/compiler_gym/third_party/LLVM-Canon/README.md new file mode 100644 index 000000000..7dae67e24 --- /dev/null +++ b/compiler_gym/third_party/LLVM-Canon/README.md @@ -0,0 +1,2 @@ +# LLVM-Canon +LLVM-Canon aims to transform LLVM modules into a canonical form by reordering and renaming instructions while preserving the same semantics. From ce3ed13f954c8a53ecf9e8154311e3f488f3a8fe Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:28:27 -0500 Subject: [PATCH 052/239] Remove lines from README Co-authored-by: Chris Cummins --- compiler_gym/third_party/LLVM-Canon/BUILD | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler_gym/third_party/LLVM-Canon/BUILD b/compiler_gym/third_party/LLVM-Canon/BUILD index 21e938f46..a066d4314 100644 --- a/compiler_gym/third_party/LLVM-Canon/BUILD +++ b/compiler_gym/third_party/LLVM-Canon/BUILD @@ -2,8 +2,6 @@ # # This source code is licensed under the MIT license found in the LICENSE file # in the root directory of this source tree. -# -# This package exposes the LLVM optimization pipeline as a CompilerGym service. load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") cc_library( From afb01f958883e4ffd98bba1cc087f44b36e77e17 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:28:42 -0500 Subject: [PATCH 053/239] Remove unnecessary flags Co-authored-by: Chris Cummins --- compiler_gym/third_party/LLVM-Canon/BUILD | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler_gym/third_party/LLVM-Canon/BUILD b/compiler_gym/third_party/LLVM-Canon/BUILD index a066d4314..cda1ea6ed 100644 --- a/compiler_gym/third_party/LLVM-Canon/BUILD +++ b/compiler_gym/third_party/LLVM-Canon/BUILD @@ -13,8 +13,6 @@ cc_library( "IRCanonicalizer.h", ], copts = [ - "-Wall", - "-fdiagnostics-color=always", "-fno-rtti", ], visibility = ["//visibility:public"], From 6933bb63bc2e1a4bbc3a577789b42ad15407154b Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:29:04 -0500 Subject: [PATCH 054/239] Remove unnecessary line Co-authored-by: Chris Cummins --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index 2c97d74bf..db849ba5f 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -326,8 +326,6 @@ class LoopLog : public llvm::FunctionPass { return false; } - - protected: }; char LoopLog::ID = 0; From 5ad5308facc7aefb1b18aa2688c8c5d452641d24 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:55:50 -0500 Subject: [PATCH 055/239] update README of LLVM-Canon repo --- compiler_gym/third_party/LLVM-Canon/README.md | 2 -- compiler_gym/third_party/LLVM-Canon/README.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 compiler_gym/third_party/LLVM-Canon/README.md create mode 100644 compiler_gym/third_party/LLVM-Canon/README.txt diff --git a/compiler_gym/third_party/LLVM-Canon/README.md b/compiler_gym/third_party/LLVM-Canon/README.md deleted file mode 100644 index 7dae67e24..000000000 --- a/compiler_gym/third_party/LLVM-Canon/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# LLVM-Canon -LLVM-Canon aims to transform LLVM modules into a canonical form by reordering and renaming instructions while preserving the same semantics. diff --git a/compiler_gym/third_party/LLVM-Canon/README.txt b/compiler_gym/third_party/LLVM-Canon/README.txt new file mode 100644 index 000000000..1796e515c --- /dev/null +++ b/compiler_gym/third_party/LLVM-Canon/README.txt @@ -0,0 +1,8 @@ +This directory contains code from this repo: + + LLVM-Canon + by Michał Paszkowski, @michalpaszkowski + +Upstream: https://github.com/michalpaszkowski/LLVM-Canon +License: Apache License 2.0 +Git commit: 757630f0aeb475165ec796e6eff8f23a4534d464 From d2fe9806c92ac4e495deced6ce52f9bc20f8bf0e Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:56:47 -0500 Subject: [PATCH 056/239] Fix letter case Co-authored-by: Chris Cummins --- examples/loop_optimizations_service/opt_loops/opt_loops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/loop_optimizations_service/opt_loops/opt_loops.cc b/examples/loop_optimizations_service/opt_loops/opt_loops.cc index db849ba5f..2b7ce73f5 100644 --- a/examples/loop_optimizations_service/opt_loops/opt_loops.cc +++ b/examples/loop_optimizations_service/opt_loops/opt_loops.cc @@ -366,7 +366,7 @@ char LoopConfiguratorPass::ID = 1; /// On error, messages are written to stderr and null is returned. /// /// \param Context LLVM Context for the module. -/// \param Name Input file Name. +/// \param Name Input file name. static std::unique_ptr readModule(LLVMContext& Context, StringRef Name) { SMDiagnostic Diag; std::unique_ptr Module = parseIRFile(Name, Diag, Context); From df360cac6f26e0f727bd9f575a7215088369687a Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Mon, 7 Feb 2022 22:59:56 -0500 Subject: [PATCH 057/239] update readme instructions --- examples/loop_optimizations_service/opt_loops/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/loop_optimizations_service/opt_loops/README.md b/examples/loop_optimizations_service/opt_loops/README.md index 42cb77dae..aa1003b39 100644 --- a/examples/loop_optimizations_service/opt_loops/README.md +++ b/examples/loop_optimizations_service/opt_loops/README.md @@ -1,10 +1,12 @@ LLVM's opt does not always enforce the unrolling or vectorization options passed as cli arguments. Hence, we created our own exeutable with custom unrolling pass in examples/loop_optimizations_service/loop_unroller that enforces the unrolling factors passed in its cli. +The tool also logs the configuration and IR of each loop to a JSON file (if you specify `--emit-json`) or YAML file (if you specify `--emit-yaml`). + ## Usage To run the custom unroller: ``` -bazel run //examples/loop_optimizations_service/opt_loops:opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll -emit-yaml= +bazel run //examples/loop_optimizations_service/opt_loops:opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll --emit-yaml= ``` ### Using the python service without bazel @@ -15,5 +17,5 @@ Follow the [Building from source using CMake](../../INSTALL.md#building-from-sou 2. Run the example from the `examples` directory of the repo ```sh $ cd examples -$ loop_optimizations_service/opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll -emit-yaml= +$ loop_optimizations_service/opt_loops -- .ll --funroll-count= --force-vector-width= -S -o .ll --emit-yaml= ``` From 01177bf751f29472cd4e4c38e5eb4aab8fa831d4 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 058/239] Remove unused cpp-suprocess dependency. --- WORKSPACE | 19 ---------- build_tools/cmake/FindSubprocess.cmake | 37 ------------------- compiler_gym/envs/llvm/service/CMakeLists.txt | 1 - external/external.cmake | 14 +------ external/subprocess/CMakeLists.txt | 23 ------------ 5 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 build_tools/cmake/FindSubprocess.cmake delete mode 100644 external/subprocess/CMakeLists.txt diff --git a/WORKSPACE b/WORKSPACE index 95b207686..941d88963 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -40,25 +40,6 @@ http_archive( urls = ["https://github.com/google/glog/archive/v0.4.0.tar.gz"], ) -# C++ subprocess management. https://github.com/arun11299/cpp-subprocess - -http_archive( - name = "subprocess", - build_file_content = """ -cc_library( - name = "subprocess", - hdrs = ["subprocess.hpp"], - include_prefix = "subprocess", - visibility = ["//visibility:public"], -) -""", - sha256 = "886df0a814a7bb7a3fdeead22f75400abd8d3235b81d05817bc8c1125eeebb8f", - strip_prefix = "cpp-subprocess-2.0", - urls = [ - "https://github.com/arun11299/cpp-subprocess/archive/v2.0.tar.gz", - ], -) - # === LLVM === http_archive( diff --git a/build_tools/cmake/FindSubprocess.cmake b/build_tools/cmake/FindSubprocess.cmake deleted file mode 100644 index f10729f1e..000000000 --- a/build_tools/cmake/FindSubprocess.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -#[=======================================================================[.rst: -Find Subprocess headers and library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -``Subprocess::libsubprocess`` - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables in your project: - -``Subprocess_FOUND`` - true if Subprocess is available. - - -#]=======================================================================] - -include(FindPackageHandleStandardArgs) - -find_path(Subprocess_INCLUDE_DIRS subprocess/subprocess.hpp) -if (Subprocess_INCLUDE_DIRS) - add_library(Subprocess::libsubprocess INTERFACE IMPORTED) - set_target_properties(Subprocess::libsubprocess PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${Subprocess_INCLUDE_DIRS}") -endif() - - -find_package_handle_standard_args(Subprocess - REQUIRED_VARS - Subprocess_INCLUDE_DIRS) diff --git a/compiler_gym/envs/llvm/service/CMakeLists.txt b/compiler_gym/envs/llvm/service/CMakeLists.txt index 3fdd67f9d..4052e151c 100644 --- a/compiler_gym/envs/llvm/service/CMakeLists.txt +++ b/compiler_gym/envs/llvm/service/CMakeLists.txt @@ -210,7 +210,6 @@ cg_cc_library( ProGraML::graph::format::node_link_graph ProGraML::ir::llvm::llvm-10 ProGraML::proto::programl_cc - Subprocess::libsubprocess CpuInfo::cpuinfo Clog::libclog INCLUDES diff --git a/external/external.cmake b/external/external.cmake index b4644703c..54c04b421 100644 --- a/external/external.cmake +++ b/external/external.cmake @@ -96,19 +96,7 @@ else() find_package(glog REQUIRED) endif() -# # C++ subprocess management. https://github.com/arun11299/cpp-subprocess - -set(COMPILER_GYM_SUBPROCESS_PROVIDER "internal" CACHE STRING "Find or build subprocess together with Compiler Gym.") -set_property(CACHE COMPILER_GYM_SUBPROCESS_PROVIDER PROPERTY STRINGS "internal" "external") -if(COMPILER_GYM_SUBPROCESS_PROVIDER STREQUAL "internal") - build_external_cmake_project( - NAME subprocess - SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/subprocess" - ) -endif() -find_package(Subprocess REQUIRED) - -# # === LLVM === +# === LLVM === set(COMPILER_GYM_LLVM_PROVIDER "internal" CACHE STRING "Find or build llvm together with Compiler Gym.") set_property(CACHE COMPILER_GYM_LLVM_PROVIDER PROPERTY STRINGS "internal" "external") diff --git a/external/subprocess/CMakeLists.txt b/external/subprocess/CMakeLists.txt deleted file mode 100644 index 6e8cab5a7..000000000 --- a/external/subprocess/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -project(gflags) -cmake_minimum_required(VERSION 3.15) - -include(ExternalProject) - -ExternalProject_Add( - subprocess - PREFIX "${CMAKE_CURRENT_BINARY_DIR}/subprocess" - GIT_REPOSITORY "https://github.com/arun11299/cpp-subprocess.git" - GIT_TAG 9c624ce4e3423cce9f148bafbae56abfd6437ea0 #tag v2.0 - CMAKE_ARGS - -C "${CMAKE_CURRENT_BINARY_DIR}/subprocess_initial_cache.cmake" - "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" - "-DCMAKE_CXX_FLAGS=-pthread" - USES_TERMINAL_CONFIGURE TRUE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE -) From e72aae34328e35c4e126f402dd9c05e9c405175c Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 059/239] Tiny comment style tidy up. --- external/external.cmake | 48 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/external/external.cmake b/external/external.cmake index 54c04b421..c02ca429a 100644 --- a/external/external.cmake +++ b/external/external.cmake @@ -10,7 +10,7 @@ include(build_external_cmake_project) unset(FETCH_CONTENT_LIST) -# # === Google test === +# === Google test === set(COMPILER_GYM_GTEST_PROVIDER "internal" CACHE STRING "Find or build gtest together with Compiler Gym.") set_property(CACHE COMPILER_GYM_GTEST_PROVIDER PROPERTY STRINGS "internal" "external") @@ -28,7 +28,7 @@ else() find_package(GTest REQUIRED) endif() -# # === Google benchmark === +# === Google benchmark === set(COMPILER_GYM_BENCHMARK_PROVIDER "internal" CACHE STRING "Find or build benchmark together with Compiler Gym.") set_property(CACHE COMPILER_GYM_BENCHMARK_PROVIDER PROPERTY STRINGS "internal" "external") @@ -57,7 +57,7 @@ else() find_package(benchmark REQUIRED) endif() -# # === Abseil === +# === Abseil === set(COMPILER_GYM_ABSEIL_PROVIDER "internal" CACHE STRING "Find or build abseil together with Compiler Gym.") set_property(CACHE COMPILER_GYM_ABSEIL_PROVIDER PROPERTY STRINGS "internal" "external") @@ -68,7 +68,7 @@ if(COMPILER_GYM_ABSEIL_PROVIDER STREQUAL "internal") endif() find_package(absl REQUIRED) -# # === Google flags === +# === Google flags === set(COMPILER_GYM_GFLAGS_PROVIDER "internal" CACHE STRING "Find or build gflags together with Compiler Gym.") set_property(CACHE COMPILER_GYM_GFLAGS_PROVIDER PROPERTY STRINGS "internal" "external") @@ -79,8 +79,7 @@ if(COMPILER_GYM_GFLAGS_PROVIDER STREQUAL "internal") endif() find_package(gflags REQUIRED) - -# # === Google logging === +# === Google logging === set(COMPILER_GYM_GLOG_PROVIDER "internal" CACHE STRING "Find or build glog together with Compiler Gym.") set_property(CACHE COMPILER_GYM_GLOG_PROVIDER PROPERTY STRINGS "internal" "external") @@ -109,8 +108,7 @@ find_package(LLVM 10.0.0 EXACT REQUIRED) # In a bunch of places in the code it is used "#include " list(APPEND LLVM_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/external/llvm/install") - -# # === Protocol buffers === +# === Protocol buffers === set(COMPILER_GYM_PROTOBUF_PROVIDER "internal" CACHE STRING "Find or build protobuf together with Compiler Gym.") set_property(CACHE COMPILER_GYM_PROTOBUF_PROVIDER PROPERTY STRINGS "internal" "external") @@ -137,7 +135,7 @@ if(COMPILER_GYM_PROTOBUF_PROVIDER STREQUAL "internal") endif() find_package(Protobuf REQUIRED) -# # === GRPC === +# === GRPC === set(COMPILER_GYM_GRPC_PROVIDER "internal" CACHE STRING "Find or build gRPC together with Compiler Gym.") set_property(CACHE COMPILER_GYM_GRPC_PROVIDER PROPERTY STRINGS "internal" "external") @@ -185,8 +183,8 @@ else() set(_GRPC_CPP_PLUGIN_EXECUTABLE $) endif() -# # === C++ enum trickery === -# # https://github.com/Neargye/magic_enum +# === C++ enum trickery === +# https://github.com/Neargye/magic_enum set(COMPILER_GYM_MAGIC_ENUM_PROVIDER "internal" CACHE STRING "Find or build magic_enum together with Compiler Gym.") set_property(CACHE COMPILER_GYM_MAGIC_ENUM_PROVIDER PROPERTY STRINGS "internal" "external") @@ -202,8 +200,8 @@ else() find_package(magic_enum REQUIRED) endif() -# # === ctuning-programs === -# # https://github.com/ChrisCummins/ctuning-programs +# === ctuning-programs === +# https://github.com/ChrisCummins/ctuning-programs # This seems to be unused. #ExternalProject_Add( @@ -228,8 +226,8 @@ source_group( FILES "ctuning-programs/README.md" ) -# # === cBench === -# # https://ctuning.org/wiki/index.php/CTools:CBench +# === cBench === +# https://ctuning.org/wiki/index.php/CTools:CBench FetchContent_Declare( cBench @@ -250,7 +248,7 @@ FetchContent_Declare( FetchContent_MakeAvailable(ctuning-ai) FetchContent_GetProperties(ctuning-ai SOURCE_DIR ctuning_ai_SRC_DIR) -# # Datasets. +# Datasets. FetchContent_Declare( cBench_consumer_tiff_data @@ -362,7 +360,7 @@ FetchContent_MakeAvailable(cBench_automotive_qsort_data) set(cBench_automotive_qsort_data_FILE "${CMAKE_CURRENT_BINARY_DIR}/external/cBench_automotive_qsort_data/src/cDatasets_V1.1_automotive_qsort_data.tar.gz") -# # === C++ cpuinfo === +# === C++ cpuinfo === set(COMPILER_GYM_CPUINFO_PROVIDER "internal" CACHE STRING "Find or build cpuinfo together with Compiler Gym.") set_property(CACHE COMPILER_GYM_CPUINFO_PROVIDER PROPERTY STRINGS "internal" "external") @@ -389,8 +387,8 @@ find_package(Clog REQUIRED) # "${_CpuInfo_LINK_LIBS}") -# # === Csmith === -# # https://embed.cs.utah.edu/csmith/ +# === Csmith === +# https://embed.cs.utah.edu/csmith/ build_external_cmake_project( NAME csmith @@ -398,8 +396,8 @@ build_external_cmake_project( INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/external/csmith/install/csmith") find_package(Csmith REQUIRED) -# # === DeepDataFlow === -# # https://zenodo.org/record/4122437 +# === DeepDataFlow === +# https://zenodo.org/record/4122437 #FetchContent_Declare( # DeepDataFlow @@ -427,7 +425,7 @@ else() find_package(fmt REQUIRED) endif() -# # === Boost === +# === Boost === set(COMPILER_GYM_BOOST_PROVIDER "internal" CACHE STRING "Find or build boost together with Compiler Gym.") set_property(CACHE COMPILER_GYM_BOOST_PROVIDER PROPERTY STRINGS "internal" "external") @@ -441,7 +439,7 @@ if(COMPILER_GYM_BOOST_PROVIDER STREQUAL "internal") endif() find_package(Boost REQUIRED COMPONENTS filesystem headers) -# # === nlohmann_json === +# === nlohmann_json === set(COMPILER_GYM_NLOHMANN_JSON_PROVIDER "internal" CACHE STRING "Find or build nlohmann_json together with Compiler Gym.") set_property(CACHE COMPILER_GYM_NLOHMANN_JSON_PROVIDER PROPERTY STRINGS "internal" "external") @@ -457,8 +455,8 @@ else() find_package(nlohmann_json REQUIRED) endif() -# # === ProGraML === -# # https://github.com/ChrisCummins/ProGraML +# === ProGraML === +# https://github.com/ChrisCummins/ProGraML build_external_cmake_project( NAME programl From 2bcde65ec9b2c606d0b9063162bc5cd5fdd86642 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 060/239] [cmake] Remove Polly from the LLVM build. The polly project is not used by CompilerGym. --- compiler_gym/envs/llvm/service/CMakeLists.txt | 11 ----------- compiler_gym/third_party/autophase/CMakeLists.txt | 9 --------- compiler_gym/third_party/llvm/CMakeLists.txt | 9 --------- external/llvm/CMakeLists.txt | 2 +- 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/compiler_gym/envs/llvm/service/CMakeLists.txt b/compiler_gym/envs/llvm/service/CMakeLists.txt index 4052e151c..f74b7c2f4 100644 --- a/compiler_gym/envs/llvm/service/CMakeLists.txt +++ b/compiler_gym/envs/llvm/service/CMakeLists.txt @@ -7,8 +7,6 @@ cg_add_all_subdirs() set(_DEPS "compiler_gym-llvm-service") if(DARWIN) - list(APPEND _DEPS ::libLLVMPolly) - #TODO(boian): figure out what is this target. #list(APPEND _DEPS "@llvm//:darwin") endif() cg_filegroup( @@ -16,15 +14,6 @@ cg_filegroup( DEPENDS ${_DEPS} ) -cg_genrule( - NAME libLLVMPolly - OUTS "libLLVMPolly.so" - COMMAND - "cp $ $@" - ABS_DEPENDS - LLVMPolly -) - cg_cc_binary( NAME compiler_gym-llvm-service diff --git a/compiler_gym/third_party/autophase/CMakeLists.txt b/compiler_gym/third_party/autophase/CMakeLists.txt index 61ac60c25..72d183a0b 100644 --- a/compiler_gym/third_party/autophase/CMakeLists.txt +++ b/compiler_gym/third_party/autophase/CMakeLists.txt @@ -52,12 +52,3 @@ cg_cc_binary( DEFINES ${LLVM_DEFINITIONS} ) - -cg_genrule( - NAME libLLVMPolly - OUTS "libLLVMPolly.so" - COMMAND - "cp $ $@" - ABS_DEPENDS - LLVMPolly -) diff --git a/compiler_gym/third_party/llvm/CMakeLists.txt b/compiler_gym/third_party/llvm/CMakeLists.txt index 700e2dede..762d243d5 100644 --- a/compiler_gym/third_party/llvm/CMakeLists.txt +++ b/compiler_gym/third_party/llvm/CMakeLists.txt @@ -33,15 +33,6 @@ cg_cc_binary( ${LLVM_DEFINITIONS} ) -cg_genrule( - NAME libLLVMPolly - OUTS "libLLVMPolly.so" - COMMAND - "cp $ $@" - ABS_DEPENDS - LLVMPolly -) - cg_py_library( NAME instcount diff --git a/external/llvm/CMakeLists.txt b/external/llvm/CMakeLists.txt index fe2fddbe8..91ee80d8f 100644 --- a/external/llvm/CMakeLists.txt +++ b/external/llvm/CMakeLists.txt @@ -32,7 +32,7 @@ else() set(_INSTALL_COMMAND "${CMAKE_COMMAND}" --install "") endif() -file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/llvm_initial_cache.cmake" "set(LLVM_ENABLE_PROJECTS \"clang;polly\" CACHE STRING \"\")\n") +file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/llvm_initial_cache.cmake" "set(LLVM_ENABLE_PROJECTS \"clang\" CACHE STRING \"\")\n") ExternalProject_Add( llvm From 201996de6d639a0fa31b05a875248874344de817 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 061/239] [cmake] Fix implicit conversion to STRING warning. Fixes the (harmless) typo "string" in place of "STRING", causing the following warning: -- Install configuration: "Release" CMake Warning (dev) at build_tools/cmake/FindCsmith.cmake:52 (set): implicitly converting 'string' to 'STRING' type. Call Stack (most recent call first): external/external.cmake:397 (find_package) CMakeLists.txt:64 (include) This warning is for project developers. Use -Wno-dev to suppress it. --- build_tools/cmake/FindCsmith.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/cmake/FindCsmith.cmake b/build_tools/cmake/FindCsmith.cmake index 114f74f89..256881534 100644 --- a/build_tools/cmake/FindCsmith.cmake +++ b/build_tools/cmake/FindCsmith.cmake @@ -49,7 +49,7 @@ if (Csmith_EXECUTABLE) get_filename_component(Csmith_ROOT_DIR "${Csmith_EXECUTABLE}" DIRECTORY) get_filename_component(Csmith_ROOT_DIR "${Csmith_ROOT_DIR}/.." ABSOLUTE) - set(Csmith_ROOT_DIR "${Csmith_ROOT_DIR}" CACHE string "Path to the root installation directory of Csmith.") + set(Csmith_ROOT_DIR "${Csmith_ROOT_DIR}" CACHE STRING "Path to the root installation directory of Csmith.") endif() find_path(Csmith_INCLUDE_DIRS csmith.h PATH_SUFFIXES csmith csmith-2.3.0) find_library(Csmith_LIBRARIES csmith) From f59b59743a5665b8e0569af882a60e00ca7ec3cb Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Tue, 8 Feb 2022 18:43:18 -0500 Subject: [PATCH 062/239] enable CMake build of IRCanonicalizer --- .../third_party/LLVM-Canon/CMakeLists.txt | 24 ++++++++++++++++ .../opt_loops/CMakeLists.txt | 28 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 compiler_gym/third_party/LLVM-Canon/CMakeLists.txt create mode 100644 examples/loop_optimizations_service/opt_loops/CMakeLists.txt diff --git a/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt b/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt new file mode 100644 index 000000000..5d85b5fa4 --- /dev/null +++ b/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +cg_add_all_subdirs() + + +llvm_map_components_to_libnames(_LLVM_LIBS analysis core irreader support passes) +cg_cc_library( + NAME + IRCanonicalizer + SRCS + "IRCanonicalizer.cc" + COPTS + "-fno-rtti" + ABS_DEPS + ${_LLVM_LIBS} + INCLUDES + ${LLVM_INCLUDE_DIRS} + DEFINES + ${LLVM_DEFINITIONS} +) + diff --git a/examples/loop_optimizations_service/opt_loops/CMakeLists.txt b/examples/loop_optimizations_service/opt_loops/CMakeLists.txt new file mode 100644 index 000000000..082141d49 --- /dev/null +++ b/examples/loop_optimizations_service/opt_loops/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +cg_add_all_subdirs() + + +llvm_map_components_to_libnames(_LLVM_LIBS analysis core irreader support passes) +cg_cc_binary( + NAME + opt_loops + SRCS + "opt_loops.cc" + COPTS + "-fno-rtti" + ABS_DEPS + ${_LLVM_LIBS} + nlohmann_json::nlohmann_json + compiler_gym::third_party::LLVM-Canon::IRCanonicalizer + INCLUDES + ${LLVM_INCLUDE_DIRS} + DEFINES + ${LLVM_DEFINITIONS} +) + +ADD_CUSTOM_TARGET(link_opt_loops_target ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/examples/loop_optimizations_service/opt_loops/opt_loops ${CMAKE_SOURCE_DIR}/examples/loop_optimizations_service/opt_loops/opt_loops) From 1476ab021d32ed9b29fc72e410bfa116fd83b8b3 Mon Sep 17 00:00:00 2001 From: Mostafa Elhoushi Date: Tue, 8 Feb 2022 22:14:52 -0500 Subject: [PATCH 063/239] make pre-commit hook happy --- compiler_gym/third_party/LLVM-Canon/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt b/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt index 5d85b5fa4..49ee73075 100644 --- a/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt +++ b/compiler_gym/third_party/LLVM-Canon/CMakeLists.txt @@ -21,4 +21,3 @@ cg_cc_library( DEFINES ${LLVM_DEFINITIONS} ) - From 1d95739e051b63da1ad6d4af2e3e61056b38c3aa Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 064/239] Strip "include/" prefix for LLVM headers. --- compiler_gym/envs/llvm/service/Benchmark.h | 2 +- compiler_gym/envs/llvm/service/passes/config.py | 11 ++++++----- .../llvm/service/passes/make_action_space_genfiles.py | 4 ++-- external/external.cmake | 2 -- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Benchmark.h b/compiler_gym/envs/llvm/service/Benchmark.h index 5be168938..d6e07c93d 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.h +++ b/compiler_gym/envs/llvm/service/Benchmark.h @@ -14,9 +14,9 @@ #include "compiler_gym/envs/llvm/service/Cost.h" #include "compiler_gym/service/proto/compiler_gym_service.pb.h" #include "compiler_gym/util/Subprocess.h" -#include "include/llvm/IR/ModuleSummaryIndex.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/IR/ModuleSummaryIndex.h" namespace compiler_gym::llvm_service { diff --git a/compiler_gym/envs/llvm/service/passes/config.py b/compiler_gym/envs/llvm/service/passes/config.py index 45e6e7f64..bb856fc96 100644 --- a/compiler_gym/envs/llvm/service/passes/config.py +++ b/compiler_gym/envs/llvm/service/passes/config.py @@ -7,11 +7,12 @@ # A set of headers that must be included. EXTRA_LLVM_HEADERS = { - "include/llvm/LinkAllPasses.h", - "include/llvm/Transforms/Coroutines.h", - "include/llvm/Transforms/IPO.h", - "include/llvm/Transforms/Scalar.h", - "include/llvm/Transforms/Utils.h", + "llvm/LinkAllPasses.h", + "llvm/Transforms/Coroutines.h", + "llvm/Transforms/Instrumentation.h", + "llvm/Transforms/IPO.h", + "llvm/Transforms/Scalar.h", + "llvm/Transforms/Utils.h", } # A mapping from the name of a pass as defined in a INITIALIZE_PASS(name, ...) diff --git a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py index 3265525d7..5a61b5081 100644 --- a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py +++ b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py @@ -18,8 +18,8 @@ Example: #pragma once - #include "include/llvm/LinkAllPasses.h" - #include "include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h" + #include "llvm/LinkAllPasses.h" + #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h" ... This file includes the set of LLVM headers that must be included to use the diff --git a/external/external.cmake b/external/external.cmake index c02ca429a..feef0b346 100644 --- a/external/external.cmake +++ b/external/external.cmake @@ -105,8 +105,6 @@ build_external_cmake_project( CONFIG_ARGS "-DCOMPILER_GYM_LLVM_PROVIDER=${COMPILER_GYM_LLVM_PROVIDER}") set(LLVM_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/llvm/llvm/src/llvm") find_package(LLVM 10.0.0 EXACT REQUIRED) -# In a bunch of places in the code it is used "#include " -list(APPEND LLVM_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/external/llvm/install") # === Protocol buffers === From eb191aa06d2af028c7cd7c383f2d67ceb14ac3e5 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 065/239] Fix a small typo. --- compiler_gym/envs/llvm/service/passes/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler_gym/envs/llvm/service/passes/BUILD b/compiler_gym/envs/llvm/service/passes/BUILD index 157d0f44b..b3442554b 100644 --- a/compiler_gym/envs/llvm/service/passes/BUILD +++ b/compiler_gym/envs/llvm/service/passes/BUILD @@ -2,7 +2,7 @@ # and converting them to an action space for reinforcement learning. # # These scripts are used to programatically generate C++ headers and sources -# that are then used to compiler the C++ LLVM compiler service. +# that are then used to compile the LLVM compiler service. load("@rules_python//python:defs.bzl", "py_binary", "py_library") genrule( From f83a24c88f3add29fe74adff6945d524c12b5eb8 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 066/239] Add a suitable menacing warning comment. --- .../extract_passes_from_llvm_source_tree.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py b/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py index 0ea0ccd4a..a237c41ba 100644 --- a/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py +++ b/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py @@ -18,7 +18,7 @@ This implements a not-very-good parser for the INITIALIZE_PASS() family of macros, which are used in the LLVM sources to declare a pass using it's name, flag, and docstring. Parsing known macros like this is fragile and likely to -break as the LLVM sources evolve. Currently only tested on LLVM 10.0. +break as the LLVM sources evolve. Currently only tested on LLVM 10.0 and 13.0.1. A more robust solution would be to parse the C++ sources and extract all classes which inherit from ModulePass etc. @@ -56,6 +56,24 @@ def parse_initialize_pass( source_path: Path, header: Optional[str], input_source: str, defines: Dict[str, str] ) -> Iterable[Pass]: """A shitty parser for INITIALIZE_PASS() macro invocations..""" + # **************************************************** + # __ _ + # _/ \ _(\(o + # / \ / _ ^^^o + # / ! \/ ! '!!!v' + # ! ! \ _' ( \____ + # ! . \ _!\ \===^\) + # \ \_! / __! + # \! / \ + # (\_ _/ _\ ) + # \ ^^--^^ __-^ /(__ + # ^^----^^ "^--v' + # + # HERE BE DRAGONS! + # + # TODO(cummins): Take this code out back and shoot it. + # **************************************************** + # Squish down to a single line. source = re.sub(r"\n\s*", " ", input_source, re.MULTILINE) # Contract multi-spaces to single space. From a656289c5dddd44b2b65ff3670221fa248355b18 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 8 Feb 2022 12:40:27 +0000 Subject: [PATCH 067/239] [llvm] Improve the pass list parsing. This makes the (dodgy AF) C++ parsing logic slightly more robust by fixing a couple of bugs where concatenated string were not correctly interpreted, and where comments were not parsed properly. --- .../extract_passes_from_llvm_source_tree.py | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py b/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py index a237c41ba..27fb0b70f 100644 --- a/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py +++ b/compiler_gym/envs/llvm/service/passes/extract_passes_from_llvm_source_tree.py @@ -28,6 +28,7 @@ import logging import os import re +import shlex import subprocess import sys from pathlib import Path @@ -92,6 +93,7 @@ def parse_initialize_pass( start = 0 in_quotes = False in_comment = False + substr = "" for i in range(len(source)): if ( not in_comment @@ -100,6 +102,7 @@ def parse_initialize_pass( and source[i + 1] == "*" ): in_comment = True + substr += source[start:i].strip() if ( in_comment and source[i] == "*" @@ -111,9 +114,11 @@ def parse_initialize_pass( if source[i] == '"': in_quotes = not in_quotes if not in_quotes and source[i] == ",": - components.append(source[start:i].strip()) + substr += source[start:i].strip() + components.append(substr) + substr = "" start = i + 2 - components.append(source[start:].strip()) + components.append(substr + source[start:].strip()) if len(components) != 5: raise ParseError( f"Expected 5 components, found {len(components)}", source, components @@ -126,14 +131,18 @@ def parse_initialize_pass( if not name: raise ParseError(f"Empty name: `{name}`", source, components) - while arg in defines: - arg = defines[arg] + # Dodgy code to combine adjacent strings with macro expansion. For example, + # 'DEBUG_TYPE "-foo"'. + arg_components = shlex.split(arg) + for i, _ in enumerate(arg_components): + while arg_components[i] in defines: + arg_components[i] = defines[arg_components[i]] + arg = " ".join(arg_components) + if arg[0] == '"' and arg[-1] == '"': + arg = arg[1:-1] + while name in defines: name = defines[name] - - if not (arg[0] == '"' and arg[-1] == '"'): - raise ParseError(f"Could not interpret arg `{arg}`", source, components) - arg = arg[1:-1] if not (name[0] == '"' and name[-1] == '"'): raise ParseError(f"Could not interpret name `{name}`", source, components) name = name[1:-1] From d608eac97139a101cf6d57f830ff58ee24de981e Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 15 Feb 2022 16:35:01 +0000 Subject: [PATCH 068/239] [llvm] Tidy up and minimize the included header set. --- compiler_gym/envs/llvm/service/passes/config.py | 10 ++++------ .../llvm/service/passes/make_action_space_genfiles.py | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler_gym/envs/llvm/service/passes/config.py b/compiler_gym/envs/llvm/service/passes/config.py index bb856fc96..ed9bd7be1 100644 --- a/compiler_gym/envs/llvm/service/passes/config.py +++ b/compiler_gym/envs/llvm/service/passes/config.py @@ -5,14 +5,12 @@ """Configuration for building an action space from a list of LLVM passes.""" from common import Pass -# A set of headers that must be included. -EXTRA_LLVM_HEADERS = { +# A set of headers that must be included to use the generated pass list. +LLVM_ACTION_INCLUDES = { "llvm/LinkAllPasses.h", + # A handle of coroutine utility passes are not pulled in by the + # LinkAllPasses.h header. "llvm/Transforms/Coroutines.h", - "llvm/Transforms/Instrumentation.h", - "llvm/Transforms/IPO.h", - "llvm/Transforms/Scalar.h", - "llvm/Transforms/Utils.h", } # A mapping from the name of a pass as defined in a INITIALIZE_PASS(name, ...) diff --git a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py index 5a61b5081..ffc31b539 100644 --- a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py +++ b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py @@ -82,7 +82,7 @@ from pathlib import Path from common import Pass -from config import EXTRA_LLVM_HEADERS +from config import LLVM_ACTION_INCLUDES logger = logging.getLogger(__name__) @@ -103,7 +103,7 @@ def process_pass(pass_, headers, enum_f, switch_f): def make_action_sources(pass_iterator, outpath: Path): """Generate the enum and switch content.""" total_passes = 0 - headers = set(EXTRA_LLVM_HEADERS) + headers = set(LLVM_ACTION_INCLUDES) passes = sorted(list(pass_iterator), key=lambda p: p.name) From 2c2e81ef2ba3cfa9a06c61f9e51267bcf11cbe53 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 10:05:40 +0000 Subject: [PATCH 069/239] [llvm] Fix include path for LLVM headers. --- .../envs/llvm/service/passes/make_action_space_genfiles.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py index ffc31b539..26217fa62 100644 --- a/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py +++ b/compiler_gym/envs/llvm/service/passes/make_action_space_genfiles.py @@ -90,7 +90,11 @@ def process_pass(pass_, headers, enum_f, switch_f): """Extract and process transform passes in header.""" if pass_.header: - headers.add(pass_.header) + # Strip a leading "include/" from the header path. + header = pass_.header + if header.startswith("include/"): + header = header[len("include/") :] + headers.add(header) # The name of the pass in UPPER_PASCAL_CASE. enum_name = pass_.flag[1:].replace("-", "_").upper() From 10fe4a2374921ed0bf0d5bf218afa633908fb081 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 12:03:32 +0000 Subject: [PATCH 070/239] Add missing copyright header. --- compiler_gym/third_party/inst2vec/BUILD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler_gym/third_party/inst2vec/BUILD b/compiler_gym/third_party/inst2vec/BUILD index d0b260fa9..e9bd7c0e0 100644 --- a/compiler_gym/third_party/inst2vec/BUILD +++ b/compiler_gym/third_party/inst2vec/BUILD @@ -1,3 +1,8 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +# # This package contains a modified implementation of inst2vec. load("@rules_python//python:defs.bzl", "py_library") From fa8f9c75f2629d145cb0d87e5403d333116523a2 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 12:04:38 +0000 Subject: [PATCH 071/239] Alphabetize list of data dependencies. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3e21ef5df..d9b6bcc38 100644 --- a/setup.py +++ b/setup.py @@ -147,9 +147,9 @@ def wheel_filename(**kwargs): "compiler_gym": [ "envs/gcc/service/compiler_gym-gcc-service", "envs/llvm/service/compiler_gym-llvm-service", - "envs/loop_tool/service/compiler_gym-loop_tool-service", - "envs/llvm/service/libLLVMPolly.so", "envs/llvm/service/compute_observation", + "envs/llvm/service/libLLVMPolly.so", + "envs/loop_tool/service/compiler_gym-loop_tool-service", "third_party/cbench/benchmarks.txt", "third_party/cbench/cbench-v*/crc32.bc", "third_party/csmith/csmith/bin/csmith", From debd0f885192689654b1ae28d8852b9fdf93d63c Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 07:11:14 -0800 Subject: [PATCH 072/239] [service] Loosen gRPC constraints on message sizes. Remove the size limit on incoming and outgoing messages, and increase the mazimum allowed metadata message size. This is all to improve the reliability of the service when working with particuluarly large programs / observations, that can exceed the quite tight default resource constraints in gRPC. --- compiler_gym/service/connection.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index 3a14e0ce1..4a887eff3 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -35,8 +35,11 @@ from compiler_gym.util.truncate import truncate_lines GRPC_CHANNEL_OPTIONS = [ - # Raise the default inbound message filter from 4MB. - ("grpc.max_receive_message_length", 512 * 1024 * 1024), + # Disable the inbound message length filter to allow for large messages such + # as observations. + ("grpc.max_receive_message_length", -1), + # Fix for "received initial metadata size exceeds limit" + ("grpc.max_metadata_size", 512 * 1024), # Spurious error UNAVAILABLE "Trying to connect an http1.x server". # https://putridparrot.com/blog/the-unavailable-trying-to-connect-an-http1-x-server-grpc-error/ ("grpc.enable_http_proxy", 0), From d5a8669fe80be1f1030b287b0879fadccafb0d34 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 23:47:06 +0000 Subject: [PATCH 073/239] [tests] Disable pytest resource warning capture. Issue #459. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f9c70b212..3ee451e38 100644 --- a/tox.ini +++ b/tox.ini @@ -13,3 +13,4 @@ ignore = E501, E302, W503, E203 filterwarnings = error ignore::pytest.PytestAssertRewriteWarning: + ignore::ResourceWarning: From 5f6d3e742c33a7be8fe6df8de1cc8dad092f5412 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 00:14:07 +0000 Subject: [PATCH 074/239] [tests] Re-use existing plugin. --- tests/llvm/gym_interface_compatability.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/llvm/gym_interface_compatability.py b/tests/llvm/gym_interface_compatability.py index 62174d588..7b385a01b 100644 --- a/tests/llvm/gym_interface_compatability.py +++ b/tests/llvm/gym_interface_compatability.py @@ -4,17 +4,11 @@ # LICENSE file in the root directory of this source tree. """Test that LlvmEnv is compatible with OpenAI gym interface.""" import gym -import pytest from compiler_gym.envs.llvm import LlvmEnv from tests.test_main import main - -@pytest.fixture(scope="function") -def env() -> LlvmEnv: - """Create an LLVM environment.""" - with gym.make("llvm-autophase-ic-v0") as env_: - yield env_ +pytest_plugins = ["tests.pytest_plugins.llvm"] def test_type_classes(env: LlvmEnv): From 7bccaa0edfb593f8267c00bf9723c553f3cf46a3 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 01:57:24 +0000 Subject: [PATCH 075/239] [llvm] Compute and return -lSystem location on macOS. This extends the logic for extracting #include search paths to also extract the location of the -lSystem library from the host target. This is to enable compiler binary support on macOS. --- compiler_gym/envs/llvm/__init__.py | 4 +- compiler_gym/envs/llvm/llvm_benchmark.py | 86 ++++++++++++------- compiler_gym/envs/llvm/llvm_env.py | 2 +- .../example_unrolling_service/__init__.py | 6 +- .../example_without_bazel.py | 5 +- .../loop_optimizations_service/__init__.py | 5 +- .../example_without_bazel.py | 6 +- tests/llvm/custom_benchmarks_test.py | 28 +++--- 8 files changed, 81 insertions(+), 61 deletions(-) diff --git a/compiler_gym/envs/llvm/__init__.py b/compiler_gym/envs/llvm/__init__.py index ebbeaff00..56c275966 100644 --- a/compiler_gym/envs/llvm/__init__.py +++ b/compiler_gym/envs/llvm/__init__.py @@ -9,7 +9,7 @@ from compiler_gym.envs.llvm.compute_observation import compute_observation from compiler_gym.envs.llvm.llvm_benchmark import ( ClangInvocation, - get_system_includes, + get_system_library_flags, make_benchmark, ) from compiler_gym.envs.llvm.llvm_env import LlvmEnv @@ -24,7 +24,7 @@ __all__ = [ "ClangInvocation", "compute_observation", - "get_system_includes", + "get_system_library_flags", "LLVM_SERVICE_BINARY", "LlvmEnv", "make_benchmark", diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 62e049d83..2cc251ece 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -6,10 +6,13 @@ import logging import os import random +import shlex import subprocess +import sys import tempfile from concurrent.futures import as_completed from datetime import datetime +from functools import lru_cache from pathlib import Path from typing import Iterable, List, Optional, Union @@ -22,22 +25,31 @@ logger = logging.getLogger(__name__) -def get_compiler_includes(compiler: str) -> Iterable[Path]: - """Run the system compiler in verbose mode on a dummy input to get the - system header search path. +def _get_system_library_flags(compiler: str) -> Iterable[str]: + """Run the given compiler in verbose mode on a dummy input to extract the + set of system include paths, and on macOS, the location of + libclang_rt.osx.a. + + Returns an iterable sequence of compiler line flags. """ # Create a temporary directory to write the compiled 'binary' to, since # GNU assembler does not support piping to stdout. with tempfile.TemporaryDirectory() as d: try: + cmd = [compiler, "-xc++", "-v", "-", "-o", str(Path(d) / "a.out")] + # On macOS we need to compile a binary to invoke the linker. + if sys.platform != "darwin": + cmd.append("-c") with Popen( - [compiler, "-xc++", "-v", "-c", "-", "-o", str(Path(d) / "a.out")], + cmd, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True, ) as process: - _, stderr = process.communicate(input="", timeout=30) + _, stderr = process.communicate( + input="int main(){return 0;}", timeout=30 + ) if process.returncode: raise OSError( f"Failed to invoke {compiler}. " @@ -59,18 +71,21 @@ def get_compiler_includes(compiler: str) -> Iterable[Path]: # /path/2 # End of search list in_search_list = False - for line in stderr.split("\n"): + lines = stderr.split("\n") + for line in lines: if in_search_list and line.startswith("End of search list"): break elif in_search_list: # We have an include path to return. path = Path(line.strip()) - yield path + yield "-isystem" + yield str(path) # Compatibility fix for compiling benchmark sources which use the # '#include ' header, which on macOS is located in a # 'machine/endian.h' directory. if (path / "machine").is_dir(): - yield path / "machine" + yield "-isystem" + yield str(path / "machine") elif line.startswith("#include <...> search starts here:"): in_search_list = True else: @@ -80,32 +95,40 @@ def get_compiler_includes(compiler: str) -> Iterable[Path]: msg += f":\n{stderr}" raise OSError(msg) - -# Memoized search paths. Call get_system_includes() to access them. -_SYSTEM_INCLUDES = None + # On macOS we need to provide the location of the libclang_rt.osx.a library, + # which we can grab from the linker invocation. + if sys.platform == "darwin": + ld_invocation = shlex.split(lines[-1]) + for i in range(1, len(ld_invocation) - 1): + if ld_invocation[i] == "-lSystem": + yield "-lSystem" + yield ld_invocation[i + 1] -def get_system_includes() -> List[Path]: - """Determine the system include paths for C/C++ compilation jobs. +@lru_cache(maxsize=16) +def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: + """Determine the set of compilation flags needed to use the host system + libraries. This uses the system compiler to determine the search paths for C/C++ system - headers. By default, :code:`c++` is invoked. This can be overridden by - setting :code:`os.environ["CXX"]`. + headers, and on macOS, the location of libclang_rt.osx.a. By default, + :code:`c++` is invoked. This can be overridden by setting + :code:`os.environ["CXX"]` prior to calling this function. - :return: A list of paths to system header directories. - :raises OSError: If the compiler fails, or if the search paths cannot be - determined. + The results of this function are cached, so changes to CXX will have no + effect on subsequent calls. + + :return: A list of command line flags for a compiler. + + :raises OSError: If the compiler fails, or if the output of the compiler + cannot be understood. """ - # Memoize the system includes paths. - global _SYSTEM_INCLUDES - if _SYSTEM_INCLUDES is None: - system_compiler = os.environ.get("CXX", "c++") - try: - _SYSTEM_INCLUDES = list(get_compiler_includes(system_compiler)) - except OSError as e: - logger.warning("%s", e) - _SYSTEM_INCLUDES = [] - return _SYSTEM_INCLUDES + compiler = compiler or os.environ.get("CXX", "c++") + try: + return list(_get_system_library_flags(compiler)) + except OSError as e: + logger.warning("%s", e) + return [] class ClangInvocation: @@ -119,7 +142,7 @@ def __init__( :param args: The list of arguments to pass to clang. :param system_includes: Whether to include the system standard libraries during compilation jobs. This requires a system toolchain. See - :func:`get_system_includes`. + :func:`get_system_library_flags`. :param timeout: The maximum number of seconds to allow clang to run before terminating. """ @@ -130,8 +153,7 @@ def __init__( def command(self, outpath: Path) -> List[str]: cmd = [str(llvm.clang_path())] if self.system_includes: - for directory in get_system_includes(): - cmd += ["-isystem", str(directory)] + cmd += get_system_library_flags() cmd += [str(s) for s in self.args] cmd += ["-c", "-emit-llvm", "-o", str(outpath)] @@ -253,7 +275,7 @@ def make_benchmark( :param system_includes: Whether to include the system standard libraries during compilation jobs. This requires a system toolchain. See - :func:`get_system_includes`. + :func:`get_system_library_flags`. :param timeout: The maximum number of seconds to allow clang to run before terminating. diff --git a/compiler_gym/envs/llvm/llvm_env.py b/compiler_gym/envs/llvm/llvm_env.py index e9504520f..b137e2f06 100644 --- a/compiler_gym/envs/llvm/llvm_env.py +++ b/compiler_gym/envs/llvm/llvm_env.py @@ -387,7 +387,7 @@ def make_benchmark( :param system_includes: Whether to include the system standard libraries during compilation jobs. This requires a system toolchain. See - :func:`get_system_includes`. + :func:`get_system_library_flags`. :param timeout: The maximum number of seconds to allow clang to run before terminating. diff --git a/examples/example_unrolling_service/__init__.py b/examples/example_unrolling_service/__init__.py index a6960ee78..4686e352e 100644 --- a/examples/example_unrolling_service/__init__.py +++ b/examples/example_unrolling_service/__init__.py @@ -9,7 +9,7 @@ from compiler_gym.datasets import Benchmark, Dataset from compiler_gym.datasets.uri import BenchmarkUri -from compiler_gym.envs.llvm.llvm_benchmark import get_system_includes +from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.spaces import Reward from compiler_gym.third_party import llvm from compiler_gym.util.registration import register @@ -114,9 +114,7 @@ def preprocess(src: Path) -> bytes: "-I", str(NEURO_VECTORIZER_HEADER.parent), src, - ] - for directory in get_system_includes(): - cmd += ["-isystem", str(directory)] + ] + get_system_library_flags() return subprocess.check_output( cmd, timeout=300, diff --git a/examples/example_unrolling_service/example_without_bazel.py b/examples/example_unrolling_service/example_without_bazel.py index 7abef8230..9cf079931 100644 --- a/examples/example_unrolling_service/example_without_bazel.py +++ b/examples/example_unrolling_service/example_without_bazel.py @@ -21,7 +21,7 @@ import compiler_gym from compiler_gym.datasets import Benchmark, Dataset -from compiler_gym.envs.llvm.llvm_benchmark import get_system_includes +from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.spaces import Reward from compiler_gym.third_party import llvm from compiler_gym.util.registration import register @@ -124,8 +124,7 @@ def preprocess(src: Path) -> bytes: str(NEURO_VECTORIZER_HEADER.parent), src, ] - for directory in get_system_includes(): - cmd += ["-isystem", str(directory)] + cmd += get_system_library_flags() return subprocess.check_output( cmd, timeout=300, diff --git a/examples/loop_optimizations_service/__init__.py b/examples/loop_optimizations_service/__init__.py index 41195cfc2..45ab1055a 100644 --- a/examples/loop_optimizations_service/__init__.py +++ b/examples/loop_optimizations_service/__init__.py @@ -8,7 +8,7 @@ from typing import Iterable from compiler_gym.datasets import Benchmark, Dataset -from compiler_gym.envs.llvm.llvm_benchmark import get_system_includes +from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.spaces import Reward from compiler_gym.third_party import llvm from compiler_gym.util.registration import register @@ -115,8 +115,7 @@ def preprocess(src: Path) -> bytes: str(NEURO_VECTORIZER_HEADER.parent), src, ] - for directory in get_system_includes(): - cmd += ["-isystem", str(directory)] + cmd += get_system_library_flags() return subprocess.check_output( cmd, timeout=300, diff --git a/examples/loop_optimizations_service/example_without_bazel.py b/examples/loop_optimizations_service/example_without_bazel.py index 0dc1eac3c..db6c5b7c4 100644 --- a/examples/loop_optimizations_service/example_without_bazel.py +++ b/examples/loop_optimizations_service/example_without_bazel.py @@ -20,7 +20,7 @@ import compiler_gym from compiler_gym.datasets import Benchmark, Dataset -from compiler_gym.envs.llvm.llvm_benchmark import get_system_includes +from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.spaces import Reward from compiler_gym.third_party import llvm from compiler_gym.util.registration import register @@ -125,9 +125,7 @@ def preprocess(src: Path) -> bytes: "-I", str(NEURO_VECTORIZER_HEADER.parent), src, - ] - for directory in get_system_includes(): - cmd += ["-isystem", str(directory)] + ] + get_system_library_flags() return subprocess.check_output( cmd, timeout=300, diff --git a/tests/llvm/custom_benchmarks_test.py b/tests/llvm/custom_benchmarks_test.py index da7ed4a94..73a102920 100644 --- a/tests/llvm/custom_benchmarks_test.py +++ b/tests/llvm/custom_benchmarks_test.py @@ -13,6 +13,7 @@ from compiler_gym.datasets import Benchmark from compiler_gym.envs import LlvmEnv, llvm +from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import File from compiler_gym.util.runfiles_path import runfiles_path @@ -286,26 +287,29 @@ def test_two_custom_benchmarks_reset(env: LlvmEnv): assert env.benchmark == benchmark2.uri -def test_get_compiler_includes_not_found(): - with pytest.raises(OSError, match=r"Failed to invoke not-a-real-binary"): - list(llvm.llvm_benchmark.get_compiler_includes("not-a-real-binary")) +def test_get_system_library_flags_not_found(caplog): + assert get_system_library_flags("not-a-real-binary") == [] + logging_message = caplog.record_tuples[-1][-1] + assert "Failed to invoke not-a-real-binary" in logging_message -def test_get_compiler_includes_nonzero_exit_status(): +def test_get_system_library_flags_nonzero_exit_status(caplog): """Test that setting the $CXX to an invalid binary raises an error.""" - with pytest.raises(OSError, match=r"Failed to invoke false"): - list(llvm.llvm_benchmark.get_compiler_includes("false")) + assert get_system_library_flags("false") == [] + logging_message = caplog.record_tuples[-1][-1] + assert "Failed to invoke false" in logging_message -def test_get_compiler_includes_output_parse_failure(): +def test_get_system_library_flags_output_parse_failure(caplog): """Test that setting the $CXX to an invalid binary raises an error.""" old_cxx = os.environ.get("CXX") - os.environ["CXX"] = "echo" try: - with pytest.raises( - OSError, match="Failed to parse '#include <...>' search paths from echo" - ): - list(llvm.llvm_benchmark.get_compiler_includes("echo")) + os.environ["CXX"] = "echo" + assert get_system_library_flags("echo") == [] + logging_message = caplog.record_tuples[-1][-1] + assert ( + "Failed to parse '#include <...>' search paths from echo" in logging_message + ) finally: if old_cxx: os.environ["CXX"] = old_cxx From 7160f73f4afe125a6727b270df83c85d4262ee2d Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 02:26:52 +0000 Subject: [PATCH 076/239] [llvm] Create a temporary file, not an entire directory. --- compiler_gym/envs/llvm/llvm_benchmark.py | 40 ++++++++++++++---------- tests/llvm/custom_benchmarks_test.py | 22 ++++++------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 2cc251ece..08c5a52d8 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -14,7 +14,7 @@ from datetime import datetime from functools import lru_cache from pathlib import Path -from typing import Iterable, List, Optional, Union +from typing import Iterable, List, Optional, Tuple, Union from compiler_gym.datasets import Benchmark, BenchmarkInitError from compiler_gym.third_party import llvm @@ -26,17 +26,12 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: - """Run the given compiler in verbose mode on a dummy input to extract the - set of system include paths, and on macOS, the location of - libclang_rt.osx.a. - - Returns an iterable sequence of compiler line flags. - """ - # Create a temporary directory to write the compiled 'binary' to, since - # GNU assembler does not support piping to stdout. - with tempfile.TemporaryDirectory() as d: + """Private implementation function.""" + # Create a temporary directory to write the compiled binary to, since GNU + # assembler does not support piping to stdout. + with tempfile.NamedTemporaryFile(dir=transient_cache_path(".")) as f: try: - cmd = [compiler, "-xc++", "-v", "-", "-o", str(Path(d) / "a.out")] + cmd = [compiler, "-xc++", "-v", "-", "-o", f.name] # On macOS we need to compile a binary to invoke the linker. if sys.platform != "darwin": cmd.append("-c") @@ -105,7 +100,15 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: yield ld_invocation[i + 1] -@lru_cache(maxsize=16) +@lru_cache(maxsize=32) +def _get_cached_system_library_flags(compiler: str) -> Tuple[List[str], str]: + """Private implementation detail.""" + try: + return list(_get_system_library_flags(compiler)), None + except OSError as e: + return [], str(e) + + def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: """Determine the set of compilation flags needed to use the host system libraries. @@ -124,11 +127,14 @@ def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: cannot be understood. """ compiler = compiler or os.environ.get("CXX", "c++") - try: - return list(_get_system_library_flags(compiler)) - except OSError as e: - logger.warning("%s", e) - return [] + # We want to cache the results of this expensive query, but also emit a + # logging warning when the function is called, including when the call + # results in a cache hit. We therefore must cache both the flags and the + # error, if any. + flags, error = _get_cached_system_library_flags(compiler) + if error: + logger.warning("%s", error) + return flags class ClangInvocation: diff --git a/tests/llvm/custom_benchmarks_test.py b/tests/llvm/custom_benchmarks_test.py index 73a102920..c2c1e595d 100644 --- a/tests/llvm/custom_benchmarks_test.py +++ b/tests/llvm/custom_benchmarks_test.py @@ -13,7 +13,7 @@ from compiler_gym.datasets import Benchmark from compiler_gym.envs import LlvmEnv, llvm -from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags +from compiler_gym.envs.llvm import llvm_benchmark from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import File from compiler_gym.util.runfiles_path import runfiles_path @@ -288,16 +288,16 @@ def test_two_custom_benchmarks_reset(env: LlvmEnv): def test_get_system_library_flags_not_found(caplog): - assert get_system_library_flags("not-a-real-binary") == [] - logging_message = caplog.record_tuples[-1][-1] - assert "Failed to invoke not-a-real-binary" in logging_message + flags, error = llvm_benchmark._get_cached_system_library_flags("not-a-real-binary") + assert flags == [] + assert "Failed to invoke not-a-real-binary" in error def test_get_system_library_flags_nonzero_exit_status(caplog): """Test that setting the $CXX to an invalid binary raises an error.""" - assert get_system_library_flags("false") == [] - logging_message = caplog.record_tuples[-1][-1] - assert "Failed to invoke false" in logging_message + flags, error = llvm_benchmark._get_cached_system_library_flags("false") + assert flags == [] + assert "Failed to invoke false" in error def test_get_system_library_flags_output_parse_failure(caplog): @@ -305,11 +305,9 @@ def test_get_system_library_flags_output_parse_failure(caplog): old_cxx = os.environ.get("CXX") try: os.environ["CXX"] = "echo" - assert get_system_library_flags("echo") == [] - logging_message = caplog.record_tuples[-1][-1] - assert ( - "Failed to parse '#include <...>' search paths from echo" in logging_message - ) + flags, error = llvm_benchmark._get_cached_system_library_flags("echo") + assert flags == [] + assert "Failed to parse '#include <...>' search paths from echo" in error finally: if old_cxx: os.environ["CXX"] = old_cxx From ec4ca9dd3a245a15b248c27b62a9a6ec413c5d04 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 17:48:11 +0000 Subject: [PATCH 077/239] [service] Improve and fix repr of connections. Fix a bug in which connection live was reported the wrong way around (dead services were logged as alive and alive connections as dead. Also makes the representations more verbose to better explain what type and state they are in. --- compiler_gym/service/connection.py | 9 ++++++--- tests/service/connection_test.py | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index 4a887eff3..f548a7d62 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -529,8 +529,11 @@ def close(self): super().close() def __repr__(self): - alive_or_dead = "alive" if self.process.poll() else "dead" - return f"{self.url} running on PID={self.process.pid} ({alive_or_dead})" + if self.process.poll() is None: + return ( + f"Connection to service at {self.url} running on PID {self.process.pid}" + ) + return f"Connection to dead service at {self.url}" class UnmanagedConnection(Connection): @@ -570,7 +573,7 @@ def __init__(self, url: str, rpc_init_max_seconds: float): super().__init__(channel, url) def __repr__(self): - return self.url + return f"Connection to unmanaged service {self.url}" class CompilerGymServiceConnection: diff --git a/tests/service/connection_test.py b/tests/service/connection_test.py index 3cd71fd08..66f2e3ac0 100644 --- a/tests/service/connection_test.py +++ b/tests/service/connection_test.py @@ -90,5 +90,19 @@ def test_call_stub_negative_timeout(connection: CompilerGymServiceConnection): connection(connection.stub.GetSpaces, GetSpacesRequest(), timeout=-10) +def test_ManagedConnection_repr(connection: CompilerGymServiceConnection): + cnx = connection.connection + assert ( + repr(cnx) + == f"Connection to service at {cnx.url} running on PID {cnx.process.pid}" + ) + + # Kill the service. + cnx.process.terminate() + cnx.process.communicate() + + assert repr(cnx) == f"Connection to dead service at {cnx.url}" + + if __name__ == "__main__": main() From 416b542de4e33578de8a0c8de13b46fcc6149bbd Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 18:41:02 +0000 Subject: [PATCH 078/239] Use io_context rather than io_service alias. boost::asio::io_service is only for backwards compatibility. --- compiler_gym/envs/llvm/service/Cost.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 38c3c657a..884cf4bf6 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -74,9 +74,9 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& fmt::format("{} -w -xir - -o {} -c", clangPath.string(), tmpFile.string()); #endif - boost::asio::io_service clangService; + boost::asio::io_context clangContext; auto stdinBuffer{boost::asio::buffer(ir)}; - bp::async_pipe stdinPipe(clangService); + bp::async_pipe stdinPipe(clangContext); boost::asio::io_context clangStderrStream; std::future clangStderrFuture; @@ -88,8 +88,8 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& stdinPipe, stdinBuffer, [&](const boost::system::error_code& ec, std::size_t n) { stdinPipe.async_close(); }); - clangService.run_for(std::chrono::seconds(60)); - if (clangService.poll()) { + clangContext.run_for(std::chrono::seconds(60)); + if (clangContext.poll()) { return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost within 60 seconds")); } From 0cd8d43060e7cede1daa2e8ed4d57df083bb0e85 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 18:41:34 +0000 Subject: [PATCH 079/239] [llvm] Fix bug leading to zombie llvm-size processes. This corrects my use of the boost::process API whereby llvm-size child processes could become detached from the parent environment service and be left as zombies. I found this issue will attempting to reproduce #572. I'm not sure if this bug is relevant. --- compiler_gym/envs/llvm/service/Cost.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 884cf4bf6..66f873fb9 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -113,12 +113,14 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& bp::child llvmSize(llvmSizeCmd, bp::std_in.close(), bp::std_out > llvmSizeStdoutFuture, bp::std_err > bp::null, llvmSizeStdoutStream); - if (!util::wait_for(llvmSize, std::chrono::seconds(60))) { + llvmSizeStdoutStream.run_for(std::chrono::seconds(60)); + if (llvmSizeStdoutStream.poll()) { return Status(StatusCode::DEADLINE_EXCEEDED, fmt::format("Failed to compute .text size cost within 60 seconds")); } + llvmSize.wait(); + llvmSizeOutput = llvmSizeStdoutFuture.get(); - llvmSizeStdoutStream.run(); fs::remove(tmpFile); if (llvmSize.exit_code()) { return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost. " @@ -126,7 +128,6 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& llvmSize.exit_code(), llvmSizeCmd)); } - llvmSizeOutput = llvmSizeStdoutFuture.get(); } catch (bp::process_error& e) { fs::remove(tmpFile); return Status(StatusCode::INVALID_ARGUMENT, @@ -154,6 +155,7 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& return Status(StatusCode::INTERNAL, fmt::format("Failed to parse .TEXT size: `{}`\n", llvmSizeOutput)); } + return Status::OK; } From 751609682326cd1be9bd5beee21bcbfd5bd82eb1 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 18:49:55 +0000 Subject: [PATCH 080/239] [service] Turn off TCP port reuse for gRPC channels. --- compiler_gym/service/connection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index f548a7d62..6bd203fe6 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -43,6 +43,10 @@ # Spurious error UNAVAILABLE "Trying to connect an http1.x server". # https://putridparrot.com/blog/the-unavailable-trying-to-connect-an-http1-x-server-grpc-error/ ("grpc.enable_http_proxy", 0), + # Disable TCP port re-use to mitigate port conflict errors when starting + # many services in parallel. Context: + # https://github.com/facebookresearch/CompilerGym/issues/572 + ("grpc.so_reuseport", 0), ] logger = logging.getLogger(__name__) From 7728ccfe40e99e4dae45ce8688e1f1b2537d2192 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 19:01:36 +0000 Subject: [PATCH 081/239] [service] Set the same options consistently for gRPC in Python and C++. --- compiler_gym/service/connection.py | 1 + .../runtime/CreateAndRunCompilerGymServiceImpl.cc | 11 +++++++++++ .../runtime/CreateAndRunCompilerGymServiceImpl.h | 8 +++----- .../runtime/create_and_run_compiler_gym_service.py | 6 ++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index 6bd203fe6..16257d48b 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -37,6 +37,7 @@ GRPC_CHANNEL_OPTIONS = [ # Disable the inbound message length filter to allow for large messages such # as observations. + ("grpc.max_send_message_length", -1), ("grpc.max_receive_message_length", -1), # Fix for "received initial metadata size exceeds limit" ("grpc.max_metadata_size", 512 * 1024), diff --git a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.cc b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.cc index 28319136d..0a839bc11 100644 --- a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.cc +++ b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.cc @@ -20,4 +20,15 @@ void shutdown_handler(int signum) { shutdownSignal.set_value(); } +// Configure the gRPC server, using the same options as the python client. See +// GRPC_CHANNEL_OPTIONS in compiler_gym/service/connection.py for the python +// equivalents and the rationale for each. +void setGrpcChannelOptions(grpc::ServerBuilder& builder) { + builder.SetMaxReceiveMessageSize(-1); + builder.SetMaxSendMessageSize(-1); + builder.AddChannelArgument(GRPC_ARG_MAX_METADATA_SIZE, 512 * 1024); + builder.AddChannelArgument(GRPC_ARG_ENABLE_HTTP_PROXY, 0); + builder.AddChannelArgument(GRPC_ARG_ALLOW_REUSEPORT, 0); +} + } // namespace compiler_gym::runtime diff --git a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h index 51d6dbbb7..6a4f1b2c1 100644 --- a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h +++ b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h @@ -29,12 +29,10 @@ namespace compiler_gym::runtime { extern std::promise shutdownSignal; -// Increase maximum message size beyond the 4MB default as inbound message -// may be larger (e.g., in the case of IR strings). -constexpr size_t kMaxMessageSizeInBytes = 512 * 1024 * 1024; - void shutdown_handler(int signum); +void setGrpcChannelOptions(grpc::ServerBuilder& builder); + // Create a service, configured using --port and --working_dir flags, and run // it. This function never returns. // @@ -87,7 +85,7 @@ template grpc::ServerBuilder builder; builder.RegisterService(&service); - builder.SetMaxMessageSize(kMaxMessageSizeInBytes); + setGrpcChannelOptions(builder); // Start a channel on the port. int port; diff --git a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py index df9d43039..ec9896ccd 100644 --- a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py +++ b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py @@ -18,6 +18,7 @@ import grpc from absl import app, flags, logging +from compiler_gym.service import connections from compiler_gym.service.compilation_session import CompilationSession from compiler_gym.service.proto import compiler_gym_service_pb2_grpc from compiler_gym.service.runtime.compiler_gym_service import CompilerGymService @@ -94,10 +95,7 @@ def main(argv): # Create the service. server = grpc.server( futures.ThreadPoolExecutor(max_workers=FLAGS.rpc_service_threads), - options=[ - ("grpc.max_send_message_length", MAX_MESSAGE_SIZE_IN_BYTES), - ("grpc.max_receive_message_length", MAX_MESSAGE_SIZE_IN_BYTES), - ], + options=connections.CLIENT_CONNECTION_OPTIONS, ) service = CompilerGymService( working_directory=working_dir, From 070e21cc4e1f8a2d46405c519e76e64e9a8c1e8c Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 02:53:04 +0000 Subject: [PATCH 082/239] Fix typo in variable name and dependency. --- compiler_gym/service/runtime/BUILD | 1 + .../service/runtime/create_and_run_compiler_gym_service.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler_gym/service/runtime/BUILD b/compiler_gym/service/runtime/BUILD index 9432e0dea..535516fd3 100644 --- a/compiler_gym/service/runtime/BUILD +++ b/compiler_gym/service/runtime/BUILD @@ -93,6 +93,7 @@ py_library( srcs = ["create_and_run_compiler_gym_service.py"], deps = [ ":compiler_gym_service", + "//compiler_gym/service:connection", "//compiler_gym/service/proto", "//compiler_gym/util", ], diff --git a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py index ec9896ccd..94e410465 100644 --- a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py +++ b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py @@ -18,7 +18,7 @@ import grpc from absl import app, flags, logging -from compiler_gym.service import connections +from compiler_gym.service import connection from compiler_gym.service.compilation_session import CompilationSession from compiler_gym.service.proto import compiler_gym_service_pb2_grpc from compiler_gym.service.runtime.compiler_gym_service import CompilerGymService @@ -95,7 +95,7 @@ def main(argv): # Create the service. server = grpc.server( futures.ThreadPoolExecutor(max_workers=FLAGS.rpc_service_threads), - options=connections.CLIENT_CONNECTION_OPTIONS, + options=connection.GRPC_CHANNEL_OPTIONS, ) service = CompilerGymService( working_directory=working_dir, From a1a063c16e25bcb58f07edbfedbfd7e24e7db39f Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 13:09:14 +0000 Subject: [PATCH 083/239] [llvm] Add discussion note about env.apply() semantics. --- compiler_gym/envs/compiler_env.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/compiler_gym/envs/compiler_env.py b/compiler_gym/envs/compiler_env.py index e500367c1..2669f55c7 100644 --- a/compiler_gym/envs/compiler_env.py +++ b/compiler_gym/envs/compiler_env.py @@ -1142,6 +1142,15 @@ def apply(self, state: CompilerEnvState) -> None: # noqa if not self.in_episode: self.reset(benchmark=state.benchmark) + # TODO(cummins): Does this behavior make sense? Take, for example: + # + # >>> env.apply(state) + # >>> env.benchmark == state.benchmark + # False + # + # I think most users would reasonable expect `env.apply(state)` to fully + # apply the state, not just the sequence of actions. And what about the + # choice of observation space, reward space, etc? if self.benchmark != state.benchmark: warnings.warn( f"Applying state from environment for benchmark '{state.benchmark}' " From b65c7d14997aa9d615c1ecc621377660715372cc Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 13:30:46 +0000 Subject: [PATCH 084/239] [tests] Apply a default 5 minute timeout to all test functions. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 3ee451e38..1cfff8d93 100644 --- a/tox.ini +++ b/tox.ini @@ -14,3 +14,5 @@ filterwarnings = error ignore::pytest.PytestAssertRewriteWarning: ignore::ResourceWarning: +# Global timeout applied to all test functions: +timeout = 300 From d4d851362d782b8bbd651a5d37aeeebaf80dfc3a Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 13:40:08 +0000 Subject: [PATCH 085/239] [tests] Merge cBench test files. --- tests/llvm/BUILD | 12 ------------ tests/llvm/CMakeLists.txt | 11 ----------- tests/llvm/all_benchmarks_init_close_test.py | 20 -------------------- tests/llvm/datasets/BUILD | 3 ++- tests/llvm/datasets/cbench_test.py | 6 ++++++ 5 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 tests/llvm/all_benchmarks_init_close_test.py diff --git a/tests/llvm/BUILD b/tests/llvm/BUILD index 51037cc7c..a5f483f20 100644 --- a/tests/llvm/BUILD +++ b/tests/llvm/BUILD @@ -27,18 +27,6 @@ py_test( ], ) -py_test( - name = "all_benchmarks_init_close_test", - timeout = "long", - srcs = ["all_benchmarks_init_close_test.py"], - shard_count = 6, - deps = [ - "//compiler_gym/envs", - "//tests:test_main", - "//tests/pytest_plugins:llvm", - ], -) - py_test( name = "autophase_test", timeout = "short", diff --git a/tests/llvm/CMakeLists.txt b/tests/llvm/CMakeLists.txt index 1b6a7c40a..9e7307bcb 100644 --- a/tests/llvm/CMakeLists.txt +++ b/tests/llvm/CMakeLists.txt @@ -26,17 +26,6 @@ cg_py_test( tests::test_main ) -cg_py_test( - NAME - all_benchmarks_init_close_test - SRCS - "all_benchmarks_init_close_test.py" - DEPS - compiler_gym::envs::envs - tests::pytest_plugins::llvm - tests::test_main -) - cg_py_test( NAME autophase_test diff --git a/tests/llvm/all_benchmarks_init_close_test.py b/tests/llvm/all_benchmarks_init_close_test.py deleted file mode 100644 index aecbd4c49..000000000 --- a/tests/llvm/all_benchmarks_init_close_test.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. -"""Integrations tests for the LLVM CompilerGym environments.""" - -from compiler_gym.envs import CompilerEnv -from tests.test_main import main - -pytest_plugins = ["tests.pytest_plugins.llvm"] - - -def test_init_benchmark(env: CompilerEnv, benchmark_name: str): - """Create an environment for each benchmark and close it.""" - env.reset(benchmark=benchmark_name) - assert env.benchmark == benchmark_name - - -if __name__ == "__main__": - main() diff --git a/tests/llvm/datasets/BUILD b/tests/llvm/datasets/BUILD index 8495f611c..f1c0938c3 100644 --- a/tests/llvm/datasets/BUILD +++ b/tests/llvm/datasets/BUILD @@ -20,8 +20,9 @@ py_test( py_test( name = "cbench_test", - timeout = "moderate", + timeout = "long", srcs = ["cbench_test.py"], + shard_count = 4, deps = [ "//compiler_gym/envs/llvm", "//compiler_gym/envs/llvm/datasets", diff --git a/tests/llvm/datasets/cbench_test.py b/tests/llvm/datasets/cbench_test.py index 17736d365..f7ed6b4f4 100644 --- a/tests/llvm/datasets/cbench_test.py +++ b/tests/llvm/datasets/cbench_test.py @@ -101,5 +101,11 @@ def test_cbench_v1_dataset_out_of_range(env: LlvmEnv): env.datasets.benchmark("cbench-v1/qsort?dataset=abc") +def test_cbench_v1_init_close_test(env: LlvmEnv, benchmark_name: str): + """Create an environment for each benchmark and close it.""" + env.reset(benchmark=benchmark_name) + assert env.benchmark == benchmark_name + + if __name__ == "__main__": main() From 359be5f345e33ef20da7fcd92e3d56d1053d5c63 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 13:40:23 +0000 Subject: [PATCH 086/239] [tests] Refine flaky test timeout. --- tests/llvm/threading_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/llvm/threading_test.py b/tests/llvm/threading_test.py index 4aaa7534a..e125230db 100644 --- a/tests/llvm/threading_test.py +++ b/tests/llvm/threading_test.py @@ -53,8 +53,7 @@ def run(self) -> None: self.done = True -# Timeout may be exceeded if the environment is slow to start. -@flaky +@flaky # Timeout may be exceeded if the environment is slow to start. def test_running_environment_in_background_thread(): """Test launching and running an LLVM environment in a background thread.""" thread = ThreadedWorker( @@ -63,7 +62,7 @@ def test_running_environment_in_background_thread(): actions=[0, 0, 0], ) thread.start() - thread.join(timeout=60) + thread.join(timeout=10) assert thread.done assert thread.observation is not None @@ -71,6 +70,7 @@ def test_running_environment_in_background_thread(): assert thread.info +@flaky # Timeout may be exceeded if the environment is slow to start. def test_moving_environment_to_background_thread(): """Test running an LLVM environment from a background thread. The environment is made in the main thread and used in the background thread. From 0bf6651109af3c7684f1dacdef091e2c6b93e27b Mon Sep 17 00:00:00 2001 From: xtremey Date: Sun, 20 Feb 2022 18:59:39 +0100 Subject: [PATCH 087/239] Added Leaderboard Entry for PPO --- README.md | 21 ++--- leaderboard/llvm_instcount/ppo/README.md | 98 ++++++++++++++++++++++ leaderboard/llvm_instcount/ppo/results.csv | 24 ++++++ 3 files changed, 133 insertions(+), 10 deletions(-) create mode 100644 leaderboard/llvm_instcount/ppo/README.md create mode 100644 leaderboard/llvm_instcount/ppo/results.csv diff --git a/README.md b/README.md index 21bf0c3c2..334b7efae 100644 --- a/README.md +++ b/README.md @@ -127,16 +127,17 @@ This leaderboard tracks the results achieved by algorithms on the `llvm-ic-v0` environment on the 23 benchmarks in the `cbench-v1` dataset. | Author | Algorithm | Links | Date | Walltime (mean) | Codesize Reduction (geomean) | -| --- | --- | --- | --- | --- | --- | -| Facebook | Random search (t=10800) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10800.csv) | 2021-03 | 10,512.356s | **1.062×** | -| Facebook | Random search (t=3600) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t3600.csv) | 2021-03 | 3,630.821s | 1.061× | -| Facebook | Greedy search | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e0.csv) | 2021-03 | 169.237s | 1.055× | -| Facebook | Random search (t=60) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t60.csv) | 2021-03 | 91.215s | 1.045× | -| Facebook | e-Greedy search (e=0.1) | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e10.csv) | 2021-03 | 152.579s | 1.041× | -| Jiadong Guo | Tabular Q (N=5000, H=10) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H10-N5000.csv) | 2021-04 | 2534.305 | 1.036× | -| Facebook | Random search (t=10) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10.csv) | 2021-03 | **42.939s** | 1.031× | -| Patrick Hesse | DQN (N=4000, H=10) | [write-up](leaderboard/llvm_instcount/dqn/README.md), [results](leaderboard/llvm_instcount/dqn/results-instcountnorm-H10-N4000.csv) | 2021-06 | 91.018s | 1.029× | -| Jiadong Guo | Tabular Q (N=2000, H=5) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H5-N2000.csv) | 2021-04 | 694.105 | 0.988× | +| --- | --- | --- | --- |-----------------|------------------------------| + | Leibniz University| PPO + Guided Search | [write-up](leaderboard/llvm_instcount/ppo/README.md), [results](leaderboard/llvm_instcount/random_search/results.csv) | 2022-02 | 69.821s | **1.070×** | +| Facebook | Random search (t=10800) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10800.csv) | 2021-03 | 10,512.356s | 1.062× | +| Facebook | Random search (t=3600) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t3600.csv) | 2021-03 | 3,630.821s | 1.061× | +| Facebook | Greedy search | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e0.csv) | 2021-03 | 169.237s | 1.055× | +| Facebook | Random search (t=60) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t60.csv) | 2021-03 | 91.215s | 1.045× | +| Facebook | e-Greedy search (e=0.1) | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e10.csv) | 2021-03 | 152.579s | 1.041× | +| Jiadong Guo | Tabular Q (N=5000, H=10) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H10-N5000.csv) | 2021-04 | 2534.305 | 1.036× | +| Facebook | Random search (t=10) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10.csv) | 2021-03 | 42.939s | 1.031× | +| Patrick Hesse | DQN (N=4000, H=10) | [write-up](leaderboard/llvm_instcount/dqn/README.md), [results](leaderboard/llvm_instcount/dqn/results-instcountnorm-H10-N4000.csv) | 2021-06 | 91.018s | 1.029× | +| Jiadong Guo | Tabular Q (N=2000, H=5) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H5-N2000.csv) | 2021-04 | 694.105 | 0.988× | ## Contributing diff --git a/leaderboard/llvm_instcount/ppo/README.md b/leaderboard/llvm_instcount/ppo/README.md new file mode 100644 index 000000000..19827b1a8 --- /dev/null +++ b/leaderboard/llvm_instcount/ppo/README.md @@ -0,0 +1,98 @@ + +# Proximal Policy Optimization with Guided Random Search + +**tldr;** +Proximal Policy Optimization (PPO) followed by guided search using the action +probabilities of the PPO-Model + +**Authors:** Nicolas Fröhlich, Robin Schmöcker, Yannik Mahlau + + + +**Publication:** Not Available + + + +**Results:** Geometric Mean: 1.070, [results](/results.csv) + + + +**CompilerGym version:** 0.2.1 + + + + +**Is the approach Open Source?:** Yes + +The source code is available as Open-Source: +https://github.com/xtremey/ppo_compiler_gym + +**Did you modify the CompilerGym source code?:** No (apart from state space wrappers) + + +**What parameters does the approach have?** + +| Hyperparameter | Value | +|--------------------------- |--------- | +| Number of Epochs | 80 | +| Epsilon Clip | 0.1 | +| Mean Square Error Factor | 0.5 | +| Entropy Factor | 0.01 | +| Learning Rate | 0.0005 | +| Trajectories until Update | 20 | +| Hidden Layer Size | 128 | +| Activation Function | TanH | +| Number of Layers | 4 | +| Shared Parameter Layers | First 3 | +| Optimizer | Adam | + +**What range of values were considered for the above parameters?** + +We experimented a little bit with the hyperparameters of PPO, but the results did not +change drastically. Therefore, we did not perform any Hyperparameter Optimization. + +**Is the policy deterministic?:** No + + +## Description + + + +Our Model uses the Proximal Policy Optimization (PPO) Architecture: +https://arxiv.org/abs/1707.06347 + +We used a wrapper to extend the state space such that the number of remaining steps is +an additional entry in the state space (as a number, not one hot encoded). During +training we limited the number of steps per episode to 200. + +In a second step we use the action probabilities of the model to perform a guided +random search (also for 200 steps). We limited the search time to one minute for each +environment. + +In a third step we optimized the best trajectory found during random search by taking 500 +additional steps using the models action probabilities. This did not yield improvement +for all environments, but sometimes improved solution a little with basically no +computational cost. Therefore, the maximum possible length of a trajectory is 700. +However, most trajectories are much shorter. + +We excluded the Ghostscript benchmark during training since it took a lot of computation +and presented itself as a bottleneck. Additionally, we excluded the random search and additional +steps for this benchmark since it did not yield any improvement and drastically increased the mean +walltime. + + +### Credit +Credit to nikhilbarhate99 +(https://github.com/nikhilbarhate99/PPO-PyTorch/blob/master/PPO.py). +Parts of the rollout buffer and the update method are taken from this repo. \ No newline at end of file diff --git a/leaderboard/llvm_instcount/ppo/results.csv b/leaderboard/llvm_instcount/ppo/results.csv new file mode 100644 index 000000000..06de00024 --- /dev/null +++ b/leaderboard/llvm_instcount/ppo/results.csv @@ -0,0 +1,24 @@ +benchmark://cbench-v1/adpcm,1.0083798882681567,60.93814396858215,opt -sroa -mem2reg -insert-gcov-profiling -add-discriminators -prune-eh -jump-threading -dce -sroa -dce -insert-gcov-profiling -reassociate -lcssa -jump-threading -instcombine -mergefunc -sroa -canonicalize-aliases -loop-load-elim -consthoist -newgvn -dce -lower-matrix-intrinsics -sroa -sroa -instsimplify -dce -gvn-hoist -simplifycfg -sink -coro-split -rewrite-statepoints-for-gc -newgvn -instnamer -forceattrs -loop-distribute -simplifycfg -inject-tli-mappings -bdce -ipconstprop -scalarizer -reassociate -prune-eh -cross-dso-cfi -pgo-memop-opt -early-cse -instcombine -simplifycfg -speculative-execution -instcombine -newgvn -constmerge -coro-elide -partially-inline-libcalls -insert-gcov-profiling -newgvn -ipsccp -early-cse -redundant-dbg-inst-elim -aggressive-instcombine -coro-elide -dce -loop-guard-widening -cross-dso-cfi -newgvn -newgvn -simplifycfg -mergeicmps -speculative-execution -instnamer -simplifycfg -loop-data-prefetch -sccp -post-inline-ee-instrument -newgvn -sroa -consthoist -mem2reg -simplifycfg -gvn-hoist -loop-data-prefetch -constprop -early-cse -loop-unroll-and-jam -inferattrs -instcombine -simplifycfg -simplifycfg -lower-constant-intrinsics -simplifycfg -simplifycfg -newgvn -lower-widenable-condition -gvn-hoist -instcombine -mergefunc -instcombine -licm -instcombine -loop-idiom -jump-threading -newgvn -rpo-functionattrs -lower-constant-intrinsics -loop-load-elim -pgo-memop-opt -lower-guard-intrinsic -instcombine -mergeicmps -indvars -lower-matrix-intrinsics -licm -sccp -newgvn -ipsccp -prune-eh -loweratomic -newgvn -sccp -jump-threading -lower-expect -loop-vectorize -instcombine -flattencfg -coro-split -simplifycfg -aggressive-instcombine -coro-early -callsite-splitting -elim-avail-extern -mergereturn -strip-nondebug -mem2reg -simplifycfg -coro-cleanup -lower-guard-intrinsic -nary-reassociate -aggressive-instcombine -instcombine -simplifycfg -early-cse -strip-dead-prototypes -licm -ipsccp -newgvn -loop-load-elim -canonicalize-aliases -coro-split -loop-versioning -newgvn -strip-debug-declare -loop-data-prefetch -lower-constant-intrinsics -strip-nondebug -instcombine -flattencfg -partially-inline-libcalls -sancov -lower-matrix-intrinsics -instcombine -strip-debug-declare -sroa -early-cse-memssa -partially-inline-libcalls -float2int -callsite-splitting -newgvn -globalopt -inject-tli-mappings -jump-threading -constmerge -mergefunc -prune-eh -coro-elide -lower-matrix-intrinsics -consthoist -insert-gcov-profiling -newgvn -tailcallelim -adce -lowerinvoke -reassociate -called-value-propagation -mergeicmps -simplifycfg -simplifycfg -instsimplify -functionattrs -globalsplit -tailcallelim -rpo-functionattrs -partially-inline-libcalls -slp-vectorizer -forceattrs -coro-elide -lower-widenable-condition -reassociate -loop-load-elim -globaldce -memcpyopt -mergefunc -sroa -sroa -coro-cleanup -sroa -loop-unswitch -called-value-propagation -sroa -mem2reg -sink -sink -inferattrs -gvn-hoist -dce -sroa -name-anon-globals -sroa -early-cse -coro-cleanup -loop-fusion -mem2reg -strip-nondebug -sroa -mergereturn -instnamer -loop-predication -prune-eh -strip-nondebug -loop-data-prefetch -mem2reg -dce -sroa -reg2mem -sroa -loop-predication -sroa -loop-sink -ipconstprop -sroa -sroa -forceattrs -infer-address-spaces -forceattrs -dce -called-value-propagation -insert-gcov-profiling -loop-unswitch -newgvn -mem2reg -forceattrs -globalsplit -mem2reg -ee-instrument -lcssa -add-discriminators -lower-widenable-condition -sroa -adce -simple-loop-unswitch -sroa -argpromotion -infer-address-spaces -sroa -lcssa -globalopt -rewrite-statepoints-for-gc -instsimplify -constprop -loop-unroll-and-jam -loop-simplify -sroa -forceattrs -loop-unswitch -mergereturn -mem2reg -pgo-memop-opt -constmerge -lcssa -loop-simplify -mem2reg -sroa -loop-vectorize -nary-reassociate -insert-gcov-profiling -consthoist -instnamer -alignment-from-assumptions -reassociate -dse -simplifycfg -infer-address-spaces -alignment-from-assumptions -rewrite-statepoints-for-gc -lcssa -loop-instsimplify -instsimplify -sccp -alignment-from-assumptions -float2int -loop-reduce -simple-loop-unswitch -sroa -gvn -guard-widening -instcombine -post-inline-ee-instrument -gvn-hoist -sroa -instcombine -alignment-from-assumptions -loop-vectorize -gvn-hoist -loop-reduce -reassociate -loop-interchange -simple-loop-unswitch -sink -mem2reg -sroa -sroa -sroa -mem2reg -loop-data-prefetch -add-discriminators -infer-address-spaces -instsimplify -loop-vectorize -instsimplify -gvn-hoist -loop-reduce -sroa -sccp -strip-dead-prototypes -lcssa -lower-widenable-condition -sroa -loop-load-elim -sroa -infer-address-spaces -sroa -sroa -sroa -loop-vectorize -sroa -reassociate -loop-interchange -licm -instcombine -jump-threading -sroa -instnamer -early-cse-memssa -add-discriminators -loop-interchange -globalopt -insert-gcov-profiling -canonicalize-aliases -loop-vectorize -sroa -loop-reduce -sroa -simple-loop-unswitch -bdce -instsimplify -sroa -sroa -constmerge -pgo-memop-opt -sink -lower-guard-intrinsic -sroa -forceattrs -mergereturn -sroa -sroa -sroa -sroa -mem2reg -sroa -always-inline -bdce -argpromotion -simple-loop-unswitch -barrier -sroa -lowerinvoke -sroa -sroa -sroa -mem2reg -newgvn -sroa -sroa -irce -loop-unswitch -loop-guard-widening -alignment-from-assumptions -loop-deletion -simple-loop-unswitch -instsimplify -tailcallelim -attributor -sroa -lower-matrix-intrinsics -lcssa -coro-early -mem2reg -hotcoldsplit -mem2reg -ee-instrument -sroa -loop-vectorize -sroa -sroa -loop-predication -lcssa -pgo-memop-opt -sroa -adce -tailcallelim -alignment-from-assumptions -loop-simplify -strip -sroa -loop-guard-widening -break-crit-edges -loop-load-elim -insert-gcov-profiling -tailcallelim -lower-guard-intrinsic -sroa -sroa -scalarizer -jump-threading -sroa -sroa -sroa -sroa -loop-unroll-and-jam -insert-gcov-profiling -sroa -sroa -barrier -simple-loop-unswitch -partially-inline-libcalls -mem2reg -sccp -strip-dead-prototypes -strip-nondebug -sroa -early-cse -sroa -lowerinvoke -barrier -early-cse -sroa -jump-threading -barrier -speculative-execution -loweratomic -newgvn -loop-load-elim -called-value-propagation -infer-address-spaces -instcombine -inject-tli-mappings -strip -newgvn -sroa -inferattrs -ee-instrument -instcombine -coro-cleanup -globalsplit -instcombine -slsr -lower-matrix-intrinsics -lower-guard-intrinsic -constprop -loop-deletion -early-cse-memssa -inject-tli-mappings -functionattrs -sroa -dce -reassociate -simplifycfg -instcombine -separate-const-offset-from-gep -lower-constant-intrinsics -jump-threading -lowerinvoke -early-cse -indvars -lcssa -instcombine -infer-address-spaces -newgvn -gvn-hoist -div-rem-pairs -float2int -reassociate -simplifycfg -dce -gvn-hoist -instcombine -newgvn -early-cse -pgo-memop-opt -newgvn -newgvn -loop-instsimplify -simplifycfg -sink -simplifycfg -early-cse -lower-matrix-intrinsics -sccp -tailcallelim -lowerinvoke -coro-split -add-discriminators -mergereturn -pgo-memop-opt -sroa -simplifycfg -loop-guard-widening -deadargelim -reassociate -early-cse-memssa -instcombine -sink -attributor -functionattrs -constmerge -newgvn -gvn-hoist -early-cse-memssa -sink -reassociate -elim-avail-extern -reassociate -lcssa -globalsplit -consthoist -early-cse -instcombine -gvn-hoist -forceattrs -constprop -sroa -name-anon-globals -deadargelim -gvn-hoist -add-discriminators -aggressive-instcombine -gvn-hoist -mergereturn -lower-matrix-intrinsics -gvn -sroa -simple-loop-unswitch -dse -coro-elide -div-rem-pairs -loop-sink -simplifycfg -newgvn -lower-matrix-intrinsics -sroa -name-anon-globals -instcombine -always-inline -instcombine -instcombine -instnamer -globalsplit -coro-early -instcombine -instcombine -instnamer -argpromotion -early-cse -adce -gvn-hoist -dce -loop-guard-widening -sink -early-cse -div-rem-pairs -dce -simplifycfg -pgo-memop-opt -coro-elide -nary-reassociate -ipsccp -pgo-memop-opt -gvn-hoist -sancov -loop-guard-widening -newgvn -instcombine -add-discriminators -simplifycfg -mergefunc -gvn-hoist -globalsplit -cross-dso-cfi -early-cse -coro-early -redundant-dbg-inst-elim -simplifycfg -irce -lower-expect -ipsccp -early-cse -adce -sccp -ipconstprop -slsr -gvn-hoist -ipconstprop -float2int -loop-versioning -instcombine -insert-gcov-profiling -attributor -functionattrs -coro-split -gvn -adce -simplifycfg -float2int -early-cse -aggressive-instcombine -simplifycfg -consthoist -gvn-hoist -ipsccp -coro-cleanup -consthoist -simplifycfg -constmerge -gvn-hoist -sccp -gvn-hoist -flattencfg -consthoist -simplifycfg -early-cse -strip-dead-prototypes -simplifycfg -strip-dead-prototypes -sccp -simplifycfg -reassociate -dse -pgo-memop-opt -simplifycfg -cross-dso-cfi -functionattrs -float2int -simple-loop-unswitch -instcombine -instcombine -name-anon-globals -mergeicmps -early-cse-memssa -sancov -sroa -simplifycfg -redundant-dbg-inst-elim -mergereturn -dse -instcombine -float2int -ipsccp -tailcallelim -cross-dso-cfi -pgo-memop-opt -gvn-hoist -lower-guard-intrinsic -indvars -pgo-memop-opt -infer-address-spaces -simplifycfg -early-cse -ipsccp -coro-split -coro-elide -indvars -lower-constant-intrinsics -lower-constant-intrinsics -dse -instcombine -gvn -indvars -dse -instcombine -ee-instrument -float2int +benchmark://cbench-v1/blowfish,1.10178117048346,61.936835527420044,opt -mem2reg -callsite-splitting -simplifycfg -slsr -sancov -barrier -loop-data-prefetch -die -coro-elide -instsimplify -early-cse-memssa -gvn-hoist -instcombine -add-discriminators -globalsplit -globaldce -deadargelim -lower-widenable-condition -jump-threading -simplifycfg -hotcoldsplit -newgvn -partially-inline-libcalls -dse -functionattrs -scalarizer -coro-elide -newgvn -separate-const-offset-from-gep -rpo-functionattrs -instcombine -dse -simplifycfg -globalopt -loop-versioning -newgvn -reassociate -consthoist -forceattrs -lower-guard-intrinsic -instcombine -loop-versioning -pgo-memop-opt -instcombine -gvn-hoist -dse -consthoist -memcpyopt -jump-threading -dse -instcombine -mergefunc -gvn -aggressive-instcombine -mldst-motion -prune-eh -rpo-functionattrs -simplifycfg -loop-unroll-and-jam -insert-gcov-profiling -gvn -strip-dead-prototypes -dce -gvn-hoist -ipsccp -globaldce -sroa -strip-nondebug -insert-gcov-profiling -gvn-hoist -functionattrs -instcombine -callsite-splitting -sink -name-anon-globals -insert-gcov-profiling -infer-address-spaces -lower-constant-intrinsics -instsimplify -coro-cleanup -deadargelim -div-rem-pairs -callsite-splitting -lower-widenable-condition -alignment-from-assumptions -loop-versioning -add-discriminators -globaldce -sroa -simplifycfg -instcombine -flattencfg -early-cse-memssa -mergereturn -loop-data-prefetch -constmerge -dse -coro-elide -early-cse-memssa -callsite-splitting -early-cse-memssa -reassociate -coro-early -early-cse -loop-data-prefetch -div-rem-pairs -globalsplit -instcombine -newgvn -instcombine -instcombine -sccp -gvn-hoist -dse -instcombine -barrier -pgo-memop-opt -newgvn -redundant-dbg-inst-elim -gvn-hoist -pgo-memop-opt -mergefunc -lower-matrix-intrinsics -redundant-dbg-inst-elim -load-store-vectorizer -instcombine -correlated-propagation -newgvn -instcombine -instcombine -pgo-memop-opt -gvn -jump-threading -indvars -argpromotion -add-discriminators -argpromotion -jump-threading -constprop -speculative-execution -instnamer -sink -consthoist -gvn-hoist -add-discriminators -simplifycfg -gvn-hoist -loop-interchange -lowerinvoke -simplifycfg -sroa -loop-distribute -load-store-vectorizer -jump-threading -nary-reassociate -simple-loop-unswitch -slp-vectorizer -early-cse-memssa -instcombine -consthoist -gvn-hoist -globaldce -gvn -gvn -instcombine -die -instcombine -simplifycfg -loop-data-prefetch -instnamer -rpo-functionattrs -instcombine -lower-matrix-intrinsics -adce -scalarizer -early-cse -insert-gcov-profiling -instsimplify -aggressive-instcombine -simplifycfg -instcombine -rpo-functionattrs -libcalls-shrinkwrap -simplifycfg -coro-split -gvn-hoist -aggressive-instcombine -deadargelim -simplifycfg -pgo-memop-opt -instsimplify -gvn-hoist -lcssa -sink -gvn -newgvn -simplifycfg -gvn-hoist -speculative-execution -jump-threading -instcombine -globalsplit -indvars -globalopt -jump-threading -ee-instrument -dce -simple-loop-unswitch -lower-guard-intrinsic -simplifycfg -coro-cleanup -jump-threading -pgo-memop-opt -jump-threading -flattencfg -mergereturn -instcombine -reassociate -lower-matrix-intrinsics -simplifycfg -mergefunc -simplifycfg -instcombine -simplifycfg -sccp -dse -mergefunc -gvn-hoist -sroa -irce -redundant-dbg-inst-elim -die -callsite-splitting -ee-instrument -strip-dead-prototypes -coro-elide -coro-split -slsr -simplifycfg -simplifycfg -loop-vectorize -lower-matrix-intrinsics -sink -instcombine -callsite-splitting -lower-guard-intrinsic -instcombine -jump-threading -simplifycfg -gvn-hoist -slp-vectorizer -insert-gcov-profiling -sroa -loop-data-prefetch -instsimplify -insert-gcov-profiling -mergefunc -sroa -strip-debug-declare -simplifycfg -tailcallelim -simplifycfg -pgo-memop-opt -newgvn -coro-elide -die -early-cse-memssa -bdce -gvn-hoist -name-anon-globals -sroa -redundant-dbg-inst-elim -newgvn -loop-data-prefetch -consthoist -simplifycfg -sroa -pgo-memop-opt -constprop -early-cse -coro-elide -simplifycfg -simplifycfg -lower-expect -instcombine -instcombine -instcombine -pgo-memop-opt -simplifycfg -dse -instcombine -early-cse-memssa -simplifycfg -instcombine -simplifycfg -coro-split -adce -early-cse-memssa -instnamer -newgvn -lcssa -scalarizer -pgo-memop-opt -newgvn -rewrite-statepoints-for-gc -mldst-motion -instcombine -strip-nondebug -functionattrs -gvn-hoist -gvn-hoist -instcombine -mergefunc -loop-versioning -newgvn -instcombine -indvars -mergereturn -coro-split -simplifycfg -callsite-splitting -coro-early -flattencfg -licm -argpromotion -consthoist -partially-inline-libcalls -elim-avail-extern -early-cse-memssa -loop-guard-widening -instcombine -libcalls-shrinkwrap -instcombine -instcombine -coro-elide -inferattrs -simplifycfg -adce -newgvn -lower-widenable-condition -lowerinvoke -instcombine -instcombine -simplifycfg -constmerge -simplifycfg -coro-cleanup -early-cse-memssa -coro-elide -early-cse-memssa -simplifycfg -consthoist -consthoist -scalarizer -newgvn -instcombine -loop-versioning -prune-eh -loop-load-elim -add-discriminators -loop-distribute -loop-deletion -simplifycfg -instsimplify -canonicalize-aliases -instnamer -instcombine -functionattrs -instcombine -dce -instcombine -indvars -simplifycfg -gvn-hoist -instcombine -simplifycfg -tailcallelim -instcombine -loop-data-prefetch -forceattrs -strip-dead-prototypes -gvn-hoist -instsimplify -coro-elide -instcombine -coro-elide -sroa -strip-dead-prototypes -newgvn -simplifycfg -dce -coro-elide -jump-threading -coro-split -slp-vectorizer -bdce -sroa -coro-elide -load-store-vectorizer -coro-split -coro-split -newgvn -scalarizer -ipsccp -instsimplify -instcombine -reassociate -constmerge -instcombine -consthoist -called-value-propagation -loop-deletion -lowerinvoke -gvn-hoist -functionattrs -instcombine -jump-threading -ipsccp -strip-nondebug -scalarizer -jump-threading -mergeicmps -coro-cleanup -newgvn -bdce -pgo-memop-opt -instcombine -adce -loop-data-prefetch -reassociate -infer-address-spaces -simplifycfg -forceattrs -lower-matrix-intrinsics -instcombine -flattencfg -consthoist -gvn-hoist -infer-address-spaces -simplifycfg -sancov -instcombine -separate-const-offset-from-gep -loop-versioning -tailcallelim -redundant-dbg-inst-elim -mergefunc -sancov -early-cse -instcombine -pgo-memop-opt -canonicalize-aliases -instnamer -simplifycfg -sccp -gvn-hoist -post-inline-ee-instrument -infer-address-spaces -dse -loop-data-prefetch -simplifycfg -constprop -gvn -sccp -loop-versioning -coro-cleanup -dse -instcombine -speculative-execution -gvn-hoist -newgvn -loop-versioning -gvn-hoist -name-anon-globals -strip-nondebug -simplifycfg -adce -instcombine -loop-versioning -lower-guard-intrinsic -globalsplit -instcombine -reassociate -ipsccp -coro-elide -consthoist -called-value-propagation -add-discriminators -consthoist -consthoist -early-cse-memssa -instsimplify -instcombine -loweratomic -simplifycfg -loop-data-prefetch -strip-dead-prototypes -div-rem-pairs -early-cse-memssa -instcombine -simplifycfg -nary-reassociate -instcombine -gvn-hoist -barrier -instcombine -bdce -newgvn -lcssa -loop-idiom -mergefunc -dce -redundant-dbg-inst-elim -simplifycfg -scalarizer -early-cse-memssa -bdce -constmerge -lower-guard-intrinsic -instnamer -early-cse -gvn -simplifycfg -ee-instrument -gvn-hoist -inject-tli-mappings -coro-elide -simplifycfg -simplifycfg -consthoist -coro-cleanup -lcssa -adce -instcombine -simplifycfg -instcombine -instcombine -guard-widening -loop-sink -slp-vectorizer -libcalls-shrinkwrap -instcombine -consthoist -lcssa -constprop -canonicalize-aliases -simplifycfg -early-cse-memssa -argpromotion -strip -lower-expect -gvn -instcombine -globalopt -aggressive-instcombine -constprop -loop-interchange -loop-data-prefetch -adce -early-cse-memssa -jump-threading -add-discriminators -sink -barrier -jump-threading -adce -post-inline-ee-instrument -mergefunc -coro-split -dce -sancov -instcombine -mergefunc -lower-matrix-intrinsics -ee-instrument -simplifycfg -jump-threading -speculative-execution -dse -loop-sink -constprop -ipconstprop -newgvn -rewrite-statepoints-for-gc -prune-eh -sroa -elim-avail-extern -globalsplit -memcpyopt -gvn -barrier -early-cse-memssa -strip-nondebug -mergefunc -called-value-propagation -simplifycfg -newgvn -prune-eh -early-cse-memssa -loop-distribute -simplifycfg -loop-fusion -instnamer -globalopt -instcombine -ipsccp -sccp -globalopt -ipconstprop -early-cse-memssa -pgo-memop-opt -consthoist -newgvn -strip -pgo-memop-opt -consthoist -slsr -consthoist -libcalls-shrinkwrap -lower-constant-intrinsics -coro-early -add-discriminators -mergefunc -instcombine -called-value-propagation -ipsccp -strip-nondebug -globalopt -instcombine -strip-dead-prototypes -bdce -instcombine -ipconstprop -instcombine -inferattrs -early-cse -reassociate -early-cse -callsite-splitting -simplifycfg -early-cse-memssa -lower-expect -pgo-memop-opt -sroa -instcombine -instcombine -pgo-memop-opt -loop-versioning -scalarizer -globalsplit -lower-widenable-condition -barrier -instcombine -loweratomic -mldst-motion -rewrite-statepoints-for-gc -newgvn -correlated-propagation -dse -scalarizer -instcombine -redundant-dbg-inst-elim -memcpyopt -instsimplify -instcombine -die -instcombine -consthoist -instcombine -post-inline-ee-instrument -simplifycfg -simplifycfg -rewrite-statepoints-for-gc -loop-versioning -nary-reassociate -inject-tli-mappings -scalarizer -rpo-functionattrs -redundant-dbg-inst-elim -jump-threading -ipconstprop -instcombine -forceattrs -newgvn -gvn -prune-eh -instcombine -instcombine -early-cse-memssa -lower-widenable-condition -add-discriminators -mergefunc -correlated-propagation -strip-nondebug -strip-nondebug -bdce -early-cse-memssa -deadargelim -rpo-functionattrs -coro-elide +benchmark://cbench-v1/crc32,1.0,60.860716819763184,opt -sroa -insert-gcov-profiling -sroa -consthoist -sroa -pgo-memop-opt -called-value-propagation -sroa -sroa -bdce -gvn-hoist -strip-dead-prototypes -coro-elide -barrier -sroa -sink -reassociate -barrier -gvn-hoist -dce -loop-reroll -instsimplify -ee-instrument -mem2reg -speculative-execution -sroa -sroa -mem2reg -loop-interchange -mem2reg -sroa -loop-deletion -lower-guard-intrinsic -sroa -strip-nondebug -simple-loop-unswitch -sancov -sancov -sroa -sroa -sroa -forceattrs -sroa -insert-gcov-profiling -infer-address-spaces -sroa -tailcallelim -loop-interchange -globalopt -loop-guard-widening -loop-idiom -sroa -newgvn -insert-gcov-profiling -inject-tli-mappings -indvars -loop-vectorize -lower-matrix-intrinsics -lcssa -loop-deletion -bdce -bdce -sroa -sroa -mergereturn -constprop -sroa -mergereturn -lcssa -loop-load-elim -insert-gcov-profiling -mem2reg -instsimplify -ipsccp -sroa -simplifycfg -sroa -instsimplify -loop-load-elim -lowerinvoke -sroa -sroa -scalarizer -ee-instrument -early-cse -alignment-from-assumptions -alignment-from-assumptions -sroa -always-inline -dce -lcssa -early-cse -sroa -alignment-from-assumptions -sccp -pgo-memop-opt -mem2reg -reassociate -sroa -constprop -indvars -newgvn -reassociate -loop-guard-widening -called-value-propagation -loop-guard-widening -strip-nondebug -reassociate -adce -sroa -sroa -instcombine -sroa -sroa -sroa -partially-inline-libcalls -gvn-hoist -sroa -simplifycfg -loop-reduce -mem2reg -newgvn -insert-gcov-profiling -loop-unroll-and-jam -early-cse -sccp -sroa -flattencfg -early-cse -sroa -rpo-functionattrs -mem2reg -loop-load-elim -functionattrs -loop-data-prefetch -instcombine -sroa -consthoist -newgvn -gvn -loop-data-prefetch -lcssa -slsr -loop-distribute -simplifycfg -argpromotion -newgvn -early-cse -coro-elide -simplifycfg -early-cse -loop-data-prefetch -early-cse-memssa -strip-dead-prototypes -slp-vectorizer -loop-data-prefetch -simplifycfg -mem2reg -strip-nondebug -post-inline-ee-instrument -sroa -div-rem-pairs -loop-sink -add-discriminators -simplifycfg -simplifycfg -newgvn -simplifycfg -early-cse -loop-versioning -reassociate -name-anon-globals -attributor -instcombine -rpo-functionattrs -slsr -lower-widenable-condition -early-cse -simplifycfg -scalarizer -guard-widening -simplifycfg -instnamer -early-cse-memssa -forceattrs -instcombine -jump-threading -forceattrs -lower-constant-intrinsics -newgvn -loop-predication -jump-threading -loop-fusion -ee-instrument -slsr -post-inline-ee-instrument -simplifycfg -slsr -libcalls-shrinkwrap -loop-versioning -correlated-propagation -loop-idiom -insert-gcov-profiling -loop-simplifycfg -loop-interchange -lower-guard-intrinsic -constprop -loop-sink -sroa -mem2reg -loop-reduce -loop-unroll-and-jam -loop-fusion -sroa -sroa -sroa -sroa -bdce -sroa -sroa -mergereturn -add-discriminators -loop-reroll -mem2reg -hotcoldsplit -constprop -simple-loop-unswitch -sroa -sroa -sccp -loop-reduce -lowerinvoke -alignment-from-assumptions -sroa -sink -loop-predication -canonicalize-aliases -loop-guard-widening -loop-data-prefetch -coro-cleanup -constmerge -lower-matrix-intrinsics -sroa -loop-unswitch -sink -loop-guard-widening -add-discriminators -reassociate -coro-elide -instsimplify -inferattrs -newgvn -newgvn -loop-vectorize -loop-vectorize -loop-load-elim -indvars -simple-loop-unswitch -loop-idiom -alignment-from-assumptions -mem2reg -lcssa -sroa -loop-unswitch -pgo-memop-opt -sroa -loop-data-prefetch -loop-vectorize -loop-sink -instsimplify -add-discriminators -simplifycfg -memcpyopt -constmerge -sroa -globalopt -loop-interchange -early-cse -sroa -mem2reg -sroa -lcssa -float2int -lower-guard-intrinsic -loop-reduce -sroa -sroa -loop-unroll-and-jam -early-cse-memssa -loop-unroll-and-jam -instsimplify -sancov -loop-load-elim -barrier -dce -sroa -infer-address-spaces -lcssa -sink -loop-reduce -lcssa -loop-guard-widening -sroa -mem2reg -barrier -add-discriminators -sroa -loop-unroll-and-jam -break-crit-edges -sroa -instsimplify -early-cse -instsimplify -argpromotion -instsimplify -jump-threading -sroa -coro-elide -coro-cleanup -forceattrs -strip -globalsplit -insert-gcov-profiling -sroa -loop-deletion -adce -sroa -loop-vectorize -sroa -sancov -insert-gcov-profiling -sroa -mergereturn -pgo-memop-opt -hotcoldsplit -ee-instrument -sroa -reassociate -mem2reg -sroa -loop-deletion -sroa -lower-guard-intrinsic -loop-predication -instsimplify -strip-dead-prototypes -reassociate -loop-deletion -sroa -sroa -mem2reg -insert-gcov-profiling -early-cse -mem2reg -ee-instrument -insert-gcov-profiling -loop-reroll -alignment-from-assumptions -mem2reg -inferattrs -sroa -sroa -slp-vectorizer -sroa -loop-reroll -mem2reg -simple-loop-unswitch -reg2mem -mem2reg -constprop -barrier -sroa -simple-loop-unswitch -pgo-memop-opt -insert-gcov-profiling -sroa -sroa -alignment-from-assumptions -mem2reg -functionattrs -simplifycfg -loop-predication -strip-dead-prototypes -early-cse-memssa -mem2reg -loop-sink -early-cse -licm -pgo-memop-opt -loop-predication -dce -constprop -sroa -add-discriminators -sroa -sroa -sroa -lowerswitch -sroa -sancov -loop-predication -insert-gcov-profiling -loop-load-elim -early-cse -sroa -globalopt -barrier -sroa -reassociate -called-value-propagation -lower-guard-intrinsic -loop-predication -lower-guard-intrinsic -sroa -sroa -sroa -sroa -sccp -infer-address-spaces -sroa -loop-deletion -lower-matrix-intrinsics -sroa -sroa -globalsplit -loop-data-prefetch -early-cse-memssa -sroa -loop-versioning -barrier -ee-instrument -sroa -loop-load-elim -sroa -mem2reg -called-value-propagation -loop-guard-widening -coro-cleanup -sroa -barrier -insert-gcov-profiling -indvars -loop-predication -called-value-propagation -globalopt -globalopt -loop-reduce -mem2reg -mem2reg -lower-constant-intrinsics -coro-cleanup -reassociate -mergereturn -sroa -sroa -ipconstprop -simple-loop-unswitch -sroa -sroa -insert-gcov-profiling -mem2reg -instnamer -sroa -coro-elide -loop-simplifycfg -sccp -adce -sroa -sroa -loop-sink -alignment-from-assumptions -argpromotion -sroa -mem2reg -reassociate -sink -sroa -sroa -strip-nondebug -sroa -instsimplify -sccp -loop-reroll -forceattrs -strip-nondebug -cross-dso-cfi -coro-early -ipconstprop -lower-guard-intrinsic -sroa -loop-interchange -sroa -adce -sroa -simplifycfg -name-anon-globals -ipsccp -jump-threading -sroa -called-value-propagation -loop-guard-widening -loop-reduce -mem2reg -hotcoldsplit -sroa -constmerge -always-inline -sroa -loop-idiom -mergereturn -ipsccp -loop-deletion -simple-loop-unswitch -loop-guard-widening -argpromotion -sroa -sroa -instsimplify -speculative-execution -insert-gcov-profiling -sroa -loop-interchange -dce -reassociate -gvn-hoist -indvars -dce -dce -sroa -mem2reg -sroa -tailcallelim -sroa -lcssa -loop-predication -gvn-hoist -simple-loop-unswitch -sroa -sroa -coro-cleanup -loop-idiom -post-inline-ee-instrument -reassociate -sroa -post-inline-ee-instrument -lower-constant-intrinsics -constmerge -sink -gvn-hoist -sroa -sroa -sccp -sroa -forceattrs -strip-nondebug -speculative-execution -sroa -tailcallelim -sroa -pgo-memop-opt -early-cse-memssa -ee-instrument -instsimplify -sroa -loop-reroll -simplifycfg -mem2reg -sroa -mem2reg -dce -instsimplify -insert-gcov-profiling -sroa -slsr -sroa -ipsccp -coro-early -sroa -rewrite-statepoints-for-gc -mem2reg -ee-instrument -loop-unroll-and-jam -loop-sink -sroa -barrier -loop-idiom -loop-guard-widening -loweratomic -early-cse -gvn-hoist -sroa -correlated-propagation -mergereturn -sroa -sroa -sroa -sink -loop-versioning -early-cse -constprop -sroa -sroa -sroa -sroa -speculative-execution -sroa -early-cse -lcssa -loop-idiom -inferattrs -sroa -canonicalize-aliases -lower-guard-intrinsic -gvn-hoist -simplifycfg -loop-simplify -loop-simplify -add-discriminators -sroa -instcombine -newgvn -adce -sroa -mem2reg -lowerinvoke -sroa -mergereturn -simplifycfg -ee-instrument -forceattrs -loop-distribute -mldst-motion -instcombine -consthoist -dce -ipsccp -strip-nondebug -early-cse-memssa -simplifycfg -callsite-splitting -slsr -sccp -partially-inline-libcalls -mergeicmps -memcpyopt -lower-matrix-intrinsics -redundant-dbg-inst-elim -mem2reg -gvn-hoist -prune-eh -loop-vectorize -newgvn -dce -instcombine -simplifycfg -simplifycfg -gvn-hoist -instcombine -sccp -lower-matrix-intrinsics -newgvn -inject-tli-mappings -lower-expect -coro-split -instcombine -rpo-functionattrs -lower-expect -ipconstprop -reassociate -lower-widenable-condition -slsr -coro-elide -adce -coro-elide -lower-constant-intrinsics -newgvn -dce -aggressive-instcombine -loop-versioning -sancov -float2int -ipconstprop -dse -lower-matrix-intrinsics -strip-dead-prototypes -die -lower-expect -reassociate -lower-widenable-condition -instcombine -inferattrs -lower-widenable-condition -simplifycfg -pgo-memop-opt -instcombine -gvn -simplifycfg -die -strip-nondebug -lower-constant-intrinsics +benchmark://cbench-v1/ghostscript,1.0296089727338689,110.89521312713623,opt -loop-interchange -sroa -adce -early-cse-memssa -simplifycfg -loop-guard-widening -globalsplit -coro-elide -coro-elide -jump-threading -instcombine -globalsplit -sancov -slsr -speculative-execution -gvn -simplifycfg -instcombine -separate-const-offset-from-gep -instcombine -jump-threading -lower-constant-intrinsics -early-cse-memssa -float2int -gvn -deadargelim -partially-inline-libcalls -die -simplifycfg -loop-versioning -lower-constant-intrinsics -lower-constant-intrinsics -coro-cleanup -simplifycfg -coro-elide -prune-eh -jump-threading -simplifycfg -die -reassociate -loop-versioning -ipconstprop -rpo-functionattrs -loop-versioning -callsite-splitting -simplifycfg -gvn -early-cse-memssa -sancov -instnamer -ipconstprop -loop-data-prefetch -dse -adce -globalsplit -slp-vectorizer -rpo-functionattrs -functionattrs -called-value-propagation -loop-sink -simplifycfg -deadargelim -sancov -name-anon-globals -instcombine -callsite-splitting -gvn -coro-split -always-inline -rpo-functionattrs -sccp -insert-gcov-profiling -coro-split -early-cse-memssa -instnamer -early-cse -lower-expect -die -instsimplify -mldst-motion -instcombine -dse -coro-early -mergefunc -newgvn -gvn-hoist -callsite-splitting -newgvn -separate-const-offset-from-gep -die -sancov -instcombine -forceattrs -newgvn -jump-threading -coro-cleanup -aggressive-instcombine -float2int -strip-nondebug -instcombine -simple-loop-unswitch -simplifycfg -loop-load-elim -redundant-dbg-inst-elim -sancov -rpo-functionattrs -dse -mergefunc -lowerinvoke -instcombine -early-cse -strip-nondebug -early-cse -adce -simplifycfg -die -mergereturn -always-inline -licm -instnamer -insert-gcov-profiling -simple-loop-unswitch -reassociate -newgvn -coro-split -functionattrs -newgvn -simplifycfg -simplifycfg -dce -nary-reassociate -coro-split -newgvn -lower-widenable-condition -jump-threading -consthoist -separate-const-offset-from-gep -globalsplit -simplifycfg -dse -jump-threading -loop-load-elim -early-cse-memssa -gvn -instcombine -loweratomic -simplifycfg -functionattrs -consthoist -jump-threading -lower-expect -ipsccp -jump-threading -gvn -adce -newgvn -rpo-functionattrs -sccp -simplifycfg -prune-eh -early-cse-memssa -coro-split -simplifycfg -globaldce -sancov -speculative-execution -coro-elide -slp-vectorizer -name-anon-globals -globalsplit -consthoist -loop-data-prefetch -name-anon-globals -simplifycfg -simplifycfg -instcombine -instcombine -instcombine -mergefunc -canonicalize-aliases -functionattrs -instcombine -strip-debug-declare -prune-eh -infer-address-spaces -rpo-functionattrs -canonicalize-aliases -mergefunc -callsite-splitting -dce -loop-versioning -loop-load-elim -gvn-hoist -simplifycfg -lower-matrix-intrinsics -float2int -dse -simplifycfg -instsimplify -dse' +benchmark://cbench-v1/ispell,1.028289936664321,66.57882642745972,opt -loop-data-prefetch -barrier -forceattrs -sroa -instcombine -instcombine -bdce -strip-dead-prototypes -early-cse-memssa -strip-debug-declare -add-discriminators -instcombine -simplifycfg -memcpyopt -jump-threading -forceattrs -strip-dead-prototypes -newgvn -redundant-dbg-inst-elim -post-inline-ee-instrument -instsimplify -newgvn -strip-nondebug -early-cse-memssa -coro-elide -instcombine -constmerge -cross-dso-cfi -load-store-vectorizer -deadargelim -strip-dead-prototypes -name-anon-globals -reassociate -redundant-dbg-inst-elim -adce -separate-const-offset-from-gep -instcombine -lower-expect -ipconstprop -name-anon-globals -aggressive-instcombine -functionattrs -mldst-motion -aggressive-instcombine -inferattrs -die -die -constprop -redundant-dbg-inst-elim -lower-widenable-condition -simplifycfg -lcssa -mldst-motion -functionattrs -add-discriminators -instcombine -strip-dead-prototypes -instsimplify -loop-versioning -inferattrs -redundant-dbg-inst-elim -attributor -jump-threading -licm -callsite-splitting -globalopt -dse -partially-inline-libcalls -ipsccp -rewrite-statepoints-for-gc -instcombine -name-anon-globals -sroa -lower-constant-intrinsics -pgo-memop-opt -mergefunc -slp-vectorizer -mergefunc -insert-gcov-profiling -instcombine -ipconstprop -scalarizer -libcalls-shrinkwrap -lowerinvoke -elim-avail-extern -memcpyopt -mem2reg -adce -aggressive-instcombine -libcalls-shrinkwrap -newgvn -mem2reg -flattencfg -loop-unroll-and-jam -newgvn -newgvn -loop-distribute -called-value-propagation -lowerinvoke -float2int -consthoist -bdce -jump-threading -simplifycfg -rpo-functionattrs -simplifycfg -coro-split -mergefunc -simple-loop-unswitch -loop-versioning -lower-matrix-intrinsics -simplifycfg -simplifycfg -adce -jump-threading -gvn-hoist -mergereturn -simplifycfg -simplifycfg -instcombine -newgvn -rewrite-statepoints-for-gc -globalopt -aggressive-instcombine -callsite-splitting -newgvn -consthoist -sancov -globalopt -gvn-hoist -lower-widenable-condition -simplifycfg -forceattrs -strip-debug-declare -loop-versioning -post-inline-ee-instrument -consthoist -rpo-functionattrs -sroa -simplifycfg -gvn -loop-load-elim -aggressive-instcombine -sancov -lower-matrix-intrinsics -coro-elide -jump-threading -mergefunc -strip-dead-prototypes -globalopt -slp-vectorizer -dse -strip-nondebug -sancov -lower-constant-intrinsics -libcalls-shrinkwrap -pgo-memop-opt -libcalls-shrinkwrap -elim-avail-extern -lcssa -coro-elide -early-cse-memssa -mergefunc -instcombine -gvn -inferattrs -instcombine -lcssa -instcombine -globaldce -aggressive-instcombine -strip-debug-declare -aggressive-instcombine -sink -memcpyopt -newgvn -strip-nondebug -lower-matrix-intrinsics -lower-matrix-intrinsics -gvn -flattencfg -aggressive-instcombine -lowerinvoke -consthoist -simplifycfg -simplifycfg -simplifycfg -rpo-functionattrs -gvn -deadargelim -partially-inline-libcalls -jump-threading -newgvn -reassociate -inject-tli-mappings -gvn -functionattrs -strip-debug-declare -mergeicmps -consthoist -early-cse-memssa -mergereturn -pgo-memop-opt -instcombine -mergefunc -prune-eh -simplifycfg -globalopt -lower-matrix-intrinsics -aggressive-instcombine -slsr -mergefunc -jump-threading -loop-versioning -instcombine -inject-tli-mappings -elim-avail-extern -simplifycfg -pgo-memop-opt -insert-gcov-profiling -name-anon-globals -partially-inline-libcalls -sroa -simplifycfg -newgvn -strip-debug-declare -callsite-splitting -instcombine -globalsplit -gvn -alignment-from-assumptions -jump-threading -functionattrs -adce -inferattrs -gvn-hoist -indvars -dse -simplifycfg -flattencfg -lower-expect -name-anon-globals -elim-avail-extern -rpo-functionattrs -partially-inline-libcalls -rpo-functionattrs -redundant-dbg-inst-elim -sink -coro-elide -callsite-splitting -sroa -strip-nondebug -jump-threading -gvn -argpromotion -strip-nondebug -loop-data-prefetch -instcombine -die -aggressive-instcombine -libcalls-shrinkwrap -dce -early-cse -aggressive-instcombine -dse -simplifycfg -adce -loop-versioning -jump-threading -early-cse-memssa -newgvn -coro-elide -lower-expect -elim-avail-extern -rpo-functionattrs -dse -ipconstprop -simplifycfg -gvn -simplifycfg -strip -gvn-hoist -jump-threading -rpo-functionattrs -div-rem-pairs -prune-eh -slp-vectorizer -speculative-execution -mergeicmps -lower-constant-intrinsics -simplifycfg -elim-avail-extern -die -sancov -lower-matrix-intrinsics -sccp -newgvn -barrier -elim-avail-extern -loop-load-elim -gvn-hoist -aggressive-instcombine -licm -simplifycfg -newgvn -simplifycfg -newgvn -mldst-motion -early-cse -alignment-from-assumptions -scalarizer -partially-inline-libcalls -dse -newgvn -post-inline-ee-instrument -sancov -div-rem-pairs -ipconstprop -float2int -deadargelim -bdce -sink -sancov -early-cse -memcpyopt -strip-nondebug -elim-avail-extern -name-anon-globals -globalsplit -mergefunc -gvn -float2int -lowerinvoke -pgo-memop-opt -newgvn -slsr -dse -gvn-hoist -lower-matrix-intrinsics -callsite-splitting -sancov -always-inline -early-cse -barrier -loop-versioning -lower-guard-intrinsic -early-cse -aggressive-instcombine -ipsccp -early-cse-memssa -lower-expect -functionattrs -consthoist -loop-versioning -newgvn -tailcallelim -deadargelim -strip-debug-declare -libcalls-shrinkwrap -instcombine -simplifycfg -instnamer -callsite-splitting -strip-debug-declare -dce -consthoist -callsite-splitting -flattencfg -instcombine -coro-split -newgvn -elim-avail-extern -jump-threading -gvn-hoist -strip-debug-declare -alignment-from-assumptions -early-cse-memssa -called-value-propagation -coro-elide -gvn-hoist -tailcallelim -die -sink -callsite-splitting -strip-debug-declare -sancov -constprop -mergefunc -mem2reg -slsr -simplifycfg -coro-early -lower-constant-intrinsics -globalopt -mem2reg -called-value-propagation -functionattrs -gvn -aggressive-instcombine -deadargelim -insert-gcov-profiling -globalsplit -gvn-hoist -dse -simplifycfg -correlated-propagation -dse -gvn-hoist -tailcallelim -functionattrs -post-inline-ee-instrument -adce -lower-expect -aggressive-instcombine -globaldce -correlated-propagation -name-anon-globals -constprop -early-cse -name-anon-globals -lower-matrix-intrinsics -aggressive-instcombine -aggressive-instcombine -lower-widenable-condition -early-cse -pgo-memop-opt -die -instnamer -slp-vectorizer -consthoist -lcssa -lower-matrix-intrinsics -flattencfg -tailcallelim -correlated-propagation -speculative-execution -prune-eh -cross-dso-cfi -always-inline -dse -simplifycfg -consthoist -alignment-from-assumptions -redundant-dbg-inst-elim -partially-inline-libcalls -simplifycfg -loop-data-prefetch -simplifycfg -speculative-execution -globaldce -gvn -simplifycfg -newgvn -newgvn -strip -jump-threading -slp-vectorizer -deadargelim -simplifycfg -aggressive-instcombine -constprop -sancov -inferattrs -div-rem-pairs -gvn -sroa -insert-gcov-profiling -newgvn -slp-vectorizer -speculative-execution -dce -inferattrs -strip-debug-declare -guard-widening -simplifycfg -loop-load-elim -die -simplifycfg -simple-loop-unswitch -instcombine -lower-expect -instnamer -sancov -nary-reassociate -globalopt -instcombine -mergefunc -loop-data-prefetch -lowerinvoke -callsite-splitting -insert-gcov-profiling -mergefunc -coro-split -instcombine -jump-threading -aggressive-instcombine -gvn-hoist -globaldce -aggressive-instcombine -adce -name-anon-globals -loop-data-prefetch -lower-matrix-intrinsics -adce -name-anon-globals -callsite-splitting -constmerge -simplifycfg -early-cse-memssa -functionattrs -slp-vectorizer -tailcallelim -prune-eh -coro-split -lower-matrix-intrinsics -early-cse-memssa -lower-matrix-intrinsics -simplifycfg -ipconstprop -jump-threading -early-cse-memssa -mergefunc -jump-threading -sancov -div-rem-pairs -simplifycfg -coro-split -inferattrs -partially-inline-libcalls -functionattrs -slsr -instcombine -functionattrs -indvars -globalsplit -slsr -lower-matrix-intrinsics -strip -lower-constant-intrinsics -die -loop-idiom -rpo-functionattrs -simplifycfg -gvn-hoist -callsite-splitting -lower-matrix-intrinsics -dse -slsr -newgvn -dce -float2int -globalopt -mergereturn -deadargelim -dse -name-anon-globals -scalarizer -callsite-splitting -mergefunc -rpo-functionattrs -callsite-splitting -jump-threading -libcalls-shrinkwrap -die -globaldce -guard-widening -ipconstprop -lcssa -mergeicmps -jump-threading -globalsplit -forceattrs -gvn -aggressive-instcombine -ee-instrument -strip-nondebug -slsr -indvars -lower-matrix-intrinsics -simplifycfg -lower-constant-intrinsics -instnamer -globalopt -deadargelim -mergeicmps -rpo-functionattrs -aggressive-instcombine -bdce -flattencfg -separate-const-offset-from-gep -deadargelim -sink -die -name-anon-globals -simplifycfg -gvn-hoist -lower-expect -loop-reroll -slp-vectorizer -inferattrs -indvars -instcombine -newgvn -guard-widening -indvars -adce -functionattrs -post-inline-ee-instrument -simple-loop-unswitch -infer-address-spaces -die -barrier -barrier -argpromotion -guard-widening -instcombine -strip-nondebug -pgo-memop-opt -loweratomic -scalarizer -jump-threading -redundant-dbg-inst-elim -elim-avail-extern -ipconstprop -infer-address-spaces -pgo-memop-opt -instcombine -newgvn -sancov -adce -gvn-hoist -simplifycfg -lower-constant-intrinsics -jump-threading -name-anon-globals -gvn-hoist -bdce -ipconstprop -lowerinvoke -slp-vectorizer -callsite-splitting -loop-vectorize -sancov -strip-dead-prototypes -adce -ipconstprop -loop-data-prefetch -slsr -constprop -ee-instrument -constprop -callsite-splitting -inject-tli-mappings -simple-loop-unswitch -instcombine -lower-widenable-condition -lower-matrix-intrinsics -callsite-splitting -pgo-memop-opt -globalopt -aggressive-instcombine -loop-load-elim -strip-debug-declare -dce -slsr -loop-fusion -libcalls-shrinkwrap -slsr -jump-threading -loop-load-elim -instnamer -pgo-memop-opt -callsite-splitting -die -simplifycfg -break-crit-edges -inferattrs -post-inline-ee-instrument -inject-tli-mappings -tailcallelim -mergeicmps -jump-threading -instcombine -lower-matrix-intrinsics -gvn-hoist -newgvn -indvars -tailcallelim -simplifycfg -lower-widenable-condition -instnamer -rpo-functionattrs -gvn -dse -jump-threading -newgvn -callsite-splitting -die -instnamer -div-rem-pairs +benchmark://cbench-v1/ghostscript,1.0296089727338689,110.89521312713623,opt -loop-interchange -sroa -adce -early-cse-memssa -simplifycfg -loop-guard-widening -globalsplit -coro-elide -coro-elide -jump-threading -instcombine -globalsplit -sancov -slsr -speculative-execution -gvn -simplifycfg -instcombine -separate-const-offset-from-gep -instcombine -jump-threading -lower-constant-intrinsics -early-cse-memssa -float2int -gvn -deadargelim -partially-inline-libcalls -die -simplifycfg -loop-versioning -lower-constant-intrinsics -lower-constant-intrinsics -coro-cleanup -simplifycfg -coro-elide -prune-eh -jump-threading -simplifycfg -die -reassociate -loop-versioning -ipconstprop -rpo-functionattrs -loop-versioning -callsite-splitting -simplifycfg -gvn -early-cse-memssa -sancov -instnamer -ipconstprop -loop-data-prefetch -dse -adce -globalsplit -slp-vectorizer -rpo-functionattrs -functionattrs -called-value-propagation -loop-sink -simplifycfg -deadargelim -sancov -name-anon-globals -instcombine -callsite-splitting -gvn -coro-split -always-inline -rpo-functionattrs -sccp -insert-gcov-profiling -coro-split -early-cse-memssa -instnamer -early-cse -lower-expect -die -instsimplify -mldst-motion -instcombine -dse -coro-early -mergefunc -newgvn -gvn-hoist -callsite-splitting -newgvn -separate-const-offset-from-gep -die -sancov -instcombine -forceattrs -newgvn -jump-threading -coro-cleanup -aggressive-instcombine -float2int -strip-nondebug -instcombine -simple-loop-unswitch -simplifycfg -loop-load-elim -redundant-dbg-inst-elim -sancov -rpo-functionattrs -dse -mergefunc -lowerinvoke -instcombine -early-cse -strip-nondebug -early-cse -adce -simplifycfg -die -mergereturn -always-inline -licm -instnamer -insert-gcov-profiling -simple-loop-unswitch -reassociate -newgvn -coro-split -functionattrs -newgvn -simplifycfg -simplifycfg -dce -nary-reassociate -coro-split -newgvn -lower-widenable-condition -jump-threading -consthoist -separate-const-offset-from-gep -globalsplit -simplifycfg -dse -jump-threading -loop-load-elim -early-cse-memssa -gvn -instcombine -loweratomic -simplifycfg -functionattrs -consthoist -jump-threading -lower-expect -ipsccp -jump-threading -gvn -adce -newgvn -rpo-functionattrs -sccp -simplifycfg -prune-eh -early-cse-memssa -coro-split -simplifycfg -globaldce -sancov -speculative-execution -coro-elide -slp-vectorizer -name-anon-globals -globalsplit -consthoist -loop-data-prefetch -name-anon-globals -simplifycfg -simplifycfg -instcombine -instcombine -instcombine -mergefunc -canonicalize-aliases -functionattrs -instcombine -strip-debug-declare -prune-eh -infer-address-spaces -rpo-functionattrs -canonicalize-aliases -mergefunc -callsite-splitting -dce -loop-versioning -loop-load-elim -gvn-hoist -simplifycfg -lower-matrix-intrinsics -float2int -dse -simplifycfg -instsimplify -dse' +benchmark://cbench-v1/jpeg-d,1.0493254773173644,79.56333637237549,opt -sroa -loop-data-prefetch -instcombine -mergeicmps -always-inline -pgo-memop-opt -sroa -gvn-hoist -strip-nondebug -simplifycfg -lower-matrix-intrinsics -instcombine -mergereturn -mergereturn -newgvn -lower-matrix-intrinsics -loop-guard-widening -sroa -simplifycfg -bdce -consthoist -mem2reg -instcombine -loop-data-prefetch -early-cse-memssa -slp-vectorizer -lower-expect -functionattrs -sink -instcombine -gvn-hoist -dce -gvn -newgvn -instcombine -loop-fusion -simplifycfg -pgo-memop-opt -simplifycfg -instcombine -lowerinvoke -sroa -loop-vectorize -newgvn -dse -redundant-dbg-inst-elim -loop-data-prefetch -aggressive-instcombine -simplifycfg -instcombine -dse -name-anon-globals -simplifycfg -globalopt -aggressive-instcombine -simplifycfg -newgvn -gvn -simplifycfg -simplifycfg -ipsccp -mem2reg -add-discriminators -instcombine -simplifycfg -coro-cleanup -loop-interchange -strip-dead-prototypes -gvn-hoist -add-discriminators -jump-threading -simplifycfg -simplifycfg -mergeicmps -simplifycfg -instcombine -strip-nondebug -instcombine -licm -lower-expect -instcombine -insert-gcov-profiling -instcombine -instcombine -mem2reg -always-inline -loop-fusion -adce -mergefunc -instcombine -nary-reassociate -early-cse-memssa -instcombine -ipconstprop -lower-matrix-intrinsics -instsimplify -gvn-hoist -pgo-memop-opt -redundant-dbg-inst-elim -strip-nondebug -gvn-hoist -mldst-motion -sroa -lower-constant-intrinsics -aggressive-instcombine -reassociate -float2int -simplifycfg -dse -gvn-hoist -always-inline -loop-versioning -early-cse-memssa -inferattrs -mergeicmps -instcombine -mergefunc -lower-guard-intrinsic -lower-widenable-condition -newgvn -sroa -loop-idiom -simplifycfg -speculative-execution -instcombine -coro-split -loop-data-prefetch -instcombine -strip -indvars -lowerinvoke -ipconstprop -loop-fusion -slsr -sroa -loop-guard-widening -coro-split -early-cse-memssa -deadargelim -simplifycfg -rewrite-statepoints-for-gc -globaldce -infer-address-spaces -early-cse-memssa -gvn-hoist -adce -partially-inline-libcalls -lower-expect -lowerinvoke -instcombine -strip-dead-prototypes -coro-elide -globaldce -lower-widenable-condition -instcombine -elim-avail-extern -speculative-execution -globaldce -slsr -early-cse -infer-address-spaces -float2int -simplifycfg -elim-avail-extern -mergefunc -coro-cleanup -instcombine -globalsplit -slsr -ipconstprop -prune-eh -flattencfg -globalopt -insert-gcov-profiling -lower-expect -simplifycfg -early-cse-memssa -gvn-hoist -coro-elide -memcpyopt -early-cse-memssa -aggressive-instcombine -loop-unroll-and-jam -mergefunc -sroa -sroa -instcombine -gvn-hoist -sroa -loop-sink -simplifycfg -instcombine -simple-loop-unswitch -newgvn -instsimplify -forceattrs -sink -inject-tli-mappings -sroa -newgvn -gvn -mergereturn -gvn-hoist -always-inline -instnamer -loop-sink -adce -mem2reg -mldst-motion -sccp -inject-tli-mappings -consthoist -gvn -loop-data-prefetch -newgvn -instcombine -pgo-memop-opt -adce -adce -gvn-hoist -reassociate -instcombine -speculative-execution -loop-load-elim -dce -simplifycfg -reassociate -instcombine -simplifycfg -newgvn -prune-eh -adce -inject-tli-mappings -mem2reg -gvn-hoist -sroa -float2int -rewrite-statepoints-for-gc -simplifycfg -mldst-motion -simplifycfg -instcombine -simplifycfg -sroa -licm -libcalls-shrinkwrap -slp-vectorizer -simplifycfg -newgvn -adce -early-cse -simplifycfg -globalopt -inferattrs -dse -inject-tli-mappings -coro-cleanup -ipconstprop -slp-vectorizer -partially-inline-libcalls -simplifycfg -gvn -pgo-memop-opt -mergefunc -loop-data-prefetch -instcombine -lower-matrix-intrinsics -alignment-from-assumptions -newgvn -globalsplit -lower-constant-intrinsics -pgo-memop-opt -strip-dead-prototypes -coro-split -consthoist -loop-simplify -sccp -sink -inject-tli-mappings -lcssa -globaldce -consthoist -newgvn -consthoist -loop-distribute -adce -simplifycfg -elim-avail-extern -instcombine -constmerge -instcombine -instcombine -strip -simplifycfg -gvn -sroa -loop-vectorize -simplifycfg -instcombine -early-cse -instcombine -ipsccp -simplifycfg -consthoist -gvn-hoist -inject-tli-mappings -early-cse -dse -simplifycfg -lower-matrix-intrinsics -sroa -reassociate -barrier -simplifycfg -ipsccp -simplifycfg -barrier -gvn -sroa -simplifycfg -coro-cleanup -simplifycfg -simplifycfg -constprop -lower-matrix-intrinsics -instcombine -scalarizer -die -adce -gvn-hoist -loop-versioning -float2int -instsimplify -name-anon-globals -lowerinvoke -float2int -jump-threading -barrier -slsr -simple-loop-unswitch -ipconstprop -gvn-hoist -ipconstprop -rewrite-statepoints-for-gc -barrier -coro-split -inferattrs -instnamer -sroa -lower-widenable-condition -consthoist -always-inline -speculative-execution -newgvn -simplifycfg -loop-distribute -gvn-hoist -instcombine -early-cse-memssa -sccp -scalarizer -called-value-propagation -simplifycfg -instcombine -simplifycfg -globaldce -slsr -instcombine -newgvn -pgo-memop-opt -strip -inferattrs -lower-constant-intrinsics -jump-threading -strip-dead-prototypes -prune-eh -simplifycfg -lower-matrix-intrinsics -mergefunc -globalsplit -loop-sink -adce -slsr -instcombine -partially-inline-libcalls -sroa -newgvn -adce -newgvn -ipsccp -adce -tailcallelim -loop-sink -speculative-execution -gvn -lower-guard-intrinsic -simplifycfg -coro-split -consthoist -functionattrs -lower-guard-intrinsic -callsite-splitting -instcombine -sancov -mem2reg -strip-debug-declare -strip -globaldce -mem2reg -add-discriminators -consthoist -always-inline -dse -slp-vectorizer -sroa -strip -alignment-from-assumptions -jump-threading -jump-threading -instsimplify -newgvn -callsite-splitting -instcombine -loop-fusion -instcombine -barrier -lower-guard-intrinsic -consthoist -tailcallelim -loop-data-prefetch -simplifycfg -reassociate -newgvn -instcombine -functionattrs -simplifycfg -globalsplit -loop-versioning -newgvn -constmerge -simplifycfg -slp-vectorizer -coro-elide -simplifycfg -simplifycfg -instcombine -early-cse-memssa -instcombine -jump-threading -consthoist -strip-dead-prototypes -instnamer -loop-versioning -newgvn -barrier -div-rem-pairs -ipsccp -consthoist -slp-vectorizer -mergefunc -loweratomic -globalopt -coro-split -gvn -strip-dead-prototypes -guard-widening -lower-constant-intrinsics -loop-versioning -dse -instcombine -instcombine -lcssa -simplifycfg -instcombine -gvn -lower-constant-intrinsics -globaldce -newgvn -speculative-execution -deadargelim -callsite-splitting -sancov -mergeicmps -coro-elide -consthoist -inject-tli-mappings -strip-nondebug -consthoist -sancov -inject-tli-mappings -simplifycfg -speculative-execution -simplifycfg -globalopt -lowerinvoke -gvn-hoist -simplifycfg -instcombine -prune-eh -redundant-dbg-inst-elim -correlated-propagation -sancov -loop-simplifycfg -cross-dso-cfi -ipconstprop -simplifycfg -instcombine -ipconstprop -indvars -argpromotion -early-cse -sccp -early-cse -sccp -globalopt -newgvn -newgvn -infer-address-spaces -rpo-functionattrs -lower-widenable-condition -gvn-hoist -nary-reassociate -consthoist -lower-matrix-intrinsics -mergereturn -forceattrs -mem2reg -gvn-hoist -jump-threading -infer-address-spaces -float2int -mergereturn -sroa -coro-cleanup -nary-reassociate -ipsccp -instcombine -simplifycfg -loop-versioning -slp-vectorizer -slsr -early-cse-memssa -simplifycfg -early-cse-memssa -lower-constant-intrinsics -loweratomic -rpo-functionattrs -scalarizer -pgo-memop-opt -loop-versioning -indvars -float2int -simplifycfg -speculative-execution -newgvn -strip -mldst-motion -scalarizer -lower-matrix-intrinsics -argpromotion -lower-constant-intrinsics -sroa -aggressive-instcombine -mergefunc -newgvn -coro-split -jump-threading -reassociate -constprop -sccp -lowerinvoke -attributor -loop-data-prefetch -die -callsite-splitting -coro-split -simplifycfg -slp-vectorizer -simplifycfg -lower-matrix-intrinsics -early-cse-memssa -adce -newgvn -jump-threading -aggressive-instcombine -slp-vectorizer -loop-data-prefetch -rpo-functionattrs -insert-gcov-profiling -jump-threading -newgvn -jump-threading -mergefunc -sancov -post-inline-ee-instrument -callsite-splitting -strip-nondebug -die -jump-threading -mergeicmps -lower-widenable-condition -dse -always-inline -scalarizer -lower-guard-intrinsic -elim-avail-extern -strip-dead-prototypes -dse -strip-nondebug -coro-elide -gvn -loop-guard-widening -instcombine -instcombine -consthoist -lowerinvoke -instcombine -sroa -newgvn -simplifycfg -inferattrs -instsimplify -adce -argpromotion -slsr -early-cse -simplifycfg -strip-debug-declare -simplifycfg -gvn -lcssa -early-cse-memssa -lowerinvoke -globalsplit -float2int -adce -inferattrs -slsr -ipconstprop -strip-dead-prototypes -simplifycfg -guard-widening -strip-dead-prototypes -consthoist -globalopt -inferattrs -lowerinvoke -indvars -coro-elide -newgvn -simplifycfg -strip-nondebug -add-discriminators -prune-eh -mem2reg -lower-constant-intrinsics -sancov -forceattrs -cross-dso-cfi -constmerge -early-cse-memssa -licm -licm -newgvn -redundant-dbg-inst-elim -newgvn -dse -loop-unroll-and-jam -gvn-hoist -loop-data-prefetch -instcombine -consthoist -loop-versioning -newgvn -instcombine -instcombine -newgvn -loop-guard-widening -jump-threading -ipconstprop -constprop -instcombine -strip-dead-prototypes -deadargelim -coro-split -jump-threading -called-value-propagation -instcombine -mergeicmps -jump-threading -tailcallelim -mem2reg -ipsccp -consthoist -consthoist -globalsplit -cross-dso-cfi -lower-constant-intrinsics -coro-early -insert-gcov-profiling +benchmark://cbench-v1/patricia,1.0111234705228032,60.98874354362488,opt -sroa -sccp -sroa -loop-guard-widening -instsimplify -early-cse -sroa -called-value-propagation -newgvn -rewrite-statepoints-for-gc -gvn-hoist -loop-sink -loop-deletion -indvars -sroa -add-discriminators -sroa -sancov -sroa -instsimplify -sroa -sroa -reassociate -sroa -barrier -guard-widening -coro-cleanup -dce -called-value-propagation -loweratomic -ipconstprop -post-inline-ee-instrument -correlated-propagation -lower-widenable-condition -instsimplify -early-cse-memssa -early-cse -globalsplit -early-cse -adce -sroa -loop-unroll-and-jam -jump-threading -lcssa -alignment-from-assumptions -name-anon-globals -sancov -sink -sroa -licm -simplifycfg -newgvn -strip -newgvn -loop-unroll-and-jam -loop-distribute -pgo-memop-opt -flattencfg -simplifycfg -sroa -consthoist -adce -sroa -mldst-motion -strip-debug-declare -newgvn -sroa -loop-sink -loop-deletion -sroa -mem2reg -instcombine -loop-load-elim -strip-nondebug -sroa -name-anon-globals -newgvn -sroa -strip-nondebug -sroa -loop-guard-widening -aggressive-instcombine -indvars -loop-simplifycfg -insert-gcov-profiling -indvars -prune-eh -ee-instrument -tailcallelim -reassociate -loop-idiom -early-cse -sroa -instcombine -sroa -loop-distribute -redundant-dbg-inst-elim -pgo-memop-opt -sroa -functionattrs -tailcallelim -lower-matrix-intrinsics -strip-nondebug -dse -lower-constant-intrinsics -alignment-from-assumptions -float2int -sroa -dse -cross-dso-cfi -argpromotion -globalsplit -strip -globalsplit -lower-matrix-intrinsics -canonicalize-aliases -name-anon-globals -mldst-motion -ee-instrument -infer-address-spaces -indvars -inferattrs -div-rem-pairs -reassociate -ee-instrument -simplifycfg -strip-nondebug -die -callsite-splitting -rpo-functionattrs -loop-simplify -jump-threading -strip-nondebug -sancov -insert-gcov-profiling -loop-guard-widening -attributor -adce -sancov -div-rem-pairs -strip-dead-prototypes -dse -speculative-execution -gvn-hoist -reassociate -lower-matrix-intrinsics -gvn-hoist -lowerinvoke -scalarizer -consthoist -gvn -lower-matrix-intrinsics -sccp -gvn-hoist -simplifycfg -deadargelim -coro-split -correlated-propagation -lowerinvoke -instcombine -coro-split -loop-data-prefetch -globalopt -early-cse -lower-widenable-condition -die -coro-elide -correlated-propagation -attributor -globalsplit -adce -aggressive-instcombine -aggressive-instcombine -sancov -slsr -aggressive-instcombine -mergeicmps -consthoist -sancov -float2int -mergefunc -gvn-hoist -guard-widening -aggressive-instcombine -add-discriminators -sccp -strip-nondebug -early-cse-memssa -partially-inline-libcalls -loop-versioning -redundant-dbg-inst-elim -infer-address-spaces -strip-debug-declare -bdce -callsite-splitting -mergefunc -early-cse -loop-distribute -jump-threading -simplifycfg -early-cse-memssa -loop-versioning-licm -loop-predication -simplifycfg -sroa -mem2reg -infer-address-spaces -strip -mem2reg -flattencfg -post-inline-ee-instrument -sroa -add-discriminators -reassociate -sroa -sroa -sroa -sroa -sroa -alignment-from-assumptions -reassociate -sroa -sroa -loop-interchange -strip-nondebug -sroa -early-cse-memssa -float2int -lcssa -sroa -sroa -tailcallelim -called-value-propagation -loop-guard-widening -loop-predication -simplifycfg -sroa -sroa -load-store-vectorizer -loop-simplify -sroa -mem2reg -indvars -simple-loop-unswitch -loop-data-prefetch -sroa -loop-reroll -sroa -constprop -sroa -barrier -inject-tli-mappings -sroa -loop-reduce -scalarizer -ee-instrument -sroa -lcssa -loop-unroll-and-jam -sroa -loop-data-prefetch -sroa -ipconstprop -called-value-propagation -called-value-propagation -infer-address-spaces -sink -correlated-propagation -barrier -sroa -instsimplify -sroa -add-discriminators -loop-predication -gvn -instsimplify -mem2reg -gvn-hoist -instsimplify -sroa -sroa -mem2reg -lower-matrix-intrinsics -alignment-from-assumptions -add-discriminators -lower-matrix-intrinsics -dse -simplifycfg -loop-predication -loop-simplifycfg -sroa -lowerinvoke -mem2reg -called-value-propagation -loop-distribute -hotcoldsplit -loop-interchange -sroa -sink -sroa -sroa -forceattrs -sroa -sccp -simplifycfg -alignment-from-assumptions -sroa -mem2reg -sroa -scalarizer -sroa -sink -sroa -pgo-memop-opt -aggressive-instcombine -lower-guard-intrinsic -insert-gcov-profiling -called-value-propagation -loop-load-elim -loop-vectorize -loop-deletion -dce -barrier -sroa -lower-guard-intrinsic -loop-idiom -redundant-dbg-inst-elim -jump-threading -inject-tli-mappings -instcombine -loop-guard-widening -loop-deletion -mem2reg -sroa -insert-gcov-profiling -loop-interchange -alignment-from-assumptions -coro-cleanup -add-discriminators -sroa -coro-cleanup -simple-loop-unswitch -sroa -insert-gcov-profiling -insert-gcov-profiling -pgo-memop-opt -insert-gcov-profiling -sccp -bdce -mergereturn -mem2reg -rpo-functionattrs -instsimplify -sroa -sancov -globalsplit -sroa -instcombine -loop-deletion -sroa -mergereturn -instsimplify -sroa -jump-threading -sroa -sroa -div-rem-pairs -sroa -mergereturn -mem2reg -early-cse-memssa -early-cse -early-cse -sroa -sroa -simplifycfg -sroa -insert-gcov-profiling -sroa -sroa -sroa -sroa -loop-idiom -newgvn -loop-guard-widening -sroa -early-cse-memssa -strip-nondebug -sroa -sroa -instsimplify -mergereturn -ee-instrument -early-cse -reassociate -dce -sroa -forceattrs -sroa -loop-load-elim -hotcoldsplit -rpo-functionattrs -instsimplify -pgo-memop-opt -newgvn -sroa -bdce -sroa -lcssa -reassociate -add-discriminators -instsimplify -strip-nondebug -lower-guard-intrinsic -add-discriminators -simplifycfg -early-cse -sroa -gvn-hoist -loop-interchange -sroa -loop-guard-widening -newgvn -loop-guard-widening -simplifycfg -loop-load-elim -jump-threading -gvn-hoist -barrier -globalopt -lower-constant-intrinsics -lcssa -loop-fusion -bdce -lower-matrix-intrinsics -always-inline -early-cse -sink -loop-fusion -simple-loop-unswitch -sroa -sroa -sroa -dce -loop-predication -simple-loop-unswitch -loop-data-prefetch -simplifycfg -sroa -pgo-memop-opt -gvn-hoist -sroa -insert-gcov-profiling -hotcoldsplit -sancov -infer-address-spaces -sroa -loop-fusion -sroa -simplifycfg -instnamer -loop-distribute -inferattrs -loop-load-elim -attributor -loweratomic -sroa -infer-address-spaces -mem2reg -forceattrs -sroa -sroa -sroa -slp-vectorizer -early-cse -sroa -sroa -inject-tli-mappings -gvn-hoist -correlated-propagation -strip-nondebug -inferattrs -mergereturn -reassociate -lower-guard-intrinsic -early-cse -coro-elide -always-inline -loop-data-prefetch -instcombine -lower-guard-intrinsic -sroa -functionattrs -canonicalize-aliases -instnamer -mergereturn -inferattrs -sroa -early-cse -sink -indvars -instsimplify -loop-predication -early-cse -post-inline-ee-instrument -licm -instsimplify -instcombine -instcombine -licm -memcpyopt -gvn-hoist -instcombine -lcssa -dse -gvn-hoist -sroa -consthoist -loop-fusion -instnamer -strip-nondebug -inject-tli-mappings -sroa -scalarizer -called-value-propagation -inject-tli-mappings -forceattrs -div-rem-pairs -sancov -instcombine -loop-guard-widening -sroa -sroa -licm -loop-data-prefetch -mem2reg -lower-guard-intrinsic -simplifycfg -loop-guard-widening -instcombine -licm -consthoist -dce -simplifycfg -ee-instrument -instcombine -consthoist -sroa -coro-elide -adce -strip-dead-prototypes -sccp -infer-address-spaces -simplifycfg -barrier -sroa -div-rem-pairs -mem2reg -mem2reg -barrier -sroa -barrier -simplifycfg -dse -mem2reg -loop-versioning -mem2reg -early-cse -dce -reassociate -correlated-propagation -sink -gvn-hoist -simplifycfg -aggressive-instcombine -alignment-from-assumptions -simplifycfg -constmerge -scalarizer -lcssa -indvars -canonicalize-aliases -sroa -sccp -speculative-execution -instsimplify -simplifycfg -globalsplit -gvn-hoist -mem2reg -break-crit-edges -early-cse-memssa -sroa -adce -sroa -sink -sroa -coro-early -speculative-execution -instnamer -globalopt -alignment-from-assumptions -float2int -simplifycfg -gvn-hoist -alignment-from-assumptions -simplifycfg -sccp -ipsccp -instcombine -coro-elide -newgvn -instnamer -always-inline -instcombine -lower-widenable-condition -instnamer -redundant-dbg-inst-elim -simplifycfg -early-cse-memssa -dse -post-inline-ee-instrument -instnamer -mem2reg -early-cse-memssa -early-cse-memssa -gvn -simplifycfg -early-cse -add-discriminators -loop-fusion -dse -mergeicmps -flattencfg -gvn -nary-reassociate -loop-data-prefetch -globalopt -instcombine -slsr -forceattrs -constmerge -sccp -strip-nondebug -mergefunc -tailcallelim -instsimplify -scalarizer -lowerinvoke -slp-vectorizer -add-discriminators -pgo-memop-opt -dse -flattencfg -mergefunc -reassociate -lower-widenable-condition -partially-inline-libcalls -sancov -mergefunc -consthoist -scalarizer -aggressive-instcombine -coro-cleanup -coro-split -sink -inferattrs -instcombine -strip -strip-nondebug -mldst-motion -inferattrs -name-anon-globals -barrier -slp-vectorizer -instcombine -dce -die -instnamer -tailcallelim -loop-versioning -gvn -speculative-execution -sink -callsite-splitting -lower-constant-intrinsics -scalarizer -coro-split -aggressive-instcombine -slsr -callsite-splitting -dce -adce -flattencfg -gvn-hoist -sroa -die -insert-gcov-profiling -indvars -partially-inline-libcalls +benchmark://cbench-v1/rijndael,1.1092372556535077,62.701143980026245,opt -sroa -loop-versioning -gvn-hoist -simplifycfg -lower-widenable-condition -early-cse-memssa -consthoist -instcombine -globaldce -flattencfg -loop-data-prefetch -loop-versioning -instsimplify -gvn-hoist -simplifycfg -pgo-memop-opt -nary-reassociate -scalarizer -correlated-propagation -attributor -callsite-splitting -redundant-dbg-inst-elim -sancov -die -insert-gcov-profiling -instsimplify -redundant-dbg-inst-elim -jump-threading -early-cse-memssa -simplifycfg -slsr -scalarizer -mergefunc -called-value-propagation -simplifycfg -speculative-execution -slp-vectorizer -coro-elide -simplifycfg -mem2reg -coro-split -scalarizer -functionattrs -prune-eh -ipsccp -early-cse-memssa -callsite-splitting -name-anon-globals -slsr -slp-vectorizer -deadargelim -simplifycfg -newgvn -die -mergereturn -simplifycfg -callsite-splitting -name-anon-globals -slsr -adce -mldst-motion -simplifycfg -ipconstprop -constprop -simplifycfg -partially-inline-libcalls -insert-gcov-profiling -globalopt -post-inline-ee-instrument -simplifycfg -simplifycfg -constprop -die -lowerinvoke -strip-nondebug -globaldce -cross-dso-cfi -newgvn -jump-threading -simplifycfg -speculative-execution -loop-vectorize -die -instcombine -slp-vectorizer -simplifycfg -instcombine -irce -ipconstprop -newgvn -gvn-hoist -slp-vectorizer -rpo-functionattrs -instcombine -ipconstprop -simplifycfg -sccp -pgo-memop-opt -ipsccp -lower-constant-intrinsics -simplifycfg -always-inline -simplifycfg -lcssa -constmerge -gvn-hoist -simplifycfg -instcombine -dse -aggressive-instcombine -coro-elide -speculative-execution -callsite-splitting -consthoist -callsite-splitting -callsite-splitting -prune-eh -globalopt -reassociate -instnamer -early-cse -pgo-memop-opt -instcombine -reassociate -simplifycfg -loop-data-prefetch -float2int -functionattrs -adce -elim-avail-extern -loop-sink -gvn -strip-dead-prototypes -strip -guard-widening -instcombine -instcombine -loop-unroll-and-jam -globaldce -sccp -functionattrs -instcombine -instcombine -mergefunc -deadargelim -post-inline-ee-instrument -instcombine -adce -called-value-propagation -strip-nondebug -inject-tli-mappings -instcombine -instcombine -jump-threading -float2int -slp-vectorizer -loop-data-prefetch -lower-expect -tailcallelim -float2int -ipsccp -libcalls-shrinkwrap -redundant-dbg-inst-elim -instsimplify -infer-address-spaces -newgvn -mergereturn -aggressive-instcombine -lowerinvoke -callsite-splitting -simplifycfg -loop-unroll-and-jam -forceattrs -float2int -strip-nondebug -mergefunc -newgvn -slp-vectorizer -libcalls-shrinkwrap -separate-const-offset-from-gep -lcssa -dse -bdce -loop-versioning -called-value-propagation -speculative-execution -jump-threading -newgvn -simplifycfg -slsr -name-anon-globals -lower-widenable-condition -float2int -consthoist -slp-vectorizer -strip-debug-declare -globalsplit -early-cse-memssa -deadargelim -mergeicmps -globalopt -ee-instrument -inferattrs -insert-gcov-profiling -slp-vectorizer -instnamer -rewrite-statepoints-for-gc -newgvn -ipsccp -cross-dso-cfi -deadargelim -scalarizer -indvars -lower-guard-intrinsic -ipsccp -dse -loop-data-prefetch -slp-vectorizer -pgo-memop-opt -instcombine -pgo-memop-opt -coro-elide -simplifycfg -strip-dead-prototypes -adce -lower-widenable-condition -div-rem-pairs -add-discriminators -consthoist -alignment-from-assumptions -scalarizer -early-cse-memssa -gvn -early-cse-memssa -canonicalize-aliases -gvn-hoist -ee-instrument -slp-vectorizer -coro-split -lower-constant-intrinsics -cross-dso-cfi -cross-dso-cfi -pgo-memop-opt -sroa -redundant-dbg-inst-elim -early-cse-memssa -mergefunc -float2int -consthoist -lower-constant-intrinsics -simplifycfg -pgo-memop-opt -instcombine -mergereturn -strip -adce -partially-inline-libcalls -adce -barrier -sccp -gvn -newgvn -forceattrs -loop-unroll-and-jam -callsite-splitting -instcombine -argpromotion -strip-debug-declare -instcombine -post-inline-ee-instrument -globalopt -coro-split -instcombine -loop-simplify -loop-data-prefetch -post-inline-ee-instrument -dce -lowerinvoke -simplifycfg -aggressive-instcombine -inferattrs -coro-elide -functionattrs -name-anon-globals -loop-sink -simplifycfg -instcombine -sroa -reassociate -globaldce -globalsplit -instsimplify -post-inline-ee-instrument -add-discriminators -strip-nondebug -gvn -separate-const-offset-from-gep -loop-versioning -instcombine -post-inline-ee-instrument -gvn -instcombine -simplifycfg -elim-avail-extern -simplifycfg -rewrite-statepoints-for-gc -float2int -mergefunc -slsr -loop-vectorize -gvn-hoist -early-cse-memssa -lower-expect -early-cse -indvars -sancov -inferattrs -simplifycfg -jump-threading -consthoist -aggressive-instcombine -globaldce -simplifycfg -adce -newgvn -lower-expect -instcombine -callsite-splitting -lcssa -jump-threading -loop-versioning-licm -simplifycfg -globalopt -dce -loop-unroll-and-jam -nary-reassociate -cross-dso-cfi -early-cse-memssa -die -die -instcombine -add-discriminators -float2int -globalopt -instcombine -lower-matrix-intrinsics -die -slsr -gvn -gvn-hoist -die -indvars -mergefunc -consthoist -instnamer -simplifycfg -globalopt -slp-vectorizer -simplifycfg -aggressive-instcombine -nary-reassociate -argpromotion -consthoist -rpo-functionattrs -alignment-from-assumptions -coro-elide -elim-avail-extern -sccp -redundant-dbg-inst-elim -add-discriminators -called-value-propagation -coro-elide -licm -instcombine -gvn-hoist -inferattrs -mergeicmps -flattencfg -sccp -strip-debug-declare -sroa -early-cse-memssa -elim-avail-extern -ipsccp -newgvn -die -mergeicmps -prune-eh -mldst-motion -tailcallelim -simplifycfg -licm -sink -callsite-splitting -speculative-execution -callsite-splitting -canonicalize-aliases -rpo-functionattrs -mergefunc -ipsccp -strip-debug-declare -mem2reg -loop-vectorize -functionattrs -mergereturn -gvn -instcombine -ee-instrument -instsimplify -strip -correlated-propagation -reassociate -lcssa -coro-split -early-cse-memssa -early-cse-memssa -add-discriminators -simplifycfg -newgvn -prune-eh -simplifycfg -loop-unroll-and-jam -cross-dso-cfi -gvn -div-rem-pairs -ipconstprop -cross-dso-cfi -guard-widening -dse -barrier -newgvn -early-cse -strip-dead-prototypes -loop-load-elim -callsite-splitting -called-value-propagation -instcombine -prune-eh -coro-split -instcombine -globalsplit -instcombine -simplifycfg -pgo-memop-opt -alignment-from-assumptions -pgo-memop-opt -inferattrs -strip-dead-prototypes -callsite-splitting -lower-constant-intrinsics -ipconstprop -load-store-vectorizer -sancov -mergereturn -correlated-propagation -add-discriminators -coro-split -float2int -callsite-splitting -consthoist -pgo-memop-opt -cross-dso-cfi -loop-versioning -gvn-hoist -strip-nondebug -mergereturn -loop-data-prefetch -instcombine -early-cse-memssa -aggressive-instcombine -loweratomic -rpo-functionattrs -instcombine -adce -elim-avail-extern -ipconstprop -redundant-dbg-inst-elim -name-anon-globals -instcombine -dse -float2int -float2int -gvn -simple-loop-unswitch -jump-threading -instsimplify -loop-simplify -bdce -ipconstprop -instcombine -strip-nondebug -loop-sink -memcpyopt -guard-widening -ipsccp -newgvn -alignment-from-assumptions -lower-constant-intrinsics -mergereturn -strip-debug-declare -simplifycfg -instcombine -globalopt -rewrite-statepoints-for-gc -mldst-motion -globalsplit -redundant-dbg-inst-elim -scalarizer -ipconstprop -instcombine -libcalls-shrinkwrap -loop-versioning -sink -globalopt -callsite-splitting -loop-guard-widening -mldst-motion -simplifycfg -early-cse-memssa -instcombine -instcombine -name-anon-globals -jump-threading -die -early-cse -early-cse -inject-tli-mappings -adce -consthoist -insert-gcov-profiling -dce -early-cse -correlated-propagation -newgvn -jump-threading -instsimplify -callsite-splitting -gvn-hoist -simplifycfg -always-inline -simplifycfg -dce -globalsplit -sroa -loop-instsimplify -consthoist -instcombine -jump-threading -argpromotion -early-cse -instsimplify -pgo-memop-opt -flattencfg -mem2reg -dse -called-value-propagation -strip-nondebug -instcombine -ipconstprop -sroa -instsimplify -loop-unroll-and-jam -instcombine -alignment-from-assumptions -callsite-splitting -adce -coro-elide -lowerinvoke -lower-constant-intrinsics -loweratomic -forceattrs -simplifycfg -ipsccp -lower-matrix-intrinsics -loop-versioning -simplifycfg -instcombine -jump-threading -elim-avail-extern -mldst-motion -ipsccp -simplifycfg -strip-dead-prototypes -callsite-splitting -simplifycfg -nary-reassociate -post-inline-ee-instrument -aggressive-instcombine -newgvn -early-cse -simplifycfg -loop-unroll-and-jam -instcombine -instcombine -coro-elide -die -insert-gcov-profiling -gvn-hoist -ipsccp -forceattrs -sccp -simplifycfg -dce -instcombine -instcombine -instcombine -globaldce -loop-data-prefetch -scalarizer -early-cse -constprop -jump-threading -adce -simplifycfg -pgo-memop-opt -instcombine -mergereturn -simplifycfg -instcombine -newgvn -lowerinvoke -instsimplify -loop-deletion -memcpyopt -newgvn -jump-threading -lowerinvoke -newgvn -early-cse-memssa -loop-simplify -reassociate -loop-data-prefetch -simplifycfg -early-cse-memssa -instsimplify -early-cse-memssa -strip-dead-prototypes -simplifycfg -redundant-dbg-inst-elim -libcalls-shrinkwrap -instcombine -inferattrs -adce -coro-elide -early-cse -instcombine -insert-gcov-profiling -cross-dso-cfi -instcombine -prune-eh -instcombine -globalopt -mem2reg -inferattrs -memcpyopt -slsr -consthoist -simplifycfg -instnamer -simplifycfg -scalarizer -sink -gvn-hoist -early-cse-memssa -instsimplify -simplifycfg -early-cse-memssa -early-cse-memssa -insert-gcov-profiling -adce -float2int -instcombine -instnamer -indvars -redundant-dbg-inst-elim -early-cse-memssa -constmerge -instcombine -redundant-dbg-inst-elim -early-cse -die -strip-dead-prototypes -ipconstprop -early-cse-memssa -lowerinvoke -instcombine -loop-versioning -lower-guard-intrinsic -callsite-splitting -coro-elide -prune-eh -ipconstprop -simplifycfg -pgo-memop-opt -jump-threading -inferattrs -globaldce -early-cse-memssa -callsite-splitting -gvn-hoist +benchmark://cbench-v1/stringsearch2,0.9962686567164181,60.92854332923889,opt -partially-inline-libcalls -mem2reg -simple-loop-unswitch -mem2reg -add-discriminators -sroa -alignment-from-assumptions -sroa -bdce -gvn-hoist -separate-const-offset-from-gep -loop-reroll -early-cse-memssa -pgo-memop-opt -early-cse -inferattrs -cross-dso-cfi -early-cse -coro-cleanup -lcssa -scalarizer -sccp -lower-guard-intrinsic -adce -indvars -constprop -dce -early-cse -sroa -correlated-propagation -lower-guard-intrinsic -sroa -sroa -lower-matrix-intrinsics -sroa -inject-tli-mappings -loop-unroll-and-jam -newgvn -simplifycfg -aggressive-instcombine -sroa -strip-dead-prototypes -canonicalize-aliases -jump-threading -argpromotion -hotcoldsplit -loop-predication -loop-guard-widening -globalopt -newgvn -div-rem-pairs -mergereturn -sroa -coro-split -indvars -sroa -sccp -lower-matrix-intrinsics -coro-cleanup -strip-dead-prototypes -early-cse -loop-idiom -sroa -prune-eh -simplifycfg -lcssa -mergereturn -barrier -name-anon-globals -bdce -loop-guard-widening -loop-idiom -alignment-from-assumptions -instcombine -sroa -canonicalize-aliases -sroa -simplifycfg -prune-eh -loop-versioning-licm -insert-gcov-profiling -simple-loop-unswitch -sroa -globalopt -sroa -loweratomic -instcombine -mem2reg -sroa -cross-dso-cfi -callsite-splitting -prune-eh -alignment-from-assumptions -mergeicmps -consthoist -strip -constprop -insert-gcov-profiling -sroa -reassociate -infer-address-spaces -globalsplit -forceattrs -correlated-propagation -mergefunc -loop-sink -sccp -called-value-propagation -ipconstprop -memcpyopt -memcpyopt -lcssa -globalsplit -cross-dso-cfi -globalopt -mergeicmps -newgvn -mem2reg -instnamer -speculative-execution -loop-fusion -early-cse-memssa -canonicalize-aliases -sroa -sink -elim-avail-extern -sroa -gvn-hoist -adce -lowerinvoke -constmerge -callsite-splitting -deadargelim -instcombine -consthoist -early-cse-memssa -early-cse-memssa -simplifycfg -coro-elide -early-cse-memssa -early-cse-memssa -simplifycfg -instcombine -post-inline-ee-instrument -loop-data-prefetch -ipsccp -die -rpo-functionattrs -sroa -sancov -newgvn -partially-inline-libcalls -jump-threading -simplifycfg -early-cse -lower-guard-intrinsic -pgo-memop-opt -consthoist -mldst-motion -forceattrs -jump-threading -float2int -strip-debug-declare -lowerinvoke -instcombine -strip-debug-declare -early-cse -gvn-hoist -gvn -lowerinvoke -ipconstprop -globalopt -lower-matrix-intrinsics -functionattrs -lower-widenable-condition -jump-threading -loop-data-prefetch -instcombine -simplifycfg -gvn -licm -callsite-splitting -simplifycfg -tailcallelim -newgvn -instsimplify -speculative-execution -slsr -aggressive-instcombine -gvn-hoist -globalopt -guard-widening -sink -loop-unroll-and-jam -consthoist -jump-threading -loop-versioning -newgvn -adce -correlated-propagation -infer-address-spaces -globalopt -sroa -forceattrs -simplifycfg -sroa -infer-address-spaces -sroa -sroa -barrier -reassociate -sroa -dce -strip-nondebug -loop-reduce -ee-instrument -mem2reg -barrier -mldst-motion -sroa -sroa -sroa -loop-fusion -loop-simplify -sroa -loop-data-prefetch -constprop -loop-instsimplify -forceattrs -inferattrs -lcssa -mem2reg -loop-simplifycfg -insert-gcov-profiling -scalarizer -instcombine -bdce -sroa -sroa -ipconstprop -reassociate -called-value-propagation -insert-gcov-profiling -loop-unroll-and-jam -alignment-from-assumptions -loop-sink -barrier -sroa -canonicalize-aliases -reassociate -loop-predication -always-inline -loop-versioning -sink -sroa -sroa -adce -sroa -sroa -ipsccp -aggressive-instcombine -sroa -sroa -sroa -sroa -licm -always-inline -gvn-hoist -sroa -sroa -early-cse -sroa -loop-predication -insert-gcov-profiling -strip-nondebug -simple-loop-unswitch -constprop -alignment-from-assumptions -sroa -mem2reg -attributor -simplifycfg -sroa -inject-tli-mappings -sroa -sroa -sccp -sroa -sroa -instnamer -reassociate -pgo-memop-opt -sroa -strip-debug-declare -sroa -simplifycfg -globalopt -loop-guard-widening -sroa -simplifycfg -instsimplify -insert-gcov-profiling -mem2reg -instnamer -post-inline-ee-instrument -constmerge -constprop -sroa -early-cse -sroa -jump-threading -aggressive-instcombine -sccp -insert-gcov-profiling -sroa -sroa -mem2reg -sroa -loop-unroll-and-jam -sroa -gvn-hoist -sroa -canonicalize-aliases -inferattrs -constmerge -instsimplify -sroa -scalarizer -sroa -sroa -rpo-functionattrs -correlated-propagation -inferattrs -sroa -mem2reg -mem2reg -indvars -sroa -sancov -lower-guard-intrinsic -sroa -gvn-hoist -instsimplify -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -loop-reduce -sroa -sroa -early-cse-memssa -sroa -sroa -sroa -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -sroa -gvn-hoist -scalarizer -reassociate -loop-unswitch -ipsccp -sroa -simple-loop-unswitch -instcombine -mem2reg -forceattrs -simplifycfg -simplifycfg -strip-debug-declare -sroa -sroa -scalarizer -lower-matrix-intrinsics -sroa -sccp -loop-data-prefetch -callsite-splitting -sroa -loop-load-elim -newgvn -loop-simplifycfg -newgvn -sroa -simple-loop-unswitch -loop-interchange -sroa -rpo-functionattrs -sroa -adce -early-cse -globalsplit -mergefunc -functionattrs -sroa -mem2reg -loop-data-prefetch -name-anon-globals -globalsplit -prune-eh -ee-instrument -callsite-splitting -simplifycfg -strip -loop-load-elim -functionattrs -nary-reassociate -speculative-execution -rpo-functionattrs -indvars -instsimplify -sancov -ee-instrument -dce -elim-avail-extern -newgvn -mem2reg -dse -sink -deadargelim -instsimplify -ipsccp -dce -insert-gcov-profiling -insert-gcov-profiling -lower-expect -mergereturn -loop-interchange -reassociate -reassociate -sink -ee-instrument -ee-instrument -argpromotion -instsimplify -add-discriminators -reassociate -instcombine -rewrite-statepoints-for-gc -constprop -lcssa -sroa -instsimplify -constprop -insert-gcov-profiling -coro-early -strip-nondebug -sink -sancov -mergereturn -sroa -called-value-propagation -lower-guard-intrinsic -adce -hotcoldsplit -mem2reg -sroa -reassociate -globalopt -barrier -globalsplit -slsr -sroa -instnamer -correlated-propagation -coro-cleanup -hotcoldsplit -constmerge -sroa -lcssa -ipconstprop -sroa -insert-gcov-profiling -sroa -sroa -gvn-hoist -sroa -sroa -loop-deletion -sccp -name-anon-globals -jump-threading -mem2reg -slp-vectorizer -mem2reg -ee-instrument -functionattrs -sroa -post-inline-ee-instrument -sroa -bdce -mem2reg -ee-instrument -always-inline -globalopt -sroa -mergefunc -reassociate -insert-gcov-profiling -bdce -correlated-propagation -strip-dead-prototypes -loop-simplify -loop-guard-widening -mergereturn -reassociate -forceattrs -globalsplit -sccp -globalsplit -mem2reg -add-discriminators -alignment-from-assumptions -sroa -argpromotion -insert-gcov-profiling -pgo-memop-opt -sink -tailcallelim -early-cse -sroa -scalarizer -forceattrs -add-discriminators -callsite-splitting -loop-unswitch -rewrite-statepoints-for-gc -sroa -loop-interchange -infer-address-spaces -always-inline -early-cse-memssa -sroa -called-value-propagation -adce -simplifycfg -early-cse -loop-unroll-and-jam -elim-avail-extern -loop-unroll-and-jam -sroa -globalopt -globalsplit -barrier -scalarizer -infer-address-spaces -loop-versioning -elim-avail-extern -constprop -alignment-from-assumptions -speculative-execution -loop-sink -early-cse -sroa -insert-gcov-profiling -sroa -instsimplify -reassociate -constmerge -loop-guard-widening -mem2reg -aggressive-instcombine -instsimplify -forceattrs -speculative-execution -pgo-memop-opt -globalsplit -constmerge -div-rem-pairs -lower-widenable-condition -loop-guard-widening -loop-guard-widening -sroa -bdce -sroa -sroa -sroa -simplifycfg -forceattrs -coro-elide -lower-expect -licm -dse -newgvn -lower-guard-intrinsic -alignment-from-assumptions -reassociate -sroa -lcssa -strip -post-inline-ee-instrument -name-anon-globals -consthoist -mergefunc -ipsccp -infer-address-spaces -newgvn -tailcallelim -loop-versioning -sroa -sink -name-anon-globals -simplifycfg -instcombine -strip -sroa -simplifycfg -strip-nondebug -loop-unroll -load-store-vectorizer -coro-cleanup -consthoist -consthoist -simplifycfg -rewrite-statepoints-for-gc -loop-data-prefetch -globalsplit -instcombine -newgvn -inferattrs -jump-threading -dce -early-cse-memssa -globalopt -lower-constant-intrinsics -nary-reassociate -consthoist -instcombine -sancov -post-inline-ee-instrument -add-discriminators -post-inline-ee-instrument -instcombine -cross-dso-cfi -gvn -speculative-execution -slsr -inferattrs -simplifycfg -ipconstprop -sink -lower-guard-intrinsic -lower-expect -gvn -early-cse-memssa -newgvn -gvn-hoist -die -lower-expect -newgvn -lowerinvoke -early-cse-memssa -ipconstprop -barrier -loop-versioning -flattencfg -aggressive-instcombine -post-inline-ee-instrument -elim-avail-extern -newgvn -adce -indvars -aggressive-instcombine -gvn -dce -gvn -libcalls-shrinkwrap -strip-nondebug -dse -tailcallelim -gvn -early-cse-memssa -correlated-propagation -mergefunc -simplifycfg -loop-instsimplify -nary-reassociate -slsr -instcombine -newgvn -strip-nondebug -gvn -dce -float2int -instcombine -elim-avail-extern -consthoist -consthoist -instcombine -partially-inline-libcalls -lower-expect -instnamer -scalarizer -lower-constant-intrinsics -dse -lower-guard-intrinsic -newgvn -adce +benchmark://cbench-v1/susan,1.026874840030715,65.63927268981934,opt -sroa -lower-matrix-intrinsics -ipsccp -instcombine -early-cse -coro-split -simplifycfg -loop-sink -indvars -instcombine -sccp -coro-elide -coro-split -indvars -strip-nondebug -functionattrs -gvn -prune-eh -consthoist -early-cse-memssa -early-cse-memssa -reassociate -aggressive-instcombine -instsimplify -insert-gcov-profiling -simplifycfg -float2int -gvn -strip-dead-prototypes -die -gvn-hoist -guard-widening -loop-deletion -post-inline-ee-instrument -indvars -newgvn -newgvn -lower-matrix-intrinsics -early-cse -globalopt -instcombine -simplifycfg -simplifycfg -div-rem-pairs -globalsplit -lowerinvoke -add-discriminators -early-cse-memssa -partially-inline-libcalls -sink -jump-threading -callsite-splitting -add-discriminators -early-cse-memssa -cross-dso-cfi -simplifycfg -jump-threading -simplifycfg -instcombine -aggressive-instcombine -licm -simple-loop-unswitch -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -reassociate -constprop -callsite-splitting -elim-avail-extern -memcpyopt -globalsplit -memcpyopt -loop-data-prefetch -globalopt -slsr -consthoist -partially-inline-libcalls -lower-matrix-intrinsics -newgvn -lower-widenable-condition -simplifycfg -loop-versioning -load-store-vectorizer -lower-constant-intrinsics -instsimplify -globalopt -newgvn -pgo-memop-opt -redundant-dbg-inst-elim -newgvn -sink -lowerinvoke -adce -globalsplit -aggressive-instcombine -gvn -lcssa -sancov -coro-elide -sink -barrier -mergereturn -coro-split -gvn-hoist -partially-inline-libcalls -strip-nondebug -scalarizer -lower-matrix-intrinsics -simplifycfg -irce -loop-unroll-and-jam -strip-debug-declare -flattencfg -coro-cleanup -guard-widening -newgvn -speculative-execution -gvn -ipconstprop -instcombine -early-cse-memssa -simplifycfg -flattencfg -name-anon-globals -simplifycfg -div-rem-pairs -loop-versioning -simplifycfg -jump-threading -memcpyopt -instcombine -ipsccp -simplifycfg -sccp -pgo-memop-opt -early-cse-memssa -mldst-motion -float2int -loop-versioning -aggressive-instcombine -sroa -early-cse-memssa -strip -globaldce -scalarizer -instcombine -globalopt -lowerinvoke -inferattrs -elim-avail-extern -pgo-memop-opt -loop-load-elim -strip-dead-prototypes -slp-vectorizer -lower-widenable-condition -sancov -inject-tli-mappings -name-anon-globals -sroa -lower-matrix-intrinsics -sancov -slp-vectorizer -callsite-splitting -callsite-splitting -lower-expect -nary-reassociate -newgvn -lowerinvoke -gvn-hoist -early-cse-memssa -speculative-execution -callsite-splitting -speculative-execution -loweratomic -slsr -sroa -infer-address-spaces -instcombine -gvn -simplifycfg -libcalls-shrinkwrap -newgvn -instcombine -loop-data-prefetch -newgvn -globalopt -constprop -lower-matrix-intrinsics -lower-expect -globalsplit -coro-split -partially-inline-libcalls -lower-expect -always-inline -partially-inline-libcalls -add-discriminators -newgvn -gvn-hoist -gvn -libcalls-shrinkwrap -pgo-memop-opt -slp-vectorizer -insert-gcov-profiling -functionattrs -dse -gvn-hoist -add-discriminators -inferattrs -gvn -lower-matrix-intrinsics -early-cse-memssa -early-cse-memssa -lower-expect -correlated-propagation -pgo-memop-opt -newgvn -aggressive-instcombine -slsr -globalsplit -strip-nondebug -strip-debug-declare -instcombine -gvn -prune-eh -loop-versioning -instsimplify -ipsccp -flattencfg -forceattrs -strip -loop-simplify -float2int -jump-threading -gvn -nary-reassociate -lower-widenable-condition -dse -loop-deletion -lower-matrix-intrinsics -slp-vectorizer -adce -loop-interchange -gvn-hoist -gvn-hoist -loop-versioning -simplifycfg -infer-address-spaces -lower-widenable-condition -consthoist -lowerinvoke -libcalls-shrinkwrap -instcombine -lower-widenable-condition -strip-dead-prototypes -mergefunc -early-cse -elim-avail-extern -coro-elide -globaldce -gvn-hoist -instcombine -early-cse-memssa -instcombine -newgvn -argpromotion -jump-threading -simplifycfg -early-cse-memssa -coro-elide -instcombine -loop-data-prefetch -pgo-memop-opt -gvn -aggressive-instcombine -rewrite-statepoints-for-gc -lower-matrix-intrinsics -early-cse-memssa -rpo-functionattrs -coro-elide -dse -inferattrs -early-cse-memssa -slsr -callsite-splitting -speculative-execution -instcombine -adce -instcombine -post-inline-ee-instrument -tailcallelim -float2int -instcombine -instcombine -slp-vectorizer -sancov -coro-elide -functionattrs -scalarizer -lower-guard-intrinsic -always-inline -lower-matrix-intrinsics -instnamer -jump-threading -simplifycfg -instcombine -sccp -sancov -jump-threading -ipconstprop -callsite-splitting -newgvn -post-inline-ee-instrument -early-cse-memssa -globalsplit -consthoist -sancov -gvn-hoist -sink -functionattrs -cross-dso-cfi -early-cse-memssa -coro-split -reassociate -instcombine -callsite-splitting -pgo-memop-opt -memcpyopt -gvn-hoist -adce -infer-address-spaces -flattencfg -slp-vectorizer -lower-matrix-intrinsics -simplifycfg -callsite-splitting -loop-fusion -newgvn -instcombine -globalsplit -lower-guard-intrinsic -adce -jump-threading -deadargelim -loop-interchange -sancov -prune-eh -callsite-splitting -licm -lower-widenable-condition -post-inline-ee-instrument -jump-threading -ee-instrument -coro-elide -aggressive-instcombine -lowerinvoke -sink -early-cse-memssa -simplifycfg -loop-versioning -prune-eh -early-cse-memssa -constmerge -instcombine -mergefunc -jump-threading -nary-reassociate -newgvn -consthoist -rpo-functionattrs -simplifycfg -simplifycfg -coro-elide -instcombine -strip-dead-prototypes -partially-inline-libcalls -libcalls-shrinkwrap -strip -jump-threading -loop-load-elim -insert-gcov-profiling -simplifycfg -early-cse-memssa -alignment-from-assumptions -early-cse-memssa -rpo-functionattrs -early-cse-memssa -newgvn -early-cse-memssa -barrier -reassociate -gvn -strip-dead-prototypes -div-rem-pairs -globalopt -early-cse-memssa -loop-unroll-and-jam -early-cse-memssa -constprop -strip -partially-inline-libcalls -float2int -lower-widenable-condition -barrier -slsr -early-cse -simplifycfg -mergefunc -aggressive-instcombine -lower-widenable-condition -elim-avail-extern -dse -instcombine -loop-interchange -lowerinvoke -reassociate -instcombine -rpo-functionattrs -instcombine -jump-threading -simplifycfg -nary-reassociate -dse -strip-nondebug -always-inline -instsimplify -early-cse-memssa -globalopt -sancov -flattencfg -slsr -simplifycfg -strip-dead-prototypes -functionattrs -coro-elide -callsite-splitting -early-cse-memssa -loop-data-prefetch -instcombine -jump-threading -elim-avail-extern -slp-vectorizer -separate-const-offset-from-gep -gvn -always-inline -simplifycfg -newgvn -loop-load-elim -lower-widenable-condition -deadargelim -loop-versioning -early-cse -coro-elide -instnamer -cross-dso-cfi -adce -loop-load-elim -ipconstprop -lower-constant-intrinsics -strip-debug-declare -early-cse -inferattrs -instcombine -elim-avail-extern -instcombine -coro-elide -newgvn -instcombine -consthoist -bdce -rpo-functionattrs -globaldce -newgvn -adce -loop-data-prefetch -infer-address-spaces -gvn-hoist -strip -speculative-execution -sccp -lower-matrix-intrinsics -libcalls-shrinkwrap -newgvn -indvars -instcombine -simplifycfg -instcombine -partially-inline-libcalls -separate-const-offset-from-gep -mergefunc -canonicalize-aliases -dce -sancov -consthoist -infer-address-spaces -mergefunc -ipsccp -float2int -simplifycfg -slsr -div-rem-pairs -early-cse -lower-widenable-condition -instcombine -sancov -globalopt -coro-elide -dse -globalsplit -instcombine -instcombine -newgvn -rpo-functionattrs -speculative-execution -callsite-splitting -gvn -lower-expect -prune-eh -aggressive-instcombine -lowerinvoke -coro-elide -constprop -pgo-memop-opt -early-cse -lower-matrix-intrinsics -guard-widening -early-cse-memssa -coro-elide -callsite-splitting -simplifycfg -lower-widenable-condition -rewrite-statepoints-for-gc -constmerge -sink -lower-widenable-condition -slsr -indvars -deadargelim -simplifycfg -globalopt -rewrite-statepoints-for-gc -inject-tli-mappings -adce -lower-expect -cross-dso-cfi -coro-split -partially-inline-libcalls -ipconstprop -die -coro-cleanup -insert-gcov-profiling -aggressive-instcombine -simplifycfg -jump-threading -argpromotion -simplifycfg -name-anon-globals -sccp -newgvn -scalarizer -div-rem-pairs -strip-dead-prototypes -ipconstprop -prune-eh -inferattrs -lowerinvoke -globalsplit -adce -constprop -insert-gcov-profiling -partially-inline-libcalls -newgvn -dce -loop-versioning -callsite-splitting -pgo-memop-opt -die -lowerinvoke -aggressive-instcombine -die -callsite-splitting -partially-inline-libcalls -slsr -jump-threading -ipconstprop -instcombine -instnamer -elim-avail-extern -globalopt -die -loop-versioning -instcombine -deadargelim -sroa -partially-inline-libcalls -jump-threading -reassociate -newgvn -rpo-functionattrs -nary-reassociate -loop-data-prefetch -globaldce -instcombine -early-cse-memssa -gvn-hoist -gvn -float2int -licm -consthoist -newgvn -insert-gcov-profiling -sccp -slp-vectorizer -prune-eh -lowerinvoke -ipsccp -gvn -loop-data-prefetch -mergefunc -sink -lower-guard-intrinsic -redundant-dbg-inst-elim -early-cse-memssa -coro-early -instcombine -prune-eh -simplifycfg -prune-eh -dce -infer-address-spaces -elim-avail-extern -instcombine -coro-split -consthoist -gvn -globalsplit -add-discriminators -nary-reassociate -simplifycfg -sancov -forceattrs -consthoist -deadargelim -pgo-memop-opt -aggressive-instcombine -memcpyopt -memcpyopt -lower-expect -gvn-hoist -inferattrs -hotcoldsplit -lower-matrix-intrinsics -jump-threading -globalopt -lowerinvoke -aggressive-instcombine -lower-expect -aggressive-instcombine -gvn -die -mldst-motion -instcombine -coro-early -gvn -instsimplify -elim-avail-extern -sccp -aggressive-instcombine -instsimplify -reassociate -slsr -lower-widenable-condition -jump-threading -simplifycfg -libcalls-shrinkwrap -simplifycfg -aggressive-instcombine -instcombine -scalarizer -loop-simplify -loop-reroll -newgvn -early-cse-memssa -prune-eh -callsite-splitting -simplifycfg -globaldce -newgvn -functionattrs -dce -gvn-hoist -gvn -forceattrs -loop-fusion -strip-dead-prototypes -newgvn -forceattrs -die -instcombine -early-cse -instcombine +benchmark://cbench-v1/tiff2rgba,1.0461367226770069,77.85855555534363,opt -sroa -mem2reg -coro-split -instcombine -attributor -newgvn -guard-widening -lower-expect -float2int -gvn-hoist -simplifycfg -pgo-memop-opt -newgvn -globalopt -ipsccp -gvn-hoist -dse -loop-idiom -early-cse-memssa -dce -consthoist -lower-constant-intrinsics -gvn-hoist -simplifycfg -guard-widening -gvn-hoist -loop-versioning -slp-vectorizer -instcombine -always-inline -newgvn -rpo-functionattrs -consthoist -mergereturn -instcombine -infer-address-spaces -deadargelim -pgo-memop-opt -separate-const-offset-from-gep -strip-nondebug -called-value-propagation -rpo-functionattrs -ipconstprop -sink -ipsccp -forceattrs -add-discriminators -early-cse -flattencfg -dce -licm -instcombine -jump-threading -name-anon-globals -simplifycfg -dse -ipconstprop -simplifycfg -die -jump-threading -pgo-memop-opt -sink -slsr -lower-constant-intrinsics -simplifycfg -consthoist -constmerge -newgvn -post-inline-ee-instrument -coro-elide -pgo-memop-opt -adce -slsr -div-rem-pairs -ipsccp -reassociate -simplifycfg -sroa -newgvn -lower-matrix-intrinsics -lower-constant-intrinsics -pgo-memop-opt -strip-nondebug -lower-widenable-condition -dce -simplifycfg -consthoist -ipconstprop -lowerinvoke -slsr -ipsccp -float2int -instcombine -strip-dead-prototypes -infer-address-spaces -instnamer -reassociate -gvn-hoist -early-cse -alignment-from-assumptions -loop-versioning -barrier -mergeicmps -rpo-functionattrs -instcombine -newgvn -callsite-splitting -float2int -instcombine -strip-nondebug -jump-threading -die -gvn-hoist -instcombine -newgvn -barrier -gvn -partially-inline-libcalls -cross-dso-cfi -callsite-splitting -lower-expect -globaldce -coro-split -simplifycfg -deadargelim -callsite-splitting -lowerinvoke -die -sccp -instsimplify -sroa -early-cse-memssa -early-cse-memssa -consthoist -lowerinvoke -slp-vectorizer -prune-eh -instsimplify -callsite-splitting -newgvn -instsimplify -argpromotion -globalsplit -slp-vectorizer -early-cse-memssa -lower-expect -inferattrs -loop-fusion -elim-avail-extern -newgvn -dse -called-value-propagation -lower-constant-intrinsics -break-crit-edges -mem2reg -elim-avail-extern -mem2reg -callsite-splitting -newgvn -ee-instrument -sink -inject-tli-mappings -tailcallelim -tailcallelim -newgvn -forceattrs -simplifycfg -partially-inline-libcalls -simplifycfg -early-cse-memssa -pgo-memop-opt -lower-expect -instcombine -loop-simplify -canonicalize-aliases -loop-distribute -strip-dead-prototypes -cross-dso-cfi -instcombine -strip-dead-prototypes -early-cse-memssa -rpo-functionattrs -insert-gcov-profiling -rpo-functionattrs -instcombine -strip-debug-declare -coro-split -early-cse -instcombine -dse -scalarizer -simplifycfg -prune-eh -ipconstprop -slp-vectorizer -reassociate -consthoist -simplifycfg -die -aggressive-instcombine -sccp -argpromotion -early-cse -early-cse-memssa -scalarizer -early-cse-memssa -gvn-hoist -instcombine -guard-widening -redundant-dbg-inst-elim -flattencfg -die -simplifycfg -lower-widenable-condition -ee-instrument -slsr -float2int -strip-debug-declare -dce -lower-expect -name-anon-globals -ipsccp -load-store-vectorizer -argpromotion -instcombine -loop-sink -early-cse-memssa -early-cse-memssa -lower-constant-intrinsics -sancov -instcombine -simplifycfg -simplifycfg -jump-threading -slsr -float2int -mergereturn -simplifycfg -scalarizer -instcombine -loop-load-elim -simplifycfg -loop-versioning -die -coro-split -instcombine -instcombine -instsimplify -instcombine -gvn-hoist -rewrite-statepoints-for-gc -post-inline-ee-instrument -constprop -simplifycfg -newgvn -ipconstprop -prune-eh -instcombine -scalarizer -mem2reg -instcombine -instsimplify -instcombine -instcombine -add-discriminators -mldst-motion -lower-constant-intrinsics -mem2reg -indvars -simplifycfg -inferattrs -consthoist -coro-early -speculative-execution -aggressive-instcombine -instcombine -slsr -adce -newgvn -lower-matrix-intrinsics -rpo-functionattrs -slsr -mergereturn -rpo-functionattrs -slsr -instcombine -coro-elide -load-store-vectorizer -globalopt -gvn -consthoist -early-cse -gvn -tailcallelim -gvn-hoist -coro-elide -lower-expect -simplifycfg -lower-matrix-intrinsics -instcombine -constmerge -instnamer -ipconstprop -jump-threading -loop-data-prefetch -instcombine -add-discriminators -adce -nary-reassociate -gvn-hoist -loop-load-elim -simplifycfg -gvn -newgvn -simplifycfg -loop-data-prefetch -deadargelim -slp-vectorizer -loop-unroll-and-jam -forceattrs -simplifycfg -callsite-splitting -dse -adce -gvn-hoist -inferattrs -break-crit-edges -insert-gcov-profiling -simplifycfg -simplifycfg -sccp -infer-address-spaces -simplifycfg -newgvn -float2int -add-discriminators -post-inline-ee-instrument -consthoist -pgo-memop-opt -adce -lower-expect -instcombine -instcombine -coro-elide -flattencfg -called-value-propagation -jump-threading -coro-early -consthoist -adce -globalsplit -lcssa -simplifycfg -lower-widenable-condition -partially-inline-libcalls -infer-address-spaces -instcombine -post-inline-ee-instrument -consthoist -newgvn -loweratomic -argpromotion -instcombine -aggressive-instcombine -mergereturn -strip-nondebug -sroa -simplifycfg -strip-nondebug -globalsplit -loop-data-prefetch -mldst-motion -gvn-hoist -slsr -newgvn -sancov -pgo-memop-opt -loop-guard-widening -sccp -deadargelim -ipconstprop -aggressive-instcombine -lower-widenable-condition -loop-simplify -instcombine -early-cse-memssa -simplifycfg -sroa -coro-split -instcombine -adce -callsite-splitting -gvn-hoist -instcombine -instsimplify -nary-reassociate -coro-elide -lower-guard-intrinsic -dce -simple-loop-unswitch -consthoist -canonicalize-aliases -inferattrs -ipconstprop -correlated-propagation -coro-split -strip-nondebug -ee-instrument -early-cse-memssa -die -ipsccp -instcombine -forceattrs -ipconstprop -newgvn -simplifycfg -loop-load-elim -mergereturn -post-inline-ee-instrument -slsr -slsr -strip-dead-prototypes -simplifycfg -instcombine -early-cse-memssa -lower-matrix-intrinsics -instcombine -loop-load-elim -ipconstprop -instsimplify -loop-vectorize -instnamer -dse -dce -elim-avail-extern -pgo-memop-opt -coro-elide -callsite-splitting -gvn-hoist -rpo-functionattrs -mergeicmps -newgvn -simplifycfg -mergefunc -simplifycfg -gvn -mldst-motion -loop-versioning -scalarizer -deadargelim -post-inline-ee-instrument -newgvn -coro-elide -lower-matrix-intrinsics -slsr -simplifycfg -aggressive-instcombine -consthoist -instcombine -loop-deletion -scalarizer -jump-threading -coro-elide -canonicalize-aliases -correlated-propagation -div-rem-pairs -instcombine -gvn -gvn -reassociate -newgvn -reassociate -barrier -instcombine -cross-dso-cfi -jump-threading -adce -loop-load-elim -strip-dead-prototypes -simplifycfg -mldst-motion -gvn-hoist -reassociate -dse -div-rem-pairs -loop-data-prefetch -loop-fusion -coro-split -name-anon-globals -guard-widening -dce -aggressive-instcombine -instcombine -slsr -jump-threading -prune-eh -mergereturn -ipsccp -simplifycfg -tailcallelim -loop-deletion -early-cse-memssa -simplifycfg -name-anon-globals -early-cse-memssa -newgvn -adce -pgo-memop-opt -functionattrs -float2int -consthoist -strip-dead-prototypes -partially-inline-libcalls -globalopt -libcalls-shrinkwrap -mergefunc -consthoist -die -simplifycfg -strip -infer-address-spaces -gvn -name-anon-globals -constprop -coro-early -instcombine -loop-data-prefetch -simplifycfg -dse -loop-data-prefetch -reassociate -prune-eh -sroa -sancov -dse -simplifycfg -constmerge -mem2reg -jump-threading -die -instcombine -jump-threading -lower-constant-intrinsics -jump-threading -instcombine -separate-const-offset-from-gep -bdce -sroa -strip-dead-prototypes -pgo-memop-opt -constmerge -lower-matrix-intrinsics -lower-guard-intrinsic -slp-vectorizer -rewrite-statepoints-for-gc -coro-split -gvn -loop-distribute -instcombine -simplifycfg -instcombine -ipconstprop -lower-matrix-intrinsics -instcombine -newgvn -pgo-memop-opt -coro-elide -jump-threading -ipconstprop -instcombine -argpromotion -redundant-dbg-inst-elim -instcombine -lower-matrix-intrinsics -loop-guard-widening -float2int -dse -sccp -early-cse -adce -gvn-hoist -early-cse-memssa -early-cse -lower-expect -mergeicmps -early-cse-memssa -dse -strip-nondebug -loop-versioning -loop-instsimplify -mem2reg -coro-elide -early-cse-memssa -consthoist -lowerinvoke -simplifycfg -simplifycfg -instcombine -dse -ipconstprop -slsr -mergereturn -ipconstprop -mergefunc -newgvn -gvn-hoist -ipsccp -early-cse-memssa -dce -early-cse-memssa -dce -sccp -slsr -guard-widening -callsite-splitting -sroa -mergeicmps -globaldce -ipsccp -simplifycfg -ipsccp -redundant-dbg-inst-elim -early-cse-memssa -separate-const-offset-from-gep -post-inline-ee-instrument -lowerinvoke -alignment-from-assumptions -deadargelim -constprop -instnamer -coro-elide -loop-data-prefetch -lowerinvoke -mem2reg -consthoist -gvn-hoist -sccp -instcombine -tailcallelim -dse -simplifycfg -forceattrs -strip-dead-prototypes -coro-split -newgvn -instcombine -gvn -ee-instrument -coro-cleanup -instcombine -nary-reassociate -instcombine -simplifycfg -adce -instcombine -coro-cleanup -loop-load-elim -instcombine -early-cse-memssa -adce -dse -mergeicmps -instcombine -globaldce -consthoist -div-rem-pairs -instcombine -instcombine -globalsplit -constmerge -memcpyopt -globalsplit -globalopt -always-inline -mergereturn -instsimplify -instcombine -loop-guard-widening -mergefunc -coro-elide -adce -aggressive-instcombine -dse -rpo-functionattrs -early-cse -instcombine -sroa -strip-dead-prototypes -instcombine -instcombine -flattencfg -sink -consthoist -coro-split -gvn -memcpyopt -instcombine -coro-cleanup -lower-widenable-condition -slsr +benchmark://cbench-v1/tiffmedian,1.0459000717188616,77.83211016654968,opt -reg2mem -sroa -globalopt -constprop -pgo-memop-opt -simplifycfg -simple-loop-unswitch -coro-early -sroa -argpromotion -scalarizer -strip-dead-prototypes -adce -loop-data-prefetch -gvn-hoist -gvn-hoist -newgvn -pgo-memop-opt -lower-matrix-intrinsics -licm -loop-versioning -called-value-propagation -coro-split -simplifycfg -speculative-execution -strip-nondebug -lowerinvoke -ipconstprop -lowerinvoke -instcombine -name-anon-globals -simplifycfg -gvn-hoist -lower-guard-intrinsic -float2int -coro-elide -ipconstprop -insert-gcov-profiling -name-anon-globals -flattencfg -mergefunc -barrier -instcombine -loop-versioning -die -instcombine -div-rem-pairs -loop-simplify -jump-threading -gvn-hoist -newgvn -simplifycfg -die -mergeicmps -globalsplit -coro-split -globaldce -instcombine -reassociate -gvn-hoist -simplifycfg -instcombine -sroa -coro-early -rewrite-statepoints-for-gc -lower-expect -scalarizer -dce -jump-threading -mldst-motion -gvn-hoist -gvn -instcombine -loop-versioning -pgo-memop-opt -early-cse-memssa -strip-debug-declare -sancov -instcombine -instnamer -callsite-splitting -mergefunc -globalopt -ipconstprop -loop-deletion -coro-elide -dce -lowerinvoke -consthoist -instcombine -aggressive-instcombine -early-cse-memssa -lower-expect -lower-expect -nary-reassociate -gvn-hoist -sancov -strip-dead-prototypes -mem2reg -loop-simplify -loop-interchange -jump-threading -instcombine -infer-address-spaces -loop-unroll-and-jam -called-value-propagation -instcombine -gvn-hoist -simplifycfg -early-cse-memssa -sink -rpo-functionattrs -dce -globalsplit -dse -instnamer -loop-versioning -slsr -attributor -loop-data-prefetch -strip-dead-prototypes -flattencfg -lower-matrix-intrinsics -coro-elide -sccp -jump-threading -sancov -early-cse-memssa -attributor -always-inline -simplifycfg -flattencfg -loop-versioning -ipconstprop -memcpyopt -instcombine -instcombine -lower-widenable-condition -strip -insert-gcov-profiling -simplifycfg -guard-widening -adce -mergereturn -aggressive-instcombine -instsimplify -early-cse -loop-interchange -instcombine -callsite-splitting -simplifycfg -globalopt -deadargelim -elim-avail-extern -loop-distribute -pgo-memop-opt -simplifycfg -mergeicmps -globaldce -simplifycfg -loweratomic -insert-gcov-profiling -bdce -gvn-hoist -simplifycfg -gvn-hoist -newgvn -early-cse-memssa -globalopt -instcombine -sroa -early-cse-memssa -sccp -ipconstprop -newgvn -dse -slp-vectorizer -simplifycfg -mldst-motion -mergeicmps -mergereturn -gvn-hoist -slp-vectorizer -coro-elide -loop-unroll-and-jam -coro-split -instcombine -simplifycfg -sccp -dce -globalopt -speculative-execution -lower-widenable-condition -instcombine -die -callsite-splitting -inject-tli-mappings -early-cse -callsite-splitting -coro-split -speculative-execution -tailcallelim -rewrite-statepoints-for-gc -early-cse-memssa -callsite-splitting -inject-tli-mappings -insert-gcov-profiling -simplifycfg -jump-threading -callsite-splitting -jump-threading -mergefunc -licm -mergefunc -dse -loop-load-elim -early-cse-memssa -strip-nondebug -slsr -instcombine -dse -float2int -nary-reassociate -ipsccp -early-cse -canonicalize-aliases -loop-data-prefetch -speculative-execution -die -loop-versioning -mergereturn -reassociate -functionattrs -constmerge -jump-threading -loop-versioning -die -instcombine -jump-threading -correlated-propagation -coro-elide -jump-threading -loop-interchange -lower-matrix-intrinsics -lower-expect -called-value-propagation -strip-debug-declare -jump-threading -coro-elide -tailcallelim -consthoist -bdce -die -memcpyopt -lower-matrix-intrinsics -add-discriminators -instsimplify -coro-early -jump-threading -simplifycfg -lower-matrix-intrinsics -consthoist -mergereturn -cross-dso-cfi -lowerinvoke -loop-simplify -separate-const-offset-from-gep -gvn-hoist -inject-tli-mappings -callsite-splitting -jump-threading -separate-const-offset-from-gep -globaldce -coro-early -simplifycfg -simplifycfg -sancov -barrier -early-cse-memssa -ipconstprop -simplifycfg -speculative-execution -consthoist -coro-elide -argpromotion -dse -lower-expect -simplifycfg -add-discriminators -reassociate -slsr -instnamer -tailcallelim -newgvn -loop-versioning -sroa -jump-threading -deadargelim -mergefunc -loop-sink -post-inline-ee-instrument -coro-early -instcombine -strip -indvars -newgvn -mldst-motion -aggressive-instcombine -loop-unroll-and-jam -cross-dso-cfi -lowerinvoke -dce -gvn-hoist -instcombine -early-cse-memssa -globalopt -simplifycfg -nary-reassociate -die -loop-versioning -strip -jump-threading -instcombine -aggressive-instcombine -instcombine -callsite-splitting -newgvn -aggressive-instcombine -globalopt -globalsplit -elim-avail-extern -newgvn -scalarizer -coro-split -dce -bdce -instcombine -early-cse -early-cse-memssa -sancov -constprop -instcombine -prune-eh -sancov -gvn-hoist -loop-load-elim -simplifycfg -sancov -float2int -coro-early -ipconstprop -strip-nondebug -functionattrs -irce -called-value-propagation -strip-nondebug -deadargelim -dce -cross-dso-cfi -gvn -strip-nondebug -loop-versioning -slsr -load-store-vectorizer -newgvn -pgo-memop-opt -prune-eh -simplifycfg -loop-interchange -ee-instrument -adce -strip-nondebug -instcombine -cross-dso-cfi -consthoist -constprop -aggressive-instcombine -early-cse -rewrite-statepoints-for-gc -lower-expect -dse -adce -always-inline -pgo-memop-opt -float2int -always-inline -instcombine -gvn-hoist -simple-loop-unswitch -newgvn -instcombine -simplifycfg -loop-versioning -instcombine -simplifycfg -reassociate -simplifycfg -simplifycfg -consthoist -prune-eh -ipconstprop -constmerge -instcombine -mem2reg -lower-matrix-intrinsics -sroa -coro-cleanup -lower-guard-intrinsic -sroa -alignment-from-assumptions -early-cse-memssa -sccp -correlated-propagation -constprop -coro-cleanup -indvars -constprop -loop-versioning-licm -loop-data-prefetch -simplifycfg -insert-gcov-profiling -instcombine -constprop -insert-gcov-profiling -redundant-dbg-inst-elim -partially-inline-libcalls -adce -early-cse-memssa -instcombine -reassociate -simplifycfg -newgvn -insert-gcov-profiling -globalsplit -gvn-hoist -loop-data-prefetch -lower-guard-intrinsic -gvn -coro-elide -dce -strip-nondebug -strip-dead-prototypes -forceattrs -post-inline-ee-instrument -loop-data-prefetch -instcombine -early-cse-memssa -scalarizer -inject-tli-mappings -constmerge -adce -rewrite-statepoints-for-gc -newgvn -newgvn -reassociate -simplifycfg -jump-threading -reassociate -gvn-hoist -slsr -redundant-dbg-inst-elim -simplifycfg -loop-versioning -coro-early -ipconstprop -mergereturn -rewrite-statepoints-for-gc -lowerinvoke -functionattrs -instcombine -newgvn -strip -simplifycfg -strip-nondebug -early-cse-memssa -early-cse-memssa -newgvn -instcombine -prune-eh -reassociate -consthoist -simplifycfg -reassociate -redundant-dbg-inst-elim -lowerinvoke -instsimplify -lower-guard-intrinsic -simplifycfg -inferattrs -callsite-splitting -callsite-splitting -newgvn -newgvn -simplifycfg -coro-cleanup -instcombine -loop-simplify -loweratomic -instsimplify -coro-cleanup -simplifycfg -instcombine -instnamer -coro-elide -simplifycfg -globaldce -simplifycfg -aggressive-instcombine -barrier -div-rem-pairs -loop-versioning -aggressive-instcombine -dse -inferattrs -simplifycfg -newgvn -newgvn -rewrite-statepoints-for-gc -pgo-memop-opt -inferattrs -tailcallelim -instcombine -instcombine -instcombine -jump-threading -gvn-hoist -dse -functionattrs -consthoist -newgvn -globalsplit -strip-nondebug -sccp -instcombine -coro-cleanup -strip-nondebug -newgvn -instcombine -aggressive-instcombine -coro-split -instcombine -die -prune-eh -deadargelim -simplifycfg -sancov -inferattrs -simplifycfg -sancov -newgvn -die -instcombine -instcombine -lowerinvoke -mem2reg -elim-avail-extern -loop-data-prefetch -instcombine -die -gvn -tailcallelim -instcombine -coro-split -ipconstprop -simplifycfg -early-cse-memssa -newgvn -instcombine -mem2reg -always-inline -gvn-hoist -sink -simplifycfg -newgvn -newgvn -early-cse-memssa -scalarizer -newgvn -globalsplit -early-cse -gvn -instcombine -insert-gcov-profiling -lower-constant-intrinsics -newgvn -functionattrs -elim-avail-extern -gvn-hoist -instcombine -early-cse-memssa -insert-gcov-profiling -post-inline-ee-instrument -name-anon-globals -instsimplify -lowerinvoke -flattencfg -coro-split -ipsccp -simplifycfg -post-inline-ee-instrument -slsr -early-cse -simplifycfg -simplifycfg -coro-elide -instcombine -instcombine -simplifycfg -early-cse -sancov -strip-dead-prototypes -callsite-splitting -prune-eh -infer-address-spaces -callsite-splitting -sroa -pgo-memop-opt -early-cse -callsite-splitting -lowerinvoke -sancov -lower-constant-intrinsics -nary-reassociate -globaldce -mergeicmps -strip-nondebug -memcpyopt -instsimplify -instcombine -simplifycfg -newgvn -post-inline-ee-instrument -nary-reassociate -gvn -simplifycfg -instcombine -newgvn -loop-versioning -coro-early -lower-matrix-intrinsics -mergefunc -loop-fusion -rewrite-statepoints-for-gc -sroa -mergefunc -instcombine -simplifycfg -nary-reassociate -lower-guard-intrinsic -sccp -simplifycfg -mem2reg -lower-guard-intrinsic -gvn -add-discriminators -consthoist -cross-dso-cfi -add-discriminators -early-cse -called-value-propagation -gvn-hoist -loop-data-prefetch -newgvn -gvn -strip-nondebug -simplifycfg -dce -slsr -nary-reassociate -jump-threading -sink -instcombine -loop-data-prefetch -simplifycfg -instcombine -forceattrs -mergefunc -coro-split -gvn-hoist -lower-constant-intrinsics -gvn-hoist -loop-versioning -nary-reassociate -early-cse -simplifycfg -always-inline -strip-nondebug -dse -licm -coro-cleanup -alignment-from-assumptions -newgvn -speculative-execution -globaldce -argpromotion -prune-eh -coro-elide -pgo-memop-opt -gvn-hoist -inferattrs +benchmark://cbench-v1/bitcount,1.0199115044247788,61.001503229141235,opt -sroa -early-cse -early-cse -infer-address-spaces -early-cse-memssa -strip-nondebug -gvn-hoist -bdce -indvars -instcombine -newgvn -newgvn -speculative-execution -newgvn -loop-load-elim -early-cse -simplifycfg -cross-dso-cfi -strip-nondebug -always-inline -dse -ipsccp -simplifycfg -early-cse -sroa -simplifycfg -mem2reg -early-cse -jump-threading -simplifycfg -mem2reg -redundant-dbg-inst-elim -sroa -adce -sroa -simplifycfg -dce -sink -ee-instrument -sroa -newgvn -constprop -bdce -deadargelim -simplifycfg -simplifycfg -sroa -inferattrs -aggressive-instcombine -post-inline-ee-instrument -ipsccp -instcombine -lower-expect -simplifycfg -sroa -instcombine -loop-distribute -globalopt -argpromotion -gvn-hoist -instcombine -mem2reg -alignment-from-assumptions -globalsplit -instcombine -coro-elide -simplifycfg -loop-fusion -simplifycfg -functionattrs -simplifycfg -loop-versioning -inject-tli-mappings -dse -loop-versioning -loop-sink -instcombine -consthoist -lcssa -nary-reassociate -early-cse -dce -coro-early -loop-simplifycfg -gvn-hoist -aggressive-instcombine -simplifycfg -newgvn -jump-threading -adce -simplifycfg -loop-data-prefetch -coro-cleanup -simplifycfg -slsr -simplifycfg -rpo-functionattrs -ipconstprop -simplifycfg -mergereturn -tailcallelim -simplifycfg -simplifycfg -loweratomic -instcombine -jump-threading -always-inline -prune-eh -simple-loop-unswitch -strip -prune-eh -rewrite-statepoints-for-gc -simplifycfg -partially-inline-libcalls -scalarizer -simplifycfg -lower-widenable-condition -ee-instrument -float2int -rpo-functionattrs -simplifycfg -reassociate -simplifycfg -reassociate -float2int -dce -bdce -ipsccp -bdce -dse -consthoist -gvn-hoist -lower-matrix-intrinsics -adce -early-cse-memssa -ipconstprop -early-cse-memssa -gvn-hoist -ipconstprop -argpromotion -instcombine -pgo-memop-opt -correlated-propagation -lowerinvoke -lcssa -newgvn -strip-nondebug -lower-matrix-intrinsics -sancov -simplifycfg -instcombine -consthoist -early-cse-memssa -loop-distribute -aggressive-instcombine -loop-distribute -aggressive-instcombine -ipsccp -ipconstprop -elim-avail-extern -instcombine -mergeicmps -called-value-propagation -aggressive-instcombine -die -simplifycfg -newgvn -consthoist -instcombine -libcalls-shrinkwrap -tailcallelim -name-anon-globals -early-cse -globaldce -bdce -jump-threading -lower-expect -redundant-dbg-inst-elim -adce -strip-dead-prototypes -globaldce -nary-reassociate -jump-threading -gvn -strip-debug-declare -sccp -pgo-memop-opt -always-inline -die -constprop -separate-const-offset-from-gep -gvn-hoist -strip-nondebug -consthoist -argpromotion -ipconstprop -libcalls-shrinkwrap -loop-load-elim -strip -simplifycfg -lcssa -pgo-memop-opt -sroa -infer-address-spaces -flattencfg -loop-unswitch -insert-gcov-profiling -coro-elide -indvars -early-cse -mldst-motion -add-discriminators -gvn-hoist -ipsccp -prune-eh -dse -early-cse -early-cse -mergereturn -ipsccp -strip-nondebug -loop-guard-widening -loop-distribute -instcombine -strip-nondebug -early-cse -mergefunc -instcombine -instcombine -barrier -infer-address-spaces -pgo-memop-opt -argpromotion -loop-data-prefetch -ee-instrument -loop-versioning -gvn-hoist -instcombine -constprop -gvn-hoist -simplifycfg -instsimplify -sroa -globalopt -instcombine -jump-threading -adce -indvars -loop-unroll-and-jam -sroa -dce -sroa -aggressive-instcombine -early-cse-memssa -instsimplify -insert-gcov-profiling -sink -sink -add-discriminators -barrier -sroa -loweratomic -dce -div-rem-pairs -dce -pgo-memop-opt -deadargelim -sroa -strip-nondebug -loweratomic -sroa -infer-address-spaces -gvn-hoist -early-cse -scalarizer -coro-cleanup -inject-tli-mappings -speculative-execution -sroa -newgvn -loop-predication -instcombine -dce -gvn -insert-gcov-profiling -coro-elide -lower-constant-intrinsics -insert-gcov-profiling -newgvn -loop-distribute -dce -loop-unroll-and-jam -inferattrs -loop-unroll-and-jam -globalopt -loop-unroll-and-jam -speculative-execution -post-inline-ee-instrument -insert-gcov-profiling -instcombine -hotcoldsplit -simple-loop-unswitch -sroa -globaldce -sroa -coro-split -guard-widening -loop-deletion -globalopt -sroa -loop-data-prefetch -loop-load-elim -coro-cleanup -simple-loop-unswitch -tailcallelim -loop-versioning -sroa -loop-sink -sroa -insert-gcov-profiling -sroa -coro-elide -scalarizer -newgvn -insert-gcov-profiling -loop-data-prefetch -coro-elide -sroa -separate-const-offset-from-gep -gvn-hoist -indvars -inject-tli-mappings -pgo-memop-opt -mem2reg -loop-predication -lcssa -ipconstprop -always-inline -dce -loop-versioning -dce -strip -sroa -loop-guard-widening -mergefunc -simplifycfg -lowerinvoke -globalsplit -coro-cleanup -partially-inline-libcalls -ee-instrument -simplifycfg -redundant-dbg-inst-elim -prune-eh -sroa -coro-early -loop-versioning -sink -coro-cleanup -reassociate -sroa -sroa -sroa -ipsccp -sroa -infer-address-spaces -argpromotion -loop-vectorize -sroa -early-cse -loop-data-prefetch -infer-address-spaces -functionattrs -early-cse -loop-versioning -simplifycfg -loop-reroll -scalarizer -called-value-propagation -ipsccp -correlated-propagation -coro-early -loop-data-prefetch -instnamer -coro-elide -insert-gcov-profiling -canonicalize-aliases -constprop -sroa -globaldce -constmerge -infer-address-spaces -globaldce -ee-instrument -instnamer -loop-versioning -reassociate -sroa -simplifycfg -newgvn -speculative-execution -adce -sroa -loop-versioning -die -barrier -ipconstprop -sroa -lowerinvoke -constmerge -sroa -alignment-from-assumptions -dce -instnamer -newgvn -sroa -infer-address-spaces -infer-address-spaces -prune-eh -instcombine -simplifycfg -loop-deletion -coro-cleanup -cross-dso-cfi -mergereturn -sroa -newgvn -inferattrs -bdce -tailcallelim -loop-unroll-and-jam -loop-versioning -reassociate -early-cse-memssa -early-cse -lower-matrix-intrinsics -insert-gcov-profiling -lower-guard-intrinsic -simplifycfg -loop-distribute -sroa -infer-address-spaces -float2int -coro-elide -gvn -jump-threading -simplifycfg -sancov -globalsplit -lower-guard-intrinsic -instcombine -called-value-propagation -coro-cleanup -newgvn -reassociate -strip-nondebug -forceattrs -gvn-hoist -early-cse -simplifycfg -instcombine -slsr -coro-cleanup -simple-loop-unswitch -called-value-propagation -early-cse-memssa -always-inline -reassociate -consthoist -gvn-hoist -loop-idiom -nary-reassociate -strip-nondebug -simplifycfg -simplifycfg -newgvn -strip-dead-prototypes -name-anon-globals -sroa -mem2reg -mergefunc -prune-eh -lcssa -early-cse-memssa -loop-versioning -loop-data-prefetch -loop-idiom -newgvn -adce -dse -add-discriminators -loop-interchange -insert-gcov-profiling -sroa -inferattrs -deadargelim -strip-nondebug -instcombine -simplifycfg -pgo-memop-opt -mergereturn -simplifycfg -deadargelim -newgvn -newgvn -rpo-functionattrs -coro-early -strip-nondebug -jump-threading -loop-guard-widening -sroa -early-cse -pgo-memop-opt -instcombine -early-cse-memssa -hotcoldsplit -mergereturn -instcombine -newgvn -instcombine -loop-unroll-and-jam -dce -newgvn -sroa -simplifycfg -instnamer -lower-widenable-condition -lcssa -instcombine -globalopt -simplifycfg -sroa -add-discriminators -insert-gcov-profiling -partially-inline-libcalls -guard-widening -lcssa -consthoist -early-cse -loop-data-prefetch -separate-const-offset-from-gep -post-inline-ee-instrument -mergeicmps -loop-guard-widening -sroa -instcombine -strip-nondebug -correlated-propagation -dce -alignment-from-assumptions -simplifycfg -newgvn -sroa -dce -sroa -ipsccp -newgvn -instcombine -dse -coro-cleanup -simplifycfg -rewrite-statepoints-for-gc -post-inline-ee-instrument -instcombine -simplifycfg -early-cse -loop-data-prefetch -newgvn -sancov -loop-data-prefetch -simplifycfg -ipconstprop -early-cse -rpo-functionattrs -instcombine -loop-idiom -licm -instcombine -ipsccp -post-inline-ee-instrument -instnamer -globaldce -lower-guard-intrinsic -consthoist -newgvn -adce -argpromotion -slsr -instsimplify -simplifycfg -early-cse -ipconstprop -coro-split -partially-inline-libcalls -functionattrs -lower-matrix-intrinsics -forceattrs -prune-eh -tailcallelim -simplifycfg -strip-debug-declare -post-inline-ee-instrument -simplifycfg -gvn-hoist -die -jump-threading -gvn-hoist -loop-guard-widening -memcpyopt -flattencfg -instcombine -gvn -strip-nondebug -adce -cross-dso-cfi -simplifycfg -globalopt -loop-versioning -sroa -name-anon-globals -mergereturn -ipconstprop -instcombine -name-anon-globals -ee-instrument -functionattrs -loop-deletion -ipsccp -sancov -instcombine -lower-widenable-condition -instcombine -tailcallelim -coro-elide -consthoist -prune-eh -redundant-dbg-inst-elim -ipsccp -newgvn -speculative-execution -sink -instcombine -instcombine -sink -consthoist -early-cse-memssa -loop-unroll-and-jam -simplifycfg -instsimplify -jump-threading -deadargelim -loop-vectorize -simplifycfg -ipsccp -coro-cleanup -strip-nondebug -globalopt -simplifycfg -newgvn -slsr -early-cse-memssa -consthoist -mldst-motion -lower-widenable-condition -dce -mldst-motion -lowerinvoke -rpo-functionattrs -redundant-dbg-inst-elim -consthoist -redundant-dbg-inst-elim -instcombine -lower-matrix-intrinsics -simplifycfg -pgo-memop-opt -float2int -mergeicmps -post-inline-ee-instrument -insert-gcov-profiling -lower-constant-intrinsics -slsr -loop-data-prefetch -lower-constant-intrinsics -deadargelim -lowerinvoke -die -float2int -add-discriminators -always-inline -simplifycfg -aggressive-instcombine -redundant-dbg-inst-elim -memcpyopt -irce -instsimplify -lower-matrix-intrinsics -constmerge -loop-versioning -slsr -loop-versioning +benchmark://cbench-v1/bzip2,1.2212154350882676,71.58076405525208,opt -add-discriminators -instnamer -lower-guard-intrinsic -add-discriminators -instnamer -partially-inline-libcalls -sroa -strip-nondebug -newgvn -bdce -dce -licm -loop-data-prefetch -instcombine -redundant-dbg-inst-elim -instcombine -instcombine -float2int -adce -simplifycfg -slp-vectorizer -newgvn -separate-const-offset-from-gep -barrier -loop-versioning -forceattrs -instcombine -sroa -rpo-functionattrs -memcpyopt -div-rem-pairs -name-anon-globals -newgvn -flattencfg -memcpyopt -redundant-dbg-inst-elim -sccp -early-cse-memssa -elim-avail-extern -mergefunc -coro-cleanup -always-inline -mergefunc -mergereturn -ee-instrument -reassociate -correlated-propagation -globalopt -post-inline-ee-instrument -callsite-splitting -instcombine -strip-debug-declare -loweratomic -slsr -called-value-propagation -forceattrs -strip -callsite-splitting -loop-data-prefetch -simplifycfg -lower-widenable-condition -constmerge -scalarizer -libcalls-shrinkwrap -early-cse -dse -simplifycfg -argpromotion -simplifycfg -globalsplit -div-rem-pairs -newgvn -coro-cleanup -loop-load-elim -newgvn -instsimplify -simplifycfg -aggressive-instcombine -pgo-memop-opt -mergefunc -lower-expect -gvn -lower-matrix-intrinsics -pgo-memop-opt -early-cse-memssa -insert-gcov-profiling -adce -newgvn -sroa -loop-versioning -globalopt -coro-elide -coro-split -speculative-execution -mldst-motion -nary-reassociate -sancov -adce -ipsccp -slp-vectorizer -cross-dso-cfi -instcombine -coro-elide -mem2reg -speculative-execution -mergereturn -simplifycfg -newgvn -newgvn -early-cse-memssa -simplifycfg -dce -lowerinvoke -constprop -instcombine -infer-address-spaces -lower-widenable-condition -newgvn -coro-split -newgvn -tailcallelim -lower-widenable-condition -newgvn -loop-load-elim -loop-load-elim -globalopt -jump-threading -instcombine -mergefunc -simplifycfg -simplifycfg -early-cse-memssa -nary-reassociate -jump-threading -slp-vectorizer -loop-versioning -simplifycfg -speculative-execution -libcalls-shrinkwrap -globaldce -slp-vectorizer -lower-matrix-intrinsics -alignment-from-assumptions -loop-data-prefetch -slsr -early-cse-memssa -coro-split -adce -functionattrs -simplifycfg -sccp -instcombine -ee-instrument -instcombine -cross-dso-cfi -functionattrs -gvn -slsr -sroa -partially-inline-libcalls -mergeicmps -loop-data-prefetch -deadargelim -jump-threading -callsite-splitting -argpromotion -alignment-from-assumptions -functionattrs -scalarizer -loop-versioning -instsimplify -simplifycfg -die -loweratomic -gvn-hoist -dce -strip-nondebug -loop-data-prefetch -functionattrs -early-cse-memssa -gvn-hoist -coro-elide -slp-vectorizer -simplifycfg -die -early-cse-memssa -gvn-hoist -loop-versioning -forceattrs -gvn -libcalls-shrinkwrap -gvn-hoist -slsr -barrier -instcombine -reassociate -gvn -slp-vectorizer -slp-vectorizer -strip-nondebug -consthoist -rewrite-statepoints-for-gc -dse -gvn-hoist -sancov -gvn-hoist -strip-nondebug -correlated-propagation -sroa -die -simple-loop-unswitch -early-cse-memssa -deadargelim -load-store-vectorizer -redundant-dbg-inst-elim -strip-nondebug -die -strip-nondebug -lower-widenable-condition -jump-threading -mergefunc -cross-dso-cfi -callsite-splitting -reassociate -instcombine -strip-nondebug -pgo-memop-opt -add-discriminators -dce -coro-elide -lowerinvoke -die -instcombine -die -insert-gcov-profiling -simplifycfg -instcombine -instcombine -jump-threading -early-cse-memssa -adce -coro-elide -prune-eh -instcombine -gvn-hoist -newgvn -newgvn -strip-nondebug -instcombine -instcombine -early-cse -early-cse-memssa -loop-data-prefetch -rewrite-statepoints-for-gc -simplifycfg -reassociate -rewrite-statepoints-for-gc -prune-eh -callsite-splitting -instcombine -loop-load-elim -jump-threading -early-cse -die -slsr -mem2reg -alignment-from-assumptions -early-cse-memssa -simplifycfg -aggressive-instcombine -pgo-memop-opt -jump-threading -pgo-memop-opt -sancov -slsr -loop-data-prefetch -coro-split -early-cse-memssa -simplifycfg -coro-elide -gvn-hoist -simplifycfg -sink -called-value-propagation -instcombine -early-cse -sccp -deadargelim -early-cse -globalopt -indvars -coro-cleanup -globalopt -elim-avail-extern -globalsplit -instcombine -pgo-memop-opt -dce -dse -newgvn -add-discriminators -newgvn -instnamer -early-cse -die -instcombine -instcombine -mem2reg -canonicalize-aliases -elim-avail-extern -functionattrs -infer-address-spaces -ipconstprop -prune-eh -loop-fusion -lower-expect -instnamer -die -instsimplify -libcalls-shrinkwrap -mergefunc -instcombine -newgvn -simplifycfg -inferattrs -deadargelim -newgvn -simplifycfg -correlated-propagation -mergereturn -reassociate -simplifycfg -lower-guard-intrinsic -early-cse -functionattrs -newgvn -simplifycfg -simplifycfg -gvn -jump-threading -coro-elide -lower-widenable-condition -globaldce -slp-vectorizer -ipconstprop -instnamer -alignment-from-assumptions -instnamer -dce -nary-reassociate -instcombine -loop-load-elim -gvn -die -callsite-splitting -inject-tli-mappings -globalopt -coro-split -loop-load-elim -pgo-memop-opt -loop-data-prefetch -flattencfg -loop-versioning -functionattrs -instcombine -early-cse-memssa -newgvn -newgvn -add-discriminators -coro-elide -newgvn -deadargelim -gvn-hoist -mergeicmps -instcombine -instcombine -newgvn -instcombine -coro-elide -instcombine -instcombine -globalopt -mergeicmps -instcombine -early-cse-memssa -lower-expect -strip -jump-threading -nary-reassociate -infer-address-spaces -coro-early -dce -instcombine -slsr -slsr -early-cse-memssa -die -newgvn -jump-threading -insert-gcov-profiling -constmerge -newgvn -instcombine -simplifycfg -strip-debug-declare -elim-avail-extern -die -memcpyopt -jump-threading -separate-const-offset-from-gep -slp-vectorizer -gvn-hoist -coro-cleanup -loop-idiom -early-cse-memssa -simplifycfg -simplifycfg -lower-guard-intrinsic -early-cse-memssa -coro-cleanup -jump-threading -gvn-hoist -insert-gcov-profiling -strip-dead-prototypes -die -memcpyopt -lower-guard-intrinsic -loop-data-prefetch -forceattrs -indvars -newgvn -tailcallelim -float2int -div-rem-pairs -simplifycfg -early-cse-memssa -loop-fusion -instcombine -speculative-execution -flattencfg -deadargelim -loop-distribute -jump-threading -gvn -die -early-cse -simplifycfg -instcombine -sink -dse -jump-threading -coro-elide -simplifycfg -lower-widenable-condition -globaldce -add-discriminators -instcombine -newgvn -lower-expect -constprop -ipsccp -argpromotion -strip-debug-declare -lower-expect -speculative-execution -sink -gvn -newgvn -gvn-hoist -redundant-dbg-inst-elim -speculative-execution -redundant-dbg-inst-elim -simplifycfg -mergefunc -jump-threading -functionattrs -instcombine -float2int -scalarizer -reassociate -newgvn -gvn -consthoist -rpo-functionattrs -simplifycfg -loop-simplifycfg -gvn -instcombine -memcpyopt -early-cse-memssa -dse -speculative-execution -early-cse-memssa -coro-elide -newgvn -instcombine -functionattrs -ipconstprop -newgvn -instcombine -slsr -coro-split -lowerinvoke -prune-eh -early-cse -jump-threading -newgvn -always-inline -sccp -loop-instsimplify -instcombine -ipsccp -loop-simplify -ipsccp -coro-elide -loop-predication -newgvn -mergefunc -loop-deletion -nary-reassociate -speculative-execution -aggressive-instcombine -load-store-vectorizer -instcombine -gvn-hoist -alignment-from-assumptions -coro-elide -coro-cleanup -gvn -flattencfg -simplifycfg -sroa -add-discriminators -gvn-hoist -simplifycfg -memcpyopt -sccp -early-cse-memssa -ipconstprop -newgvn -prune-eh -instsimplify -alignment-from-assumptions -aggressive-instcombine -pgo-memop-opt -simplifycfg -sroa -coro-split -aggressive-instcombine -simplifycfg -instcombine -strip-dead-prototypes -slsr -loop-data-prefetch -ee-instrument -deadargelim -speculative-execution -lower-widenable-condition -gvn-hoist -loweratomic -loop-distribute -lower-widenable-condition -simplifycfg -globalopt -early-cse-memssa -pgo-memop-opt -lower-matrix-intrinsics -instcombine -early-cse-memssa -newgvn -sink -lower-expect -gvn -slp-vectorizer -gvn-hoist -simplifycfg -early-cse-memssa -strip-debug-declare -canonicalize-aliases -sroa -instcombine -early-cse-memssa -reassociate -loop-fusion -loop-distribute -loop-simplify -mergefunc -gvn-hoist -lower-matrix-intrinsics -gvn-hoist -indvars -scalarizer -instcombine -callsite-splitting -reassociate -name-anon-globals -scalarizer -newgvn -licm -sccp -redundant-dbg-inst-elim -lowerinvoke -early-cse-memssa -simplifycfg -newgvn -prune-eh -simplifycfg -sccp -aggressive-instcombine -loop-unroll-and-jam -strip -instcombine -div-rem-pairs -adce -simplifycfg -gvn-hoist -instcombine -pgo-memop-opt -loop-deletion -instnamer -lower-matrix-intrinsics -strip-nondebug -coro-split -ipsccp -adce -newgvn -lower-widenable-condition -pgo-memop-opt -mergefunc -coro-elide -aggressive-instcombine -scalarizer -newgvn -loop-versioning-licm -globaldce -lower-widenable-condition -dse -constmerge -coro-elide -post-inline-ee-instrument -adce -hotcoldsplit -simplifycfg -reassociate -loop-versioning -elim-avail-extern -tailcallelim -jump-threading -scalarizer -div-rem-pairs -newgvn -instcombine -float2int -rpo-functionattrs -inject-tli-mappings -die -loweratomic -called-value-propagation -sink -instcombine -rpo-functionattrs -loop-vectorize -newgvn -functionattrs -globalsplit -constmerge -newgvn -instcombine -strip -simplifycfg -dce -instcombine -strip-dead-prototypes -jump-threading -mergefunc -gvn-hoist -die -cross-dso-cfi -flattencfg -lower-expect -globalsplit -redundant-dbg-inst-elim -mem2reg -reassociate -simplifycfg -adce -lower-constant-intrinsics -speculative-execution -prune-eh -lower-guard-intrinsic -rpo-functionattrs -prune-eh -ipconstprop -aggressive-instcombine -tailcallelim -consthoist -strip-nondebug -lower-constant-intrinsics -globalopt -ipsccp +benchmark://cbench-v1/dijkstra,0.9948979591836736,61.20203399658203,opt -sroa -simple-loop-unswitch -loop-reroll -sroa -sroa -early-cse -sroa -called-value-propagation -loop-simplifycfg -sroa -name-anon-globals -reassociate -sroa -rewrite-statepoints-for-gc -instsimplify -die -sroa -loop-guard-widening -mem2reg -sroa -coro-early -sroa -bdce -sroa -inferattrs -sroa -loop-load-elim -mem2reg -add-discriminators -sroa -sroa -simplifycfg -sroa -insert-gcov-profiling -die -reassociate -dce -loop-data-prefetch -partially-inline-libcalls -sroa -sroa -sroa -loop-predication -sroa -argpromotion -instsimplify -sroa -instsimplify -sink -early-cse -sroa -sink -sroa -sroa -sroa -argpromotion -loop-load-elim -sroa -dce -rpo-functionattrs -early-cse -rpo-functionattrs -sroa -sroa -infer-address-spaces -strip-dead-prototypes -globaldce -insert-gcov-profiling -sink -guard-widening -infer-address-spaces -gvn-hoist -rewrite-statepoints-for-gc -sroa -bdce -alignment-from-assumptions -gvn-hoist -mldst-motion -post-inline-ee-instrument -globalopt -insert-gcov-profiling -argpromotion -instcombine -loop-unroll-and-jam -pgo-memop-opt -infer-address-spaces -pgo-memop-opt -dce -loop-unroll-and-jam -reassociate -sroa -sroa -early-cse -instsimplify -globalopt -instnamer -sroa -early-cse -always-inline -gvn-hoist -sroa -adce -sroa -simplifycfg -inject-tli-mappings -canonicalize-aliases -early-cse -newgvn -mem2reg -sroa -alignment-from-assumptions -globalsplit -early-cse-memssa -early-cse -lowerinvoke -gvn-hoist -insert-gcov-profiling -sancov -early-cse -load-store-vectorizer -simplifycfg -inferattrs -early-cse -name-anon-globals -bdce -sancov -simplifycfg -coro-cleanup -instcombine -slp-vectorizer -lower-expect -indvars -mem2reg -coro-elide -loop-data-prefetch -forceattrs -attributor -infer-address-spaces -early-cse-memssa -dse -partially-inline-libcalls -reassociate -rewrite-statepoints-for-gc -correlated-propagation -div-rem-pairs -memcpyopt -strip-nondebug -early-cse-memssa -strip-nondebug -called-value-propagation -dse -instnamer -insert-gcov-profiling -lower-guard-intrinsic -coro-elide -early-cse -scalarizer -mem2reg -lcssa -mem2reg -forceattrs -indvars -early-cse-memssa -early-cse-memssa -instcombine -adce -lower-guard-intrinsic -loweratomic -functionattrs -sroa -float2int -lower-guard-intrinsic -called-value-propagation -prune-eh -dse -simplifycfg -pgo-memop-opt -globaldce -inferattrs -rewrite-statepoints-for-gc -mergefunc -instcombine -sink -insert-gcov-profiling -instcombine -instsimplify -redundant-dbg-inst-elim -correlated-propagation -instcombine -lcssa -infer-address-spaces -aggressive-instcombine -early-cse-memssa -mergefunc -coro-early -constprop -globaldce -cross-dso-cfi -coro-early -partially-inline-libcalls -loop-reroll -lcssa -insert-gcov-profiling -globalsplit -sroa -forceattrs -licm -loop-predication -sroa -sroa -simplifycfg -mem2reg -sroa -div-rem-pairs -sroa -simplifycfg -sroa -insert-gcov-profiling -sroa -sroa -sroa -reassociate -reassociate -sroa -simplifycfg -instsimplify -sroa -sancov -sroa -sroa -simplifycfg -loop-fusion -mem2reg -sroa -alignment-from-assumptions -sroa -ee-instrument -alignment-from-assumptions -lower-guard-intrinsic -sroa -loop-simplify -sroa -sroa -lower-guard-intrinsic -load-store-vectorizer -guard-widening -bdce -loop-guard-widening -simple-loop-unswitch -reassociate -loop-load-elim -constprop -sroa -barrier -scalarizer -mem2reg -sccp -called-value-propagation -loop-reduce -sroa -infer-address-spaces -loop-predication -sroa -sroa -lower-guard-intrinsic -early-cse -aggressive-instcombine -loop-guard-widening -sroa -name-anon-globals -sroa -sroa -sroa -instcombine -sroa -newgvn -add-discriminators -sroa -alignment-from-assumptions -sroa -sroa -loop-interchange -sroa -correlated-propagation -sroa -sroa -lcssa -sroa -alignment-from-assumptions -globaldce -simple-loop-unswitch -sroa -strip-nondebug -globalopt -sroa -simple-loop-unswitch -sroa -loop-sink -sroa -sroa -reassociate -sroa -sroa -loop-simplify -loop-sink -sroa -div-rem-pairs -sroa -loop-unswitch -lowerinvoke -mem2reg -sroa -strip-nondebug -insert-gcov-profiling -barrier -sroa -sroa -licm -insert-gcov-profiling -sroa -sroa -sink -sroa -loop-unroll-and-jam -loop-simplify -sroa -simplifycfg -strip-dead-prototypes -loop-predication -early-cse -sroa -sroa -licm -loop-unroll-and-jam -insert-gcov-profiling -reassociate -loop-fusion -hotcoldsplit -sroa -simplifycfg -sroa -always-inline -correlated-propagation -speculative-execution -constprop -sroa -sroa -forceattrs -sroa -sroa -dce -sroa -forceattrs -sroa -sroa -loop-versioning -called-value-propagation -lowerinvoke -sroa -mem2reg -sroa -sroa -sroa -aggressive-instcombine -sroa -sroa -sroa -sroa -sroa -sroa -indvars -sroa -sroa -guard-widening -sroa -globalopt -loop-guard-widening -newgvn -lower-guard-intrinsic -gvn-hoist -canonicalize-aliases -lowerinvoke -sroa -sroa -separate-const-offset-from-gep -speculative-execution -nary-reassociate -lowerinvoke -hotcoldsplit -loop-unroll-and-jam -pgo-memop-opt -gvn-hoist -called-value-propagation -instsimplify -sroa -globalopt -early-cse-memssa -sroa -mem2reg -loop-versioning -sroa -insert-gcov-profiling -load-store-vectorizer -sroa -add-discriminators -sroa -sroa -mergefunc -add-discriminators -sroa -sroa -insert-gcov-profiling -loop-vectorize -reassociate -lcssa -early-cse -mem2reg -add-discriminators -sroa -bdce -loop-interchange -instsimplify -sroa -inferattrs -sroa -gvn -sroa -reassociate -gvn-hoist -reassociate -lcssa -sroa -instnamer -sroa -sroa -sroa -reassociate -loop-guard-widening -rewrite-statepoints-for-gc -loop-unroll-and-jam -sroa -sroa -sroa -insert-gcov-profiling -reassociate -sroa -loop-load-elim -sroa -strip-nondebug -dce -sroa -sroa -dce -reassociate -always-inline -dce -instsimplify -sroa -alignment-from-assumptions -sroa -sroa -sroa -sroa -mem2reg -speculative-execution -sroa -sroa -coro-early -constprop -sroa -loop-deletion -sroa -sroa -inferattrs -sroa -sroa -sroa -lower-guard-intrinsic -argpromotion -sroa -speculative-execution -mem2reg -speculative-execution -loop-reroll -sroa -constprop -sroa -sroa -constprop -adce -coro-early -always-inline -sroa -sroa -sroa -mem2reg -barrier -sroa -sroa -infer-address-spaces -alignment-from-assumptions -sroa -sroa -sroa -loop-unroll-and-jam -instsimplify -reassociate -alignment-from-assumptions -sroa -sroa -mem2reg -sroa -pgo-memop-opt -sccp -sroa -bdce -simple-loop-unswitch -sroa -alignment-from-assumptions -add-discriminators -sroa -sroa -insert-gcov-profiling -loop-sink -gvn-hoist -sroa -sroa -loop-load-elim -mem2reg -mem2reg -sroa -sroa -sroa -sroa -sroa -insert-gcov-profiling -loop-guard-widening -sroa -sroa -indvars -strip-dead-prototypes -add-discriminators -loop-guard-widening -tailcallelim -loop-predication -sroa -mem2reg -mem2reg -globalsplit -sroa -mem2reg -sccp -loop-simplify -globalopt -simplifycfg -sroa -sroa -loop-data-prefetch -loop-data-prefetch -forceattrs -strip-nondebug -reassociate -loop-data-prefetch -instsimplify -insert-gcov-profiling -lcssa -insert-gcov-profiling -infer-address-spaces -coro-early -loop-load-elim -lower-guard-intrinsic -sroa -mem2reg -sroa -sroa -sroa -memcpyopt -instnamer -inferattrs -canonicalize-aliases -globalopt -dce -sroa -early-cse-memssa -simplifycfg -called-value-propagation -reassociate -consthoist -ipsccp -newgvn -sccp -barrier -lower-guard-intrinsic -sroa -scalarizer -bdce -speculative-execution -barrier -strip-nondebug -coro-cleanup -forceattrs -slsr -adce -loop-data-prefetch -sink -mergefunc -instsimplify -sroa -elim-avail-extern -scalarizer -aggressive-instcombine -sroa -early-cse-memssa -sroa -name-anon-globals -simplifycfg -gvn -coro-cleanup -ipsccp -sancov -lowerinvoke -mergefunc -sroa -instcombine -early-cse-memssa -slp-vectorizer -jump-threading -sccp -simplifycfg -early-cse -globalsplit -float2int -dse -sroa -coro-cleanup -name-anon-globals -gvn-hoist -jump-threading -mergereturn -separate-const-offset-from-gep -lcssa -reassociate -instsimplify -loop-unroll-and-jam -instsimplify -mem2reg -strip-dead-prototypes -early-cse-memssa -loop-load-elim -name-anon-globals -loop-unroll-and-jam -newgvn -sink -infer-address-spaces -constprop -tailcallelim -loop-data-prefetch -sroa -simplifycfg -early-cse -newgvn -newgvn -sroa -lowerinvoke -scalarizer -instcombine -early-cse-memssa -tailcallelim -rewrite-statepoints-for-gc -slp-vectorizer -simplifycfg -slsr -early-cse-memssa -add-discriminators -barrier -loop-deletion -sroa -lowerinvoke -adce -dse -early-cse -jump-threading -instcombine -newgvn -mergefunc -lower-matrix-intrinsics -lower-matrix-intrinsics -lower-constant-intrinsics -simplifycfg -simplifycfg -reassociate -flattencfg -sancov -callsite-splitting -instcombine -simplifycfg -early-cse-memssa -elim-avail-extern -loop-versioning -sancov +benchmark://cbench-v1/gsm,1.1296065737051797,64.22639560699463,opt -sroa -gvn-hoist -rpo-functionattrs -adce -coro-split -insert-gcov-profiling -instnamer -lower-expect -newgvn -strip-dead-prototypes -rpo-functionattrs -float2int -float2int -loop-data-prefetch -mergeicmps -gvn-hoist -strip-nondebug -indvars -sccp -float2int -mergereturn -simplifycfg -sancov -coro-split -simplifycfg -indvars -consthoist -instcombine -mem2reg -early-cse-memssa -pgo-memop-opt -rewrite-statepoints-for-gc -loop-simplifycfg -early-cse-memssa -gvn-hoist -lower-expect -functionattrs -speculative-execution -scalarizer -name-anon-globals -jump-threading -mergefunc -jump-threading -gvn-hoist -ipconstprop -lower-expect -simplifycfg -loop-predication -gvn -early-cse-memssa -sancov -newgvn -insert-gcov-profiling -ipconstprop -partially-inline-libcalls -dce -simplifycfg -early-cse -separate-const-offset-from-gep -lcssa -sancov -coro-elide -prune-eh -called-value-propagation -partially-inline-libcalls -early-cse -lcssa -sroa -globalsplit -coro-elide -post-inline-ee-instrument -newgvn -aggressive-instcombine -ipsccp -simplifycfg -instcombine -ipsccp -newgvn -float2int -ipsccp -early-cse-memssa -loweratomic -instcombine -separate-const-offset-from-gep -consthoist -sccp -scalarizer -name-anon-globals -mem2reg -slp-vectorizer -loop-data-prefetch -gvn -newgvn -coro-elide -deadargelim -mergeicmps -lower-widenable-condition -globalsplit -argpromotion -lower-matrix-intrinsics -lower-constant-intrinsics -dse -gvn-hoist -memcpyopt -insert-gcov-profiling -slsr -lower-guard-intrinsic -simplifycfg -insert-gcov-profiling -elim-avail-extern -strip-nondebug -sancov -instnamer -simplifycfg -aggressive-instcombine -simplifycfg -deadargelim -load-store-vectorizer -globalsplit -strip-nondebug -strip-nondebug -prune-eh -ipsccp -slsr -ipsccp -tailcallelim -simplifycfg -inject-tli-mappings -simplifycfg -gvn -instcombine -early-cse -bdce -slp-vectorizer -aggressive-instcombine -constprop -consthoist -adce -div-rem-pairs -loop-load-elim -tailcallelim -lcssa -mergefunc -tailcallelim -mldst-motion -mldst-motion -lower-constant-intrinsics -cross-dso-cfi -coro-cleanup -indvars -strip-nondebug -simplifycfg -bdce -strip-nondebug -simplifycfg -forceattrs -insert-gcov-profiling -consthoist -memcpyopt -ipconstprop -callsite-splitting -loop-interchange -callsite-splitting -ipconstprop -slp-vectorizer -nary-reassociate -coro-elide -callsite-splitting -called-value-propagation -jump-threading -instcombine -nary-reassociate -strip-dead-prototypes -simplifycfg -slsr -newgvn -correlated-propagation -instcombine -globalsplit -jump-threading -libcalls-shrinkwrap -dse -simplifycfg -instsimplify -load-store-vectorizer -loop-versioning -barrier -pgo-memop-opt -ipconstprop -instcombine -early-cse-memssa -argpromotion -simplifycfg -deadargelim -lower-widenable-condition -slp-vectorizer -jump-threading -prune-eh -early-cse-memssa -dse -simplifycfg -alignment-from-assumptions -die -aggressive-instcombine -sancov -instcombine -memcpyopt -insert-gcov-profiling -lowerinvoke -mem2reg -strip-debug-declare -ipsccp -globalsplit -inferattrs -instcombine -dse -ipconstprop -lowerinvoke -newgvn -flattencfg -guard-widening -globalsplit -tailcallelim -float2int -newgvn -mergeicmps -lower-expect -simplifycfg -lower-constant-intrinsics -partially-inline-libcalls -ipsccp -simplifycfg -lower-matrix-intrinsics -loop-versioning -partially-inline-libcalls -loweratomic -early-cse-memssa -post-inline-ee-instrument -scalarizer -lower-matrix-intrinsics -slp-vectorizer -instcombine -inferattrs -instcombine -coro-elide -gvn -slsr -lower-constant-intrinsics -newgvn -loop-versioning -sroa -deadargelim -functionattrs -name-anon-globals -adce -early-cse -prune-eh -callsite-splitting -functionattrs -ee-instrument -instcombine -simplifycfg -attributor -mergeicmps -lower-constant-intrinsics -sink -jump-threading -jump-threading -strip-dead-prototypes -coro-split -speculative-execution -functionattrs -instcombine -instsimplify -jump-threading -attributor -newgvn -instnamer -loop-data-prefetch -mldst-motion -simplifycfg -dce -float2int -gvn-hoist -consthoist -aggressive-instcombine -aggressive-instcombine -gvn-hoist -correlated-propagation -instsimplify -elim-avail-extern -slsr -ipsccp -simplifycfg -gvn -globalsplit -simplifycfg -sancov -gvn-hoist -float2int -dce -coro-elide -mergereturn -cross-dso-cfi -early-cse-memssa -early-cse-memssa -rewrite-statepoints-for-gc -early-cse-memssa -coro-split -licm -dce -functionattrs -early-cse-memssa -separate-const-offset-from-gep -consthoist -pgo-memop-opt -rpo-functionattrs -div-rem-pairs -insert-gcov-profiling -argpromotion -die -coro-early -ipconstprop -lower-expect -speculative-execution -gvn-hoist -consthoist -rpo-functionattrs -jump-threading -functionattrs -rpo-functionattrs -mldst-motion -dse -instcombine -speculative-execution -flattencfg -strip -lowerinvoke -instcombine -lower-widenable-condition -mergereturn -coro-cleanup -loop-versioning -dse -dse -consthoist -globalsplit -dce -libcalls-shrinkwrap -ipsccp -jump-threading -mergefunc -dse -lower-widenable-condition -insert-gcov-profiling -coro-elide -called-value-propagation -gvn-hoist -strip-debug-declare -coro-early -coro-early -slsr -lower-guard-intrinsic -newgvn -gvn -lower-constant-intrinsics -globaldce -loop-versioning -callsite-splitting -slp-vectorizer -prune-eh -strip -early-cse -lowerinvoke -early-cse-memssa -gvn-hoist -loop-versioning -globalsplit -loop-data-prefetch -dse -simplifycfg -strip-debug-declare -instcombine -constprop -jump-threading -simplifycfg -callsite-splitting -float2int -adce -name-anon-globals -functionattrs -lower-widenable-condition -ipconstprop -mergereturn -gvn -memcpyopt -instcombine -simplifycfg -globaldce -post-inline-ee-instrument -gvn-hoist -early-cse-memssa -redundant-dbg-inst-elim -early-cse-memssa -simplifycfg -consthoist -dse -strip -strip-nondebug -gvn-hoist -instcombine -lower-guard-intrinsic -name-anon-globals -loop-load-elim -die -simplifycfg -callsite-splitting -instcombine -partially-inline-libcalls -gvn -lower-widenable-condition -lower-widenable-condition -rewrite-statepoints-for-gc -slp-vectorizer -attributor -deadargelim -deadargelim -instcombine -die -instcombine -dse -instcombine -lower-constant-intrinsics -simplifycfg -coro-split -constprop -gvn-hoist -simplifycfg -simplifycfg -lower-widenable-condition -die -mem2reg -speculative-execution -strip-debug-declare -strip -callsite-splitting -slsr -instcombine -newgvn -slp-vectorizer -simplifycfg -slsr -loop-instsimplify -gvn-hoist -early-cse-memssa -post-inline-ee-instrument -lower-matrix-intrinsics -tailcallelim -attributor -consthoist -dse -jump-threading -loop-vectorize -rpo-functionattrs -globaldce -strip-nondebug -newgvn -lower-constant-intrinsics -cross-dso-cfi -strip-nondebug -dse -early-cse-memssa -simplifycfg -attributor -globalsplit -coro-elide -speculative-execution -loop-load-elim -rewrite-statepoints-for-gc -gvn -lower-constant-intrinsics -insert-gcov-profiling -early-cse-memssa -lowerinvoke -lower-matrix-intrinsics -redundant-dbg-inst-elim -loop-data-prefetch -lower-matrix-intrinsics -newgvn -inferattrs -adce -ipsccp -simplifycfg -newgvn -simplifycfg -early-cse-memssa -dse -pgo-memop-opt -instcombine -scalarizer -lower-constant-intrinsics -guard-widening -instcombine -newgvn -float2int -tailcallelim -aggressive-instcombine -gvn -loop-versioning -lowerinvoke -rewrite-statepoints-for-gc -post-inline-ee-instrument -coro-cleanup -coro-split -prune-eh -slp-vectorizer -redundant-dbg-inst-elim -separate-const-offset-from-gep -mldst-motion -sccp -coro-early -post-inline-ee-instrument -constprop -instcombine -newgvn -newgvn -sccp -deadargelim -gvn-hoist -loop-simplify -speculative-execution -loweratomic -simplifycfg -coro-elide -globalopt -adce -simplifycfg -instcombine -newgvn -libcalls-shrinkwrap -sroa -lowerinvoke -globalopt -consthoist -strip-debug-declare -reassociate -strip-nondebug -barrier -lower-widenable-condition -scalarizer -early-cse -mldst-motion -globalopt -insert-gcov-profiling -slsr -newgvn -die -simplifycfg -dse -lower-matrix-intrinsics -newgvn -jump-threading -pgo-memop-opt -newgvn -newgvn -loop-versioning -instcombine -globalsplit -loop-versioning -strip-dead-prototypes -instcombine -callsite-splitting -gvn-hoist -early-cse-memssa -instcombine -memcpyopt -mergeicmps -gvn -instcombine -sroa -lower-expect -break-crit-edges -lower-expect -loweratomic -mergeicmps -callsite-splitting -coro-elide -coro-elide -ipconstprop -early-cse-memssa -slp-vectorizer -constmerge -called-value-propagation -adce -newgvn -jump-threading -mergefunc -globalsplit -instcombine -sccp -tailcallelim -slsr -slp-vectorizer -newgvn -post-inline-ee-instrument -sccp -always-inline -die -loweratomic -coro-cleanup -die -instcombine -die -ee-instrument -prune-eh -nary-reassociate -early-cse-memssa -instcombine -slp-vectorizer -die -deadargelim -instcombine -die -cross-dso-cfi -die -newgvn -loop-data-prefetch -insert-gcov-profiling -instcombine -loweratomic -coro-elide -slp-vectorizer -globaldce -newgvn -infer-address-spaces -globaldce -slsr -loop-distribute -post-inline-ee-instrument -mergereturn -ipsccp -instcombine -globalopt -globaldce -rpo-functionattrs -strip-debug-declare -post-inline-ee-instrument -deadargelim -gvn-hoist -instcombine -jump-threading -lower-matrix-intrinsics -barrier -slp-vectorizer -jump-threading -instcombine -instcombine -coro-elide -dce -simplifycfg -instcombine -early-cse -simplifycfg -mldst-motion -simplifycfg -die -simplifycfg -dce -newgvn -jump-threading -float2int -rpo-functionattrs -name-anon-globals -mergeicmps -lcssa -sancov -name-anon-globals -slsr -sink -coro-cleanup -prune-eh -flattencfg -gvn-hoist -float2int -dse -consthoist -slsr -insert-gcov-profiling -callsite-splitting -dse -coro-cleanup -insert-gcov-profiling -gvn -simplifycfg -canonicalize-aliases -die -bdce -instcombine -cross-dso-cfi -loop-simplify +benchmark://cbench-v1/jpeg-c,1.0468425458040127,78.61691927909851,opt -sroa -sroa -nary-reassociate -consthoist -functionattrs -infer-address-spaces -functionattrs -instsimplify -simplifycfg -adce -simplifycfg -gvn-hoist -coro-elide -ipconstprop -hotcoldsplit -globalsplit -instcombine -instsimplify -redundant-dbg-inst-elim -lower-guard-intrinsic -jump-threading -instsimplify -inject-tli-mappings -mem2reg -instsimplify -newgvn -rpo-functionattrs -redundant-dbg-inst-elim -pgo-memop-opt -pgo-memop-opt -simplifycfg -forceattrs -scalarizer -simplifycfg -newgvn -die -globalsplit -instsimplify -loop-guard-widening -sroa -sroa -speculative-execution -constprop -speculative-execution -pgo-memop-opt -instcombine -newgvn -gvn-hoist -early-cse-memssa -lower-constant-intrinsics -early-cse-memssa -newgvn -sink -consthoist -loop-data-prefetch -ipsccp -rpo-functionattrs -inject-tli-mappings -sccp -lower-widenable-condition -newgvn -instcombine -newgvn -irce -instcombine -lower-guard-intrinsic -forceattrs -lcssa -gvn-hoist -simplifycfg -coro-split -slsr -simplifycfg -sccp -simplifycfg -globaldce -loop-unroll-and-jam -guard-widening -indvars -simplifycfg -scalarizer -loop-interchange -constprop -pgo-memop-opt -instcombine -sroa -dce -newgvn -instcombine -gvn -strip-nondebug -simplifycfg -slsr -insert-gcov-profiling -early-cse -forceattrs -lower-widenable-condition -nary-reassociate -loop-data-prefetch -adce -lower-matrix-intrinsics -ipsccp -canonicalize-aliases -simplifycfg -lower-matrix-intrinsics -gvn-hoist -dce -lower-expect -instcombine -loop-vectorize -pgo-memop-opt -sroa -instcombine -loop-predication -instcombine -licm -name-anon-globals -globalsplit -simplifycfg -dce -sroa -inferattrs -reassociate -sroa -mem2reg -prune-eh -jump-threading -licm -gvn-hoist -indvars -mergereturn -loop-simplify -lower-widenable-condition -sroa -early-cse-memssa -newgvn -coro-split -instcombine -gvn-hoist -strip -loop-versioning -elim-avail-extern -mergefunc -simplifycfg -loop-data-prefetch -adce -adce -aggressive-instcombine -pgo-memop-opt -loop-distribute -globalopt -sancov -alignment-from-assumptions -jump-threading -mergeicmps -licm -loop-versioning -strip-dead-prototypes -scalarizer -newgvn -simplifycfg -strip-debug-declare -functionattrs -simplifycfg -instcombine -loweratomic -gvn-hoist -tailcallelim -coro-cleanup -loop-data-prefetch -loop-versioning -simplifycfg -instcombine -partially-inline-libcalls -add-discriminators -newgvn -dce -ee-instrument -consthoist -slsr -consthoist -loop-data-prefetch -mldst-motion -correlated-propagation -loop-distribute -infer-address-spaces -infer-address-spaces -strip-debug-declare -simplifycfg -dse -slsr -gvn -separate-const-offset-from-gep -sancov -rpo-functionattrs -ipconstprop -loop-data-prefetch -globalsplit -deadargelim -cross-dso-cfi -ipconstprop -newgvn -globaldce -strip-debug-declare -loop-guard-widening -infer-address-spaces -strip-nondebug -alignment-from-assumptions -instcombine -infer-address-spaces -instnamer -early-cse -loop-versioning -loop-versioning -slsr -gvn -simplifycfg -strip-debug-declare -sroa -coro-early -lcssa -deadargelim -pgo-memop-opt -aggressive-instcombine -bdce -early-cse-memssa -sroa -strip-dead-prototypes -ipconstprop -mldst-motion -coro-elide -newgvn -instcombine -newgvn -simplifycfg -ipsccp -early-cse -partially-inline-libcalls -loop-distribute -mldst-motion -lcssa -callsite-splitting -loop-unroll-and-jam -nary-reassociate -sancov -cross-dso-cfi -coro-cleanup -early-cse-memssa -gvn-hoist -flattencfg -gvn-hoist -die -ipsccp -ee-instrument -strip -globalopt -sink -inject-tli-mappings -instcombine -coro-elide -canonicalize-aliases -strip-nondebug -instsimplify -simplifycfg -jump-threading -simplifycfg -sroa -strip-debug-declare -coro-split -loop-versioning -newgvn -instcombine -early-cse -sancov -simplifycfg -loop-load-elim -mem2reg -ipsccp -slp-vectorizer -early-cse -newgvn -functionattrs -inject-tli-mappings -partially-inline-libcalls -instcombine -post-inline-ee-instrument -instcombine -strip-nondebug -called-value-propagation -gvn-hoist -loop-reroll -barrier -alignment-from-assumptions -simplifycfg -simplifycfg -early-cse-memssa -newgvn -redundant-dbg-inst-elim -die -early-cse-memssa -mergeicmps -inject-tli-mappings -infer-address-spaces -loop-data-prefetch -gvn -lowerinvoke -gvn -guard-widening -aggressive-instcombine -simplifycfg -dce -scalarizer -guard-widening -dce -simplifycfg -pgo-memop-opt -always-inline -simplifycfg -slsr -correlated-propagation -coro-elide -canonicalize-aliases -simplifycfg -alignment-from-assumptions -mergefunc -slsr -indvars -simplifycfg -gvn-hoist -deadargelim -lower-constant-intrinsics -simplifycfg -newgvn -coro-split -loop-data-prefetch -newgvn -consthoist -instcombine -globaldce -div-rem-pairs -simplifycfg -coro-elide -gvn -redundant-dbg-inst-elim -newgvn -instcombine -gvn-hoist -mergefunc -flattencfg -lower-constant-intrinsics -consthoist -simple-loop-unswitch -mergereturn -early-cse-memssa -slsr -cross-dso-cfi -licm -mergefunc -dce -instcombine -simplifycfg -simplifycfg -loop-versioning -ipconstprop -pgo-memop-opt -scalarizer -early-cse -strip -coro-cleanup -strip-dead-prototypes -globalsplit -float2int -coro-elide -early-cse -mldst-motion -simplifycfg -callsite-splitting -deadargelim -sroa -slsr -guard-widening -gvn -loop-vectorize -coro-cleanup -div-rem-pairs -rewrite-statepoints-for-gc -mergereturn -forceattrs -loop-vectorize -mldst-motion -jump-threading -adce -instcombine -loop-versioning -barrier -strip-dead-prototypes -newgvn -instcombine -simplifycfg -flattencfg -pgo-memop-opt -gvn -prune-eh -sccp -newgvn -sroa -early-cse-memssa -instcombine -simplifycfg -newgvn -mem2reg -coro-elide -deadargelim -simplifycfg -newgvn -infer-address-spaces -reassociate -jump-threading -functionattrs -jump-threading -simple-loop-unswitch -loop-simplify -always-inline -lower-constant-intrinsics -simplifycfg -globalopt -newgvn -loop-versioning -lowerinvoke -loop-unroll-and-jam -gvn-hoist -pgo-memop-opt -loop-load-elim -bdce -consthoist -early-cse -gvn-hoist -ipconstprop -lcssa -mergeicmps -instcombine -always-inline -instcombine -insert-gcov-profiling -pgo-memop-opt -simplifycfg -lower-guard-intrinsic -globalopt -mem2reg -constmerge -bdce -lower-constant-intrinsics -strip-nondebug -lower-matrix-intrinsics -mergereturn -lower-constant-intrinsics -elim-avail-extern -instcombine -ipconstprop -early-cse-memssa -redundant-dbg-inst-elim -strip-nondebug -inferattrs -called-value-propagation -globalsplit -instcombine -strip-dead-prototypes -instsimplify -instcombine -simplifycfg -sccp -newgvn -coro-cleanup -instcombine -reassociate -argpromotion -loop-data-prefetch -add-discriminators -infer-address-spaces -float2int -inject-tli-mappings -float2int -sancov -adce -newgvn -coro-cleanup -ipconstprop -aggressive-instcombine -simplifycfg -gvn-hoist -lcssa -adce -slsr -strip-dead-prototypes -gvn-hoist -sccp -simplifycfg -gvn-hoist -simplifycfg -add-discriminators -consthoist -cross-dso-cfi -instcombine -pgo-memop-opt -instsimplify -constprop -simplifycfg -early-cse-memssa -mergereturn -coro-split -loop-sink -simplifycfg -simplifycfg -sroa -lower-expect -flattencfg -instcombine -sroa -functionattrs -cross-dso-cfi -newgvn -jump-threading -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -callsite-splitting -coro-cleanup -instcombine -mergefunc -ipsccp -mem2reg -nary-reassociate -loop-vectorize -constmerge -insert-gcov-profiling -instcombine -dce -callsite-splitting -early-cse -simplifycfg -adce -flattencfg -loop-simplify -lower-matrix-intrinsics -gvn -early-cse -instcombine -loop-fusion -coro-cleanup -lower-matrix-intrinsics -forceattrs -globalsplit -sroa -strip-dead-prototypes -gvn -float2int -instcombine -loop-predication -jump-threading -early-cse-memssa -flattencfg -simplifycfg -pgo-memop-opt -barrier -always-inline -deadargelim -newgvn -instsimplify -simplifycfg -nary-reassociate -early-cse-memssa -float2int -consthoist -redundant-dbg-inst-elim -simplifycfg -tailcallelim -jump-threading -barrier -newgvn -prune-eh -early-cse-memssa -always-inline -instcombine -aggressive-instcombine -simplifycfg -float2int -pgo-memop-opt -lower-matrix-intrinsics -lower-expect -alignment-from-assumptions -rewrite-statepoints-for-gc -indvars -nary-reassociate -consthoist -adce -coro-elide -globaldce -newgvn -tailcallelim -loop-fusion -post-inline-ee-instrument -early-cse -dce -instcombine -loop-load-elim -simplifycfg -simplifycfg -lower-constant-intrinsics -loop-versioning -bdce -newgvn -instsimplify -dce -simplifycfg -rpo-functionattrs -tailcallelim -simplifycfg -instcombine -loop-data-prefetch -jump-threading -newgvn -gvn -early-cse-memssa -guard-widening -mem2reg -slsr -early-cse-memssa -indvars -reassociate -aggressive-instcombine -globalopt -dce -sccp -reassociate -newgvn -consthoist -rewrite-statepoints-for-gc -reassociate -callsite-splitting -instcombine -instsimplify -simplifycfg -gvn -lower-expect -rpo-functionattrs -jump-threading -strip-debug-declare -inferattrs -globalsplit -simplifycfg -deadargelim -deadargelim -rewrite-statepoints-for-gc -barrier -cross-dso-cfi -loweratomic -scalarizer -strip -gvn-hoist -strip -ipconstprop -bdce -insert-gcov-profiling -instcombine -partially-inline-libcalls -insert-gcov-profiling -loop-interchange -early-cse -scalarizer -newgvn -sroa -pgo-memop-opt -canonicalize-aliases -inject-tli-mappings -ipconstprop -ipconstprop -correlated-propagation -instcombine -simplifycfg -strip-nondebug -instcombine -slp-vectorizer -pgo-memop-opt -early-cse -slsr -loweratomic -early-cse-memssa -loweratomic -strip -instcombine -argpromotion -gvn-hoist -lower-matrix-intrinsics -scalarizer -dse -reassociate -instcombine -lower-matrix-intrinsics -insert-gcov-profiling -consthoist +benchmark://cbench-v1/lame,1.0789493661276837,77.61762881278992,opt -float2int -called-value-propagation -forceattrs -sroa -sancov -partially-inline-libcalls -correlated-propagation -ipsccp -instcombine -sccp -instcombine -sink -newgvn -simplifycfg -gvn-hoist -lowerinvoke -instcombine -guard-widening -div-rem-pairs -slp-vectorizer -inferattrs -jump-threading -globaldce -indvars -early-cse-memssa -nary-reassociate -loop-distribute -gvn-hoist -speculative-execution -loop-distribute -lower-widenable-condition -globaldce -inject-tli-mappings -instcombine -instcombine -early-cse-memssa -inferattrs -float2int -adce -callsite-splitting -memcpyopt -prune-eh -loop-versioning -consthoist -newgvn -gvn -strip-nondebug -ipsccp -strip -sccp -loop-vectorize -simplifycfg -lower-guard-intrinsic -instnamer -coro-elide -loop-data-prefetch -alignment-from-assumptions -jump-threading -instcombine -aggressive-instcombine -simplifycfg -simplifycfg -forceattrs -rewrite-statepoints-for-gc -slsr -mergefunc -add-discriminators -loweratomic -lower-expect -coro-split -sccp -partially-inline-libcalls -infer-address-spaces -gvn -sroa -slsr -indvars -newgvn -bdce -ipconstprop -redundant-dbg-inst-elim -instcombine -newgvn -gvn -early-cse-memssa -licm -pgo-memop-opt -float2int -jump-threading -mergefunc -cross-dso-cfi -prune-eh -lowerinvoke -early-cse -gvn -globalsplit -nary-reassociate -bdce -instnamer -strip-dead-prototypes -deadargelim -adce -sroa -pgo-memop-opt -deadargelim -lower-matrix-intrinsics -instcombine -float2int -simplifycfg -early-cse-memssa -ipconstprop -reassociate -lower-constant-intrinsics -strip-dead-prototypes -speculative-execution -coro-cleanup -name-anon-globals -globaldce -simplifycfg -guard-widening -always-inline -coro-elide -mergeicmps -slp-vectorizer -sancov -strip -newgvn -dce -div-rem-pairs -lower-expect -jump-threading -sccp -cross-dso-cfi -newgvn -ipconstprop -strip-dead-prototypes -strip-nondebug -flattencfg -early-cse-memssa -deadargelim -name-anon-globals -coro-split -jump-threading -early-cse-memssa -coro-elide -libcalls-shrinkwrap -lower-constant-intrinsics -functionattrs -rewrite-statepoints-for-gc -partially-inline-libcalls -die -early-cse-memssa -correlated-propagation -instcombine -newgvn -mldst-motion -sroa -lower-constant-intrinsics -gvn-hoist -name-anon-globals -loop-load-elim -cross-dso-cfi -canonicalize-aliases -scalarizer -early-cse-memssa -jump-threading -simplifycfg -lower-expect -simplifycfg -jump-threading -lower-guard-intrinsic -early-cse-memssa -gvn -coro-cleanup -early-cse-memssa -scalarizer -indvars -loop-fusion -instcombine -aggressive-instcombine -inferattrs -rpo-functionattrs -strip -deadargelim -callsite-splitting -jump-threading -prune-eh -nary-reassociate -consthoist -newgvn -simplifycfg -post-inline-ee-instrument -adce -instcombine -newgvn -instcombine -lowerinvoke -dse -lower-expect -redundant-dbg-inst-elim -loweratomic -sancov -rpo-functionattrs -strip-debug-declare -scalarizer -ipconstprop -strip-nondebug -post-inline-ee-instrument -early-cse-memssa -gvn -separate-const-offset-from-gep -flattencfg -callsite-splitting -slp-vectorizer -indvars -ipconstprop -aggressive-instcombine -early-cse -newgvn -jump-threading -consthoist -callsite-splitting -loweratomic -globalsplit -callsite-splitting -coro-early -lower-constant-intrinsics -sancov -guard-widening -die -globalsplit -lower-widenable-condition -pgo-memop-opt -early-cse -strip-nondebug -loop-data-prefetch -simplifycfg -adce -callsite-splitting -globalopt -slsr -div-rem-pairs -memcpyopt -aggressive-instcombine -strip-nondebug -deadargelim -gvn -partially-inline-libcalls -reassociate -partially-inline-libcalls -die -flattencfg -partially-inline-libcalls -inferattrs -mergefunc -early-cse-memssa -coro-elide -deadargelim -mergefunc -scalarizer -aggressive-instcombine -strip -deadargelim -early-cse-memssa -strip-nondebug -barrier -inferattrs -sancov -mergeicmps -loop-fusion -mldst-motion -called-value-propagation -globalsplit -coro-split -ipsccp -jump-threading -canonicalize-aliases -slsr -newgvn -sancov -coro-early -gvn-hoist -gvn -cross-dso-cfi -mldst-motion -ipconstprop -post-inline-ee-instrument -flattencfg -scalarizer -slp-vectorizer -gvn -loop-versioning -lower-guard-intrinsic -simplifycfg -lower-widenable-condition -instcombine -coro-cleanup -constprop -instcombine -gvn -gvn -loop-versioning -globaldce -newgvn -instcombine -simplifycfg -loop-versioning -newgvn -globaldce -strip-nondebug -consthoist -prune-eh -tailcallelim -sancov -newgvn -mergereturn -deadargelim -instcombine -dse -ipconstprop -coro-cleanup -simplifycfg -sancov -globaldce -elim-avail-extern -globalsplit -mergefunc -gvn-hoist -gvn -loop-versioning -callsite-splitting -newgvn -prune-eh -lower-widenable-condition -jump-threading -loop-simplify -slsr -pgo-memop-opt -jump-threading -adce -pgo-memop-opt -lowerinvoke -speculative-execution -sink -newgvn -flattencfg -insert-gcov-profiling -consthoist -indvars -coro-elide -mergefunc -newgvn -scalarizer -memcpyopt -mem2reg -ipsccp -add-discriminators -insert-gcov-profiling -globaldce -instsimplify -lower-matrix-intrinsics -early-cse-memssa -lower-expect -sink -float2int -gvn-hoist -lower-matrix-intrinsics -globaldce -jump-threading -globaldce -coro-split -simplifycfg -dse -aggressive-instcombine -die -slp-vectorizer -instcombine -aggressive-instcombine -inferattrs -partially-inline-libcalls -mem2reg -scalarizer -slsr -newgvn -newgvn -coro-cleanup -instcombine -coro-elide -callsite-splitting -slsr -callsite-splitting -ipconstprop -constmerge -loop-interchange -lower-expect -instsimplify -strip-nondebug -slsr -memcpyopt -mergeicmps -reassociate -separate-const-offset-from-gep -loop-data-prefetch -adce -dse -sancov -globaldce -loop-fusion -post-inline-ee-instrument -nary-reassociate -early-cse-memssa -strip-nondebug -newgvn -newgvn -simplifycfg -gvn -early-cse -instcombine -jump-threading -simplifycfg -early-cse-memssa -pgo-memop-opt -instsimplify -elim-avail-extern -jump-threading -instcombine -float2int -called-value-propagation -called-value-propagation -early-cse-memssa -callsite-splitting -simplifycfg -scalarizer -instcombine -coro-elide -aggressive-instcombine -loop-unroll-and-jam -globaldce -mergeicmps -strip-nondebug -slsr -instcombine -separate-const-offset-from-gep -simplifycfg -redundant-dbg-inst-elim -dse -newgvn -attributor -dse -loop-simplify -post-inline-ee-instrument -guard-widening -loop-versioning -sroa -loop-guard-widening -speculative-execution -globaldce -reassociate -gvn-hoist -globaldce -inferattrs -argpromotion -sink -jump-threading -lower-constant-intrinsics -strip-nondebug -gvn-hoist -constmerge -strip-nondebug -bdce -cross-dso-cfi -globalopt -consthoist -div-rem-pairs -jump-threading -lower-matrix-intrinsics -lower-expect -pgo-memop-opt -deadargelim -loop-unroll-and-jam -elim-avail-extern -aggressive-instcombine -mem2reg -dse -functionattrs -prune-eh -loop-versioning -prune-eh -libcalls-shrinkwrap -mergefunc -gvn-hoist -gvn -forceattrs -consthoist -loop-vectorize -deadargelim -aggressive-instcombine -instcombine -instcombine -pgo-memop-opt -elim-avail-extern -jump-threading -lower-matrix-intrinsics -lowerinvoke -elim-avail-extern -loop-simplify -early-cse -loop-data-prefetch -early-cse-memssa -coro-split -insert-gcov-profiling -dce -pgo-memop-opt -instnamer -redundant-dbg-inst-elim -ipsccp -coro-elide -flattencfg -tailcallelim -adce -strip-nondebug -post-inline-ee-instrument -deadargelim -libcalls-shrinkwrap -simplifycfg -early-cse -functionattrs -lower-widenable-condition -callsite-splitting -partially-inline-libcalls -coro-split -mergeicmps -instcombine -instcombine -float2int -jump-threading -gvn-hoist -inferattrs -nary-reassociate -called-value-propagation -mldst-motion -partially-inline-libcalls -scalarizer -consthoist -simplifycfg -strip -prune-eh -die -lowerinvoke -instcombine -newgvn -simplifycfg -partially-inline-libcalls -slp-vectorizer -die -irce -redundant-dbg-inst-elim -instcombine -inject-tli-mappings -early-cse-memssa -ipsccp -loop-load-elim -mergefunc -loweratomic -inferattrs -globalopt -adce -jump-threading -dse -loweratomic -dse -coro-elide -float2int -strip-dead-prototypes -early-cse-memssa -callsite-splitting -loop-interchange -cross-dso-cfi -early-cse-memssa -instnamer -instcombine -ipconstprop -consthoist -dce -functionattrs -barrier -simplifycfg -consthoist -early-cse-memssa -newgvn -die -irce -lcssa -insert-gcov-profiling -constprop -cross-dso-cfi -loop-distribute -float2int -sroa -sccp -lower-constant-intrinsics -sancov -simplifycfg -die -instcombine -strip -slsr -simplifycfg -lowerinvoke -jump-threading -newgvn -barrier -slp-vectorizer -globalopt -simplifycfg -rpo-functionattrs -callsite-splitting -libcalls-shrinkwrap -lower-matrix-intrinsics -insert-gcov-profiling -elim-avail-extern -instsimplify -coro-elide -rpo-functionattrs -die -gvn -functionattrs -adce -canonicalize-aliases -flattencfg -mergeicmps -simplifycfg -simplifycfg -die -strip-dead-prototypes -jump-threading -early-cse -deadargelim -canonicalize-aliases -gvn-hoist -mem2reg -simplifycfg -post-inline-ee-instrument -reassociate -scalarizer -aggressive-instcombine -coro-split -gvn -rewrite-statepoints-for-gc -simplifycfg -deadargelim -float2int -inferattrs -tailcallelim -instcombine -loop-versioning -constmerge -loop-guard-widening -gvn -flattencfg -lower-expect -inferattrs -instcombine -forceattrs -infer-address-spaces -div-rem-pairs -loop-data-prefetch -rewrite-statepoints-for-gc -lower-matrix-intrinsics -coro-cleanup -lower-matrix-intrinsics -newgvn -loop-data-prefetch -lower-widenable-condition -inject-tli-mappings -die -lower-guard-intrinsic -loop-data-prefetch -newgvn -canonicalize-aliases -sccp -simplifycfg -load-store-vectorizer -sroa -mergefunc -callsite-splitting -loop-distribute -newgvn -simplifycfg -strip-dead-prototypes -loop-load-elim -coro-early -lower-constant-intrinsics -jump-threading -pgo-memop-opt -instcombine -mergefunc -newgvn -jump-threading -coro-split +benchmark://cbench-v1/qsort,1.136222910216718,60.9553701877594,opt -alignment-from-assumptions -loop-versioning -mem2reg -strip-debug-declare -gvn-hoist -simplifycfg -sroa -coro-elide -sroa -sroa -sroa -lcssa -early-cse -sroa -lower-guard-intrinsic -mem2reg -jump-threading -coro-cleanup -memcpyopt -name-anon-globals -adce -inferattrs -newgvn -sroa -insert-gcov-profiling -sroa -always-inline -mem2reg -sroa -pgo-memop-opt -early-cse -tailcallelim -hotcoldsplit -insert-gcov-profiling -reassociate -coro-cleanup -lcssa -sroa -ipsccp -sroa -instsimplify -constprop -mergefunc -sroa -simplifycfg -sroa -mergereturn -add-discriminators -argpromotion -sroa -forceattrs -sroa -loweratomic -deadargelim -coro-early -instcombine -sroa -reassociate -ipsccp -sroa -scalarizer -globalsplit -insert-gcov-profiling -sroa -correlated-propagation -post-inline-ee-instrument -sroa -forceattrs -simplifycfg -gvn-hoist -coro-cleanup -newgvn -loop-unroll-and-jam -indvars -loop-vectorize -instcombine -gvn-hoist -sroa -sroa -early-cse-memssa -loop-load-elim -sccp -instcombine -sroa -strip-dead-prototypes -newgvn -licm -infer-address-spaces -speculative-execution -simplifycfg -dce -loop-deletion -loop-data-prefetch -scalarizer -early-cse-memssa -infer-address-spaces -simplifycfg -strip-nondebug -rpo-functionattrs -constprop -instcombine -simplifycfg -instcombine -simplifycfg -simplifycfg -loop-sink -loop-unroll-and-jam -coro-early -lower-guard-intrinsic -sancov -instcombine -aggressive-instcombine -gvn-hoist -sccp -lower-matrix-intrinsics -ipsccp -constprop -adce -div-rem-pairs -dse -early-cse-memssa -strip-nondebug -inferattrs -early-cse-memssa -barrier -newgvn -simplifycfg -mergefunc -loop-vectorize -simplifycfg -globalopt -rpo-functionattrs -elim-avail-extern -reassociate -simplifycfg -instcombine -instcombine -lower-expect -div-rem-pairs -early-cse -sccp -jump-threading -loop-data-prefetch -libcalls-shrinkwrap -functionattrs -float2int -instcombine -speculative-execution -reassociate -simplifycfg -pgo-memop-opt -constprop -newgvn -gvn -infer-address-spaces -newgvn -sancov -simplifycfg -early-cse -strip-nondebug -simplifycfg -simplifycfg -loop-fusion -loop-load-elim -slp-vectorizer -simplifycfg -lower-constant-intrinsics -sancov -strip-nondebug -die -rpo-functionattrs -sink -globalopt -barrier -alignment-from-assumptions -simplifycfg -inject-tli-mappings -add-discriminators -mergefunc -simplifycfg -simplifycfg -gvn -deadargelim -sroa -forceattrs -newgvn -die -jump-threading -early-cse -attributor -lower-widenable-condition -pgo-memop-opt -tailcallelim -adce -gvn -callsite-splitting -deadargelim -separate-const-offset-from-gep -dse -instsimplify -sroa -lower-matrix-intrinsics -loop-sink -sroa -sroa -sroa -loop-fusion -sroa -loop-simplifycfg -sroa -gvn-hoist -loop-predication -globaldce -newgvn -simplifycfg -mem2reg -mergefunc -constprop -sroa -reassociate -cross-dso-cfi -sroa -constprop -sroa -loop-interchange -inferattrs -sroa -loop-reroll -simple-loop-unswitch -instsimplify -early-cse-memssa -sccp -sroa -reassociate -sroa -strip-nondebug -add-discriminators -strip-dead-prototypes -simplifycfg -newgvn -globalsplit -constprop -div-rem-pairs -insert-gcov-profiling -loop-guard-widening -strip-dead-prototypes -sroa -loop-reduce -add-discriminators -sroa -simple-loop-unswitch -strip-dead-prototypes -loop-versioning-licm -sroa -mem2reg -sroa -sroa -sroa -forceattrs -insert-gcov-profiling -sroa -sroa -simplifycfg -coro-elide -canonicalize-aliases -sroa -loop-idiom -loop-guard-widening -prune-eh -loop-deletion -sroa -sroa -reassociate -infer-address-spaces -loop-load-elim -mem2reg -sroa -insert-gcov-profiling -loop-guard-widening -mem2reg -loop-unroll-and-jam -lowerinvoke -reassociate -loop-guard-widening -sccp -reassociate -barrier -insert-gcov-profiling -sroa -sroa -constprop -reassociate -sroa -early-cse -sroa -sroa -globaldce -early-cse -reassociate -lower-guard-intrinsic -sroa -sroa -mldst-motion -strip -indvars -strip -sroa -loop-unroll-and-jam -scalarizer -loop-unroll-and-jam -jump-threading -sroa -early-cse -sroa -sroa -sroa -sroa -indvars -insert-gcov-profiling -sroa -sroa -loop-data-prefetch -sroa -bdce -sroa -sroa -insert-gcov-profiling -sroa -alignment-from-assumptions -coro-elide -alignment-from-assumptions -infer-address-spaces -add-discriminators -coro-cleanup -mem2reg -strip -instsimplify -coro-early -lower-guard-intrinsic -sroa -loop-deletion -sroa -mem2reg -lowerinvoke -sancov -strip-dead-prototypes -instcombine -sroa -reassociate -loop-predication -coro-cleanup -alignment-from-assumptions -pgo-memop-opt -scalarizer -correlated-propagation -mem2reg -loop-simplifycfg -simple-loop-unswitch -pgo-memop-opt -constmerge -lower-guard-intrinsic -coro-cleanup -inferattrs -globalopt -forceattrs -instnamer -sroa -ee-instrument -loop-load-elim -indvars -sroa -sroa -insert-gcov-profiling -constprop -sroa -sroa -sroa -early-cse -coro-cleanup -sroa -sroa -sroa -lower-guard-intrinsic -sroa -reassociate -loop-data-prefetch -dce -sroa -barrier -tailcallelim -barrier -sroa -sroa -lower-matrix-intrinsics -simplifycfg -sroa -sccp -reassociate -deadargelim -early-cse-memssa -gvn-hoist -instsimplify -adce -mem2reg -redundant-dbg-inst-elim -simplifycfg -loop-fusion -loop-unroll-and-jam -early-cse -hotcoldsplit -mergefunc -sroa -loop-simplifycfg -sroa -simple-loop-unswitch -argpromotion -mem2reg -reassociate -reassociate -sroa -loop-predication -sroa -loop-data-prefetch -lcssa -simplifycfg -mem2reg -jump-threading -mem2reg -globaldce -alignment-from-assumptions -alignment-from-assumptions -sroa -gvn-hoist -loop-vectorize -simplifycfg -instsimplify -mem2reg -sroa -sroa -sroa -forceattrs -sroa -loop-load-elim -mem2reg -barrier -mem2reg -loop-deletion -sroa -sroa -sroa -sroa -sroa -barrier -lcssa -sroa -instsimplify -correlated-propagation -sroa -loop-vectorize -loop-guard-widening -sroa -sink -loop-vectorize -sancov -sroa -mergefunc -reassociate -sroa -insert-gcov-profiling -inferattrs -simplifycfg -inject-tli-mappings -sroa -sroa -sroa -sroa -sroa -insert-gcov-profiling -simplifycfg -early-cse -loop-predication -mem2reg -constprop -licm -loop-unroll-and-jam -constmerge -gvn-hoist -sroa -loop-versioning -constmerge -sroa -sroa -mem2reg -strip-dead-prototypes -sroa -mergereturn -inject-tli-mappings -sroa -newgvn -sroa -sroa -insert-gcov-profiling -loop-vectorize -ee-instrument -licm -sroa -sroa -globalsplit -simplifycfg -instnamer -insert-gcov-profiling -sroa -inject-tli-mappings -sroa -ee-instrument -sroa -rpo-functionattrs -sroa -forceattrs -insert-gcov-profiling -newgvn -gvn-hoist -inferattrs -sroa -early-cse -loop-predication -lower-matrix-intrinsics -sroa -forceattrs -mem2reg -rewrite-statepoints-for-gc -sroa -loop-fusion -lowerinvoke -adce -sroa -ee-instrument -forceattrs -dse -dce -lower-matrix-intrinsics -mem2reg -early-cse -forceattrs -sroa -sroa -adce -guard-widening -simplifycfg -called-value-propagation -inject-tli-mappings -sroa -strip-dead-prototypes -gvn-hoist -sroa -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -sroa -globalsplit -strip-nondebug -inferattrs -sroa -gvn-hoist -sroa -simplifycfg -insert-gcov-profiling -inject-tli-mappings -loop-data-prefetch -insert-gcov-profiling -globalopt -loop-unroll-and-jam -functionattrs -gvn-hoist -coro-split -gvn-hoist -speculative-execution -simplifycfg -instcombine -rpo-functionattrs -instcombine -consthoist -early-cse-memssa -instcombine -speculative-execution -instcombine -instcombine -consthoist -rpo-functionattrs -redundant-dbg-inst-elim -inferattrs -functionattrs -simplifycfg -coro-elide -coro-early -simplifycfg -simplifycfg -strip-dead-prototypes -instcombine -instcombine -forceattrs -jump-threading -dse -add-discriminators -coro-split -gvn-hoist -simplifycfg -post-inline-ee-instrument -simplifycfg -early-cse-memssa -ee-instrument -coro-elide -gvn-hoist -licm -instcombine -simplifycfg -instcombine -slsr -instsimplify -instcombine -instcombine -instsimplify -ipconstprop -ipsccp -newgvn -globalsplit -sroa -dse -mem2reg -gvn -lower-guard-intrinsic -post-inline-ee-instrument -gvn-hoist -instcombine -ipsccp -loop-predication -strip -simplifycfg -inferattrs -simplifycfg -simplifycfg -gvn -mergereturn -globalopt -jump-threading -simplifycfg -consthoist -div-rem-pairs -loop-distribute -globalsplit -consthoist -lower-expect -gvn -gvn-hoist -simplifycfg -sroa -jump-threading -newgvn -aggressive-instcombine -aggressive-instcombine -loop-versioning -early-cse-memssa -reassociate -globaldce -coro-cleanup -consthoist -instcombine -dse -pgo-memop-opt -jump-threading -instcombine -constprop -loop-versioning -sancov -reassociate -ipsccp -simplifycfg -simple-loop-unswitch -newgvn -simplifycfg -sancov -callsite-splitting -cross-dso-cfi -jump-threading -early-cse-memssa -coro-split -dse -add-discriminators -add-discriminators -slsr -reassociate -partially-inline-libcalls -cross-dso-cfi -jump-threading -nary-reassociate -die -partially-inline-libcalls -consthoist -slsr +benchmark://cbench-v1/sha,1.5250836120401337,61.03710389137268,opt -correlated-propagation -sroa -simplifycfg -gvn-hoist -dse -reassociate -adce -loop-versioning -constprop -speculative-execution -early-cse-memssa -early-cse-memssa -argpromotion -loop-unroll-and-jam -sroa -constprop -newgvn -loop-vectorize -instcombine -coro-elide -scalarizer -strip -sccp -coro-cleanup -infer-address-spaces -simplifycfg -coro-cleanup -mem2reg -loop-distribute -strip-nondebug -instcombine -mergeicmps -reassociate -loop-vectorize -simplifycfg -tailcallelim -instcombine -sroa -dce -sroa -gvn-hoist -simple-loop-unswitch -loop-guard-widening -die -add-discriminators -adce -early-cse-memssa -ee-instrument -gvn-hoist -die -instsimplify -loop-guard-widening -float2int -instsimplify -prune-eh -gvn-hoist -gvn -strip-dead-prototypes -coro-cleanup -lower-guard-intrinsic -strip-dead-prototypes -instcombine -lower-matrix-intrinsics -dce -lower-guard-intrinsic -prune-eh -early-cse -mergefunc -dce -load-store-vectorizer -gvn-hoist -reassociate -simplifycfg -loop-guard-widening -loweratomic -instcombine -simplifycfg -globalopt -loop-simplify -loop-unroll-and-jam -ipconstprop -mergefunc -instcombine -simple-loop-unswitch -alignment-from-assumptions -gvn-hoist -instcombine -sink -sroa -scalarizer -infer-address-spaces -newgvn -jump-threading -dce -loop-data-prefetch -instcombine -dse -mem2reg -loweratomic -sroa -mldst-motion -elim-avail-extern -instcombine -pgo-memop-opt -newgvn -loop-deletion -lowerinvoke -sccp -nary-reassociate -dse -simplifycfg -simplifycfg -ipconstprop -early-cse-memssa -newgvn -rewrite-statepoints-for-gc -pgo-memop-opt -newgvn -lower-constant-intrinsics -simplifycfg -lowerinvoke -slsr -lower-matrix-intrinsics -instcombine -canonicalize-aliases -loop-versioning -simplifycfg -sccp -lower-matrix-intrinsics -loop-guard-widening -indvars -ipconstprop -coro-split -newgvn -sroa -mergereturn -instcombine -simplifycfg -simplifycfg -adce -deadargelim -die -rpo-functionattrs -lower-guard-intrinsic -pgo-memop-opt -instcombine -add-discriminators -float2int -simplifycfg -lower-expect -slp-vectorizer -ipconstprop -redundant-dbg-inst-elim -elim-avail-extern -simplifycfg -functionattrs -gvn -lower-expect -coro-elide -early-cse-memssa -nary-reassociate -lowerinvoke -globalopt -elim-avail-extern -loop-data-prefetch -lower-matrix-intrinsics -rpo-functionattrs -mergeicmps -barrier -globalopt -consthoist -instsimplify -globaldce -alignment-from-assumptions -inferattrs -sccp -sancov -called-value-propagation -slsr -coro-cleanup -callsite-splitting -redundant-dbg-inst-elim -lower-expect -pgo-memop-opt -partially-inline-libcalls -instcombine -newgvn -dse -globalsplit -ipsccp -newgvn -rewrite-statepoints-for-gc -aggressive-instcombine -flattencfg -lower-matrix-intrinsics -early-cse-memssa -gvn -jump-threading -called-value-propagation -mergefunc -sroa -early-cse -simple-loop-unswitch -sroa -sroa -attributor -strip -infer-address-spaces -pgo-memop-opt -sroa -sroa -sroa -loop-deletion -insert-gcov-profiling -hotcoldsplit -reassociate -loop-reroll -reassociate -simplifycfg -sroa -loop-predication -loop-interchange -sroa -mergefunc -lower-expect -instcombine -sroa -sroa -instsimplify -sancov -lower-guard-intrinsic -sroa -dce -loop-vectorize -float2int -early-cse -sroa -prune-eh -loop-simplifycfg -gvn-hoist -dce -instcombine -lcssa -simplifycfg -barrier -consthoist -scalarizer -dce -strip -attributor -loop-interchange -loop-guard-widening -simplifycfg -loop-deletion -dce -hotcoldsplit -sroa -insert-gcov-profiling -loop-guard-widening -sroa -instcombine -forceattrs -constmerge -infer-address-spaces -early-cse-memssa -loop-guard-widening -instsimplify -sroa -sroa -loop-unroll -mldst-motion -sroa -sroa -strip-debug-declare -reassociate -consthoist -early-cse -loop-deletion -lcssa -sancov -coro-early -newgvn -coro-cleanup -sroa -licm -early-cse -sroa -lcssa -mergereturn -sroa -sroa -mldst-motion -insert-gcov-profiling -scalarizer -instcombine -strip-nondebug -sroa -simplifycfg -sroa -sroa -loop-load-elim -insert-gcov-profiling -sroa -alignment-from-assumptions -sroa -reassociate -loop-unroll-and-jam -mem2reg -coro-cleanup -sroa -lower-guard-intrinsic -dce -barrier -loop-guard-widening -dce -dce -infer-address-spaces -loop-fusion -bdce -dce -early-cse -strip-nondebug -scalarizer -simplifycfg -simplifycfg -loop-deletion -forceattrs -post-inline-ee-instrument -newgvn -reassociate -sroa -early-cse -sroa -early-cse -dce -infer-address-spaces -mergefunc -bdce -indvars -sroa -constprop -nary-reassociate -sroa -loop-data-prefetch -simplifycfg -globalsplit -libcalls-shrinkwrap -sroa -gvn-hoist -constprop -loop-simplifycfg -simplifycfg -libcalls-shrinkwrap -dce -simplifycfg -early-cse -sink -add-discriminators -inferattrs -newgvn -sroa -simplifycfg -lower-constant-intrinsics -sroa -loop-distribute -gvn-hoist -loop-simplifycfg -loop-versioning -coro-split -correlated-propagation -simplifycfg -simplifycfg -lower-guard-intrinsic -adce -simplifycfg -gvn-hoist -mergeicmps -canonicalize-aliases -simplifycfg -inject-tli-mappings -forceattrs -libcalls-shrinkwrap -early-cse -insert-gcov-profiling -adce -lower-widenable-condition -scalarizer -dce -sroa -loop-load-elim -loop-sink -newgvn -inject-tli-mappings -lower-matrix-intrinsics -loweratomic -ipconstprop -sroa -coro-early -sroa -early-cse-memssa -sroa -globaldce -sroa -sroa -lcssa -sroa -loop-data-prefetch -globalopt -ee-instrument -sroa -gvn-hoist -lcssa -licm -rewrite-statepoints-for-gc -loop-idiom -sroa -loop-deletion -sccp -sroa -simplifycfg -globalsplit -correlated-propagation -loop-simplifycfg -coro-split -barrier -mergereturn -instcombine -globaldce -sroa -instcombine -simplifycfg -newgvn -hotcoldsplit -instcombine -simplifycfg -loop-idiom -canonicalize-aliases -sroa -instcombine -canonicalize-aliases -loop-deletion -mem2reg -adce -newgvn -constmerge -sroa -loop-data-prefetch -loop-data-prefetch -reassociate -canonicalize-aliases -forceattrs -sccp -sroa -insert-gcov-profiling -loop-data-prefetch -consthoist -loop-guard-widening -coro-cleanup -loop-unroll-and-jam -lower-widenable-condition -constmerge -strip -loop-data-prefetch -sccp -flattencfg -instcombine -loop-load-elim -dse -early-cse -simplifycfg -instcombine -gvn-hoist -correlated-propagation -nary-reassociate -jump-threading -loop-data-prefetch -instsimplify -consthoist -adce -coro-cleanup -pgo-memop-opt -alignment-from-assumptions -simplifycfg -instcombine -lower-guard-intrinsic -lower-guard-intrinsic -mergereturn -sroa -name-anon-globals -gvn-hoist -div-rem-pairs -consthoist -sroa -sccp -prune-eh -instcombine -insert-gcov-profiling -ipconstprop -early-cse -mergefunc -early-cse -consthoist -lcssa -flattencfg -early-cse-memssa -lowerinvoke -loop-fusion -tailcallelim -tailcallelim -sroa -simplifycfg -tailcallelim -sroa -correlated-propagation -coro-early -mergefunc -simplifycfg -ipsccp -gvn-hoist -lcssa -instcombine -instcombine -lowerinvoke -consthoist -sccp -correlated-propagation -early-cse-memssa -strip -indvars -bdce -newgvn -infer-address-spaces -coro-split -ee-instrument -gvn-hoist -mergefunc -loop-deletion -loop-load-elim -gvn-hoist -instcombine -mergefunc -gvn-hoist -alignment-from-assumptions -memcpyopt -consthoist -simplifycfg -globaldce -strip-dead-prototypes -loop-data-prefetch -sroa -sroa -loop-interchange -simplifycfg -early-cse -mem2reg -jump-threading -dse -sroa -aggressive-instcombine -globaldce -jump-threading -early-cse -loop-sink -ee-instrument -strip-debug-declare -sroa -insert-gcov-profiling -sancov -inferattrs -speculative-execution -mergeicmps -lower-matrix-intrinsics -loop-guard-widening -constprop -barrier -coro-cleanup -dce -loop-guard-widening -sroa -early-cse -instsimplify -sccp -sroa -gvn-hoist -sroa -loop-data-prefetch -sroa -loop-distribute -sroa -prune-eh -ipconstprop -jump-threading -instcombine -inject-tli-mappings -sroa -dce -newgvn -loop-deletion -barrier -infer-address-spaces -mergereturn -instsimplify -strip-dead-prototypes -nary-reassociate -consthoist -ipsccp -aggressive-instcombine -sroa -lower-guard-intrinsic -simplifycfg -early-cse-memssa -gvn-hoist -reassociate -sroa -sroa -canonicalize-aliases -constprop -called-value-propagation -bdce -lcssa -sroa -gvn-hoist -rewrite-statepoints-for-gc -instsimplify -dce -sroa -sroa -memcpyopt -early-cse-memssa -lower-guard-intrinsic -gvn-hoist -pgo-memop-opt -lower-widenable-condition -sroa -instcombine -coro-elide -early-cse -licm -instcombine -guard-widening -early-cse-memssa -newgvn -instcombine -mem2reg -globaldce -simplifycfg -early-cse-memssa -sroa -lower-guard-intrinsic -sroa -lowerinvoke -rewrite-statepoints-for-gc -ipconstprop -barrier -sroa -globalopt -div-rem-pairs -gvn -gvn-hoist -gvn -inferattrs -globaldce -mergeicmps -mldst-motion -instcombine -strip-nondebug -newgvn -die -nary-reassociate -strip-debug-declare -gvn-hoist -instnamer -mergefunc -cross-dso-cfi -jump-threading -early-cse-memssa -dse -die -consthoist -loop-versioning -mergeicmps -strip-nondebug -sancov -globalopt -jump-threading -simplifycfg -slp-vectorizer -slsr -instcombine -libcalls-shrinkwrap -attributor -gvn -early-cse -sancov -constprop -newgvn -simplifycfg -slp-vectorizer -loop-interchange -tailcallelim +benchmark://cbench-v1/stringsearch,1.0163934426229506,61.0886914730072,opt -sroa -simplifycfg -div-rem-pairs -instcombine -jump-threading -simplifycfg -called-value-propagation -deadargelim -loop-simplifycfg -name-anon-globals -cross-dso-cfi -argpromotion -reassociate -loop-data-prefetch -globalopt -simplifycfg -redundant-dbg-inst-elim -simplifycfg -name-anon-globals -die -lowerinvoke -instcombine -newgvn -instcombine -elim-avail-extern -simplifycfg -speculative-execution -ipconstprop -gvn-hoist -rpo-functionattrs -reassociate -gvn -loop-load-elim -float2int -infer-address-spaces -coro-cleanup -strip-dead-prototypes -lower-expect -strip -instcombine -simplifycfg -dse -lcssa -loop-load-elim -instcombine -dce -slsr -coro-elide -early-cse -sroa -early-cse -memcpyopt -dce -simplifycfg -gvn-hoist -newgvn -forceattrs -consthoist -insert-gcov-profiling -newgvn -early-cse-memssa -sroa -tailcallelim -called-value-propagation -barrier -loweratomic -licm -dce -aggressive-instcombine -instcombine -strip-nondebug -dce -coro-elide -globalopt -simplifycfg -mldst-motion -prune-eh -lowerinvoke -reassociate -early-cse-memssa -nary-reassociate -lower-constant-intrinsics -dce -instcombine -sancov -loop-simplify -lower-constant-intrinsics -nary-reassociate -lowerinvoke -loop-deletion -insert-gcov-profiling -lower-expect -loop-data-prefetch -licm -globalsplit -globaldce -always-inline -adce -infer-address-spaces -sancov -die -sink -redundant-dbg-inst-elim -simplifycfg -functionattrs -callsite-splitting -globalsplit -die -sroa -simplifycfg -sink -reassociate -gvn-hoist -strip-debug-declare -simplifycfg -lower-expect -post-inline-ee-instrument -float2int -simplifycfg -always-inline -mergefunc -gvn -strip-nondebug -loop-simplify -aggressive-instcombine -inferattrs -scalarizer -mldst-motion -jump-threading -instcombine -dse -gvn-hoist -instcombine -elim-avail-extern -simplifycfg -gvn-hoist -simplifycfg -lower-matrix-intrinsics -barrier -separate-const-offset-from-gep -jump-threading -gvn-hoist -consthoist -early-cse -instcombine -loop-idiom -loop-unroll-and-jam -lower-constant-intrinsics -slsr -consthoist -loop-fusion -lower-constant-intrinsics -newgvn -prune-eh -sancov -gvn -loweratomic -coro-split -float2int -dse -instcombine -newgvn -simplifycfg -globaldce -globalsplit -name-anon-globals -post-inline-ee-instrument -simplifycfg -instcombine -separate-const-offset-from-gep -coro-split -gvn -dse -called-value-propagation -instcombine -correlated-propagation -mergereturn -redundant-dbg-inst-elim -gvn -newgvn -coro-cleanup -strip-dead-prototypes -callsite-splitting -gvn-hoist -instcombine -loop-versioning -mergefunc -sancov -tailcallelim -callsite-splitting -instcombine -loop-simplify -instcombine -early-cse -coro-early -coro-elide -simplifycfg -globalsplit -forceattrs -simplifycfg -sroa -loop-load-elim -globalopt -lcssa -infer-address-spaces -sroa -lower-widenable-condition -sccp -sroa -inject-tli-mappings -forceattrs -infer-address-spaces -sroa -insert-gcov-profiling -sroa -globaldce -sroa -sroa -instsimplify -lower-guard-intrinsic -loop-load-elim -sroa -loop-idiom -sroa -constprop -reassociate -sroa -loop-vectorize -loop-reduce -lower-matrix-intrinsics -rewrite-statepoints-for-gc -sroa -break-crit-edges -inject-tli-mappings -coro-cleanup -speculative-execution -deadargelim -sroa -sroa -early-cse -loop-data-prefetch -mem2reg -lcssa -sroa -scalarizer -sroa -instsimplify -always-inline -lcssa -gvn-hoist -reassociate -gvn-hoist -mem2reg -sroa -float2int -loop-load-elim -pgo-memop-opt -loop-unroll-and-jam -lcssa -sroa -coro-early -coro-cleanup -correlated-propagation -early-cse-memssa -mergereturn -early-cse -mergereturn -strip-nondebug -indvars -sroa -nary-reassociate -sroa -sccp -dce -sroa -slp-vectorizer -ee-instrument -reassociate -dce -ipsccp -infer-address-spaces -lower-constant-intrinsics -speculative-execution -sroa -loop-versioning -globalopt -indvars -instcombine -scalarizer -constprop -functionattrs -lower-guard-intrinsic -forceattrs -ee-instrument -aggressive-instcombine -loop-data-prefetch -prune-eh -infer-address-spaces -constprop -tailcallelim -consthoist -sccp -dce -simplifycfg -sroa -strip-dead-prototypes -lcssa -forceattrs -mem2reg -simple-loop-unswitch -nary-reassociate -sroa -load-store-vectorizer -infer-address-spaces -loop-interchange -newgvn -infer-address-spaces -loop-guard-widening -ee-instrument -indvars -sroa -instcombine -sroa -sroa -lowerinvoke -simplifycfg -div-rem-pairs -insert-gcov-profiling -speculative-execution -loop-unroll-and-jam -simplifycfg -argpromotion -indvars -coro-cleanup -aggressive-instcombine -lcssa -instcombine -correlated-propagation -barrier -early-cse -loop-unroll-and-jam -simplifycfg -instsimplify -sroa -insert-gcov-profiling -correlated-propagation -sroa -pgo-memop-opt -gvn-hoist -gvn-hoist -coro-cleanup -sroa -simplifycfg -gvn-hoist -mem2reg -insert-gcov-profiling -lcssa -adce -speculative-execution -argpromotion -globalsplit -lower-constant-intrinsics -prune-eh -simplifycfg -argpromotion -globaldce -lcssa -instsimplify -lowerinvoke -dse -instcombine -sroa -partially-inline-libcalls -loop-load-elim -dce -insert-gcov-profiling -sroa -sroa -correlated-propagation -sink -sroa -gvn-hoist -ipsccp -loop-predication -simplifycfg -dse -sroa -sancov -instnamer -simplifycfg -barrier -sink -early-cse -early-cse-memssa -pgo-memop-opt -lowerinvoke -early-cse-memssa -inferattrs -loop-data-prefetch -scalarizer -pgo-memop-opt -coro-early -newgvn -newgvn -cross-dso-cfi -loop-distribute -instcombine -reassociate -dse -newgvn -cross-dso-cfi -strip-nondebug -simplifycfg -instcombine -simplifycfg -adce -sancov -loop-distribute -instsimplify -ipconstprop -adce -jump-threading -newgvn -early-cse-memssa -loop-load-elim -instcombine -lower-matrix-intrinsics -loop-data-prefetch -simplifycfg -insert-gcov-profiling -gvn-hoist -globaldce -coro-elide -instcombine -sink -coro-elide -sancov -instcombine -consthoist -gvn-hoist -early-cse-memssa -early-cse -dse -gvn-hoist -barrier -infer-address-spaces -inject-tli-mappings -instsimplify -barrier -loop-load-elim -lowerinvoke -newgvn -instcombine -flattencfg -simplifycfg -indvars -globalsplit -prune-eh -lower-matrix-intrinsics -lower-expect -sancov -dce -load-store-vectorizer -inferattrs -adce -loop-data-prefetch -mergefunc -loop-sink -sancov -mem2reg -loop-data-prefetch -lower-guard-intrinsic -pgo-memop-opt -div-rem-pairs -loop-load-elim -simplifycfg -globalopt -simplifycfg -simplifycfg -mergefunc -loweratomic -strip-nondebug -loop-unroll-and-jam -early-cse -ipsccp -forceattrs -globalopt -simplifycfg -coro-elide -simplifycfg -canonicalize-aliases -simplifycfg -instcombine -newgvn -gvn -simplifycfg -barrier -early-cse -loop-guard-widening -simplifycfg -instcombine -callsite-splitting -instcombine -instsimplify -always-inline -scalarizer -simplifycfg -early-cse -correlated-propagation -simplifycfg -instcombine -sccp -simplifycfg -mergefunc -simplifycfg -instcombine -newgvn -canonicalize-aliases -gvn-hoist -dse -simplifycfg -dse -lower-expect -simplifycfg -slsr -newgvn -mergefunc -newgvn -reassociate -ipsccp -simplifycfg -mergeicmps -aggressive-instcombine -simplifycfg -newgvn -gvn -newgvn -simplifycfg -tailcallelim -simplifycfg -consthoist -loop-instsimplify -jump-threading -callsite-splitting -sink -instcombine -simplifycfg -newgvn -coro-split -float2int -redundant-dbg-inst-elim -lower-matrix-intrinsics -loop-load-elim -loop-guard-widening -pgo-memop-opt -simplifycfg -simplifycfg -lower-widenable-condition -simplifycfg -canonicalize-aliases -die -simplifycfg -instsimplify -simplifycfg -instcombine -newgvn -newgvn -redundant-dbg-inst-elim -strip-nondebug -mergeicmps -simplifycfg -tailcallelim -loop-guard-widening -lower-expect -called-value-propagation -dse -ipconstprop -post-inline-ee-instrument -instcombine -lowerinvoke -slp-vectorizer -ipsccp -instcombine -canonicalize-aliases -strip-dead-prototypes -loop-guard-widening -tailcallelim -newgvn -lower-constant-intrinsics -float2int -prune-eh -ipsccp -coro-split -gvn-hoist -coro-cleanup -simplifycfg -loop-guard-widening -simplifycfg -libcalls-shrinkwrap -sccp -lowerinvoke -slsr -bdce -instcombine -sink -strip-dead-prototypes -gvn-hoist -inferattrs -instsimplify -sccp -instcombine -sccp -pgo-memop-opt -lower-constant-intrinsics -ipsccp -instcombine -adce -simplifycfg -early-cse-memssa -instcombine -die -float2int -simplifycfg -simplifycfg -always-inline -early-cse-memssa -nary-reassociate -pgo-memop-opt -newgvn -strip-nondebug -instcombine -float2int -newgvn -loop-guard-widening -simplifycfg -simplifycfg -loop-guard-widening -scalarizer -simplifycfg -mergefunc -jump-threading -infer-address-spaces -newgvn -early-cse-memssa -aggressive-instcombine -strip-debug-declare -sancov -strip-dead-prototypes -sccp -consthoist -early-cse -lower-matrix-intrinsics -insert-gcov-profiling -sroa -slsr -dce -strip-dead-prototypes -early-cse -early-cse-memssa -post-inline-ee-instrument -partially-inline-libcalls -lower-matrix-intrinsics -lower-matrix-intrinsics -dse -strip-nondebug -slsr -loop-versioning -post-inline-ee-instrument -elim-avail-extern -strip -lower-expect -gvn -loop-distribute -early-cse-memssa -post-inline-ee-instrument -newgvn -flattencfg -slp-vectorizer -lower-constant-intrinsics -name-anon-globals -gvn -jump-threading -consthoist -gvn -adce -sroa -simplifycfg -early-cse -tailcallelim -dse -slp-vectorizer -lower-widenable-condition -instcombine -partially-inline-libcalls -lower-widenable-condition -tailcallelim -simplifycfg -pgo-memop-opt -name-anon-globals -cross-dso-cfi +benchmark://cbench-v1/tiff2bw,1.0445932877252035,81.18065047264099,opt -loop-vectorize -div-rem-pairs -separate-const-offset-from-gep -sroa -instcombine -newgvn -loop-guard-widening -reassociate -simplifycfg -lower-expect -lower-widenable-condition -lower-expect -bdce -newgvn -early-cse -gvn -mergeicmps -guard-widening -libcalls-shrinkwrap -loop-versioning -attributor -constmerge -rpo-functionattrs -speculative-execution -early-cse-memssa -gvn -rewrite-statepoints-for-gc -gvn -loop-versioning -scalarizer -lower-constant-intrinsics -lower-widenable-condition -simplifycfg -redundant-dbg-inst-elim -pgo-memop-opt -slp-vectorizer -float2int -adce -deadargelim -float2int -strip-debug-declare -redundant-dbg-inst-elim -slsr -rewrite-statepoints-for-gc -die -instcombine -slsr -dce -loweratomic -add-discriminators -lower-constant-intrinsics -sccp -constprop -aggressive-instcombine -lower-widenable-condition -cross-dso-cfi -coro-elide -newgvn -dce -reassociate -sccp -instsimplify -lower-expect -strip-dead-prototypes -strip-debug-declare -coro-elide -instsimplify -mldst-motion -early-cse-memssa -globalsplit -insert-gcov-profiling -sroa -always-inline -slp-vectorizer -callsite-splitting -newgvn -mldst-motion -simplifycfg -strip-dead-prototypes -aggressive-instcombine -called-value-propagation -newgvn -callsite-splitting -loop-versioning -early-cse -gvn -newgvn -flattencfg -rpo-functionattrs -globalopt -mergereturn -strip-dead-prototypes -die -instsimplify -redundant-dbg-inst-elim -reassociate -newgvn -cross-dso-cfi -instcombine -redundant-dbg-inst-elim -loop-data-prefetch -simplifycfg -slsr -strip-nondebug -simplifycfg -mergereturn -loop-guard-widening -insert-gcov-profiling -simplifycfg -scalarizer -instcombine -partially-inline-libcalls -pgo-memop-opt -early-cse-memssa -coro-cleanup -sink -newgvn -mergereturn -prune-eh -loweratomic -gvn-hoist -simplifycfg -guard-widening -sccp -add-discriminators -instcombine -inject-tli-mappings -constmerge -simplifycfg -loop-versioning -instcombine -gvn -newgvn -ipconstprop -lower-matrix-intrinsics -loop-versioning -adce -reassociate -slp-vectorizer -gvn -licm -simplifycfg -loop-versioning -redundant-dbg-inst-elim -gvn -loop-load-elim -instcombine -newgvn -strip-nondebug -inject-tli-mappings -newgvn -simplifycfg -pgo-memop-opt -barrier -reassociate -gvn-hoist -ipconstprop -globaldce -float2int -always-inline -infer-address-spaces -lower-matrix-intrinsics -loop-data-prefetch -jump-threading -lowerinvoke -simplifycfg -constprop -globalopt -gvn-hoist -lower-guard-intrinsic -mergereturn -lower-expect -float2int -instcombine -instcombine -gvn -early-cse-memssa -cross-dso-cfi -simplifycfg -always-inline -rpo-functionattrs -instcombine -aggressive-instcombine -early-cse-memssa -flattencfg -simplifycfg -inject-tli-mappings -newgvn -newgvn -instcombine -instnamer -rpo-functionattrs -instcombine -early-cse-memssa -instcombine -die -aggressive-instcombine -adce -separate-const-offset-from-gep -speculative-execution -lowerinvoke -globalopt -ipconstprop -strip-nondebug -early-cse-memssa -simple-loop-unswitch -loop-load-elim -loop-unroll-and-jam -post-inline-ee-instrument -gvn -gvn -loop-versioning -licm -adce -indvars -lower-expect -coro-elide -gvn-hoist -gvn-hoist -instsimplify -canonicalize-aliases -callsite-splitting -strip-debug-declare -globalsplit -add-discriminators -instnamer -aggressive-instcombine -instcombine -early-cse-memssa -die -callsite-splitting -consthoist -pgo-memop-opt -strip-debug-declare -tailcallelim -aggressive-instcombine -jump-threading -loop-vectorize -simplifycfg -loop-deletion -licm -elim-avail-extern -name-anon-globals -speculative-execution -simplifycfg -consthoist -functionattrs -sroa -alignment-from-assumptions -loop-versioning -float2int -functionattrs -guard-widening -ipsccp -early-cse -coro-elide -name-anon-globals -sancov -deadargelim -strip-nondebug -memcpyopt -strip-nondebug -argpromotion -globalsplit -strip-dead-prototypes -nary-reassociate -called-value-propagation -speculative-execution -float2int -div-rem-pairs -jump-threading -elim-avail-extern -die -newgvn -always-inline -lowerinvoke -inferattrs -pgo-memop-opt -speculative-execution -early-cse-memssa -gvn -simplifycfg -instcombine -lower-expect -globaldce -simplifycfg -simple-loop-unswitch -early-cse -scalarizer -dse -loop-unroll-and-jam -elim-avail-extern -gvn-hoist -newgvn -alignment-from-assumptions -ipconstprop -simplifycfg -redundant-dbg-inst-elim -rpo-functionattrs -jump-threading -slsr -dse -dse -reassociate -gvn -always-inline -cross-dso-cfi -elim-avail-extern -loop-data-prefetch -redundant-dbg-inst-elim -aggressive-instcombine -simplifycfg -redundant-dbg-inst-elim -sancov -insert-gcov-profiling -jump-threading -early-cse -inferattrs -callsite-splitting -gvn-hoist -slp-vectorizer -ipsccp -float2int -ipconstprop -jump-threading -speculative-execution -callsite-splitting -coro-split -canonicalize-aliases -instcombine -dse -scalarizer -dce -lowerinvoke -simplifycfg -simplifycfg -loop-versioning -flattencfg -die -die -rewrite-statepoints-for-gc -newgvn -prune-eh -simplifycfg -die -gvn-hoist -sroa -consthoist -post-inline-ee-instrument -instcombine -coro-split -cross-dso-cfi -jump-threading -reassociate -prune-eh -pgo-memop-opt -loweratomic -lower-expect -strip -mergeicmps -argpromotion -float2int -reassociate -sancov -globalsplit -argpromotion -slp-vectorizer -rewrite-statepoints-for-gc -early-cse-memssa -indvars -globaldce -cross-dso-cfi -loop-vectorize -instsimplify -elim-avail-extern -strip-nondebug -jump-threading -lower-widenable-condition -instsimplify -speculative-execution -argpromotion -early-cse -mergeicmps -barrier -lower-constant-intrinsics -early-cse-memssa -loop-versioning -guard-widening -instcombine -partially-inline-libcalls -callsite-splitting -flattencfg -lower-expect -lcssa -reassociate -newgvn -ipsccp -elim-avail-extern -coro-elide -strip-debug-declare -simplifycfg -simplifycfg -gvn -instsimplify -gvn -sancov -coro-elide -prune-eh -lowerinvoke -loop-data-prefetch -loop-simplify -adce -early-cse-memssa -adce -coro-elide -gvn -redundant-dbg-inst-elim -post-inline-ee-instrument -adce -callsite-splitting -instsimplify -float2int -forceattrs -prune-eh -coro-cleanup -early-cse-memssa -prune-eh -jump-threading -mergeicmps -loop-instsimplify -simplifycfg -lower-guard-intrinsic -simplifycfg -lower-expect -rpo-functionattrs -prune-eh -strip-dead-prototypes -loop-unroll-and-jam -instcombine -gvn-hoist -partially-inline-libcalls -float2int -simplifycfg -div-rem-pairs -slp-vectorizer -gvn-hoist -gvn -loop-sink -instcombine -die -lower-widenable-condition -early-cse-memssa -loop-fusion -elim-avail-extern -functionattrs -newgvn -lower-constant-intrinsics -dse -instcombine -inject-tli-mappings -instcombine -die -lowerinvoke -simplifycfg -early-cse-memssa -gvn -globalopt -gvn -gvn -early-cse-memssa -flattencfg -coro-cleanup -constprop -loop-data-prefetch -loop-versioning -pgo-memop-opt -gvn-hoist -gvn -scalarizer -early-cse-memssa -slsr -instcombine -newgvn -slp-vectorizer -die -instnamer -loop-versioning -constmerge -guard-widening -always-inline -elim-avail-extern -slp-vectorizer -callsite-splitting -simplifycfg -reassociate -callsite-splitting -speculative-execution -partially-inline-libcalls -callsite-splitting -adce -functionattrs -lower-guard-intrinsic -slp-vectorizer -prune-eh -loop-versioning -pgo-memop-opt -instcombine -simple-loop-unswitch -coro-split -aggressive-instcombine -die -globalopt -simplifycfg -instcombine -loop-data-prefetch -aggressive-instcombine -gvn -slsr -lower-matrix-intrinsics -strip -redundant-dbg-inst-elim -reassociate -strip-nondebug -die -nary-reassociate -simplifycfg -lower-constant-intrinsics -alignment-from-assumptions -sccp -die -inferattrs -separate-const-offset-from-gep -redundant-dbg-inst-elim -slp-vectorizer -sroa -mergefunc -sroa -sccp -loweratomic -instnamer -post-inline-ee-instrument -dce -consthoist -early-cse-memssa -gvn -barrier -cross-dso-cfi -sancov -gvn-hoist -strip-debug-declare -lower-matrix-intrinsics -loop-unroll-and-jam -mergereturn -early-cse -newgvn -loop-versioning -memcpyopt -scalarizer -lower-expect -globalopt -deadargelim -instsimplify -post-inline-ee-instrument -slsr -correlated-propagation -early-cse -callsite-splitting -globaldce -coro-cleanup -gvn -instcombine -coro-split -cross-dso-cfi -simplifycfg -newgvn -aggressive-instcombine -name-anon-globals -newgvn -slsr -instcombine -mem2reg -instcombine -mergefunc -aggressive-instcombine -mergeicmps -coro-elide -lower-guard-intrinsic -globaldce -callsite-splitting -sroa -loop-versioning -nary-reassociate -strip -gvn -adce -instcombine -gvn-hoist -gvn-hoist -die -functionattrs -jump-threading -gvn-hoist -early-cse-memssa -prune-eh -consthoist -dce -add-discriminators -reassociate -slsr -sancov -globaldce -memcpyopt -instcombine -globaldce -lower-constant-intrinsics -jump-threading -early-cse -globaldce -coro-elide -name-anon-globals -die -pgo-memop-opt -lower-expect -strip-dead-prototypes -separate-const-offset-from-gep -float2int -aggressive-instcombine -newgvn -scalarizer -instcombine -correlated-propagation -strip-dead-prototypes -aggressive-instcombine -instcombine -gvn-hoist -instnamer -post-inline-ee-instrument -gvn-hoist -inject-tli-mappings -gvn -post-inline-ee-instrument -ipconstprop -sancov -nary-reassociate -newgvn -coro-elide -simplifycfg -die -elim-avail-extern -strip -callsite-splitting -coro-split -mergefunc -gvn-hoist -lower-constant-intrinsics -dse -slp-vectorizer -partially-inline-libcalls -instcombine -slsr -lowerinvoke -partially-inline-libcalls -adce -newgvn -pgo-memop-opt -aggressive-instcombine -canonicalize-aliases -strip-dead-prototypes -sccp -aggressive-instcombine -float2int -deadargelim -aggressive-instcombine -separate-const-offset-from-gep -simplifycfg -gvn -redundant-dbg-inst-elim -inferattrs -nary-reassociate -adce -dse -simplifycfg -newgvn -simplifycfg -simplifycfg -instcombine -simplifycfg -adce -ipconstprop -redundant-dbg-inst-elim -loop-vectorize -mergereturn -functionattrs -guard-widening -sroa -instcombine -lower-expect -pgo-memop-opt -early-cse-memssa -gvn +benchmark://cbench-v1/tiffdither,1.0488754325259517,80.645259141922,opt -sroa -simplifycfg -forceattrs -rpo-functionattrs -dse -adce -jump-threading -mergefunc -simplifycfg -instnamer -early-cse-memssa -early-cse -simplifycfg -early-cse-memssa -loweratomic -gvn-hoist -dse -simplifycfg -loop-distribute -dse -sroa -gvn-hoist -consthoist -div-rem-pairs -early-cse-memssa -gvn-hoist -separate-const-offset-from-gep -loop-guard-widening -add-discriminators -globalopt -coro-split -coro-split -early-cse -strip-nondebug -correlated-propagation -prune-eh -adce -simplifycfg -aggressive-instcombine -instsimplify -lowerinvoke -callsite-splitting -constprop -simplifycfg -forceattrs -gvn-hoist -tailcallelim -sroa -early-cse -lower-matrix-intrinsics -early-cse-memssa -loop-unroll-and-jam -slsr -rpo-functionattrs -simple-loop-unswitch -early-cse-memssa -name-anon-globals -early-cse -instcombine -newgvn -strip-dead-prototypes -loop-load-elim -strip-nondebug -alignment-from-assumptions -strip -gvn-hoist -jump-threading -simplifycfg -simplifycfg -licm -newgvn -tailcallelim -instcombine -simplifycfg -deadargelim -elim-avail-extern -instcombine -sroa -mergefunc -redundant-dbg-inst-elim -correlated-propagation -memcpyopt -loop-unroll-and-jam -instcombine -adce -rewrite-statepoints-for-gc -strip-debug-declare -elim-avail-extern -simplifycfg -jump-threading -newgvn -forceattrs -simplifycfg -lower-guard-intrinsic -instnamer -redundant-dbg-inst-elim -globalopt -loop-guard-widening -nary-reassociate -called-value-propagation -nary-reassociate -mergefunc -ipsccp -scalarizer -globalsplit -mergefunc -mergeicmps -dce -simplifycfg -mem2reg -consthoist -gvn -slp-vectorizer -infer-address-spaces -aggressive-instcombine -simplifycfg -ipsccp -constmerge -loop-load-elim -loop-data-prefetch -ipconstprop -loop-versioning -rpo-functionattrs -reassociate -gvn -sccp -aggressive-instcombine -sroa -pgo-memop-opt -gvn -pgo-memop-opt -rpo-functionattrs -guard-widening -deadargelim -early-cse -loop-data-prefetch -slp-vectorizer -simplifycfg -gvn -loop-versioning-licm -div-rem-pairs -float2int -simplifycfg -instcombine -callsite-splitting -prune-eh -die -die -called-value-propagation -pgo-memop-opt -strip-dead-prototypes -instsimplify -lower-expect -early-cse -rpo-functionattrs -mergereturn -lower-expect -loop-fusion -instcombine -div-rem-pairs -coro-elide -sroa -scalarizer -speculative-execution -die -simple-loop-unswitch -simplifycfg -reassociate -sccp -consthoist -instcombine -instsimplify -mergeicmps -lower-expect -sccp -mergeicmps -simplifycfg -coro-cleanup -lcssa -redundant-dbg-inst-elim -gvn-hoist -inferattrs -deadargelim -newgvn -gvn -strip-debug-declare -coro-split -tailcallelim -mergeicmps -lower-constant-intrinsics -consthoist -lower-matrix-intrinsics -early-cse-memssa -reassociate -sroa -loop-vectorize -lower-matrix-intrinsics -aggressive-instcombine -globalopt -strip-dead-prototypes -ipsccp -simplifycfg -speculative-execution -inferattrs -early-cse-memssa -callsite-splitting -gvn-hoist -mergefunc -strip-dead-prototypes -add-discriminators -gvn -jump-threading -dce -loop-data-prefetch -inferattrs -canonicalize-aliases -gvn-hoist -float2int -instcombine -lower-matrix-intrinsics -post-inline-ee-instrument -early-cse-memssa -nary-reassociate -loop-versioning -lower-matrix-intrinsics -libcalls-shrinkwrap -instcombine -globaldce -gvn -instcombine -strip-dead-prototypes -strip-dead-prototypes -jump-threading -scalarizer -post-inline-ee-instrument -infer-address-spaces -loop-guard-widening -coro-cleanup -consthoist -simplifycfg -instcombine -partially-inline-libcalls -slp-vectorizer -post-inline-ee-instrument -div-rem-pairs -functionattrs -elim-avail-extern -constprop -newgvn -insert-gcov-profiling -callsite-splitting -lower-widenable-condition -globalopt -float2int -globaldce -argpromotion -instsimplify -consthoist -strip-nondebug -deadargelim -simplifycfg -lower-widenable-condition -deadargelim -coro-elide -correlated-propagation -loop-fusion -early-cse-memssa -jump-threading -loop-versioning -coro-elide -dse -adce -globaldce -newgvn -early-cse-memssa -inject-tli-mappings -slsr -simplifycfg -rewrite-statepoints-for-gc -functionattrs -mergefunc -globalsplit -dce -gvn -gvn-hoist -separate-const-offset-from-gep -reassociate -mergefunc -instcombine -simplifycfg -strip-nondebug -early-cse-memssa -mergefunc -cross-dso-cfi -tailcallelim -newgvn -post-inline-ee-instrument -mergefunc -die -globaldce -mergefunc -instcombine -mergereturn -lowerinvoke -prune-eh -indvars -sancov -break-crit-edges -instsimplify -sroa -strip-nondebug -gvn-hoist -dce -insert-gcov-profiling -loop-load-elim -gvn-hoist -simplifycfg -strip-nondebug -globalopt -consthoist -pgo-memop-opt -lower-matrix-intrinsics -loweratomic -cross-dso-cfi -instcombine -lower-widenable-condition -sccp -cross-dso-cfi -simplifycfg -flattencfg -div-rem-pairs -die -callsite-splitting -newgvn -insert-gcov-profiling -globalsplit -sancov -gvn-hoist -lower-expect -simplifycfg -simplifycfg -gvn-hoist -redundant-dbg-inst-elim -instnamer -gvn -libcalls-shrinkwrap -post-inline-ee-instrument -newgvn -newgvn -newgvn -slsr -mergefunc -newgvn -mergefunc -globalsplit -sancov -strip-nondebug -lower-constant-intrinsics -instnamer -lower-widenable-condition -instcombine -memcpyopt -slp-vectorizer -libcalls-shrinkwrap -rpo-functionattrs -newgvn -early-cse-memssa -lower-constant-intrinsics -instnamer -aggressive-instcombine -ipsccp -gvn-hoist -redundant-dbg-inst-elim -simplifycfg -loop-unroll-and-jam -simplifycfg -sccp -lower-expect -partially-inline-libcalls -simplifycfg -mem2reg -separate-const-offset-from-gep -early-cse-memssa -simplifycfg -lower-matrix-intrinsics -gvn-hoist -globalopt -ipsccp -redundant-dbg-inst-elim -callsite-splitting -inferattrs -simplifycfg -deadargelim -globaldce -gvn-hoist -rpo-functionattrs -simplifycfg -die -indvars -elim-avail-extern -early-cse-memssa -coro-split -early-cse-memssa -simplifycfg -callsite-splitting -simplifycfg -scalarizer -instcombine -gvn-hoist -die -die -lower-widenable-condition -alignment-from-assumptions -simplifycfg -dse -strip -redundant-dbg-inst-elim -simplifycfg -canonicalize-aliases -instcombine -early-cse -correlated-propagation -add-discriminators -consthoist -constmerge -scalarizer -gvn-hoist -float2int -nary-reassociate -functionattrs -simplifycfg -strip-dead-prototypes -globalsplit -consthoist -gvn-hoist -loop-data-prefetch -partially-inline-libcalls -rewrite-statepoints-for-gc -coro-elide -ee-instrument -consthoist -instcombine -jump-threading -canonicalize-aliases -guard-widening -elim-avail-extern -early-cse-memssa -callsite-splitting -libcalls-shrinkwrap -slp-vectorizer -jump-threading -cross-dso-cfi -early-cse -instsimplify -sccp -mergeicmps -redundant-dbg-inst-elim -consthoist -simple-loop-unswitch -newgvn -flattencfg -strip-dead-prototypes -sroa -speculative-execution -strip-nondebug -simplifycfg -instcombine -newgvn -speculative-execution -instcombine -instcombine -lower-matrix-intrinsics -insert-gcov-profiling -slsr -elim-avail-extern -loop-data-prefetch -instsimplify -irce -simplifycfg -correlated-propagation -simplifycfg -instcombine -ipconstprop -tailcallelim -strip-dead-prototypes -functionattrs -prune-eh -jump-threading -scalarizer -strip-dead-prototypes -instcombine -inferattrs -loop-versioning -guard-widening -correlated-propagation -early-cse-memssa -newgvn -scalarizer -float2int -strip-dead-prototypes -simplifycfg -callsite-splitting -consthoist -partially-inline-libcalls -ipconstprop -sink -coro-split -sancov -jump-threading -aggressive-instcombine -mergefunc -called-value-propagation -early-cse-memssa -consthoist -newgvn -early-cse -simplifycfg -early-cse -instnamer -loop-versioning-licm -licm -callsite-splitting -instcombine -jump-threading -simplifycfg -globalsplit -sancov -load-store-vectorizer -coro-elide -jump-threading -loop-data-prefetch -dse -simplifycfg -simplifycfg -slsr -jump-threading -globalopt -coro-elide -reassociate -simplifycfg -jump-threading -early-cse-memssa -infer-address-spaces -lower-widenable-condition -adce -newgvn -float2int -post-inline-ee-instrument -barrier -prune-eh -memcpyopt -pgo-memop-opt -lower-matrix-intrinsics -deadargelim -gvn-hoist -nary-reassociate -jump-threading -guard-widening -jump-threading -insert-gcov-profiling -gvn -constmerge -newgvn -slsr -tailcallelim -scalarizer -rpo-functionattrs -gvn-hoist -argpromotion -instcombine -gvn -nary-reassociate -slsr -newgvn -barrier -div-rem-pairs -simplifycfg -coro-split -instsimplify -coro-cleanup -deadargelim -loop-simplify -reassociate -lowerinvoke -adce -lower-matrix-intrinsics -loop-data-prefetch -lower-matrix-intrinsics -newgvn -coro-split -globalsplit -sancov -consthoist -name-anon-globals -nary-reassociate -newgvn -globalsplit -strip -lower-matrix-intrinsics -strip-dead-prototypes -loop-data-prefetch -instcombine -instnamer -instcombine -loop-data-prefetch -instcombine -float2int -scalarizer -coro-cleanup -gvn -coro-split -scalarizer -globaldce -post-inline-ee-instrument -pgo-memop-opt -loop-data-prefetch -pgo-memop-opt -globalopt -newgvn -aggressive-instcombine -add-discriminators -newgvn -coro-elide -rewrite-statepoints-for-gc -die -deadargelim -coro-elide -mergeicmps -gvn-hoist -pgo-memop-opt -instcombine -loop-sink -instsimplify -strip-debug-declare -instnamer -globalsplit -consthoist -tailcallelim -always-inline -forceattrs -dse -simplifycfg -float2int -simplifycfg -ipconstprop -instcombine -aggressive-instcombine -early-cse -instcombine -newgvn -deadargelim -ipsccp -instcombine -consthoist -forceattrs -early-cse-memssa -instcombine -instcombine -die -instcombine -coro-elide -coro-split -simplifycfg -ipsccp -gvn-hoist -adce -instcombine -sink -loop-interchange -speculative-execution -lcssa -instcombine -gvn-hoist -loop-guard-widening -instcombine -redundant-dbg-inst-elim -separate-const-offset-from-gep -gvn-hoist -redundant-dbg-inst-elim -simplifycfg -instcombine -forceattrs -dse -coro-elide -post-inline-ee-instrument -rpo-functionattrs -loop-versioning -sroa -dse -strip-nondebug -newgvn -simplifycfg -simplifycfg -adce -instcombine -simplifycfg -strip-nondebug -simplifycfg -prune-eh -ee-instrument From ce7ce98824fd7ef8429cb0cdd072ae74383cb3b5 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Mon, 21 Feb 2022 17:50:45 +0000 Subject: [PATCH 088/239] [tests] Rename test file to match implementation file. --- tests/llvm/BUILD | 4 ++-- tests/llvm/CMakeLists.txt | 4 ++-- .../llvm/{llvm_benchmarks_test.py => llvm_benchmark_test.py} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename tests/llvm/{llvm_benchmarks_test.py => llvm_benchmark_test.py} (100%) diff --git a/tests/llvm/BUILD b/tests/llvm/BUILD index a5f483f20..32280ec76 100644 --- a/tests/llvm/BUILD +++ b/tests/llvm/BUILD @@ -171,8 +171,8 @@ py_test( ) py_test( - name = "llvm_benchmarks_test", - srcs = ["llvm_benchmarks_test.py"], + name = "llvm_benchmark_test", + srcs = ["llvm_benchmark_test.py"], deps = [ "//compiler_gym/envs", "//compiler_gym/service/proto", diff --git a/tests/llvm/CMakeLists.txt b/tests/llvm/CMakeLists.txt index 9e7307bcb..bfe26234d 100644 --- a/tests/llvm/CMakeLists.txt +++ b/tests/llvm/CMakeLists.txt @@ -167,9 +167,9 @@ cg_py_test( cg_py_test( NAME - llvm_benchmarks_test + llvm_benchmark_test SRCS - "llvm_benchmarks_test.py" + "llvm_benchmark_test.py" DEPS compiler_gym::envs::envs compiler_gym::service::proto::proto diff --git a/tests/llvm/llvm_benchmarks_test.py b/tests/llvm/llvm_benchmark_test.py similarity index 100% rename from tests/llvm/llvm_benchmarks_test.py rename to tests/llvm/llvm_benchmark_test.py From 1e761475f32f857d9f1daae3e8a6300f2c071cc5 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Mon, 21 Feb 2022 18:05:39 +0000 Subject: [PATCH 089/239] [llvm] Improve system library flag detection. --- compiler_gym/envs/llvm/llvm_benchmark.py | 13 ++------ tests/llvm/custom_benchmarks_test.py | 28 ---------------- tests/llvm/llvm_benchmark_test.py | 42 ++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 08c5a52d8..035088f34 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -6,7 +6,6 @@ import logging import os import random -import shlex import subprocess import sys import tempfile @@ -90,14 +89,8 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: msg += f":\n{stderr}" raise OSError(msg) - # On macOS we need to provide the location of the libclang_rt.osx.a library, - # which we can grab from the linker invocation. if sys.platform == "darwin": - ld_invocation = shlex.split(lines[-1]) - for i in range(1, len(ld_invocation) - 1): - if ld_invocation[i] == "-lSystem": - yield "-lSystem" - yield ld_invocation[i + 1] + yield "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" @lru_cache(maxsize=32) @@ -157,12 +150,10 @@ def __init__( self.timeout = timeout def command(self, outpath: Path) -> List[str]: - cmd = [str(llvm.clang_path())] + cmd = [str(llvm.clang_path()), "-c", "-emit-llvm", "-o", str(outpath)] if self.system_includes: cmd += get_system_library_flags() - cmd += [str(s) for s in self.args] - cmd += ["-c", "-emit-llvm", "-o", str(outpath)] return cmd diff --git a/tests/llvm/custom_benchmarks_test.py b/tests/llvm/custom_benchmarks_test.py index c2c1e595d..233191c2b 100644 --- a/tests/llvm/custom_benchmarks_test.py +++ b/tests/llvm/custom_benchmarks_test.py @@ -3,7 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Tests for LLVM benchmark handling.""" -import os import re import tempfile from pathlib import Path @@ -13,7 +12,6 @@ from compiler_gym.datasets import Benchmark from compiler_gym.envs import LlvmEnv, llvm -from compiler_gym.envs.llvm import llvm_benchmark from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import File from compiler_gym.util.runfiles_path import runfiles_path @@ -287,31 +285,5 @@ def test_two_custom_benchmarks_reset(env: LlvmEnv): assert env.benchmark == benchmark2.uri -def test_get_system_library_flags_not_found(caplog): - flags, error = llvm_benchmark._get_cached_system_library_flags("not-a-real-binary") - assert flags == [] - assert "Failed to invoke not-a-real-binary" in error - - -def test_get_system_library_flags_nonzero_exit_status(caplog): - """Test that setting the $CXX to an invalid binary raises an error.""" - flags, error = llvm_benchmark._get_cached_system_library_flags("false") - assert flags == [] - assert "Failed to invoke false" in error - - -def test_get_system_library_flags_output_parse_failure(caplog): - """Test that setting the $CXX to an invalid binary raises an error.""" - old_cxx = os.environ.get("CXX") - try: - os.environ["CXX"] = "echo" - flags, error = llvm_benchmark._get_cached_system_library_flags("echo") - assert flags == [] - assert "Failed to parse '#include <...>' search paths from echo" in error - finally: - if old_cxx: - os.environ["CXX"] = old_cxx - - if __name__ == "__main__": main() diff --git a/tests/llvm/llvm_benchmark_test.py b/tests/llvm/llvm_benchmark_test.py index fe4c5dbcd..6b1a38dcd 100644 --- a/tests/llvm/llvm_benchmark_test.py +++ b/tests/llvm/llvm_benchmark_test.py @@ -3,6 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Integrations tests for the LLVM CompilerGym environments.""" +import os import tempfile from pathlib import Path @@ -10,8 +11,10 @@ from compiler_gym.datasets import Benchmark from compiler_gym.envs import CompilerEnv +from compiler_gym.envs.llvm import llvm_benchmark from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import File +from tests.pytest_plugins.common import macos_only from tests.test_main import main pytest_plugins = ["tests.pytest_plugins.llvm"] @@ -41,5 +44,44 @@ def test_add_benchmark_invalid_path(env: CompilerEnv): assert str(ctx.value).endswith(str(tmp)) +def test_get_system_library_flags_not_found(caplog): + flags, error = llvm_benchmark._get_cached_system_library_flags("not-a-real-binary") + assert flags == [] + assert "Failed to invoke not-a-real-binary" in error + + +def test_get_system_library_flags_nonzero_exit_status(caplog): + """Test that setting the $CXX to an invalid binary raises an error.""" + flags, error = llvm_benchmark._get_cached_system_library_flags("false") + assert flags == [] + assert "Failed to invoke false" in error + + +def test_get_system_library_flags_output_parse_failure(caplog): + """Test that setting the $CXX to an invalid binary raises an error.""" + old_cxx = os.environ.get("CXX") + try: + os.environ["CXX"] = "echo" + flags, error = llvm_benchmark._get_cached_system_library_flags("echo") + assert flags == [] + assert "Failed to parse '#include <...>' search paths from echo" in error + finally: + if old_cxx: + os.environ["CXX"] = old_cxx + + +def test_get_system_library_flags(): + flags = llvm_benchmark.get_system_library_flags() + assert flags + assert "-isystem" in flags + + +@macos_only +def test_get_system_library_flags_system_libraries(): + flags = llvm_benchmark.get_system_library_flags() + assert flags + assert flags[-1] == "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" + + if __name__ == "__main__": main() From f6c1aa1a43bbc77061d6ffef6bc477bd90d3df7f Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Mon, 21 Feb 2022 19:13:33 +0000 Subject: [PATCH 090/239] [tests] Fix temporary environment variable setting. --- compiler_gym/envs/llvm/llvm_benchmark.py | 2 +- tests/llvm/llvm_benchmark_test.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 035088f34..2033c9382 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -119,7 +119,7 @@ def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: :raises OSError: If the compiler fails, or if the output of the compiler cannot be understood. """ - compiler = compiler or os.environ.get("CXX", "c++") + compiler = compiler or (os.environ.get("CXX") or "c++") # We want to cache the results of this expensive query, but also emit a # logging warning when the function is called, including when the call # results in a cache hit. We therefore must cache both the flags and the diff --git a/tests/llvm/llvm_benchmark_test.py b/tests/llvm/llvm_benchmark_test.py index 6b1a38dcd..ab53d55d7 100644 --- a/tests/llvm/llvm_benchmark_test.py +++ b/tests/llvm/llvm_benchmark_test.py @@ -59,15 +59,14 @@ def test_get_system_library_flags_nonzero_exit_status(caplog): def test_get_system_library_flags_output_parse_failure(caplog): """Test that setting the $CXX to an invalid binary raises an error.""" - old_cxx = os.environ.get("CXX") + old_cxx = os.environ.get("CXX", "") try: os.environ["CXX"] = "echo" flags, error = llvm_benchmark._get_cached_system_library_flags("echo") assert flags == [] assert "Failed to parse '#include <...>' search paths from echo" in error finally: - if old_cxx: - os.environ["CXX"] = old_cxx + os.environ["CXX"] = old_cxx def test_get_system_library_flags(): From 1c9c4167f9f671ac7c243d2ddaa79cced99f912a Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 01:33:14 +0000 Subject: [PATCH 091/239] [llvm] Add system flags to build_cmd protos. --- compiler_gym/envs/llvm/datasets/cbench.py | 5 ++++- compiler_gym/envs/llvm/datasets/csmith.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler_gym/envs/llvm/datasets/cbench.py b/compiler_gym/envs/llvm/datasets/cbench.py index d3bfb4426..fd001255c 100644 --- a/compiler_gym/envs/llvm/datasets/cbench.py +++ b/compiler_gym/envs/llvm/datasets/cbench.py @@ -21,6 +21,7 @@ from compiler_gym.datasets import Benchmark, TarDatasetWithManifest from compiler_gym.datasets.uri import BenchmarkUri +from compiler_gym.envs.llvm import llvm_benchmark from compiler_gym.service.proto import BenchmarkDynamicConfig, Command from compiler_gym.third_party import llvm from compiler_gym.util.commands import Popen @@ -491,7 +492,9 @@ def validator( DYNAMIC_CONFIGS[uri.path].append( BenchmarkDynamicConfig( build_cmd=Command( - argument=["$CC", "$IN"] + linkopts, + argument=["$CC", "$IN"] + + llvm_benchmark.get_system_library_flags() + + linkopts, timeout_seconds=60, outfile=["a.out"], ), diff --git a/compiler_gym/envs/llvm/datasets/csmith.py b/compiler_gym/envs/llvm/datasets/csmith.py index 4fa94a207..54c8815da 100644 --- a/compiler_gym/envs/llvm/datasets/csmith.py +++ b/compiler_gym/envs/llvm/datasets/csmith.py @@ -12,6 +12,7 @@ from compiler_gym.datasets import Benchmark, BenchmarkSource, Dataset from compiler_gym.datasets.benchmark import BenchmarkInitError, BenchmarkWithSource from compiler_gym.datasets.uri import BenchmarkUri +from compiler_gym.envs.llvm import llvm_benchmark from compiler_gym.envs.llvm.llvm_benchmark import ClangInvocation from compiler_gym.service.proto import BenchmarkDynamicConfig, Command from compiler_gym.util.commands import Popen, communicate @@ -40,7 +41,7 @@ def __init__(self, *args, **kwargs): self.proto.dynamic_config.MergeFrom( BenchmarkDynamicConfig( build_cmd=Command( - argument=["$CC", "$IN"], + argument=["$CC", "$IN"] + llvm_benchmark.get_system_library_flags(), outfile=["a.out"], timeout_seconds=60, ), From 4131cb24a053e33e806f2a3109253c82fc67f5bb Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 09:50:20 +0000 Subject: [PATCH 092/239] Hold back grpcio version. https://github.com/facebookresearch/CompilerGym/issues/572 --- compiler_gym/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler_gym/requirements.txt b/compiler_gym/requirements.txt index 721c9590d..b2f06105f 100644 --- a/compiler_gym/requirements.txt +++ b/compiler_gym/requirements.txt @@ -2,7 +2,7 @@ absl-py>=0.10.0 deprecated>=1.2.12 docker>=4.0.0 fasteners>=0.15 -grpcio>=1.32.0 +grpcio>=1.32.0,<1.44.0 gym>=0.18.0,<0.21 humanize>=2.6.0 loop_tool_py==0.0.7 From 9bbb6dcd6d0c23cfa7d363afd3a6d5242dc0f90a Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 09:58:31 +0000 Subject: [PATCH 093/239] [llvm] Add tests for system libs in ClangInvocation. --- tests/llvm/llvm_benchmark_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/llvm/llvm_benchmark_test.py b/tests/llvm/llvm_benchmark_test.py index ab53d55d7..05586c35a 100644 --- a/tests/llvm/llvm_benchmark_test.py +++ b/tests/llvm/llvm_benchmark_test.py @@ -82,5 +82,17 @@ def test_get_system_library_flags_system_libraries(): assert flags[-1] == "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" +def test_ClangInvocation_system_libs(): + cmd = llvm_benchmark.ClangInvocation(["foo.c"]).command("a.out") + assert "-isystem" in cmd + + +def test_ClangInvocation_no_system_libs(): + cmd = llvm_benchmark.ClangInvocation(["foo.c"], system_includes=False).command( + "a.out" + ) + assert "-isystem" not in cmd + + if __name__ == "__main__": main() From 17da4edde42f5a9c75cbae51aa3ada8530975766 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 09:58:52 +0000 Subject: [PATCH 094/239] [tests] Tidy up system libs tests. --- tests/llvm/llvm_benchmark_test.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/llvm/llvm_benchmark_test.py b/tests/llvm/llvm_benchmark_test.py index 05586c35a..d18c04bbf 100644 --- a/tests/llvm/llvm_benchmark_test.py +++ b/tests/llvm/llvm_benchmark_test.py @@ -44,20 +44,24 @@ def test_add_benchmark_invalid_path(env: CompilerEnv): assert str(ctx.value).endswith(str(tmp)) -def test_get_system_library_flags_not_found(caplog): +# pylint: disable=protected-access +# pylint: disable=use-implicit-booleaness-not-comparison + + +def test_get_system_library_flags_not_found(): flags, error = llvm_benchmark._get_cached_system_library_flags("not-a-real-binary") assert flags == [] assert "Failed to invoke not-a-real-binary" in error -def test_get_system_library_flags_nonzero_exit_status(caplog): +def test_get_system_library_flags_nonzero_exit_status(): """Test that setting the $CXX to an invalid binary raises an error.""" flags, error = llvm_benchmark._get_cached_system_library_flags("false") assert flags == [] assert "Failed to invoke false" in error -def test_get_system_library_flags_output_parse_failure(caplog): +def test_get_system_library_flags_output_parse_failure(): """Test that setting the $CXX to an invalid binary raises an error.""" old_cxx = os.environ.get("CXX", "") try: @@ -69,6 +73,10 @@ def test_get_system_library_flags_output_parse_failure(caplog): os.environ["CXX"] = old_cxx +# pylint: enable=use-implicit-booleaness-not-comparison +# pylint: enable=protected-access + + def test_get_system_library_flags(): flags = llvm_benchmark.get_system_library_flags() assert flags From 2825a09f399cdd78ac528fcf2496b1392bd4e3ce Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 10:14:13 +0000 Subject: [PATCH 095/239] [llvm] Raise error if system flag extraction fails. --- compiler_gym/envs/llvm/llvm_benchmark.py | 47 +++++++++++++----------- tests/llvm/llvm_benchmark_test.py | 36 +++++++----------- 2 files changed, 39 insertions(+), 44 deletions(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 2033c9382..0a39cea0d 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -13,7 +13,7 @@ from datetime import datetime from functools import lru_cache from pathlib import Path -from typing import Iterable, List, Optional, Tuple, Union +from typing import Iterable, List, Optional, Union from compiler_gym.datasets import Benchmark, BenchmarkInitError from compiler_gym.third_party import llvm @@ -24,6 +24,15 @@ logger = logging.getLogger(__name__) +class HostCompilerFailure(OSError): + """Exception raised when the system compiler fails.""" + + +class UnableToParseHostCompilerOutput(HostCompilerFailure): + """Exception raised if unable to parse the verbose output of the host + compiler.""" + + def _get_system_library_flags(compiler: str) -> Iterable[str]: """Private implementation function.""" # Create a temporary directory to write the compiled binary to, since GNU @@ -45,14 +54,14 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: input="int main(){return 0;}", timeout=30 ) if process.returncode: - raise OSError( - f"Failed to invoke {compiler}. " + raise HostCompilerFailure( + f"Failed to invoke '{compiler}'. " f"Is there a working system compiler?\n" f"Error: {stderr.strip()}" ) except FileNotFoundError as e: - raise OSError( - f"Failed to invoke {compiler}. " + raise HostCompilerFailure( + f"Failed to invoke '{compiler}'. " f"Is there a working system compiler?\n" f"Error: {e}" ) from e @@ -83,23 +92,20 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: elif line.startswith("#include <...> search starts here:"): in_search_list = True else: - msg = f"Failed to parse '#include <...>' search paths from {compiler}" + msg = f"Failed to parse '#include <...>' search paths from '{compiler}'" stderr = stderr.strip() if stderr: msg += f":\n{stderr}" - raise OSError(msg) + raise UnableToParseHostCompilerOutput(msg) if sys.platform == "darwin": yield "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" @lru_cache(maxsize=32) -def _get_cached_system_library_flags(compiler: str) -> Tuple[List[str], str]: +def _get_cached_system_library_flags(compiler: str) -> List[str]: """Private implementation detail.""" - try: - return list(_get_system_library_flags(compiler)), None - except OSError as e: - return [], str(e) + return list(_get_system_library_flags(compiler)) def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: @@ -116,18 +122,17 @@ def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: :return: A list of command line flags for a compiler. - :raises OSError: If the compiler fails, or if the output of the compiler + :raises HostCompilerFailure: If the host compiler cannot be determined, or + fails to compile a trivial piece of code. + + :raises UnableToParseHostCompilerOutput: If the output of the compiler cannot be understood. """ compiler = compiler or (os.environ.get("CXX") or "c++") - # We want to cache the results of this expensive query, but also emit a - # logging warning when the function is called, including when the call - # results in a cache hit. We therefore must cache both the flags and the - # error, if any. - flags, error = _get_cached_system_library_flags(compiler) - if error: - logger.warning("%s", error) - return flags + # We want to cache the results of this expensive query after resolving the + # default value for the compiler argument, as it can changed based on + # environment variables. + return _get_cached_system_library_flags(compiler) class ClangInvocation: diff --git a/tests/llvm/llvm_benchmark_test.py b/tests/llvm/llvm_benchmark_test.py index d18c04bbf..337ab13c5 100644 --- a/tests/llvm/llvm_benchmark_test.py +++ b/tests/llvm/llvm_benchmark_test.py @@ -3,7 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Integrations tests for the LLVM CompilerGym environments.""" -import os import tempfile from pathlib import Path @@ -44,37 +43,28 @@ def test_add_benchmark_invalid_path(env: CompilerEnv): assert str(ctx.value).endswith(str(tmp)) -# pylint: disable=protected-access -# pylint: disable=use-implicit-booleaness-not-comparison - - def test_get_system_library_flags_not_found(): - flags, error = llvm_benchmark._get_cached_system_library_flags("not-a-real-binary") - assert flags == [] - assert "Failed to invoke not-a-real-binary" in error + with pytest.raises( + llvm_benchmark.HostCompilerFailure, match="Failed to invoke 'not-a-real-binary'" + ): + llvm_benchmark.get_system_library_flags("not-a-real-binary") def test_get_system_library_flags_nonzero_exit_status(): """Test that setting the $CXX to an invalid binary raises an error.""" - flags, error = llvm_benchmark._get_cached_system_library_flags("false") - assert flags == [] - assert "Failed to invoke false" in error + with pytest.raises( + llvm_benchmark.HostCompilerFailure, match="Failed to invoke 'false'" + ): + llvm_benchmark.get_system_library_flags("false") def test_get_system_library_flags_output_parse_failure(): """Test that setting the $CXX to an invalid binary raises an error.""" - old_cxx = os.environ.get("CXX", "") - try: - os.environ["CXX"] = "echo" - flags, error = llvm_benchmark._get_cached_system_library_flags("echo") - assert flags == [] - assert "Failed to parse '#include <...>' search paths from echo" in error - finally: - os.environ["CXX"] = old_cxx - - -# pylint: enable=use-implicit-booleaness-not-comparison -# pylint: enable=protected-access + with pytest.raises( + llvm_benchmark.UnableToParseHostCompilerOutput, + match="Failed to parse '#include <...>' search paths from 'echo'", + ): + llvm_benchmark.get_system_library_flags("echo") def test_get_system_library_flags(): From ae9996c7896053e04809753f4d822d7a0cbb6aca Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 11:08:03 +0000 Subject: [PATCH 096/239] [llvm] Ensure that transient cache exists. --- compiler_gym/envs/llvm/llvm_benchmark.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index 0a39cea0d..c1f33609f 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -37,7 +37,9 @@ def _get_system_library_flags(compiler: str) -> Iterable[str]: """Private implementation function.""" # Create a temporary directory to write the compiled binary to, since GNU # assembler does not support piping to stdout. - with tempfile.NamedTemporaryFile(dir=transient_cache_path(".")) as f: + transient_cache = transient_cache_path(".") + transient_cache.mkdir(parents=True, exist_ok=True) + with tempfile.NamedTemporaryFile(dir=transient_cache) as f: try: cmd = [compiler, "-xc++", "-v", "-", "-o", f.name] # On macOS we need to compile a binary to invoke the linker. From 9f3ee913f5bbd5f7f99dcc36a82d189979018d73 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 12:23:55 +0000 Subject: [PATCH 097/239] [tests] Unset the xfail attribute on macOS runtime tests. Runtime observation space is now supported. --- tests/llvm/datasets/csmith_test.py | 11 ----------- tests/llvm/llvm_session_parameters_test.py | 7 ------- tests/llvm/observation_spaces_test.py | 20 -------------------- tests/llvm/runtime_test.py | 11 ----------- tests/wrappers/llvm_test.py | 22 ---------------------- 5 files changed, 71 deletions(-) diff --git a/tests/llvm/datasets/csmith_test.py b/tests/llvm/datasets/csmith_test.py index a76627f42..1dd609158 100644 --- a/tests/llvm/datasets/csmith_test.py +++ b/tests/llvm/datasets/csmith_test.py @@ -3,7 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Tests for the Csmith dataset.""" -import sys from itertools import islice from pathlib import Path @@ -63,11 +62,6 @@ def test_csmith_from_seed_retry_count_exceeded(csmith_dataset: CsmithDataset): csmith_dataset.benchmark_from_seed(seed=1, max_retries=3, retry_count=5) -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky(max_runs=5, rerun_filter=lambda err, *args: issubclass(err[0], ServiceError)) def test_csmith_positive_runtimes(env: LlvmEnv, csmith_dataset: CsmithDataset): benchmark = next(csmith_dataset.benchmarks()) @@ -77,11 +71,6 @@ def test_csmith_positive_runtimes(env: LlvmEnv, csmith_dataset: CsmithDataset): assert np.all(np.greater(val, 0)) -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky(max_runs=5, rerun_filter=lambda err, *args: issubclass(err[0], ServiceError)) def test_csmith_positive_buildtimes(env: LlvmEnv, csmith_dataset: CsmithDataset): benchmark = next(csmith_dataset.benchmarks()) diff --git a/tests/llvm/llvm_session_parameters_test.py b/tests/llvm/llvm_session_parameters_test.py index 56a8db6de..1d72cde52 100644 --- a/tests/llvm/llvm_session_parameters_test.py +++ b/tests/llvm/llvm_session_parameters_test.py @@ -3,8 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Tests for LLVM session parameter handlers.""" -import sys - import pytest from flaky import flaky @@ -69,11 +67,6 @@ def test_benchmarks_cache_parameter_invalid_int_type(env: LlvmEnv): env.send_params(("service.benchmark_cache.set_max_size_in_bytes", "not an int")) -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky # Runtime can timeout. @pytest.mark.parametrize("n", [1, 3, 10]) def test_runtime_observation_parameters(env: LlvmEnv, n: int): diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index 67bf9b5f1..4a910c25f 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -1204,11 +1204,6 @@ def test_object_text_size_observation_spaces(env: LlvmEnv): assert value == crc32_code_sizes[sys.platform][2] -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky # Runtimes can timeout def test_runtime_observation_space(env: LlvmEnv): env.reset("cbench-v1/crc32") @@ -1231,11 +1226,6 @@ def test_runtime_observation_space(env: LlvmEnv): assert buildtime > 0 -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky # Runtimes can timeout def test_runtime_observation_space_different_observation_count(env: LlvmEnv): """Test setting a custom observation count for LLVM runtimes.""" @@ -1257,11 +1247,6 @@ def test_runtime_observation_space_different_observation_count(env: LlvmEnv): assert value.shape == (5,) -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky # Runtimes can timeout def test_runtime_observation_space_invalid_observation_count(env: LlvmEnv): """Test setting an invalid custom observation count for LLVM runtimes.""" @@ -1283,11 +1268,6 @@ def test_runtime_observation_space_not_runnable(env: LlvmEnv): assert env.observation[key] is None -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky # Build can timeout def test_buildtime_observation_space(env: LlvmEnv): env.reset("cbench-v1/crc32") diff --git a/tests/llvm/runtime_test.py b/tests/llvm/runtime_test.py index 541707f6f..823a48172 100644 --- a/tests/llvm/runtime_test.py +++ b/tests/llvm/runtime_test.py @@ -3,7 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Integrations tests for LLVM runtime support.""" -import sys from pathlib import Path import numpy as np @@ -17,11 +16,6 @@ pytest_plugins = ["tests.pytest_plugins.llvm"] -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @pytest.mark.parametrize("runtime_observation_count", [1, 3, 5]) def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_count: int): env.reset() @@ -56,11 +50,6 @@ def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_coun assert np.all(runtimes > 0) -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @flaky def test_custom_benchmark_runtimes_differ(env: LlvmEnv, tmpdir): """Same as above, but test that runtimes differ from run to run.""" diff --git a/tests/wrappers/llvm_test.py b/tests/wrappers/llvm_test.py index f40a8dbaf..821a426cd 100644 --- a/tests/wrappers/llvm_test.py +++ b/tests/wrappers/llvm_test.py @@ -3,8 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Unit tests for compiler_gym.wrappers.llvm.""" -import sys - import numpy as np import pytest from flaky import flaky @@ -17,11 +15,6 @@ pytest_plugins = ["tests.pytest_plugins.llvm"] -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) def test_invalid_runtime_count(env: LlvmEnv): env = RuntimePointEstimateReward(env, runtime_count=-10) with pytest.raises( @@ -30,11 +23,6 @@ def test_invalid_runtime_count(env: LlvmEnv): env.reset() -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) def test_invalid_warmup_count(env: LlvmEnv): env = RuntimePointEstimateReward(env, warmup_count=-10) with pytest.raises( @@ -58,22 +46,12 @@ def test_reward_range_not_runnable_benchmark(env: LlvmEnv): env.reset(benchmark="benchmark://npb-v0/1") -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) def test_fork(env: LlvmEnv): env = RuntimePointEstimateReward(env) with env.fork() as fkd: assert fkd.reward_space_spec.name == "runtime" -@pytest.mark.xfail( - sys.platform == "darwin", - strict=True, - reason="github.com/facebookresearch/CompilerGym/issues/459", -) @pytest.mark.parametrize("runtime_count", [1, 3, 5]) @pytest.mark.parametrize("warmup_count", [0, 1, 3]) @pytest.mark.parametrize("estimator", [np.median, min]) From 25c982dc1b0e5564c3979e29d2a4ccbd6fdbee74 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 13:16:45 +0000 Subject: [PATCH 098/239] [tests] Add missing system libraries to test. --- tests/llvm/runtime_test.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/llvm/runtime_test.py b/tests/llvm/runtime_test.py index 823a48172..ad0ebbd7c 100644 --- a/tests/llvm/runtime_test.py +++ b/tests/llvm/runtime_test.py @@ -9,7 +9,7 @@ import pytest from flaky import flaky -from compiler_gym.envs.llvm import LlvmEnv +from compiler_gym.envs.llvm import LlvmEnv, llvm_benchmark from compiler_gym.service.connection import ServiceError from tests.test_main import main @@ -37,7 +37,9 @@ def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_coun benchmark = env.make_benchmark(Path(tmpdir) / "program.c") - benchmark.proto.dynamic_config.build_cmd.argument.extend(["$CC", "$IN"]) + benchmark.proto.dynamic_config.build_cmd.argument.extend( + ["$CC", "$IN"] + llvm_benchmark.get_system_library_flags() + ) benchmark.proto.dynamic_config.build_cmd.outfile.extend(["a.out"]) benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10 @@ -73,7 +75,9 @@ def test_custom_benchmark_runtimes_differ(env: LlvmEnv, tmpdir): benchmark = env.make_benchmark(Path(tmpdir) / "program.c") - benchmark.proto.dynamic_config.build_cmd.argument.extend(["$CC", "$IN"]) + benchmark.proto.dynamic_config.build_cmd.argument.extend( + ["$CC", "$IN"] + llvm_benchmark.get_system_library_flags() + ) benchmark.proto.dynamic_config.build_cmd.outfile.extend(["a.out"]) benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10 From 2c2ceaebfccae72beb4aaacc74e0c8134c6f2ffe Mon Sep 17 00:00:00 2001 From: xtremey Date: Tue, 22 Feb 2022 17:07:45 +0100 Subject: [PATCH 099/239] Added proper description and results for leaderboard entry --- README.md | 24 ++++---- leaderboard/llvm_instcount/ppo/README.md | 71 ++++++++++++++-------- leaderboard/llvm_instcount/ppo/results.csv | 48 +++++++-------- 3 files changed, 81 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 334b7efae..2f0bab64b 100644 --- a/README.md +++ b/README.md @@ -126,18 +126,18 @@ pipeline. This leaderboard tracks the results achieved by algorithms on the `llvm-ic-v0` environment on the 23 benchmarks in the `cbench-v1` dataset. -| Author | Algorithm | Links | Date | Walltime (mean) | Codesize Reduction (geomean) | -| --- | --- | --- | --- |-----------------|------------------------------| - | Leibniz University| PPO + Guided Search | [write-up](leaderboard/llvm_instcount/ppo/README.md), [results](leaderboard/llvm_instcount/random_search/results.csv) | 2022-02 | 69.821s | **1.070×** | -| Facebook | Random search (t=10800) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10800.csv) | 2021-03 | 10,512.356s | 1.062× | -| Facebook | Random search (t=3600) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t3600.csv) | 2021-03 | 3,630.821s | 1.061× | -| Facebook | Greedy search | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e0.csv) | 2021-03 | 169.237s | 1.055× | -| Facebook | Random search (t=60) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t60.csv) | 2021-03 | 91.215s | 1.045× | -| Facebook | e-Greedy search (e=0.1) | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e10.csv) | 2021-03 | 152.579s | 1.041× | -| Jiadong Guo | Tabular Q (N=5000, H=10) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H10-N5000.csv) | 2021-04 | 2534.305 | 1.036× | -| Facebook | Random search (t=10) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10.csv) | 2021-03 | 42.939s | 1.031× | -| Patrick Hesse | DQN (N=4000, H=10) | [write-up](leaderboard/llvm_instcount/dqn/README.md), [results](leaderboard/llvm_instcount/dqn/results-instcountnorm-H10-N4000.csv) | 2021-06 | 91.018s | 1.029× | -| Jiadong Guo | Tabular Q (N=2000, H=5) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H5-N2000.csv) | 2021-04 | 694.105 | 0.988× | +| Author | Algorithm | Links | Date | Walltime (mean) | Codesize Reduction (geomean) | +|--------------------------------------------------| --- | --- | --- |-----------------|------------------------------| + | Robin Schmöcker, Yannik Mahlau, Nicolas Fröhlich | PPO + Guided Search | [write-up](leaderboard/llvm_instcount/ppo/README.md), [results](leaderboard/llvm_instcount/random_search/results.csv) | 2022-02 | 69.821s | **1.070×** | +| Facebook | Random search (t=10800) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10800.csv) | 2021-03 | 10,512.356s | 1.062× | +| Facebook | Random search (t=3600) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t3600.csv) | 2021-03 | 3,630.821s | 1.061× | +| Facebook | Greedy search | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e0.csv) | 2021-03 | 169.237s | 1.055× | +| Facebook | Random search (t=60) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t60.csv) | 2021-03 | 91.215s | 1.045× | +| Facebook | e-Greedy search (e=0.1) | [write-up](leaderboard/llvm_instcount/e_greedy/README.md), [results](leaderboard/llvm_instcount/e_greedy/results_e10.csv) | 2021-03 | 152.579s | 1.041× | +| Jiadong Guo | Tabular Q (N=5000, H=10) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H10-N5000.csv) | 2021-04 | 2534.305 | 1.036× | +| Facebook | Random search (t=10) | [write-up](leaderboard/llvm_instcount/random_search/README.md), [results](leaderboard/llvm_instcount/random_search/results_p125_t10.csv) | 2021-03 | 42.939s | 1.031× | +| Patrick Hesse | DQN (N=4000, H=10) | [write-up](leaderboard/llvm_instcount/dqn/README.md), [results](leaderboard/llvm_instcount/dqn/results-instcountnorm-H10-N4000.csv) | 2021-06 | 91.018s | 1.029× | +| Jiadong Guo | Tabular Q (N=2000, H=5) | [write-up](leaderboard/llvm_instcount/tabular_q/README.md), [results](leaderboard/llvm_instcount/tabular_q/results-H5-N2000.csv) | 2021-04 | 694.105 | 0.988× | ## Contributing diff --git a/leaderboard/llvm_instcount/ppo/README.md b/leaderboard/llvm_instcount/ppo/README.md index 19827b1a8..ef45e1a81 100644 --- a/leaderboard/llvm_instcount/ppo/README.md +++ b/leaderboard/llvm_instcount/ppo/README.md @@ -1,23 +1,19 @@ # Proximal Policy Optimization with Guided Random Search - **tldr;** -Proximal Policy Optimization (PPO) followed by guided search using the action +Proximal Policy Optimization (PPO) followed by guided search using the action probabilities of the PPO-Model **Authors:** Nicolas Fröhlich, Robin Schmöcker, Yannik Mahlau - **Publication:** Not Available - **Results:** Geometric Mean: 1.070, [results](/results.csv) - **CompilerGym version:** 0.2.1 - - **Is the approach Open Source?:** Yes -The source code is available as Open-Source: -https://github.com/xtremey/ppo_compiler_gym +The source code is available as Open-Source: +https://github.com/xtremey/ppo_compiler_gym/tree/72c08d86e4c96ed1e4579e5a00b9377e556609ab **Did you modify the CompilerGym source code?:** No (apart from state space wrappers) **What range of values were considered for the above parameters?** -We experimented a little bit with the hyperparameters of PPO, but the results did not +We experimented a little bit with the hyperparameters of PPO, but the results did not change drastically. Therefore, we did not perform any Hyperparameter Optimization. **Is the policy deterministic?:** No ## Description - -Our Model uses the Proximal Policy Optimization (PPO) Architecture: +Our Model uses the Proximal Policy Optimization (PPO) Architecture: https://arxiv.org/abs/1707.06347 -We used a wrapper to extend the state space such that the number of remaining steps is -an additional entry in the state space (as a number, not one hot encoded). During -training we limited the number of steps per episode to 200. - -In a second step we use the action probabilities of the model to perform a guided -random search (also for 200 steps). We limited the search time to one minute for each +### Training +We used a wrapper to extend the state space such that the number of remaining steps in +an additional entry in the state space (as a number, not one hot encoded). During +training, we limited the number of steps per episode to 200. We trained the PPO Model on all benchmarks +except ghostscript. Therefore, the model is not tested on unseen programs, except ghostscript. +The performance of ghostscript indicates potential for generalization to unseen programs as it is better +than the baseline compiler and most other techniques on the leaderboard. + +We trained for 10 hours on a consumer computer and evaluated performance every half hour using only cpu in a docker +on windows. The peak performance was reached after 7 hours. +The exact specification is: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz 3.70 GHz, 32GB RAM + +### Guided Search +In a second step we use the action probabilities of the model to perform a guided +random search (also for 200 steps). We limited the search time to one minute for each environment. -In a third step we optimized the best trajectory found during random search by taking 500 +In a third step we optimized the best trajectory found during random search by taking 500 additional steps using the models action probabilities. This did not yield improvement for all environments, but sometimes improved solution a little with basically no -computational cost. Therefore, the maximum possible length of a trajectory is 700. +computational cost. Therefore, the maximum possible length of a trajectory is 700. However, most trajectories are much shorter. -We excluded the Ghostscript benchmark during training since it took a lot of computation -and presented itself as a bottleneck. Additionally, we excluded the random search and additional +We excluded the ghostscript benchmark during training since it took a lot of computation +and presented itself as a bottleneck. Additionally, we excluded the random search and additional steps for this benchmark since it did not yield any improvement and drastically increased the mean walltime. - -### Credit -Credit to nikhilbarhate99 +## Reproduction +The following commands can be used to train the PPO Model. To exactly reproduce our experiment, ghostscript has +to be excluded from the benchmark file. +```sh +benchmarks = [] +f = open("cbench-v1.txt", "r") +for line in f: + benchmarks.append(line.strip()) +f.close() + +env = llvm_wrapper(benchmarks, max_episode_steps=200, steps_in_observation=True) + +ppo_training = PPO(env) +ppo_training.train(log_progress=True, training_time=60 * 60 * 10, progress_log_rate=60 * 30) +Evaluation.evaluate(benchmarks, "default", additional_steps_for_max=500, max_trials_per_benchmark=100000, + max_time_per_benchmark=60 * 1) +``` + +## Credit +Credit to nikhilbarhate99 (https://github.com/nikhilbarhate99/PPO-PyTorch/blob/master/PPO.py). -Parts of the rollout buffer and the update method are taken from this repo. \ No newline at end of file +Parts of the rollout buffer and the update method are taken from this repo. diff --git a/leaderboard/llvm_instcount/ppo/results.csv b/leaderboard/llvm_instcount/ppo/results.csv index 06de00024..3db725c79 100644 --- a/leaderboard/llvm_instcount/ppo/results.csv +++ b/leaderboard/llvm_instcount/ppo/results.csv @@ -1,24 +1,24 @@ -benchmark://cbench-v1/adpcm,1.0083798882681567,60.93814396858215,opt -sroa -mem2reg -insert-gcov-profiling -add-discriminators -prune-eh -jump-threading -dce -sroa -dce -insert-gcov-profiling -reassociate -lcssa -jump-threading -instcombine -mergefunc -sroa -canonicalize-aliases -loop-load-elim -consthoist -newgvn -dce -lower-matrix-intrinsics -sroa -sroa -instsimplify -dce -gvn-hoist -simplifycfg -sink -coro-split -rewrite-statepoints-for-gc -newgvn -instnamer -forceattrs -loop-distribute -simplifycfg -inject-tli-mappings -bdce -ipconstprop -scalarizer -reassociate -prune-eh -cross-dso-cfi -pgo-memop-opt -early-cse -instcombine -simplifycfg -speculative-execution -instcombine -newgvn -constmerge -coro-elide -partially-inline-libcalls -insert-gcov-profiling -newgvn -ipsccp -early-cse -redundant-dbg-inst-elim -aggressive-instcombine -coro-elide -dce -loop-guard-widening -cross-dso-cfi -newgvn -newgvn -simplifycfg -mergeicmps -speculative-execution -instnamer -simplifycfg -loop-data-prefetch -sccp -post-inline-ee-instrument -newgvn -sroa -consthoist -mem2reg -simplifycfg -gvn-hoist -loop-data-prefetch -constprop -early-cse -loop-unroll-and-jam -inferattrs -instcombine -simplifycfg -simplifycfg -lower-constant-intrinsics -simplifycfg -simplifycfg -newgvn -lower-widenable-condition -gvn-hoist -instcombine -mergefunc -instcombine -licm -instcombine -loop-idiom -jump-threading -newgvn -rpo-functionattrs -lower-constant-intrinsics -loop-load-elim -pgo-memop-opt -lower-guard-intrinsic -instcombine -mergeicmps -indvars -lower-matrix-intrinsics -licm -sccp -newgvn -ipsccp -prune-eh -loweratomic -newgvn -sccp -jump-threading -lower-expect -loop-vectorize -instcombine -flattencfg -coro-split -simplifycfg -aggressive-instcombine -coro-early -callsite-splitting -elim-avail-extern -mergereturn -strip-nondebug -mem2reg -simplifycfg -coro-cleanup -lower-guard-intrinsic -nary-reassociate -aggressive-instcombine -instcombine -simplifycfg -early-cse -strip-dead-prototypes -licm -ipsccp -newgvn -loop-load-elim -canonicalize-aliases -coro-split -loop-versioning -newgvn -strip-debug-declare -loop-data-prefetch -lower-constant-intrinsics -strip-nondebug -instcombine -flattencfg -partially-inline-libcalls -sancov -lower-matrix-intrinsics -instcombine -strip-debug-declare -sroa -early-cse-memssa -partially-inline-libcalls -float2int -callsite-splitting -newgvn -globalopt -inject-tli-mappings -jump-threading -constmerge -mergefunc -prune-eh -coro-elide -lower-matrix-intrinsics -consthoist -insert-gcov-profiling -newgvn -tailcallelim -adce -lowerinvoke -reassociate -called-value-propagation -mergeicmps -simplifycfg -simplifycfg -instsimplify -functionattrs -globalsplit -tailcallelim -rpo-functionattrs -partially-inline-libcalls -slp-vectorizer -forceattrs -coro-elide -lower-widenable-condition -reassociate -loop-load-elim -globaldce -memcpyopt -mergefunc -sroa -sroa -coro-cleanup -sroa -loop-unswitch -called-value-propagation -sroa -mem2reg -sink -sink -inferattrs -gvn-hoist -dce -sroa -name-anon-globals -sroa -early-cse -coro-cleanup -loop-fusion -mem2reg -strip-nondebug -sroa -mergereturn -instnamer -loop-predication -prune-eh -strip-nondebug -loop-data-prefetch -mem2reg -dce -sroa -reg2mem -sroa -loop-predication -sroa -loop-sink -ipconstprop -sroa -sroa -forceattrs -infer-address-spaces -forceattrs -dce -called-value-propagation -insert-gcov-profiling -loop-unswitch -newgvn -mem2reg -forceattrs -globalsplit -mem2reg -ee-instrument -lcssa -add-discriminators -lower-widenable-condition -sroa -adce -simple-loop-unswitch -sroa -argpromotion -infer-address-spaces -sroa -lcssa -globalopt -rewrite-statepoints-for-gc -instsimplify -constprop -loop-unroll-and-jam -loop-simplify -sroa -forceattrs -loop-unswitch -mergereturn -mem2reg -pgo-memop-opt -constmerge -lcssa -loop-simplify -mem2reg -sroa -loop-vectorize -nary-reassociate -insert-gcov-profiling -consthoist -instnamer -alignment-from-assumptions -reassociate -dse -simplifycfg -infer-address-spaces -alignment-from-assumptions -rewrite-statepoints-for-gc -lcssa -loop-instsimplify -instsimplify -sccp -alignment-from-assumptions -float2int -loop-reduce -simple-loop-unswitch -sroa -gvn -guard-widening -instcombine -post-inline-ee-instrument -gvn-hoist -sroa -instcombine -alignment-from-assumptions -loop-vectorize -gvn-hoist -loop-reduce -reassociate -loop-interchange -simple-loop-unswitch -sink -mem2reg -sroa -sroa -sroa -mem2reg -loop-data-prefetch -add-discriminators -infer-address-spaces -instsimplify -loop-vectorize -instsimplify -gvn-hoist -loop-reduce -sroa -sccp -strip-dead-prototypes -lcssa -lower-widenable-condition -sroa -loop-load-elim -sroa -infer-address-spaces -sroa -sroa -sroa -loop-vectorize -sroa -reassociate -loop-interchange -licm -instcombine -jump-threading -sroa -instnamer -early-cse-memssa -add-discriminators -loop-interchange -globalopt -insert-gcov-profiling -canonicalize-aliases -loop-vectorize -sroa -loop-reduce -sroa -simple-loop-unswitch -bdce -instsimplify -sroa -sroa -constmerge -pgo-memop-opt -sink -lower-guard-intrinsic -sroa -forceattrs -mergereturn -sroa -sroa -sroa -sroa -mem2reg -sroa -always-inline -bdce -argpromotion -simple-loop-unswitch -barrier -sroa -lowerinvoke -sroa -sroa -sroa -mem2reg -newgvn -sroa -sroa -irce -loop-unswitch -loop-guard-widening -alignment-from-assumptions -loop-deletion -simple-loop-unswitch -instsimplify -tailcallelim -attributor -sroa -lower-matrix-intrinsics -lcssa -coro-early -mem2reg -hotcoldsplit -mem2reg -ee-instrument -sroa -loop-vectorize -sroa -sroa -loop-predication -lcssa -pgo-memop-opt -sroa -adce -tailcallelim -alignment-from-assumptions -loop-simplify -strip -sroa -loop-guard-widening -break-crit-edges -loop-load-elim -insert-gcov-profiling -tailcallelim -lower-guard-intrinsic -sroa -sroa -scalarizer -jump-threading -sroa -sroa -sroa -sroa -loop-unroll-and-jam -insert-gcov-profiling -sroa -sroa -barrier -simple-loop-unswitch -partially-inline-libcalls -mem2reg -sccp -strip-dead-prototypes -strip-nondebug -sroa -early-cse -sroa -lowerinvoke -barrier -early-cse -sroa -jump-threading -barrier -speculative-execution -loweratomic -newgvn -loop-load-elim -called-value-propagation -infer-address-spaces -instcombine -inject-tli-mappings -strip -newgvn -sroa -inferattrs -ee-instrument -instcombine -coro-cleanup -globalsplit -instcombine -slsr -lower-matrix-intrinsics -lower-guard-intrinsic -constprop -loop-deletion -early-cse-memssa -inject-tli-mappings -functionattrs -sroa -dce -reassociate -simplifycfg -instcombine -separate-const-offset-from-gep -lower-constant-intrinsics -jump-threading -lowerinvoke -early-cse -indvars -lcssa -instcombine -infer-address-spaces -newgvn -gvn-hoist -div-rem-pairs -float2int -reassociate -simplifycfg -dce -gvn-hoist -instcombine -newgvn -early-cse -pgo-memop-opt -newgvn -newgvn -loop-instsimplify -simplifycfg -sink -simplifycfg -early-cse -lower-matrix-intrinsics -sccp -tailcallelim -lowerinvoke -coro-split -add-discriminators -mergereturn -pgo-memop-opt -sroa -simplifycfg -loop-guard-widening -deadargelim -reassociate -early-cse-memssa -instcombine -sink -attributor -functionattrs -constmerge -newgvn -gvn-hoist -early-cse-memssa -sink -reassociate -elim-avail-extern -reassociate -lcssa -globalsplit -consthoist -early-cse -instcombine -gvn-hoist -forceattrs -constprop -sroa -name-anon-globals -deadargelim -gvn-hoist -add-discriminators -aggressive-instcombine -gvn-hoist -mergereturn -lower-matrix-intrinsics -gvn -sroa -simple-loop-unswitch -dse -coro-elide -div-rem-pairs -loop-sink -simplifycfg -newgvn -lower-matrix-intrinsics -sroa -name-anon-globals -instcombine -always-inline -instcombine -instcombine -instnamer -globalsplit -coro-early -instcombine -instcombine -instnamer -argpromotion -early-cse -adce -gvn-hoist -dce -loop-guard-widening -sink -early-cse -div-rem-pairs -dce -simplifycfg -pgo-memop-opt -coro-elide -nary-reassociate -ipsccp -pgo-memop-opt -gvn-hoist -sancov -loop-guard-widening -newgvn -instcombine -add-discriminators -simplifycfg -mergefunc -gvn-hoist -globalsplit -cross-dso-cfi -early-cse -coro-early -redundant-dbg-inst-elim -simplifycfg -irce -lower-expect -ipsccp -early-cse -adce -sccp -ipconstprop -slsr -gvn-hoist -ipconstprop -float2int -loop-versioning -instcombine -insert-gcov-profiling -attributor -functionattrs -coro-split -gvn -adce -simplifycfg -float2int -early-cse -aggressive-instcombine -simplifycfg -consthoist -gvn-hoist -ipsccp -coro-cleanup -consthoist -simplifycfg -constmerge -gvn-hoist -sccp -gvn-hoist -flattencfg -consthoist -simplifycfg -early-cse -strip-dead-prototypes -simplifycfg -strip-dead-prototypes -sccp -simplifycfg -reassociate -dse -pgo-memop-opt -simplifycfg -cross-dso-cfi -functionattrs -float2int -simple-loop-unswitch -instcombine -instcombine -name-anon-globals -mergeicmps -early-cse-memssa -sancov -sroa -simplifycfg -redundant-dbg-inst-elim -mergereturn -dse -instcombine -float2int -ipsccp -tailcallelim -cross-dso-cfi -pgo-memop-opt -gvn-hoist -lower-guard-intrinsic -indvars -pgo-memop-opt -infer-address-spaces -simplifycfg -early-cse -ipsccp -coro-split -coro-elide -indvars -lower-constant-intrinsics -lower-constant-intrinsics -dse -instcombine -gvn -indvars -dse -instcombine -ee-instrument -float2int -benchmark://cbench-v1/blowfish,1.10178117048346,61.936835527420044,opt -mem2reg -callsite-splitting -simplifycfg -slsr -sancov -barrier -loop-data-prefetch -die -coro-elide -instsimplify -early-cse-memssa -gvn-hoist -instcombine -add-discriminators -globalsplit -globaldce -deadargelim -lower-widenable-condition -jump-threading -simplifycfg -hotcoldsplit -newgvn -partially-inline-libcalls -dse -functionattrs -scalarizer -coro-elide -newgvn -separate-const-offset-from-gep -rpo-functionattrs -instcombine -dse -simplifycfg -globalopt -loop-versioning -newgvn -reassociate -consthoist -forceattrs -lower-guard-intrinsic -instcombine -loop-versioning -pgo-memop-opt -instcombine -gvn-hoist -dse -consthoist -memcpyopt -jump-threading -dse -instcombine -mergefunc -gvn -aggressive-instcombine -mldst-motion -prune-eh -rpo-functionattrs -simplifycfg -loop-unroll-and-jam -insert-gcov-profiling -gvn -strip-dead-prototypes -dce -gvn-hoist -ipsccp -globaldce -sroa -strip-nondebug -insert-gcov-profiling -gvn-hoist -functionattrs -instcombine -callsite-splitting -sink -name-anon-globals -insert-gcov-profiling -infer-address-spaces -lower-constant-intrinsics -instsimplify -coro-cleanup -deadargelim -div-rem-pairs -callsite-splitting -lower-widenable-condition -alignment-from-assumptions -loop-versioning -add-discriminators -globaldce -sroa -simplifycfg -instcombine -flattencfg -early-cse-memssa -mergereturn -loop-data-prefetch -constmerge -dse -coro-elide -early-cse-memssa -callsite-splitting -early-cse-memssa -reassociate -coro-early -early-cse -loop-data-prefetch -div-rem-pairs -globalsplit -instcombine -newgvn -instcombine -instcombine -sccp -gvn-hoist -dse -instcombine -barrier -pgo-memop-opt -newgvn -redundant-dbg-inst-elim -gvn-hoist -pgo-memop-opt -mergefunc -lower-matrix-intrinsics -redundant-dbg-inst-elim -load-store-vectorizer -instcombine -correlated-propagation -newgvn -instcombine -instcombine -pgo-memop-opt -gvn -jump-threading -indvars -argpromotion -add-discriminators -argpromotion -jump-threading -constprop -speculative-execution -instnamer -sink -consthoist -gvn-hoist -add-discriminators -simplifycfg -gvn-hoist -loop-interchange -lowerinvoke -simplifycfg -sroa -loop-distribute -load-store-vectorizer -jump-threading -nary-reassociate -simple-loop-unswitch -slp-vectorizer -early-cse-memssa -instcombine -consthoist -gvn-hoist -globaldce -gvn -gvn -instcombine -die -instcombine -simplifycfg -loop-data-prefetch -instnamer -rpo-functionattrs -instcombine -lower-matrix-intrinsics -adce -scalarizer -early-cse -insert-gcov-profiling -instsimplify -aggressive-instcombine -simplifycfg -instcombine -rpo-functionattrs -libcalls-shrinkwrap -simplifycfg -coro-split -gvn-hoist -aggressive-instcombine -deadargelim -simplifycfg -pgo-memop-opt -instsimplify -gvn-hoist -lcssa -sink -gvn -newgvn -simplifycfg -gvn-hoist -speculative-execution -jump-threading -instcombine -globalsplit -indvars -globalopt -jump-threading -ee-instrument -dce -simple-loop-unswitch -lower-guard-intrinsic -simplifycfg -coro-cleanup -jump-threading -pgo-memop-opt -jump-threading -flattencfg -mergereturn -instcombine -reassociate -lower-matrix-intrinsics -simplifycfg -mergefunc -simplifycfg -instcombine -simplifycfg -sccp -dse -mergefunc -gvn-hoist -sroa -irce -redundant-dbg-inst-elim -die -callsite-splitting -ee-instrument -strip-dead-prototypes -coro-elide -coro-split -slsr -simplifycfg -simplifycfg -loop-vectorize -lower-matrix-intrinsics -sink -instcombine -callsite-splitting -lower-guard-intrinsic -instcombine -jump-threading -simplifycfg -gvn-hoist -slp-vectorizer -insert-gcov-profiling -sroa -loop-data-prefetch -instsimplify -insert-gcov-profiling -mergefunc -sroa -strip-debug-declare -simplifycfg -tailcallelim -simplifycfg -pgo-memop-opt -newgvn -coro-elide -die -early-cse-memssa -bdce -gvn-hoist -name-anon-globals -sroa -redundant-dbg-inst-elim -newgvn -loop-data-prefetch -consthoist -simplifycfg -sroa -pgo-memop-opt -constprop -early-cse -coro-elide -simplifycfg -simplifycfg -lower-expect -instcombine -instcombine -instcombine -pgo-memop-opt -simplifycfg -dse -instcombine -early-cse-memssa -simplifycfg -instcombine -simplifycfg -coro-split -adce -early-cse-memssa -instnamer -newgvn -lcssa -scalarizer -pgo-memop-opt -newgvn -rewrite-statepoints-for-gc -mldst-motion -instcombine -strip-nondebug -functionattrs -gvn-hoist -gvn-hoist -instcombine -mergefunc -loop-versioning -newgvn -instcombine -indvars -mergereturn -coro-split -simplifycfg -callsite-splitting -coro-early -flattencfg -licm -argpromotion -consthoist -partially-inline-libcalls -elim-avail-extern -early-cse-memssa -loop-guard-widening -instcombine -libcalls-shrinkwrap -instcombine -instcombine -coro-elide -inferattrs -simplifycfg -adce -newgvn -lower-widenable-condition -lowerinvoke -instcombine -instcombine -simplifycfg -constmerge -simplifycfg -coro-cleanup -early-cse-memssa -coro-elide -early-cse-memssa -simplifycfg -consthoist -consthoist -scalarizer -newgvn -instcombine -loop-versioning -prune-eh -loop-load-elim -add-discriminators -loop-distribute -loop-deletion -simplifycfg -instsimplify -canonicalize-aliases -instnamer -instcombine -functionattrs -instcombine -dce -instcombine -indvars -simplifycfg -gvn-hoist -instcombine -simplifycfg -tailcallelim -instcombine -loop-data-prefetch -forceattrs -strip-dead-prototypes -gvn-hoist -instsimplify -coro-elide -instcombine -coro-elide -sroa -strip-dead-prototypes -newgvn -simplifycfg -dce -coro-elide -jump-threading -coro-split -slp-vectorizer -bdce -sroa -coro-elide -load-store-vectorizer -coro-split -coro-split -newgvn -scalarizer -ipsccp -instsimplify -instcombine -reassociate -constmerge -instcombine -consthoist -called-value-propagation -loop-deletion -lowerinvoke -gvn-hoist -functionattrs -instcombine -jump-threading -ipsccp -strip-nondebug -scalarizer -jump-threading -mergeicmps -coro-cleanup -newgvn -bdce -pgo-memop-opt -instcombine -adce -loop-data-prefetch -reassociate -infer-address-spaces -simplifycfg -forceattrs -lower-matrix-intrinsics -instcombine -flattencfg -consthoist -gvn-hoist -infer-address-spaces -simplifycfg -sancov -instcombine -separate-const-offset-from-gep -loop-versioning -tailcallelim -redundant-dbg-inst-elim -mergefunc -sancov -early-cse -instcombine -pgo-memop-opt -canonicalize-aliases -instnamer -simplifycfg -sccp -gvn-hoist -post-inline-ee-instrument -infer-address-spaces -dse -loop-data-prefetch -simplifycfg -constprop -gvn -sccp -loop-versioning -coro-cleanup -dse -instcombine -speculative-execution -gvn-hoist -newgvn -loop-versioning -gvn-hoist -name-anon-globals -strip-nondebug -simplifycfg -adce -instcombine -loop-versioning -lower-guard-intrinsic -globalsplit -instcombine -reassociate -ipsccp -coro-elide -consthoist -called-value-propagation -add-discriminators -consthoist -consthoist -early-cse-memssa -instsimplify -instcombine -loweratomic -simplifycfg -loop-data-prefetch -strip-dead-prototypes -div-rem-pairs -early-cse-memssa -instcombine -simplifycfg -nary-reassociate -instcombine -gvn-hoist -barrier -instcombine -bdce -newgvn -lcssa -loop-idiom -mergefunc -dce -redundant-dbg-inst-elim -simplifycfg -scalarizer -early-cse-memssa -bdce -constmerge -lower-guard-intrinsic -instnamer -early-cse -gvn -simplifycfg -ee-instrument -gvn-hoist -inject-tli-mappings -coro-elide -simplifycfg -simplifycfg -consthoist -coro-cleanup -lcssa -adce -instcombine -simplifycfg -instcombine -instcombine -guard-widening -loop-sink -slp-vectorizer -libcalls-shrinkwrap -instcombine -consthoist -lcssa -constprop -canonicalize-aliases -simplifycfg -early-cse-memssa -argpromotion -strip -lower-expect -gvn -instcombine -globalopt -aggressive-instcombine -constprop -loop-interchange -loop-data-prefetch -adce -early-cse-memssa -jump-threading -add-discriminators -sink -barrier -jump-threading -adce -post-inline-ee-instrument -mergefunc -coro-split -dce -sancov -instcombine -mergefunc -lower-matrix-intrinsics -ee-instrument -simplifycfg -jump-threading -speculative-execution -dse -loop-sink -constprop -ipconstprop -newgvn -rewrite-statepoints-for-gc -prune-eh -sroa -elim-avail-extern -globalsplit -memcpyopt -gvn -barrier -early-cse-memssa -strip-nondebug -mergefunc -called-value-propagation -simplifycfg -newgvn -prune-eh -early-cse-memssa -loop-distribute -simplifycfg -loop-fusion -instnamer -globalopt -instcombine -ipsccp -sccp -globalopt -ipconstprop -early-cse-memssa -pgo-memop-opt -consthoist -newgvn -strip -pgo-memop-opt -consthoist -slsr -consthoist -libcalls-shrinkwrap -lower-constant-intrinsics -coro-early -add-discriminators -mergefunc -instcombine -called-value-propagation -ipsccp -strip-nondebug -globalopt -instcombine -strip-dead-prototypes -bdce -instcombine -ipconstprop -instcombine -inferattrs -early-cse -reassociate -early-cse -callsite-splitting -simplifycfg -early-cse-memssa -lower-expect -pgo-memop-opt -sroa -instcombine -instcombine -pgo-memop-opt -loop-versioning -scalarizer -globalsplit -lower-widenable-condition -barrier -instcombine -loweratomic -mldst-motion -rewrite-statepoints-for-gc -newgvn -correlated-propagation -dse -scalarizer -instcombine -redundant-dbg-inst-elim -memcpyopt -instsimplify -instcombine -die -instcombine -consthoist -instcombine -post-inline-ee-instrument -simplifycfg -simplifycfg -rewrite-statepoints-for-gc -loop-versioning -nary-reassociate -inject-tli-mappings -scalarizer -rpo-functionattrs -redundant-dbg-inst-elim -jump-threading -ipconstprop -instcombine -forceattrs -newgvn -gvn -prune-eh -instcombine -instcombine -early-cse-memssa -lower-widenable-condition -add-discriminators -mergefunc -correlated-propagation -strip-nondebug -strip-nondebug -bdce -early-cse-memssa -deadargelim -rpo-functionattrs -coro-elide -benchmark://cbench-v1/crc32,1.0,60.860716819763184,opt -sroa -insert-gcov-profiling -sroa -consthoist -sroa -pgo-memop-opt -called-value-propagation -sroa -sroa -bdce -gvn-hoist -strip-dead-prototypes -coro-elide -barrier -sroa -sink -reassociate -barrier -gvn-hoist -dce -loop-reroll -instsimplify -ee-instrument -mem2reg -speculative-execution -sroa -sroa -mem2reg -loop-interchange -mem2reg -sroa -loop-deletion -lower-guard-intrinsic -sroa -strip-nondebug -simple-loop-unswitch -sancov -sancov -sroa -sroa -sroa -forceattrs -sroa -insert-gcov-profiling -infer-address-spaces -sroa -tailcallelim -loop-interchange -globalopt -loop-guard-widening -loop-idiom -sroa -newgvn -insert-gcov-profiling -inject-tli-mappings -indvars -loop-vectorize -lower-matrix-intrinsics -lcssa -loop-deletion -bdce -bdce -sroa -sroa -mergereturn -constprop -sroa -mergereturn -lcssa -loop-load-elim -insert-gcov-profiling -mem2reg -instsimplify -ipsccp -sroa -simplifycfg -sroa -instsimplify -loop-load-elim -lowerinvoke -sroa -sroa -scalarizer -ee-instrument -early-cse -alignment-from-assumptions -alignment-from-assumptions -sroa -always-inline -dce -lcssa -early-cse -sroa -alignment-from-assumptions -sccp -pgo-memop-opt -mem2reg -reassociate -sroa -constprop -indvars -newgvn -reassociate -loop-guard-widening -called-value-propagation -loop-guard-widening -strip-nondebug -reassociate -adce -sroa -sroa -instcombine -sroa -sroa -sroa -partially-inline-libcalls -gvn-hoist -sroa -simplifycfg -loop-reduce -mem2reg -newgvn -insert-gcov-profiling -loop-unroll-and-jam -early-cse -sccp -sroa -flattencfg -early-cse -sroa -rpo-functionattrs -mem2reg -loop-load-elim -functionattrs -loop-data-prefetch -instcombine -sroa -consthoist -newgvn -gvn -loop-data-prefetch -lcssa -slsr -loop-distribute -simplifycfg -argpromotion -newgvn -early-cse -coro-elide -simplifycfg -early-cse -loop-data-prefetch -early-cse-memssa -strip-dead-prototypes -slp-vectorizer -loop-data-prefetch -simplifycfg -mem2reg -strip-nondebug -post-inline-ee-instrument -sroa -div-rem-pairs -loop-sink -add-discriminators -simplifycfg -simplifycfg -newgvn -simplifycfg -early-cse -loop-versioning -reassociate -name-anon-globals -attributor -instcombine -rpo-functionattrs -slsr -lower-widenable-condition -early-cse -simplifycfg -scalarizer -guard-widening -simplifycfg -instnamer -early-cse-memssa -forceattrs -instcombine -jump-threading -forceattrs -lower-constant-intrinsics -newgvn -loop-predication -jump-threading -loop-fusion -ee-instrument -slsr -post-inline-ee-instrument -simplifycfg -slsr -libcalls-shrinkwrap -loop-versioning -correlated-propagation -loop-idiom -insert-gcov-profiling -loop-simplifycfg -loop-interchange -lower-guard-intrinsic -constprop -loop-sink -sroa -mem2reg -loop-reduce -loop-unroll-and-jam -loop-fusion -sroa -sroa -sroa -sroa -bdce -sroa -sroa -mergereturn -add-discriminators -loop-reroll -mem2reg -hotcoldsplit -constprop -simple-loop-unswitch -sroa -sroa -sccp -loop-reduce -lowerinvoke -alignment-from-assumptions -sroa -sink -loop-predication -canonicalize-aliases -loop-guard-widening -loop-data-prefetch -coro-cleanup -constmerge -lower-matrix-intrinsics -sroa -loop-unswitch -sink -loop-guard-widening -add-discriminators -reassociate -coro-elide -instsimplify -inferattrs -newgvn -newgvn -loop-vectorize -loop-vectorize -loop-load-elim -indvars -simple-loop-unswitch -loop-idiom -alignment-from-assumptions -mem2reg -lcssa -sroa -loop-unswitch -pgo-memop-opt -sroa -loop-data-prefetch -loop-vectorize -loop-sink -instsimplify -add-discriminators -simplifycfg -memcpyopt -constmerge -sroa -globalopt -loop-interchange -early-cse -sroa -mem2reg -sroa -lcssa -float2int -lower-guard-intrinsic -loop-reduce -sroa -sroa -loop-unroll-and-jam -early-cse-memssa -loop-unroll-and-jam -instsimplify -sancov -loop-load-elim -barrier -dce -sroa -infer-address-spaces -lcssa -sink -loop-reduce -lcssa -loop-guard-widening -sroa -mem2reg -barrier -add-discriminators -sroa -loop-unroll-and-jam -break-crit-edges -sroa -instsimplify -early-cse -instsimplify -argpromotion -instsimplify -jump-threading -sroa -coro-elide -coro-cleanup -forceattrs -strip -globalsplit -insert-gcov-profiling -sroa -loop-deletion -adce -sroa -loop-vectorize -sroa -sancov -insert-gcov-profiling -sroa -mergereturn -pgo-memop-opt -hotcoldsplit -ee-instrument -sroa -reassociate -mem2reg -sroa -loop-deletion -sroa -lower-guard-intrinsic -loop-predication -instsimplify -strip-dead-prototypes -reassociate -loop-deletion -sroa -sroa -mem2reg -insert-gcov-profiling -early-cse -mem2reg -ee-instrument -insert-gcov-profiling -loop-reroll -alignment-from-assumptions -mem2reg -inferattrs -sroa -sroa -slp-vectorizer -sroa -loop-reroll -mem2reg -simple-loop-unswitch -reg2mem -mem2reg -constprop -barrier -sroa -simple-loop-unswitch -pgo-memop-opt -insert-gcov-profiling -sroa -sroa -alignment-from-assumptions -mem2reg -functionattrs -simplifycfg -loop-predication -strip-dead-prototypes -early-cse-memssa -mem2reg -loop-sink -early-cse -licm -pgo-memop-opt -loop-predication -dce -constprop -sroa -add-discriminators -sroa -sroa -sroa -lowerswitch -sroa -sancov -loop-predication -insert-gcov-profiling -loop-load-elim -early-cse -sroa -globalopt -barrier -sroa -reassociate -called-value-propagation -lower-guard-intrinsic -loop-predication -lower-guard-intrinsic -sroa -sroa -sroa -sroa -sccp -infer-address-spaces -sroa -loop-deletion -lower-matrix-intrinsics -sroa -sroa -globalsplit -loop-data-prefetch -early-cse-memssa -sroa -loop-versioning -barrier -ee-instrument -sroa -loop-load-elim -sroa -mem2reg -called-value-propagation -loop-guard-widening -coro-cleanup -sroa -barrier -insert-gcov-profiling -indvars -loop-predication -called-value-propagation -globalopt -globalopt -loop-reduce -mem2reg -mem2reg -lower-constant-intrinsics -coro-cleanup -reassociate -mergereturn -sroa -sroa -ipconstprop -simple-loop-unswitch -sroa -sroa -insert-gcov-profiling -mem2reg -instnamer -sroa -coro-elide -loop-simplifycfg -sccp -adce -sroa -sroa -loop-sink -alignment-from-assumptions -argpromotion -sroa -mem2reg -reassociate -sink -sroa -sroa -strip-nondebug -sroa -instsimplify -sccp -loop-reroll -forceattrs -strip-nondebug -cross-dso-cfi -coro-early -ipconstprop -lower-guard-intrinsic -sroa -loop-interchange -sroa -adce -sroa -simplifycfg -name-anon-globals -ipsccp -jump-threading -sroa -called-value-propagation -loop-guard-widening -loop-reduce -mem2reg -hotcoldsplit -sroa -constmerge -always-inline -sroa -loop-idiom -mergereturn -ipsccp -loop-deletion -simple-loop-unswitch -loop-guard-widening -argpromotion -sroa -sroa -instsimplify -speculative-execution -insert-gcov-profiling -sroa -loop-interchange -dce -reassociate -gvn-hoist -indvars -dce -dce -sroa -mem2reg -sroa -tailcallelim -sroa -lcssa -loop-predication -gvn-hoist -simple-loop-unswitch -sroa -sroa -coro-cleanup -loop-idiom -post-inline-ee-instrument -reassociate -sroa -post-inline-ee-instrument -lower-constant-intrinsics -constmerge -sink -gvn-hoist -sroa -sroa -sccp -sroa -forceattrs -strip-nondebug -speculative-execution -sroa -tailcallelim -sroa -pgo-memop-opt -early-cse-memssa -ee-instrument -instsimplify -sroa -loop-reroll -simplifycfg -mem2reg -sroa -mem2reg -dce -instsimplify -insert-gcov-profiling -sroa -slsr -sroa -ipsccp -coro-early -sroa -rewrite-statepoints-for-gc -mem2reg -ee-instrument -loop-unroll-and-jam -loop-sink -sroa -barrier -loop-idiom -loop-guard-widening -loweratomic -early-cse -gvn-hoist -sroa -correlated-propagation -mergereturn -sroa -sroa -sroa -sink -loop-versioning -early-cse -constprop -sroa -sroa -sroa -sroa -speculative-execution -sroa -early-cse -lcssa -loop-idiom -inferattrs -sroa -canonicalize-aliases -lower-guard-intrinsic -gvn-hoist -simplifycfg -loop-simplify -loop-simplify -add-discriminators -sroa -instcombine -newgvn -adce -sroa -mem2reg -lowerinvoke -sroa -mergereturn -simplifycfg -ee-instrument -forceattrs -loop-distribute -mldst-motion -instcombine -consthoist -dce -ipsccp -strip-nondebug -early-cse-memssa -simplifycfg -callsite-splitting -slsr -sccp -partially-inline-libcalls -mergeicmps -memcpyopt -lower-matrix-intrinsics -redundant-dbg-inst-elim -mem2reg -gvn-hoist -prune-eh -loop-vectorize -newgvn -dce -instcombine -simplifycfg -simplifycfg -gvn-hoist -instcombine -sccp -lower-matrix-intrinsics -newgvn -inject-tli-mappings -lower-expect -coro-split -instcombine -rpo-functionattrs -lower-expect -ipconstprop -reassociate -lower-widenable-condition -slsr -coro-elide -adce -coro-elide -lower-constant-intrinsics -newgvn -dce -aggressive-instcombine -loop-versioning -sancov -float2int -ipconstprop -dse -lower-matrix-intrinsics -strip-dead-prototypes -die -lower-expect -reassociate -lower-widenable-condition -instcombine -inferattrs -lower-widenable-condition -simplifycfg -pgo-memop-opt -instcombine -gvn -simplifycfg -die -strip-nondebug -lower-constant-intrinsics -benchmark://cbench-v1/ghostscript,1.0296089727338689,110.89521312713623,opt -loop-interchange -sroa -adce -early-cse-memssa -simplifycfg -loop-guard-widening -globalsplit -coro-elide -coro-elide -jump-threading -instcombine -globalsplit -sancov -slsr -speculative-execution -gvn -simplifycfg -instcombine -separate-const-offset-from-gep -instcombine -jump-threading -lower-constant-intrinsics -early-cse-memssa -float2int -gvn -deadargelim -partially-inline-libcalls -die -simplifycfg -loop-versioning -lower-constant-intrinsics -lower-constant-intrinsics -coro-cleanup -simplifycfg -coro-elide -prune-eh -jump-threading -simplifycfg -die -reassociate -loop-versioning -ipconstprop -rpo-functionattrs -loop-versioning -callsite-splitting -simplifycfg -gvn -early-cse-memssa -sancov -instnamer -ipconstprop -loop-data-prefetch -dse -adce -globalsplit -slp-vectorizer -rpo-functionattrs -functionattrs -called-value-propagation -loop-sink -simplifycfg -deadargelim -sancov -name-anon-globals -instcombine -callsite-splitting -gvn -coro-split -always-inline -rpo-functionattrs -sccp -insert-gcov-profiling -coro-split -early-cse-memssa -instnamer -early-cse -lower-expect -die -instsimplify -mldst-motion -instcombine -dse -coro-early -mergefunc -newgvn -gvn-hoist -callsite-splitting -newgvn -separate-const-offset-from-gep -die -sancov -instcombine -forceattrs -newgvn -jump-threading -coro-cleanup -aggressive-instcombine -float2int -strip-nondebug -instcombine -simple-loop-unswitch -simplifycfg -loop-load-elim -redundant-dbg-inst-elim -sancov -rpo-functionattrs -dse -mergefunc -lowerinvoke -instcombine -early-cse -strip-nondebug -early-cse -adce -simplifycfg -die -mergereturn -always-inline -licm -instnamer -insert-gcov-profiling -simple-loop-unswitch -reassociate -newgvn -coro-split -functionattrs -newgvn -simplifycfg -simplifycfg -dce -nary-reassociate -coro-split -newgvn -lower-widenable-condition -jump-threading -consthoist -separate-const-offset-from-gep -globalsplit -simplifycfg -dse -jump-threading -loop-load-elim -early-cse-memssa -gvn -instcombine -loweratomic -simplifycfg -functionattrs -consthoist -jump-threading -lower-expect -ipsccp -jump-threading -gvn -adce -newgvn -rpo-functionattrs -sccp -simplifycfg -prune-eh -early-cse-memssa -coro-split -simplifycfg -globaldce -sancov -speculative-execution -coro-elide -slp-vectorizer -name-anon-globals -globalsplit -consthoist -loop-data-prefetch -name-anon-globals -simplifycfg -simplifycfg -instcombine -instcombine -instcombine -mergefunc -canonicalize-aliases -functionattrs -instcombine -strip-debug-declare -prune-eh -infer-address-spaces -rpo-functionattrs -canonicalize-aliases -mergefunc -callsite-splitting -dce -loop-versioning -loop-load-elim -gvn-hoist -simplifycfg -lower-matrix-intrinsics -float2int -dse -simplifycfg -instsimplify -dse' -benchmark://cbench-v1/ispell,1.028289936664321,66.57882642745972,opt -loop-data-prefetch -barrier -forceattrs -sroa -instcombine -instcombine -bdce -strip-dead-prototypes -early-cse-memssa -strip-debug-declare -add-discriminators -instcombine -simplifycfg -memcpyopt -jump-threading -forceattrs -strip-dead-prototypes -newgvn -redundant-dbg-inst-elim -post-inline-ee-instrument -instsimplify -newgvn -strip-nondebug -early-cse-memssa -coro-elide -instcombine -constmerge -cross-dso-cfi -load-store-vectorizer -deadargelim -strip-dead-prototypes -name-anon-globals -reassociate -redundant-dbg-inst-elim -adce -separate-const-offset-from-gep -instcombine -lower-expect -ipconstprop -name-anon-globals -aggressive-instcombine -functionattrs -mldst-motion -aggressive-instcombine -inferattrs -die -die -constprop -redundant-dbg-inst-elim -lower-widenable-condition -simplifycfg -lcssa -mldst-motion -functionattrs -add-discriminators -instcombine -strip-dead-prototypes -instsimplify -loop-versioning -inferattrs -redundant-dbg-inst-elim -attributor -jump-threading -licm -callsite-splitting -globalopt -dse -partially-inline-libcalls -ipsccp -rewrite-statepoints-for-gc -instcombine -name-anon-globals -sroa -lower-constant-intrinsics -pgo-memop-opt -mergefunc -slp-vectorizer -mergefunc -insert-gcov-profiling -instcombine -ipconstprop -scalarizer -libcalls-shrinkwrap -lowerinvoke -elim-avail-extern -memcpyopt -mem2reg -adce -aggressive-instcombine -libcalls-shrinkwrap -newgvn -mem2reg -flattencfg -loop-unroll-and-jam -newgvn -newgvn -loop-distribute -called-value-propagation -lowerinvoke -float2int -consthoist -bdce -jump-threading -simplifycfg -rpo-functionattrs -simplifycfg -coro-split -mergefunc -simple-loop-unswitch -loop-versioning -lower-matrix-intrinsics -simplifycfg -simplifycfg -adce -jump-threading -gvn-hoist -mergereturn -simplifycfg -simplifycfg -instcombine -newgvn -rewrite-statepoints-for-gc -globalopt -aggressive-instcombine -callsite-splitting -newgvn -consthoist -sancov -globalopt -gvn-hoist -lower-widenable-condition -simplifycfg -forceattrs -strip-debug-declare -loop-versioning -post-inline-ee-instrument -consthoist -rpo-functionattrs -sroa -simplifycfg -gvn -loop-load-elim -aggressive-instcombine -sancov -lower-matrix-intrinsics -coro-elide -jump-threading -mergefunc -strip-dead-prototypes -globalopt -slp-vectorizer -dse -strip-nondebug -sancov -lower-constant-intrinsics -libcalls-shrinkwrap -pgo-memop-opt -libcalls-shrinkwrap -elim-avail-extern -lcssa -coro-elide -early-cse-memssa -mergefunc -instcombine -gvn -inferattrs -instcombine -lcssa -instcombine -globaldce -aggressive-instcombine -strip-debug-declare -aggressive-instcombine -sink -memcpyopt -newgvn -strip-nondebug -lower-matrix-intrinsics -lower-matrix-intrinsics -gvn -flattencfg -aggressive-instcombine -lowerinvoke -consthoist -simplifycfg -simplifycfg -simplifycfg -rpo-functionattrs -gvn -deadargelim -partially-inline-libcalls -jump-threading -newgvn -reassociate -inject-tli-mappings -gvn -functionattrs -strip-debug-declare -mergeicmps -consthoist -early-cse-memssa -mergereturn -pgo-memop-opt -instcombine -mergefunc -prune-eh -simplifycfg -globalopt -lower-matrix-intrinsics -aggressive-instcombine -slsr -mergefunc -jump-threading -loop-versioning -instcombine -inject-tli-mappings -elim-avail-extern -simplifycfg -pgo-memop-opt -insert-gcov-profiling -name-anon-globals -partially-inline-libcalls -sroa -simplifycfg -newgvn -strip-debug-declare -callsite-splitting -instcombine -globalsplit -gvn -alignment-from-assumptions -jump-threading -functionattrs -adce -inferattrs -gvn-hoist -indvars -dse -simplifycfg -flattencfg -lower-expect -name-anon-globals -elim-avail-extern -rpo-functionattrs -partially-inline-libcalls -rpo-functionattrs -redundant-dbg-inst-elim -sink -coro-elide -callsite-splitting -sroa -strip-nondebug -jump-threading -gvn -argpromotion -strip-nondebug -loop-data-prefetch -instcombine -die -aggressive-instcombine -libcalls-shrinkwrap -dce -early-cse -aggressive-instcombine -dse -simplifycfg -adce -loop-versioning -jump-threading -early-cse-memssa -newgvn -coro-elide -lower-expect -elim-avail-extern -rpo-functionattrs -dse -ipconstprop -simplifycfg -gvn -simplifycfg -strip -gvn-hoist -jump-threading -rpo-functionattrs -div-rem-pairs -prune-eh -slp-vectorizer -speculative-execution -mergeicmps -lower-constant-intrinsics -simplifycfg -elim-avail-extern -die -sancov -lower-matrix-intrinsics -sccp -newgvn -barrier -elim-avail-extern -loop-load-elim -gvn-hoist -aggressive-instcombine -licm -simplifycfg -newgvn -simplifycfg -newgvn -mldst-motion -early-cse -alignment-from-assumptions -scalarizer -partially-inline-libcalls -dse -newgvn -post-inline-ee-instrument -sancov -div-rem-pairs -ipconstprop -float2int -deadargelim -bdce -sink -sancov -early-cse -memcpyopt -strip-nondebug -elim-avail-extern -name-anon-globals -globalsplit -mergefunc -gvn -float2int -lowerinvoke -pgo-memop-opt -newgvn -slsr -dse -gvn-hoist -lower-matrix-intrinsics -callsite-splitting -sancov -always-inline -early-cse -barrier -loop-versioning -lower-guard-intrinsic -early-cse -aggressive-instcombine -ipsccp -early-cse-memssa -lower-expect -functionattrs -consthoist -loop-versioning -newgvn -tailcallelim -deadargelim -strip-debug-declare -libcalls-shrinkwrap -instcombine -simplifycfg -instnamer -callsite-splitting -strip-debug-declare -dce -consthoist -callsite-splitting -flattencfg -instcombine -coro-split -newgvn -elim-avail-extern -jump-threading -gvn-hoist -strip-debug-declare -alignment-from-assumptions -early-cse-memssa -called-value-propagation -coro-elide -gvn-hoist -tailcallelim -die -sink -callsite-splitting -strip-debug-declare -sancov -constprop -mergefunc -mem2reg -slsr -simplifycfg -coro-early -lower-constant-intrinsics -globalopt -mem2reg -called-value-propagation -functionattrs -gvn -aggressive-instcombine -deadargelim -insert-gcov-profiling -globalsplit -gvn-hoist -dse -simplifycfg -correlated-propagation -dse -gvn-hoist -tailcallelim -functionattrs -post-inline-ee-instrument -adce -lower-expect -aggressive-instcombine -globaldce -correlated-propagation -name-anon-globals -constprop -early-cse -name-anon-globals -lower-matrix-intrinsics -aggressive-instcombine -aggressive-instcombine -lower-widenable-condition -early-cse -pgo-memop-opt -die -instnamer -slp-vectorizer -consthoist -lcssa -lower-matrix-intrinsics -flattencfg -tailcallelim -correlated-propagation -speculative-execution -prune-eh -cross-dso-cfi -always-inline -dse -simplifycfg -consthoist -alignment-from-assumptions -redundant-dbg-inst-elim -partially-inline-libcalls -simplifycfg -loop-data-prefetch -simplifycfg -speculative-execution -globaldce -gvn -simplifycfg -newgvn -newgvn -strip -jump-threading -slp-vectorizer -deadargelim -simplifycfg -aggressive-instcombine -constprop -sancov -inferattrs -div-rem-pairs -gvn -sroa -insert-gcov-profiling -newgvn -slp-vectorizer -speculative-execution -dce -inferattrs -strip-debug-declare -guard-widening -simplifycfg -loop-load-elim -die -simplifycfg -simple-loop-unswitch -instcombine -lower-expect -instnamer -sancov -nary-reassociate -globalopt -instcombine -mergefunc -loop-data-prefetch -lowerinvoke -callsite-splitting -insert-gcov-profiling -mergefunc -coro-split -instcombine -jump-threading -aggressive-instcombine -gvn-hoist -globaldce -aggressive-instcombine -adce -name-anon-globals -loop-data-prefetch -lower-matrix-intrinsics -adce -name-anon-globals -callsite-splitting -constmerge -simplifycfg -early-cse-memssa -functionattrs -slp-vectorizer -tailcallelim -prune-eh -coro-split -lower-matrix-intrinsics -early-cse-memssa -lower-matrix-intrinsics -simplifycfg -ipconstprop -jump-threading -early-cse-memssa -mergefunc -jump-threading -sancov -div-rem-pairs -simplifycfg -coro-split -inferattrs -partially-inline-libcalls -functionattrs -slsr -instcombine -functionattrs -indvars -globalsplit -slsr -lower-matrix-intrinsics -strip -lower-constant-intrinsics -die -loop-idiom -rpo-functionattrs -simplifycfg -gvn-hoist -callsite-splitting -lower-matrix-intrinsics -dse -slsr -newgvn -dce -float2int -globalopt -mergereturn -deadargelim -dse -name-anon-globals -scalarizer -callsite-splitting -mergefunc -rpo-functionattrs -callsite-splitting -jump-threading -libcalls-shrinkwrap -die -globaldce -guard-widening -ipconstprop -lcssa -mergeicmps -jump-threading -globalsplit -forceattrs -gvn -aggressive-instcombine -ee-instrument -strip-nondebug -slsr -indvars -lower-matrix-intrinsics -simplifycfg -lower-constant-intrinsics -instnamer -globalopt -deadargelim -mergeicmps -rpo-functionattrs -aggressive-instcombine -bdce -flattencfg -separate-const-offset-from-gep -deadargelim -sink -die -name-anon-globals -simplifycfg -gvn-hoist -lower-expect -loop-reroll -slp-vectorizer -inferattrs -indvars -instcombine -newgvn -guard-widening -indvars -adce -functionattrs -post-inline-ee-instrument -simple-loop-unswitch -infer-address-spaces -die -barrier -barrier -argpromotion -guard-widening -instcombine -strip-nondebug -pgo-memop-opt -loweratomic -scalarizer -jump-threading -redundant-dbg-inst-elim -elim-avail-extern -ipconstprop -infer-address-spaces -pgo-memop-opt -instcombine -newgvn -sancov -adce -gvn-hoist -simplifycfg -lower-constant-intrinsics -jump-threading -name-anon-globals -gvn-hoist -bdce -ipconstprop -lowerinvoke -slp-vectorizer -callsite-splitting -loop-vectorize -sancov -strip-dead-prototypes -adce -ipconstprop -loop-data-prefetch -slsr -constprop -ee-instrument -constprop -callsite-splitting -inject-tli-mappings -simple-loop-unswitch -instcombine -lower-widenable-condition -lower-matrix-intrinsics -callsite-splitting -pgo-memop-opt -globalopt -aggressive-instcombine -loop-load-elim -strip-debug-declare -dce -slsr -loop-fusion -libcalls-shrinkwrap -slsr -jump-threading -loop-load-elim -instnamer -pgo-memop-opt -callsite-splitting -die -simplifycfg -break-crit-edges -inferattrs -post-inline-ee-instrument -inject-tli-mappings -tailcallelim -mergeicmps -jump-threading -instcombine -lower-matrix-intrinsics -gvn-hoist -newgvn -indvars -tailcallelim -simplifycfg -lower-widenable-condition -instnamer -rpo-functionattrs -gvn -dse -jump-threading -newgvn -callsite-splitting -die -instnamer -div-rem-pairs -benchmark://cbench-v1/ghostscript,1.0296089727338689,110.89521312713623,opt -loop-interchange -sroa -adce -early-cse-memssa -simplifycfg -loop-guard-widening -globalsplit -coro-elide -coro-elide -jump-threading -instcombine -globalsplit -sancov -slsr -speculative-execution -gvn -simplifycfg -instcombine -separate-const-offset-from-gep -instcombine -jump-threading -lower-constant-intrinsics -early-cse-memssa -float2int -gvn -deadargelim -partially-inline-libcalls -die -simplifycfg -loop-versioning -lower-constant-intrinsics -lower-constant-intrinsics -coro-cleanup -simplifycfg -coro-elide -prune-eh -jump-threading -simplifycfg -die -reassociate -loop-versioning -ipconstprop -rpo-functionattrs -loop-versioning -callsite-splitting -simplifycfg -gvn -early-cse-memssa -sancov -instnamer -ipconstprop -loop-data-prefetch -dse -adce -globalsplit -slp-vectorizer -rpo-functionattrs -functionattrs -called-value-propagation -loop-sink -simplifycfg -deadargelim -sancov -name-anon-globals -instcombine -callsite-splitting -gvn -coro-split -always-inline -rpo-functionattrs -sccp -insert-gcov-profiling -coro-split -early-cse-memssa -instnamer -early-cse -lower-expect -die -instsimplify -mldst-motion -instcombine -dse -coro-early -mergefunc -newgvn -gvn-hoist -callsite-splitting -newgvn -separate-const-offset-from-gep -die -sancov -instcombine -forceattrs -newgvn -jump-threading -coro-cleanup -aggressive-instcombine -float2int -strip-nondebug -instcombine -simple-loop-unswitch -simplifycfg -loop-load-elim -redundant-dbg-inst-elim -sancov -rpo-functionattrs -dse -mergefunc -lowerinvoke -instcombine -early-cse -strip-nondebug -early-cse -adce -simplifycfg -die -mergereturn -always-inline -licm -instnamer -insert-gcov-profiling -simple-loop-unswitch -reassociate -newgvn -coro-split -functionattrs -newgvn -simplifycfg -simplifycfg -dce -nary-reassociate -coro-split -newgvn -lower-widenable-condition -jump-threading -consthoist -separate-const-offset-from-gep -globalsplit -simplifycfg -dse -jump-threading -loop-load-elim -early-cse-memssa -gvn -instcombine -loweratomic -simplifycfg -functionattrs -consthoist -jump-threading -lower-expect -ipsccp -jump-threading -gvn -adce -newgvn -rpo-functionattrs -sccp -simplifycfg -prune-eh -early-cse-memssa -coro-split -simplifycfg -globaldce -sancov -speculative-execution -coro-elide -slp-vectorizer -name-anon-globals -globalsplit -consthoist -loop-data-prefetch -name-anon-globals -simplifycfg -simplifycfg -instcombine -instcombine -instcombine -mergefunc -canonicalize-aliases -functionattrs -instcombine -strip-debug-declare -prune-eh -infer-address-spaces -rpo-functionattrs -canonicalize-aliases -mergefunc -callsite-splitting -dce -loop-versioning -loop-load-elim -gvn-hoist -simplifycfg -lower-matrix-intrinsics -float2int -dse -simplifycfg -instsimplify -dse' -benchmark://cbench-v1/jpeg-d,1.0493254773173644,79.56333637237549,opt -sroa -loop-data-prefetch -instcombine -mergeicmps -always-inline -pgo-memop-opt -sroa -gvn-hoist -strip-nondebug -simplifycfg -lower-matrix-intrinsics -instcombine -mergereturn -mergereturn -newgvn -lower-matrix-intrinsics -loop-guard-widening -sroa -simplifycfg -bdce -consthoist -mem2reg -instcombine -loop-data-prefetch -early-cse-memssa -slp-vectorizer -lower-expect -functionattrs -sink -instcombine -gvn-hoist -dce -gvn -newgvn -instcombine -loop-fusion -simplifycfg -pgo-memop-opt -simplifycfg -instcombine -lowerinvoke -sroa -loop-vectorize -newgvn -dse -redundant-dbg-inst-elim -loop-data-prefetch -aggressive-instcombine -simplifycfg -instcombine -dse -name-anon-globals -simplifycfg -globalopt -aggressive-instcombine -simplifycfg -newgvn -gvn -simplifycfg -simplifycfg -ipsccp -mem2reg -add-discriminators -instcombine -simplifycfg -coro-cleanup -loop-interchange -strip-dead-prototypes -gvn-hoist -add-discriminators -jump-threading -simplifycfg -simplifycfg -mergeicmps -simplifycfg -instcombine -strip-nondebug -instcombine -licm -lower-expect -instcombine -insert-gcov-profiling -instcombine -instcombine -mem2reg -always-inline -loop-fusion -adce -mergefunc -instcombine -nary-reassociate -early-cse-memssa -instcombine -ipconstprop -lower-matrix-intrinsics -instsimplify -gvn-hoist -pgo-memop-opt -redundant-dbg-inst-elim -strip-nondebug -gvn-hoist -mldst-motion -sroa -lower-constant-intrinsics -aggressive-instcombine -reassociate -float2int -simplifycfg -dse -gvn-hoist -always-inline -loop-versioning -early-cse-memssa -inferattrs -mergeicmps -instcombine -mergefunc -lower-guard-intrinsic -lower-widenable-condition -newgvn -sroa -loop-idiom -simplifycfg -speculative-execution -instcombine -coro-split -loop-data-prefetch -instcombine -strip -indvars -lowerinvoke -ipconstprop -loop-fusion -slsr -sroa -loop-guard-widening -coro-split -early-cse-memssa -deadargelim -simplifycfg -rewrite-statepoints-for-gc -globaldce -infer-address-spaces -early-cse-memssa -gvn-hoist -adce -partially-inline-libcalls -lower-expect -lowerinvoke -instcombine -strip-dead-prototypes -coro-elide -globaldce -lower-widenable-condition -instcombine -elim-avail-extern -speculative-execution -globaldce -slsr -early-cse -infer-address-spaces -float2int -simplifycfg -elim-avail-extern -mergefunc -coro-cleanup -instcombine -globalsplit -slsr -ipconstprop -prune-eh -flattencfg -globalopt -insert-gcov-profiling -lower-expect -simplifycfg -early-cse-memssa -gvn-hoist -coro-elide -memcpyopt -early-cse-memssa -aggressive-instcombine -loop-unroll-and-jam -mergefunc -sroa -sroa -instcombine -gvn-hoist -sroa -loop-sink -simplifycfg -instcombine -simple-loop-unswitch -newgvn -instsimplify -forceattrs -sink -inject-tli-mappings -sroa -newgvn -gvn -mergereturn -gvn-hoist -always-inline -instnamer -loop-sink -adce -mem2reg -mldst-motion -sccp -inject-tli-mappings -consthoist -gvn -loop-data-prefetch -newgvn -instcombine -pgo-memop-opt -adce -adce -gvn-hoist -reassociate -instcombine -speculative-execution -loop-load-elim -dce -simplifycfg -reassociate -instcombine -simplifycfg -newgvn -prune-eh -adce -inject-tli-mappings -mem2reg -gvn-hoist -sroa -float2int -rewrite-statepoints-for-gc -simplifycfg -mldst-motion -simplifycfg -instcombine -simplifycfg -sroa -licm -libcalls-shrinkwrap -slp-vectorizer -simplifycfg -newgvn -adce -early-cse -simplifycfg -globalopt -inferattrs -dse -inject-tli-mappings -coro-cleanup -ipconstprop -slp-vectorizer -partially-inline-libcalls -simplifycfg -gvn -pgo-memop-opt -mergefunc -loop-data-prefetch -instcombine -lower-matrix-intrinsics -alignment-from-assumptions -newgvn -globalsplit -lower-constant-intrinsics -pgo-memop-opt -strip-dead-prototypes -coro-split -consthoist -loop-simplify -sccp -sink -inject-tli-mappings -lcssa -globaldce -consthoist -newgvn -consthoist -loop-distribute -adce -simplifycfg -elim-avail-extern -instcombine -constmerge -instcombine -instcombine -strip -simplifycfg -gvn -sroa -loop-vectorize -simplifycfg -instcombine -early-cse -instcombine -ipsccp -simplifycfg -consthoist -gvn-hoist -inject-tli-mappings -early-cse -dse -simplifycfg -lower-matrix-intrinsics -sroa -reassociate -barrier -simplifycfg -ipsccp -simplifycfg -barrier -gvn -sroa -simplifycfg -coro-cleanup -simplifycfg -simplifycfg -constprop -lower-matrix-intrinsics -instcombine -scalarizer -die -adce -gvn-hoist -loop-versioning -float2int -instsimplify -name-anon-globals -lowerinvoke -float2int -jump-threading -barrier -slsr -simple-loop-unswitch -ipconstprop -gvn-hoist -ipconstprop -rewrite-statepoints-for-gc -barrier -coro-split -inferattrs -instnamer -sroa -lower-widenable-condition -consthoist -always-inline -speculative-execution -newgvn -simplifycfg -loop-distribute -gvn-hoist -instcombine -early-cse-memssa -sccp -scalarizer -called-value-propagation -simplifycfg -instcombine -simplifycfg -globaldce -slsr -instcombine -newgvn -pgo-memop-opt -strip -inferattrs -lower-constant-intrinsics -jump-threading -strip-dead-prototypes -prune-eh -simplifycfg -lower-matrix-intrinsics -mergefunc -globalsplit -loop-sink -adce -slsr -instcombine -partially-inline-libcalls -sroa -newgvn -adce -newgvn -ipsccp -adce -tailcallelim -loop-sink -speculative-execution -gvn -lower-guard-intrinsic -simplifycfg -coro-split -consthoist -functionattrs -lower-guard-intrinsic -callsite-splitting -instcombine -sancov -mem2reg -strip-debug-declare -strip -globaldce -mem2reg -add-discriminators -consthoist -always-inline -dse -slp-vectorizer -sroa -strip -alignment-from-assumptions -jump-threading -jump-threading -instsimplify -newgvn -callsite-splitting -instcombine -loop-fusion -instcombine -barrier -lower-guard-intrinsic -consthoist -tailcallelim -loop-data-prefetch -simplifycfg -reassociate -newgvn -instcombine -functionattrs -simplifycfg -globalsplit -loop-versioning -newgvn -constmerge -simplifycfg -slp-vectorizer -coro-elide -simplifycfg -simplifycfg -instcombine -early-cse-memssa -instcombine -jump-threading -consthoist -strip-dead-prototypes -instnamer -loop-versioning -newgvn -barrier -div-rem-pairs -ipsccp -consthoist -slp-vectorizer -mergefunc -loweratomic -globalopt -coro-split -gvn -strip-dead-prototypes -guard-widening -lower-constant-intrinsics -loop-versioning -dse -instcombine -instcombine -lcssa -simplifycfg -instcombine -gvn -lower-constant-intrinsics -globaldce -newgvn -speculative-execution -deadargelim -callsite-splitting -sancov -mergeicmps -coro-elide -consthoist -inject-tli-mappings -strip-nondebug -consthoist -sancov -inject-tli-mappings -simplifycfg -speculative-execution -simplifycfg -globalopt -lowerinvoke -gvn-hoist -simplifycfg -instcombine -prune-eh -redundant-dbg-inst-elim -correlated-propagation -sancov -loop-simplifycfg -cross-dso-cfi -ipconstprop -simplifycfg -instcombine -ipconstprop -indvars -argpromotion -early-cse -sccp -early-cse -sccp -globalopt -newgvn -newgvn -infer-address-spaces -rpo-functionattrs -lower-widenable-condition -gvn-hoist -nary-reassociate -consthoist -lower-matrix-intrinsics -mergereturn -forceattrs -mem2reg -gvn-hoist -jump-threading -infer-address-spaces -float2int -mergereturn -sroa -coro-cleanup -nary-reassociate -ipsccp -instcombine -simplifycfg -loop-versioning -slp-vectorizer -slsr -early-cse-memssa -simplifycfg -early-cse-memssa -lower-constant-intrinsics -loweratomic -rpo-functionattrs -scalarizer -pgo-memop-opt -loop-versioning -indvars -float2int -simplifycfg -speculative-execution -newgvn -strip -mldst-motion -scalarizer -lower-matrix-intrinsics -argpromotion -lower-constant-intrinsics -sroa -aggressive-instcombine -mergefunc -newgvn -coro-split -jump-threading -reassociate -constprop -sccp -lowerinvoke -attributor -loop-data-prefetch -die -callsite-splitting -coro-split -simplifycfg -slp-vectorizer -simplifycfg -lower-matrix-intrinsics -early-cse-memssa -adce -newgvn -jump-threading -aggressive-instcombine -slp-vectorizer -loop-data-prefetch -rpo-functionattrs -insert-gcov-profiling -jump-threading -newgvn -jump-threading -mergefunc -sancov -post-inline-ee-instrument -callsite-splitting -strip-nondebug -die -jump-threading -mergeicmps -lower-widenable-condition -dse -always-inline -scalarizer -lower-guard-intrinsic -elim-avail-extern -strip-dead-prototypes -dse -strip-nondebug -coro-elide -gvn -loop-guard-widening -instcombine -instcombine -consthoist -lowerinvoke -instcombine -sroa -newgvn -simplifycfg -inferattrs -instsimplify -adce -argpromotion -slsr -early-cse -simplifycfg -strip-debug-declare -simplifycfg -gvn -lcssa -early-cse-memssa -lowerinvoke -globalsplit -float2int -adce -inferattrs -slsr -ipconstprop -strip-dead-prototypes -simplifycfg -guard-widening -strip-dead-prototypes -consthoist -globalopt -inferattrs -lowerinvoke -indvars -coro-elide -newgvn -simplifycfg -strip-nondebug -add-discriminators -prune-eh -mem2reg -lower-constant-intrinsics -sancov -forceattrs -cross-dso-cfi -constmerge -early-cse-memssa -licm -licm -newgvn -redundant-dbg-inst-elim -newgvn -dse -loop-unroll-and-jam -gvn-hoist -loop-data-prefetch -instcombine -consthoist -loop-versioning -newgvn -instcombine -instcombine -newgvn -loop-guard-widening -jump-threading -ipconstprop -constprop -instcombine -strip-dead-prototypes -deadargelim -coro-split -jump-threading -called-value-propagation -instcombine -mergeicmps -jump-threading -tailcallelim -mem2reg -ipsccp -consthoist -consthoist -globalsplit -cross-dso-cfi -lower-constant-intrinsics -coro-early -insert-gcov-profiling -benchmark://cbench-v1/patricia,1.0111234705228032,60.98874354362488,opt -sroa -sccp -sroa -loop-guard-widening -instsimplify -early-cse -sroa -called-value-propagation -newgvn -rewrite-statepoints-for-gc -gvn-hoist -loop-sink -loop-deletion -indvars -sroa -add-discriminators -sroa -sancov -sroa -instsimplify -sroa -sroa -reassociate -sroa -barrier -guard-widening -coro-cleanup -dce -called-value-propagation -loweratomic -ipconstprop -post-inline-ee-instrument -correlated-propagation -lower-widenable-condition -instsimplify -early-cse-memssa -early-cse -globalsplit -early-cse -adce -sroa -loop-unroll-and-jam -jump-threading -lcssa -alignment-from-assumptions -name-anon-globals -sancov -sink -sroa -licm -simplifycfg -newgvn -strip -newgvn -loop-unroll-and-jam -loop-distribute -pgo-memop-opt -flattencfg -simplifycfg -sroa -consthoist -adce -sroa -mldst-motion -strip-debug-declare -newgvn -sroa -loop-sink -loop-deletion -sroa -mem2reg -instcombine -loop-load-elim -strip-nondebug -sroa -name-anon-globals -newgvn -sroa -strip-nondebug -sroa -loop-guard-widening -aggressive-instcombine -indvars -loop-simplifycfg -insert-gcov-profiling -indvars -prune-eh -ee-instrument -tailcallelim -reassociate -loop-idiom -early-cse -sroa -instcombine -sroa -loop-distribute -redundant-dbg-inst-elim -pgo-memop-opt -sroa -functionattrs -tailcallelim -lower-matrix-intrinsics -strip-nondebug -dse -lower-constant-intrinsics -alignment-from-assumptions -float2int -sroa -dse -cross-dso-cfi -argpromotion -globalsplit -strip -globalsplit -lower-matrix-intrinsics -canonicalize-aliases -name-anon-globals -mldst-motion -ee-instrument -infer-address-spaces -indvars -inferattrs -div-rem-pairs -reassociate -ee-instrument -simplifycfg -strip-nondebug -die -callsite-splitting -rpo-functionattrs -loop-simplify -jump-threading -strip-nondebug -sancov -insert-gcov-profiling -loop-guard-widening -attributor -adce -sancov -div-rem-pairs -strip-dead-prototypes -dse -speculative-execution -gvn-hoist -reassociate -lower-matrix-intrinsics -gvn-hoist -lowerinvoke -scalarizer -consthoist -gvn -lower-matrix-intrinsics -sccp -gvn-hoist -simplifycfg -deadargelim -coro-split -correlated-propagation -lowerinvoke -instcombine -coro-split -loop-data-prefetch -globalopt -early-cse -lower-widenable-condition -die -coro-elide -correlated-propagation -attributor -globalsplit -adce -aggressive-instcombine -aggressive-instcombine -sancov -slsr -aggressive-instcombine -mergeicmps -consthoist -sancov -float2int -mergefunc -gvn-hoist -guard-widening -aggressive-instcombine -add-discriminators -sccp -strip-nondebug -early-cse-memssa -partially-inline-libcalls -loop-versioning -redundant-dbg-inst-elim -infer-address-spaces -strip-debug-declare -bdce -callsite-splitting -mergefunc -early-cse -loop-distribute -jump-threading -simplifycfg -early-cse-memssa -loop-versioning-licm -loop-predication -simplifycfg -sroa -mem2reg -infer-address-spaces -strip -mem2reg -flattencfg -post-inline-ee-instrument -sroa -add-discriminators -reassociate -sroa -sroa -sroa -sroa -sroa -alignment-from-assumptions -reassociate -sroa -sroa -loop-interchange -strip-nondebug -sroa -early-cse-memssa -float2int -lcssa -sroa -sroa -tailcallelim -called-value-propagation -loop-guard-widening -loop-predication -simplifycfg -sroa -sroa -load-store-vectorizer -loop-simplify -sroa -mem2reg -indvars -simple-loop-unswitch -loop-data-prefetch -sroa -loop-reroll -sroa -constprop -sroa -barrier -inject-tli-mappings -sroa -loop-reduce -scalarizer -ee-instrument -sroa -lcssa -loop-unroll-and-jam -sroa -loop-data-prefetch -sroa -ipconstprop -called-value-propagation -called-value-propagation -infer-address-spaces -sink -correlated-propagation -barrier -sroa -instsimplify -sroa -add-discriminators -loop-predication -gvn -instsimplify -mem2reg -gvn-hoist -instsimplify -sroa -sroa -mem2reg -lower-matrix-intrinsics -alignment-from-assumptions -add-discriminators -lower-matrix-intrinsics -dse -simplifycfg -loop-predication -loop-simplifycfg -sroa -lowerinvoke -mem2reg -called-value-propagation -loop-distribute -hotcoldsplit -loop-interchange -sroa -sink -sroa -sroa -forceattrs -sroa -sccp -simplifycfg -alignment-from-assumptions -sroa -mem2reg -sroa -scalarizer -sroa -sink -sroa -pgo-memop-opt -aggressive-instcombine -lower-guard-intrinsic -insert-gcov-profiling -called-value-propagation -loop-load-elim -loop-vectorize -loop-deletion -dce -barrier -sroa -lower-guard-intrinsic -loop-idiom -redundant-dbg-inst-elim -jump-threading -inject-tli-mappings -instcombine -loop-guard-widening -loop-deletion -mem2reg -sroa -insert-gcov-profiling -loop-interchange -alignment-from-assumptions -coro-cleanup -add-discriminators -sroa -coro-cleanup -simple-loop-unswitch -sroa -insert-gcov-profiling -insert-gcov-profiling -pgo-memop-opt -insert-gcov-profiling -sccp -bdce -mergereturn -mem2reg -rpo-functionattrs -instsimplify -sroa -sancov -globalsplit -sroa -instcombine -loop-deletion -sroa -mergereturn -instsimplify -sroa -jump-threading -sroa -sroa -div-rem-pairs -sroa -mergereturn -mem2reg -early-cse-memssa -early-cse -early-cse -sroa -sroa -simplifycfg -sroa -insert-gcov-profiling -sroa -sroa -sroa -sroa -loop-idiom -newgvn -loop-guard-widening -sroa -early-cse-memssa -strip-nondebug -sroa -sroa -instsimplify -mergereturn -ee-instrument -early-cse -reassociate -dce -sroa -forceattrs -sroa -loop-load-elim -hotcoldsplit -rpo-functionattrs -instsimplify -pgo-memop-opt -newgvn -sroa -bdce -sroa -lcssa -reassociate -add-discriminators -instsimplify -strip-nondebug -lower-guard-intrinsic -add-discriminators -simplifycfg -early-cse -sroa -gvn-hoist -loop-interchange -sroa -loop-guard-widening -newgvn -loop-guard-widening -simplifycfg -loop-load-elim -jump-threading -gvn-hoist -barrier -globalopt -lower-constant-intrinsics -lcssa -loop-fusion -bdce -lower-matrix-intrinsics -always-inline -early-cse -sink -loop-fusion -simple-loop-unswitch -sroa -sroa -sroa -dce -loop-predication -simple-loop-unswitch -loop-data-prefetch -simplifycfg -sroa -pgo-memop-opt -gvn-hoist -sroa -insert-gcov-profiling -hotcoldsplit -sancov -infer-address-spaces -sroa -loop-fusion -sroa -simplifycfg -instnamer -loop-distribute -inferattrs -loop-load-elim -attributor -loweratomic -sroa -infer-address-spaces -mem2reg -forceattrs -sroa -sroa -sroa -slp-vectorizer -early-cse -sroa -sroa -inject-tli-mappings -gvn-hoist -correlated-propagation -strip-nondebug -inferattrs -mergereturn -reassociate -lower-guard-intrinsic -early-cse -coro-elide -always-inline -loop-data-prefetch -instcombine -lower-guard-intrinsic -sroa -functionattrs -canonicalize-aliases -instnamer -mergereturn -inferattrs -sroa -early-cse -sink -indvars -instsimplify -loop-predication -early-cse -post-inline-ee-instrument -licm -instsimplify -instcombine -instcombine -licm -memcpyopt -gvn-hoist -instcombine -lcssa -dse -gvn-hoist -sroa -consthoist -loop-fusion -instnamer -strip-nondebug -inject-tli-mappings -sroa -scalarizer -called-value-propagation -inject-tli-mappings -forceattrs -div-rem-pairs -sancov -instcombine -loop-guard-widening -sroa -sroa -licm -loop-data-prefetch -mem2reg -lower-guard-intrinsic -simplifycfg -loop-guard-widening -instcombine -licm -consthoist -dce -simplifycfg -ee-instrument -instcombine -consthoist -sroa -coro-elide -adce -strip-dead-prototypes -sccp -infer-address-spaces -simplifycfg -barrier -sroa -div-rem-pairs -mem2reg -mem2reg -barrier -sroa -barrier -simplifycfg -dse -mem2reg -loop-versioning -mem2reg -early-cse -dce -reassociate -correlated-propagation -sink -gvn-hoist -simplifycfg -aggressive-instcombine -alignment-from-assumptions -simplifycfg -constmerge -scalarizer -lcssa -indvars -canonicalize-aliases -sroa -sccp -speculative-execution -instsimplify -simplifycfg -globalsplit -gvn-hoist -mem2reg -break-crit-edges -early-cse-memssa -sroa -adce -sroa -sink -sroa -coro-early -speculative-execution -instnamer -globalopt -alignment-from-assumptions -float2int -simplifycfg -gvn-hoist -alignment-from-assumptions -simplifycfg -sccp -ipsccp -instcombine -coro-elide -newgvn -instnamer -always-inline -instcombine -lower-widenable-condition -instnamer -redundant-dbg-inst-elim -simplifycfg -early-cse-memssa -dse -post-inline-ee-instrument -instnamer -mem2reg -early-cse-memssa -early-cse-memssa -gvn -simplifycfg -early-cse -add-discriminators -loop-fusion -dse -mergeicmps -flattencfg -gvn -nary-reassociate -loop-data-prefetch -globalopt -instcombine -slsr -forceattrs -constmerge -sccp -strip-nondebug -mergefunc -tailcallelim -instsimplify -scalarizer -lowerinvoke -slp-vectorizer -add-discriminators -pgo-memop-opt -dse -flattencfg -mergefunc -reassociate -lower-widenable-condition -partially-inline-libcalls -sancov -mergefunc -consthoist -scalarizer -aggressive-instcombine -coro-cleanup -coro-split -sink -inferattrs -instcombine -strip -strip-nondebug -mldst-motion -inferattrs -name-anon-globals -barrier -slp-vectorizer -instcombine -dce -die -instnamer -tailcallelim -loop-versioning -gvn -speculative-execution -sink -callsite-splitting -lower-constant-intrinsics -scalarizer -coro-split -aggressive-instcombine -slsr -callsite-splitting -dce -adce -flattencfg -gvn-hoist -sroa -die -insert-gcov-profiling -indvars -partially-inline-libcalls -benchmark://cbench-v1/rijndael,1.1092372556535077,62.701143980026245,opt -sroa -loop-versioning -gvn-hoist -simplifycfg -lower-widenable-condition -early-cse-memssa -consthoist -instcombine -globaldce -flattencfg -loop-data-prefetch -loop-versioning -instsimplify -gvn-hoist -simplifycfg -pgo-memop-opt -nary-reassociate -scalarizer -correlated-propagation -attributor -callsite-splitting -redundant-dbg-inst-elim -sancov -die -insert-gcov-profiling -instsimplify -redundant-dbg-inst-elim -jump-threading -early-cse-memssa -simplifycfg -slsr -scalarizer -mergefunc -called-value-propagation -simplifycfg -speculative-execution -slp-vectorizer -coro-elide -simplifycfg -mem2reg -coro-split -scalarizer -functionattrs -prune-eh -ipsccp -early-cse-memssa -callsite-splitting -name-anon-globals -slsr -slp-vectorizer -deadargelim -simplifycfg -newgvn -die -mergereturn -simplifycfg -callsite-splitting -name-anon-globals -slsr -adce -mldst-motion -simplifycfg -ipconstprop -constprop -simplifycfg -partially-inline-libcalls -insert-gcov-profiling -globalopt -post-inline-ee-instrument -simplifycfg -simplifycfg -constprop -die -lowerinvoke -strip-nondebug -globaldce -cross-dso-cfi -newgvn -jump-threading -simplifycfg -speculative-execution -loop-vectorize -die -instcombine -slp-vectorizer -simplifycfg -instcombine -irce -ipconstprop -newgvn -gvn-hoist -slp-vectorizer -rpo-functionattrs -instcombine -ipconstprop -simplifycfg -sccp -pgo-memop-opt -ipsccp -lower-constant-intrinsics -simplifycfg -always-inline -simplifycfg -lcssa -constmerge -gvn-hoist -simplifycfg -instcombine -dse -aggressive-instcombine -coro-elide -speculative-execution -callsite-splitting -consthoist -callsite-splitting -callsite-splitting -prune-eh -globalopt -reassociate -instnamer -early-cse -pgo-memop-opt -instcombine -reassociate -simplifycfg -loop-data-prefetch -float2int -functionattrs -adce -elim-avail-extern -loop-sink -gvn -strip-dead-prototypes -strip -guard-widening -instcombine -instcombine -loop-unroll-and-jam -globaldce -sccp -functionattrs -instcombine -instcombine -mergefunc -deadargelim -post-inline-ee-instrument -instcombine -adce -called-value-propagation -strip-nondebug -inject-tli-mappings -instcombine -instcombine -jump-threading -float2int -slp-vectorizer -loop-data-prefetch -lower-expect -tailcallelim -float2int -ipsccp -libcalls-shrinkwrap -redundant-dbg-inst-elim -instsimplify -infer-address-spaces -newgvn -mergereturn -aggressive-instcombine -lowerinvoke -callsite-splitting -simplifycfg -loop-unroll-and-jam -forceattrs -float2int -strip-nondebug -mergefunc -newgvn -slp-vectorizer -libcalls-shrinkwrap -separate-const-offset-from-gep -lcssa -dse -bdce -loop-versioning -called-value-propagation -speculative-execution -jump-threading -newgvn -simplifycfg -slsr -name-anon-globals -lower-widenable-condition -float2int -consthoist -slp-vectorizer -strip-debug-declare -globalsplit -early-cse-memssa -deadargelim -mergeicmps -globalopt -ee-instrument -inferattrs -insert-gcov-profiling -slp-vectorizer -instnamer -rewrite-statepoints-for-gc -newgvn -ipsccp -cross-dso-cfi -deadargelim -scalarizer -indvars -lower-guard-intrinsic -ipsccp -dse -loop-data-prefetch -slp-vectorizer -pgo-memop-opt -instcombine -pgo-memop-opt -coro-elide -simplifycfg -strip-dead-prototypes -adce -lower-widenable-condition -div-rem-pairs -add-discriminators -consthoist -alignment-from-assumptions -scalarizer -early-cse-memssa -gvn -early-cse-memssa -canonicalize-aliases -gvn-hoist -ee-instrument -slp-vectorizer -coro-split -lower-constant-intrinsics -cross-dso-cfi -cross-dso-cfi -pgo-memop-opt -sroa -redundant-dbg-inst-elim -early-cse-memssa -mergefunc -float2int -consthoist -lower-constant-intrinsics -simplifycfg -pgo-memop-opt -instcombine -mergereturn -strip -adce -partially-inline-libcalls -adce -barrier -sccp -gvn -newgvn -forceattrs -loop-unroll-and-jam -callsite-splitting -instcombine -argpromotion -strip-debug-declare -instcombine -post-inline-ee-instrument -globalopt -coro-split -instcombine -loop-simplify -loop-data-prefetch -post-inline-ee-instrument -dce -lowerinvoke -simplifycfg -aggressive-instcombine -inferattrs -coro-elide -functionattrs -name-anon-globals -loop-sink -simplifycfg -instcombine -sroa -reassociate -globaldce -globalsplit -instsimplify -post-inline-ee-instrument -add-discriminators -strip-nondebug -gvn -separate-const-offset-from-gep -loop-versioning -instcombine -post-inline-ee-instrument -gvn -instcombine -simplifycfg -elim-avail-extern -simplifycfg -rewrite-statepoints-for-gc -float2int -mergefunc -slsr -loop-vectorize -gvn-hoist -early-cse-memssa -lower-expect -early-cse -indvars -sancov -inferattrs -simplifycfg -jump-threading -consthoist -aggressive-instcombine -globaldce -simplifycfg -adce -newgvn -lower-expect -instcombine -callsite-splitting -lcssa -jump-threading -loop-versioning-licm -simplifycfg -globalopt -dce -loop-unroll-and-jam -nary-reassociate -cross-dso-cfi -early-cse-memssa -die -die -instcombine -add-discriminators -float2int -globalopt -instcombine -lower-matrix-intrinsics -die -slsr -gvn -gvn-hoist -die -indvars -mergefunc -consthoist -instnamer -simplifycfg -globalopt -slp-vectorizer -simplifycfg -aggressive-instcombine -nary-reassociate -argpromotion -consthoist -rpo-functionattrs -alignment-from-assumptions -coro-elide -elim-avail-extern -sccp -redundant-dbg-inst-elim -add-discriminators -called-value-propagation -coro-elide -licm -instcombine -gvn-hoist -inferattrs -mergeicmps -flattencfg -sccp -strip-debug-declare -sroa -early-cse-memssa -elim-avail-extern -ipsccp -newgvn -die -mergeicmps -prune-eh -mldst-motion -tailcallelim -simplifycfg -licm -sink -callsite-splitting -speculative-execution -callsite-splitting -canonicalize-aliases -rpo-functionattrs -mergefunc -ipsccp -strip-debug-declare -mem2reg -loop-vectorize -functionattrs -mergereturn -gvn -instcombine -ee-instrument -instsimplify -strip -correlated-propagation -reassociate -lcssa -coro-split -early-cse-memssa -early-cse-memssa -add-discriminators -simplifycfg -newgvn -prune-eh -simplifycfg -loop-unroll-and-jam -cross-dso-cfi -gvn -div-rem-pairs -ipconstprop -cross-dso-cfi -guard-widening -dse -barrier -newgvn -early-cse -strip-dead-prototypes -loop-load-elim -callsite-splitting -called-value-propagation -instcombine -prune-eh -coro-split -instcombine -globalsplit -instcombine -simplifycfg -pgo-memop-opt -alignment-from-assumptions -pgo-memop-opt -inferattrs -strip-dead-prototypes -callsite-splitting -lower-constant-intrinsics -ipconstprop -load-store-vectorizer -sancov -mergereturn -correlated-propagation -add-discriminators -coro-split -float2int -callsite-splitting -consthoist -pgo-memop-opt -cross-dso-cfi -loop-versioning -gvn-hoist -strip-nondebug -mergereturn -loop-data-prefetch -instcombine -early-cse-memssa -aggressive-instcombine -loweratomic -rpo-functionattrs -instcombine -adce -elim-avail-extern -ipconstprop -redundant-dbg-inst-elim -name-anon-globals -instcombine -dse -float2int -float2int -gvn -simple-loop-unswitch -jump-threading -instsimplify -loop-simplify -bdce -ipconstprop -instcombine -strip-nondebug -loop-sink -memcpyopt -guard-widening -ipsccp -newgvn -alignment-from-assumptions -lower-constant-intrinsics -mergereturn -strip-debug-declare -simplifycfg -instcombine -globalopt -rewrite-statepoints-for-gc -mldst-motion -globalsplit -redundant-dbg-inst-elim -scalarizer -ipconstprop -instcombine -libcalls-shrinkwrap -loop-versioning -sink -globalopt -callsite-splitting -loop-guard-widening -mldst-motion -simplifycfg -early-cse-memssa -instcombine -instcombine -name-anon-globals -jump-threading -die -early-cse -early-cse -inject-tli-mappings -adce -consthoist -insert-gcov-profiling -dce -early-cse -correlated-propagation -newgvn -jump-threading -instsimplify -callsite-splitting -gvn-hoist -simplifycfg -always-inline -simplifycfg -dce -globalsplit -sroa -loop-instsimplify -consthoist -instcombine -jump-threading -argpromotion -early-cse -instsimplify -pgo-memop-opt -flattencfg -mem2reg -dse -called-value-propagation -strip-nondebug -instcombine -ipconstprop -sroa -instsimplify -loop-unroll-and-jam -instcombine -alignment-from-assumptions -callsite-splitting -adce -coro-elide -lowerinvoke -lower-constant-intrinsics -loweratomic -forceattrs -simplifycfg -ipsccp -lower-matrix-intrinsics -loop-versioning -simplifycfg -instcombine -jump-threading -elim-avail-extern -mldst-motion -ipsccp -simplifycfg -strip-dead-prototypes -callsite-splitting -simplifycfg -nary-reassociate -post-inline-ee-instrument -aggressive-instcombine -newgvn -early-cse -simplifycfg -loop-unroll-and-jam -instcombine -instcombine -coro-elide -die -insert-gcov-profiling -gvn-hoist -ipsccp -forceattrs -sccp -simplifycfg -dce -instcombine -instcombine -instcombine -globaldce -loop-data-prefetch -scalarizer -early-cse -constprop -jump-threading -adce -simplifycfg -pgo-memop-opt -instcombine -mergereturn -simplifycfg -instcombine -newgvn -lowerinvoke -instsimplify -loop-deletion -memcpyopt -newgvn -jump-threading -lowerinvoke -newgvn -early-cse-memssa -loop-simplify -reassociate -loop-data-prefetch -simplifycfg -early-cse-memssa -instsimplify -early-cse-memssa -strip-dead-prototypes -simplifycfg -redundant-dbg-inst-elim -libcalls-shrinkwrap -instcombine -inferattrs -adce -coro-elide -early-cse -instcombine -insert-gcov-profiling -cross-dso-cfi -instcombine -prune-eh -instcombine -globalopt -mem2reg -inferattrs -memcpyopt -slsr -consthoist -simplifycfg -instnamer -simplifycfg -scalarizer -sink -gvn-hoist -early-cse-memssa -instsimplify -simplifycfg -early-cse-memssa -early-cse-memssa -insert-gcov-profiling -adce -float2int -instcombine -instnamer -indvars -redundant-dbg-inst-elim -early-cse-memssa -constmerge -instcombine -redundant-dbg-inst-elim -early-cse -die -strip-dead-prototypes -ipconstprop -early-cse-memssa -lowerinvoke -instcombine -loop-versioning -lower-guard-intrinsic -callsite-splitting -coro-elide -prune-eh -ipconstprop -simplifycfg -pgo-memop-opt -jump-threading -inferattrs -globaldce -early-cse-memssa -callsite-splitting -gvn-hoist -benchmark://cbench-v1/stringsearch2,0.9962686567164181,60.92854332923889,opt -partially-inline-libcalls -mem2reg -simple-loop-unswitch -mem2reg -add-discriminators -sroa -alignment-from-assumptions -sroa -bdce -gvn-hoist -separate-const-offset-from-gep -loop-reroll -early-cse-memssa -pgo-memop-opt -early-cse -inferattrs -cross-dso-cfi -early-cse -coro-cleanup -lcssa -scalarizer -sccp -lower-guard-intrinsic -adce -indvars -constprop -dce -early-cse -sroa -correlated-propagation -lower-guard-intrinsic -sroa -sroa -lower-matrix-intrinsics -sroa -inject-tli-mappings -loop-unroll-and-jam -newgvn -simplifycfg -aggressive-instcombine -sroa -strip-dead-prototypes -canonicalize-aliases -jump-threading -argpromotion -hotcoldsplit -loop-predication -loop-guard-widening -globalopt -newgvn -div-rem-pairs -mergereturn -sroa -coro-split -indvars -sroa -sccp -lower-matrix-intrinsics -coro-cleanup -strip-dead-prototypes -early-cse -loop-idiom -sroa -prune-eh -simplifycfg -lcssa -mergereturn -barrier -name-anon-globals -bdce -loop-guard-widening -loop-idiom -alignment-from-assumptions -instcombine -sroa -canonicalize-aliases -sroa -simplifycfg -prune-eh -loop-versioning-licm -insert-gcov-profiling -simple-loop-unswitch -sroa -globalopt -sroa -loweratomic -instcombine -mem2reg -sroa -cross-dso-cfi -callsite-splitting -prune-eh -alignment-from-assumptions -mergeicmps -consthoist -strip -constprop -insert-gcov-profiling -sroa -reassociate -infer-address-spaces -globalsplit -forceattrs -correlated-propagation -mergefunc -loop-sink -sccp -called-value-propagation -ipconstprop -memcpyopt -memcpyopt -lcssa -globalsplit -cross-dso-cfi -globalopt -mergeicmps -newgvn -mem2reg -instnamer -speculative-execution -loop-fusion -early-cse-memssa -canonicalize-aliases -sroa -sink -elim-avail-extern -sroa -gvn-hoist -adce -lowerinvoke -constmerge -callsite-splitting -deadargelim -instcombine -consthoist -early-cse-memssa -early-cse-memssa -simplifycfg -coro-elide -early-cse-memssa -early-cse-memssa -simplifycfg -instcombine -post-inline-ee-instrument -loop-data-prefetch -ipsccp -die -rpo-functionattrs -sroa -sancov -newgvn -partially-inline-libcalls -jump-threading -simplifycfg -early-cse -lower-guard-intrinsic -pgo-memop-opt -consthoist -mldst-motion -forceattrs -jump-threading -float2int -strip-debug-declare -lowerinvoke -instcombine -strip-debug-declare -early-cse -gvn-hoist -gvn -lowerinvoke -ipconstprop -globalopt -lower-matrix-intrinsics -functionattrs -lower-widenable-condition -jump-threading -loop-data-prefetch -instcombine -simplifycfg -gvn -licm -callsite-splitting -simplifycfg -tailcallelim -newgvn -instsimplify -speculative-execution -slsr -aggressive-instcombine -gvn-hoist -globalopt -guard-widening -sink -loop-unroll-and-jam -consthoist -jump-threading -loop-versioning -newgvn -adce -correlated-propagation -infer-address-spaces -globalopt -sroa -forceattrs -simplifycfg -sroa -infer-address-spaces -sroa -sroa -barrier -reassociate -sroa -dce -strip-nondebug -loop-reduce -ee-instrument -mem2reg -barrier -mldst-motion -sroa -sroa -sroa -loop-fusion -loop-simplify -sroa -loop-data-prefetch -constprop -loop-instsimplify -forceattrs -inferattrs -lcssa -mem2reg -loop-simplifycfg -insert-gcov-profiling -scalarizer -instcombine -bdce -sroa -sroa -ipconstprop -reassociate -called-value-propagation -insert-gcov-profiling -loop-unroll-and-jam -alignment-from-assumptions -loop-sink -barrier -sroa -canonicalize-aliases -reassociate -loop-predication -always-inline -loop-versioning -sink -sroa -sroa -adce -sroa -sroa -ipsccp -aggressive-instcombine -sroa -sroa -sroa -sroa -licm -always-inline -gvn-hoist -sroa -sroa -early-cse -sroa -loop-predication -insert-gcov-profiling -strip-nondebug -simple-loop-unswitch -constprop -alignment-from-assumptions -sroa -mem2reg -attributor -simplifycfg -sroa -inject-tli-mappings -sroa -sroa -sccp -sroa -sroa -instnamer -reassociate -pgo-memop-opt -sroa -strip-debug-declare -sroa -simplifycfg -globalopt -loop-guard-widening -sroa -simplifycfg -instsimplify -insert-gcov-profiling -mem2reg -instnamer -post-inline-ee-instrument -constmerge -constprop -sroa -early-cse -sroa -jump-threading -aggressive-instcombine -sccp -insert-gcov-profiling -sroa -sroa -mem2reg -sroa -loop-unroll-and-jam -sroa -gvn-hoist -sroa -canonicalize-aliases -inferattrs -constmerge -instsimplify -sroa -scalarizer -sroa -sroa -rpo-functionattrs -correlated-propagation -inferattrs -sroa -mem2reg -mem2reg -indvars -sroa -sancov -lower-guard-intrinsic -sroa -gvn-hoist -instsimplify -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -loop-reduce -sroa -sroa -early-cse-memssa -sroa -sroa -sroa -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -sroa -gvn-hoist -scalarizer -reassociate -loop-unswitch -ipsccp -sroa -simple-loop-unswitch -instcombine -mem2reg -forceattrs -simplifycfg -simplifycfg -strip-debug-declare -sroa -sroa -scalarizer -lower-matrix-intrinsics -sroa -sccp -loop-data-prefetch -callsite-splitting -sroa -loop-load-elim -newgvn -loop-simplifycfg -newgvn -sroa -simple-loop-unswitch -loop-interchange -sroa -rpo-functionattrs -sroa -adce -early-cse -globalsplit -mergefunc -functionattrs -sroa -mem2reg -loop-data-prefetch -name-anon-globals -globalsplit -prune-eh -ee-instrument -callsite-splitting -simplifycfg -strip -loop-load-elim -functionattrs -nary-reassociate -speculative-execution -rpo-functionattrs -indvars -instsimplify -sancov -ee-instrument -dce -elim-avail-extern -newgvn -mem2reg -dse -sink -deadargelim -instsimplify -ipsccp -dce -insert-gcov-profiling -insert-gcov-profiling -lower-expect -mergereturn -loop-interchange -reassociate -reassociate -sink -ee-instrument -ee-instrument -argpromotion -instsimplify -add-discriminators -reassociate -instcombine -rewrite-statepoints-for-gc -constprop -lcssa -sroa -instsimplify -constprop -insert-gcov-profiling -coro-early -strip-nondebug -sink -sancov -mergereturn -sroa -called-value-propagation -lower-guard-intrinsic -adce -hotcoldsplit -mem2reg -sroa -reassociate -globalopt -barrier -globalsplit -slsr -sroa -instnamer -correlated-propagation -coro-cleanup -hotcoldsplit -constmerge -sroa -lcssa -ipconstprop -sroa -insert-gcov-profiling -sroa -sroa -gvn-hoist -sroa -sroa -loop-deletion -sccp -name-anon-globals -jump-threading -mem2reg -slp-vectorizer -mem2reg -ee-instrument -functionattrs -sroa -post-inline-ee-instrument -sroa -bdce -mem2reg -ee-instrument -always-inline -globalopt -sroa -mergefunc -reassociate -insert-gcov-profiling -bdce -correlated-propagation -strip-dead-prototypes -loop-simplify -loop-guard-widening -mergereturn -reassociate -forceattrs -globalsplit -sccp -globalsplit -mem2reg -add-discriminators -alignment-from-assumptions -sroa -argpromotion -insert-gcov-profiling -pgo-memop-opt -sink -tailcallelim -early-cse -sroa -scalarizer -forceattrs -add-discriminators -callsite-splitting -loop-unswitch -rewrite-statepoints-for-gc -sroa -loop-interchange -infer-address-spaces -always-inline -early-cse-memssa -sroa -called-value-propagation -adce -simplifycfg -early-cse -loop-unroll-and-jam -elim-avail-extern -loop-unroll-and-jam -sroa -globalopt -globalsplit -barrier -scalarizer -infer-address-spaces -loop-versioning -elim-avail-extern -constprop -alignment-from-assumptions -speculative-execution -loop-sink -early-cse -sroa -insert-gcov-profiling -sroa -instsimplify -reassociate -constmerge -loop-guard-widening -mem2reg -aggressive-instcombine -instsimplify -forceattrs -speculative-execution -pgo-memop-opt -globalsplit -constmerge -div-rem-pairs -lower-widenable-condition -loop-guard-widening -loop-guard-widening -sroa -bdce -sroa -sroa -sroa -simplifycfg -forceattrs -coro-elide -lower-expect -licm -dse -newgvn -lower-guard-intrinsic -alignment-from-assumptions -reassociate -sroa -lcssa -strip -post-inline-ee-instrument -name-anon-globals -consthoist -mergefunc -ipsccp -infer-address-spaces -newgvn -tailcallelim -loop-versioning -sroa -sink -name-anon-globals -simplifycfg -instcombine -strip -sroa -simplifycfg -strip-nondebug -loop-unroll -load-store-vectorizer -coro-cleanup -consthoist -consthoist -simplifycfg -rewrite-statepoints-for-gc -loop-data-prefetch -globalsplit -instcombine -newgvn -inferattrs -jump-threading -dce -early-cse-memssa -globalopt -lower-constant-intrinsics -nary-reassociate -consthoist -instcombine -sancov -post-inline-ee-instrument -add-discriminators -post-inline-ee-instrument -instcombine -cross-dso-cfi -gvn -speculative-execution -slsr -inferattrs -simplifycfg -ipconstprop -sink -lower-guard-intrinsic -lower-expect -gvn -early-cse-memssa -newgvn -gvn-hoist -die -lower-expect -newgvn -lowerinvoke -early-cse-memssa -ipconstprop -barrier -loop-versioning -flattencfg -aggressive-instcombine -post-inline-ee-instrument -elim-avail-extern -newgvn -adce -indvars -aggressive-instcombine -gvn -dce -gvn -libcalls-shrinkwrap -strip-nondebug -dse -tailcallelim -gvn -early-cse-memssa -correlated-propagation -mergefunc -simplifycfg -loop-instsimplify -nary-reassociate -slsr -instcombine -newgvn -strip-nondebug -gvn -dce -float2int -instcombine -elim-avail-extern -consthoist -consthoist -instcombine -partially-inline-libcalls -lower-expect -instnamer -scalarizer -lower-constant-intrinsics -dse -lower-guard-intrinsic -newgvn -adce -benchmark://cbench-v1/susan,1.026874840030715,65.63927268981934,opt -sroa -lower-matrix-intrinsics -ipsccp -instcombine -early-cse -coro-split -simplifycfg -loop-sink -indvars -instcombine -sccp -coro-elide -coro-split -indvars -strip-nondebug -functionattrs -gvn -prune-eh -consthoist -early-cse-memssa -early-cse-memssa -reassociate -aggressive-instcombine -instsimplify -insert-gcov-profiling -simplifycfg -float2int -gvn -strip-dead-prototypes -die -gvn-hoist -guard-widening -loop-deletion -post-inline-ee-instrument -indvars -newgvn -newgvn -lower-matrix-intrinsics -early-cse -globalopt -instcombine -simplifycfg -simplifycfg -div-rem-pairs -globalsplit -lowerinvoke -add-discriminators -early-cse-memssa -partially-inline-libcalls -sink -jump-threading -callsite-splitting -add-discriminators -early-cse-memssa -cross-dso-cfi -simplifycfg -jump-threading -simplifycfg -instcombine -aggressive-instcombine -licm -simple-loop-unswitch -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -reassociate -constprop -callsite-splitting -elim-avail-extern -memcpyopt -globalsplit -memcpyopt -loop-data-prefetch -globalopt -slsr -consthoist -partially-inline-libcalls -lower-matrix-intrinsics -newgvn -lower-widenable-condition -simplifycfg -loop-versioning -load-store-vectorizer -lower-constant-intrinsics -instsimplify -globalopt -newgvn -pgo-memop-opt -redundant-dbg-inst-elim -newgvn -sink -lowerinvoke -adce -globalsplit -aggressive-instcombine -gvn -lcssa -sancov -coro-elide -sink -barrier -mergereturn -coro-split -gvn-hoist -partially-inline-libcalls -strip-nondebug -scalarizer -lower-matrix-intrinsics -simplifycfg -irce -loop-unroll-and-jam -strip-debug-declare -flattencfg -coro-cleanup -guard-widening -newgvn -speculative-execution -gvn -ipconstprop -instcombine -early-cse-memssa -simplifycfg -flattencfg -name-anon-globals -simplifycfg -div-rem-pairs -loop-versioning -simplifycfg -jump-threading -memcpyopt -instcombine -ipsccp -simplifycfg -sccp -pgo-memop-opt -early-cse-memssa -mldst-motion -float2int -loop-versioning -aggressive-instcombine -sroa -early-cse-memssa -strip -globaldce -scalarizer -instcombine -globalopt -lowerinvoke -inferattrs -elim-avail-extern -pgo-memop-opt -loop-load-elim -strip-dead-prototypes -slp-vectorizer -lower-widenable-condition -sancov -inject-tli-mappings -name-anon-globals -sroa -lower-matrix-intrinsics -sancov -slp-vectorizer -callsite-splitting -callsite-splitting -lower-expect -nary-reassociate -newgvn -lowerinvoke -gvn-hoist -early-cse-memssa -speculative-execution -callsite-splitting -speculative-execution -loweratomic -slsr -sroa -infer-address-spaces -instcombine -gvn -simplifycfg -libcalls-shrinkwrap -newgvn -instcombine -loop-data-prefetch -newgvn -globalopt -constprop -lower-matrix-intrinsics -lower-expect -globalsplit -coro-split -partially-inline-libcalls -lower-expect -always-inline -partially-inline-libcalls -add-discriminators -newgvn -gvn-hoist -gvn -libcalls-shrinkwrap -pgo-memop-opt -slp-vectorizer -insert-gcov-profiling -functionattrs -dse -gvn-hoist -add-discriminators -inferattrs -gvn -lower-matrix-intrinsics -early-cse-memssa -early-cse-memssa -lower-expect -correlated-propagation -pgo-memop-opt -newgvn -aggressive-instcombine -slsr -globalsplit -strip-nondebug -strip-debug-declare -instcombine -gvn -prune-eh -loop-versioning -instsimplify -ipsccp -flattencfg -forceattrs -strip -loop-simplify -float2int -jump-threading -gvn -nary-reassociate -lower-widenable-condition -dse -loop-deletion -lower-matrix-intrinsics -slp-vectorizer -adce -loop-interchange -gvn-hoist -gvn-hoist -loop-versioning -simplifycfg -infer-address-spaces -lower-widenable-condition -consthoist -lowerinvoke -libcalls-shrinkwrap -instcombine -lower-widenable-condition -strip-dead-prototypes -mergefunc -early-cse -elim-avail-extern -coro-elide -globaldce -gvn-hoist -instcombine -early-cse-memssa -instcombine -newgvn -argpromotion -jump-threading -simplifycfg -early-cse-memssa -coro-elide -instcombine -loop-data-prefetch -pgo-memop-opt -gvn -aggressive-instcombine -rewrite-statepoints-for-gc -lower-matrix-intrinsics -early-cse-memssa -rpo-functionattrs -coro-elide -dse -inferattrs -early-cse-memssa -slsr -callsite-splitting -speculative-execution -instcombine -adce -instcombine -post-inline-ee-instrument -tailcallelim -float2int -instcombine -instcombine -slp-vectorizer -sancov -coro-elide -functionattrs -scalarizer -lower-guard-intrinsic -always-inline -lower-matrix-intrinsics -instnamer -jump-threading -simplifycfg -instcombine -sccp -sancov -jump-threading -ipconstprop -callsite-splitting -newgvn -post-inline-ee-instrument -early-cse-memssa -globalsplit -consthoist -sancov -gvn-hoist -sink -functionattrs -cross-dso-cfi -early-cse-memssa -coro-split -reassociate -instcombine -callsite-splitting -pgo-memop-opt -memcpyopt -gvn-hoist -adce -infer-address-spaces -flattencfg -slp-vectorizer -lower-matrix-intrinsics -simplifycfg -callsite-splitting -loop-fusion -newgvn -instcombine -globalsplit -lower-guard-intrinsic -adce -jump-threading -deadargelim -loop-interchange -sancov -prune-eh -callsite-splitting -licm -lower-widenable-condition -post-inline-ee-instrument -jump-threading -ee-instrument -coro-elide -aggressive-instcombine -lowerinvoke -sink -early-cse-memssa -simplifycfg -loop-versioning -prune-eh -early-cse-memssa -constmerge -instcombine -mergefunc -jump-threading -nary-reassociate -newgvn -consthoist -rpo-functionattrs -simplifycfg -simplifycfg -coro-elide -instcombine -strip-dead-prototypes -partially-inline-libcalls -libcalls-shrinkwrap -strip -jump-threading -loop-load-elim -insert-gcov-profiling -simplifycfg -early-cse-memssa -alignment-from-assumptions -early-cse-memssa -rpo-functionattrs -early-cse-memssa -newgvn -early-cse-memssa -barrier -reassociate -gvn -strip-dead-prototypes -div-rem-pairs -globalopt -early-cse-memssa -loop-unroll-and-jam -early-cse-memssa -constprop -strip -partially-inline-libcalls -float2int -lower-widenable-condition -barrier -slsr -early-cse -simplifycfg -mergefunc -aggressive-instcombine -lower-widenable-condition -elim-avail-extern -dse -instcombine -loop-interchange -lowerinvoke -reassociate -instcombine -rpo-functionattrs -instcombine -jump-threading -simplifycfg -nary-reassociate -dse -strip-nondebug -always-inline -instsimplify -early-cse-memssa -globalopt -sancov -flattencfg -slsr -simplifycfg -strip-dead-prototypes -functionattrs -coro-elide -callsite-splitting -early-cse-memssa -loop-data-prefetch -instcombine -jump-threading -elim-avail-extern -slp-vectorizer -separate-const-offset-from-gep -gvn -always-inline -simplifycfg -newgvn -loop-load-elim -lower-widenable-condition -deadargelim -loop-versioning -early-cse -coro-elide -instnamer -cross-dso-cfi -adce -loop-load-elim -ipconstprop -lower-constant-intrinsics -strip-debug-declare -early-cse -inferattrs -instcombine -elim-avail-extern -instcombine -coro-elide -newgvn -instcombine -consthoist -bdce -rpo-functionattrs -globaldce -newgvn -adce -loop-data-prefetch -infer-address-spaces -gvn-hoist -strip -speculative-execution -sccp -lower-matrix-intrinsics -libcalls-shrinkwrap -newgvn -indvars -instcombine -simplifycfg -instcombine -partially-inline-libcalls -separate-const-offset-from-gep -mergefunc -canonicalize-aliases -dce -sancov -consthoist -infer-address-spaces -mergefunc -ipsccp -float2int -simplifycfg -slsr -div-rem-pairs -early-cse -lower-widenable-condition -instcombine -sancov -globalopt -coro-elide -dse -globalsplit -instcombine -instcombine -newgvn -rpo-functionattrs -speculative-execution -callsite-splitting -gvn -lower-expect -prune-eh -aggressive-instcombine -lowerinvoke -coro-elide -constprop -pgo-memop-opt -early-cse -lower-matrix-intrinsics -guard-widening -early-cse-memssa -coro-elide -callsite-splitting -simplifycfg -lower-widenable-condition -rewrite-statepoints-for-gc -constmerge -sink -lower-widenable-condition -slsr -indvars -deadargelim -simplifycfg -globalopt -rewrite-statepoints-for-gc -inject-tli-mappings -adce -lower-expect -cross-dso-cfi -coro-split -partially-inline-libcalls -ipconstprop -die -coro-cleanup -insert-gcov-profiling -aggressive-instcombine -simplifycfg -jump-threading -argpromotion -simplifycfg -name-anon-globals -sccp -newgvn -scalarizer -div-rem-pairs -strip-dead-prototypes -ipconstprop -prune-eh -inferattrs -lowerinvoke -globalsplit -adce -constprop -insert-gcov-profiling -partially-inline-libcalls -newgvn -dce -loop-versioning -callsite-splitting -pgo-memop-opt -die -lowerinvoke -aggressive-instcombine -die -callsite-splitting -partially-inline-libcalls -slsr -jump-threading -ipconstprop -instcombine -instnamer -elim-avail-extern -globalopt -die -loop-versioning -instcombine -deadargelim -sroa -partially-inline-libcalls -jump-threading -reassociate -newgvn -rpo-functionattrs -nary-reassociate -loop-data-prefetch -globaldce -instcombine -early-cse-memssa -gvn-hoist -gvn -float2int -licm -consthoist -newgvn -insert-gcov-profiling -sccp -slp-vectorizer -prune-eh -lowerinvoke -ipsccp -gvn -loop-data-prefetch -mergefunc -sink -lower-guard-intrinsic -redundant-dbg-inst-elim -early-cse-memssa -coro-early -instcombine -prune-eh -simplifycfg -prune-eh -dce -infer-address-spaces -elim-avail-extern -instcombine -coro-split -consthoist -gvn -globalsplit -add-discriminators -nary-reassociate -simplifycfg -sancov -forceattrs -consthoist -deadargelim -pgo-memop-opt -aggressive-instcombine -memcpyopt -memcpyopt -lower-expect -gvn-hoist -inferattrs -hotcoldsplit -lower-matrix-intrinsics -jump-threading -globalopt -lowerinvoke -aggressive-instcombine -lower-expect -aggressive-instcombine -gvn -die -mldst-motion -instcombine -coro-early -gvn -instsimplify -elim-avail-extern -sccp -aggressive-instcombine -instsimplify -reassociate -slsr -lower-widenable-condition -jump-threading -simplifycfg -libcalls-shrinkwrap -simplifycfg -aggressive-instcombine -instcombine -scalarizer -loop-simplify -loop-reroll -newgvn -early-cse-memssa -prune-eh -callsite-splitting -simplifycfg -globaldce -newgvn -functionattrs -dce -gvn-hoist -gvn -forceattrs -loop-fusion -strip-dead-prototypes -newgvn -forceattrs -die -instcombine -early-cse -instcombine -benchmark://cbench-v1/tiff2rgba,1.0461367226770069,77.85855555534363,opt -sroa -mem2reg -coro-split -instcombine -attributor -newgvn -guard-widening -lower-expect -float2int -gvn-hoist -simplifycfg -pgo-memop-opt -newgvn -globalopt -ipsccp -gvn-hoist -dse -loop-idiom -early-cse-memssa -dce -consthoist -lower-constant-intrinsics -gvn-hoist -simplifycfg -guard-widening -gvn-hoist -loop-versioning -slp-vectorizer -instcombine -always-inline -newgvn -rpo-functionattrs -consthoist -mergereturn -instcombine -infer-address-spaces -deadargelim -pgo-memop-opt -separate-const-offset-from-gep -strip-nondebug -called-value-propagation -rpo-functionattrs -ipconstprop -sink -ipsccp -forceattrs -add-discriminators -early-cse -flattencfg -dce -licm -instcombine -jump-threading -name-anon-globals -simplifycfg -dse -ipconstprop -simplifycfg -die -jump-threading -pgo-memop-opt -sink -slsr -lower-constant-intrinsics -simplifycfg -consthoist -constmerge -newgvn -post-inline-ee-instrument -coro-elide -pgo-memop-opt -adce -slsr -div-rem-pairs -ipsccp -reassociate -simplifycfg -sroa -newgvn -lower-matrix-intrinsics -lower-constant-intrinsics -pgo-memop-opt -strip-nondebug -lower-widenable-condition -dce -simplifycfg -consthoist -ipconstprop -lowerinvoke -slsr -ipsccp -float2int -instcombine -strip-dead-prototypes -infer-address-spaces -instnamer -reassociate -gvn-hoist -early-cse -alignment-from-assumptions -loop-versioning -barrier -mergeicmps -rpo-functionattrs -instcombine -newgvn -callsite-splitting -float2int -instcombine -strip-nondebug -jump-threading -die -gvn-hoist -instcombine -newgvn -barrier -gvn -partially-inline-libcalls -cross-dso-cfi -callsite-splitting -lower-expect -globaldce -coro-split -simplifycfg -deadargelim -callsite-splitting -lowerinvoke -die -sccp -instsimplify -sroa -early-cse-memssa -early-cse-memssa -consthoist -lowerinvoke -slp-vectorizer -prune-eh -instsimplify -callsite-splitting -newgvn -instsimplify -argpromotion -globalsplit -slp-vectorizer -early-cse-memssa -lower-expect -inferattrs -loop-fusion -elim-avail-extern -newgvn -dse -called-value-propagation -lower-constant-intrinsics -break-crit-edges -mem2reg -elim-avail-extern -mem2reg -callsite-splitting -newgvn -ee-instrument -sink -inject-tli-mappings -tailcallelim -tailcallelim -newgvn -forceattrs -simplifycfg -partially-inline-libcalls -simplifycfg -early-cse-memssa -pgo-memop-opt -lower-expect -instcombine -loop-simplify -canonicalize-aliases -loop-distribute -strip-dead-prototypes -cross-dso-cfi -instcombine -strip-dead-prototypes -early-cse-memssa -rpo-functionattrs -insert-gcov-profiling -rpo-functionattrs -instcombine -strip-debug-declare -coro-split -early-cse -instcombine -dse -scalarizer -simplifycfg -prune-eh -ipconstprop -slp-vectorizer -reassociate -consthoist -simplifycfg -die -aggressive-instcombine -sccp -argpromotion -early-cse -early-cse-memssa -scalarizer -early-cse-memssa -gvn-hoist -instcombine -guard-widening -redundant-dbg-inst-elim -flattencfg -die -simplifycfg -lower-widenable-condition -ee-instrument -slsr -float2int -strip-debug-declare -dce -lower-expect -name-anon-globals -ipsccp -load-store-vectorizer -argpromotion -instcombine -loop-sink -early-cse-memssa -early-cse-memssa -lower-constant-intrinsics -sancov -instcombine -simplifycfg -simplifycfg -jump-threading -slsr -float2int -mergereturn -simplifycfg -scalarizer -instcombine -loop-load-elim -simplifycfg -loop-versioning -die -coro-split -instcombine -instcombine -instsimplify -instcombine -gvn-hoist -rewrite-statepoints-for-gc -post-inline-ee-instrument -constprop -simplifycfg -newgvn -ipconstprop -prune-eh -instcombine -scalarizer -mem2reg -instcombine -instsimplify -instcombine -instcombine -add-discriminators -mldst-motion -lower-constant-intrinsics -mem2reg -indvars -simplifycfg -inferattrs -consthoist -coro-early -speculative-execution -aggressive-instcombine -instcombine -slsr -adce -newgvn -lower-matrix-intrinsics -rpo-functionattrs -slsr -mergereturn -rpo-functionattrs -slsr -instcombine -coro-elide -load-store-vectorizer -globalopt -gvn -consthoist -early-cse -gvn -tailcallelim -gvn-hoist -coro-elide -lower-expect -simplifycfg -lower-matrix-intrinsics -instcombine -constmerge -instnamer -ipconstprop -jump-threading -loop-data-prefetch -instcombine -add-discriminators -adce -nary-reassociate -gvn-hoist -loop-load-elim -simplifycfg -gvn -newgvn -simplifycfg -loop-data-prefetch -deadargelim -slp-vectorizer -loop-unroll-and-jam -forceattrs -simplifycfg -callsite-splitting -dse -adce -gvn-hoist -inferattrs -break-crit-edges -insert-gcov-profiling -simplifycfg -simplifycfg -sccp -infer-address-spaces -simplifycfg -newgvn -float2int -add-discriminators -post-inline-ee-instrument -consthoist -pgo-memop-opt -adce -lower-expect -instcombine -instcombine -coro-elide -flattencfg -called-value-propagation -jump-threading -coro-early -consthoist -adce -globalsplit -lcssa -simplifycfg -lower-widenable-condition -partially-inline-libcalls -infer-address-spaces -instcombine -post-inline-ee-instrument -consthoist -newgvn -loweratomic -argpromotion -instcombine -aggressive-instcombine -mergereturn -strip-nondebug -sroa -simplifycfg -strip-nondebug -globalsplit -loop-data-prefetch -mldst-motion -gvn-hoist -slsr -newgvn -sancov -pgo-memop-opt -loop-guard-widening -sccp -deadargelim -ipconstprop -aggressive-instcombine -lower-widenable-condition -loop-simplify -instcombine -early-cse-memssa -simplifycfg -sroa -coro-split -instcombine -adce -callsite-splitting -gvn-hoist -instcombine -instsimplify -nary-reassociate -coro-elide -lower-guard-intrinsic -dce -simple-loop-unswitch -consthoist -canonicalize-aliases -inferattrs -ipconstprop -correlated-propagation -coro-split -strip-nondebug -ee-instrument -early-cse-memssa -die -ipsccp -instcombine -forceattrs -ipconstprop -newgvn -simplifycfg -loop-load-elim -mergereturn -post-inline-ee-instrument -slsr -slsr -strip-dead-prototypes -simplifycfg -instcombine -early-cse-memssa -lower-matrix-intrinsics -instcombine -loop-load-elim -ipconstprop -instsimplify -loop-vectorize -instnamer -dse -dce -elim-avail-extern -pgo-memop-opt -coro-elide -callsite-splitting -gvn-hoist -rpo-functionattrs -mergeicmps -newgvn -simplifycfg -mergefunc -simplifycfg -gvn -mldst-motion -loop-versioning -scalarizer -deadargelim -post-inline-ee-instrument -newgvn -coro-elide -lower-matrix-intrinsics -slsr -simplifycfg -aggressive-instcombine -consthoist -instcombine -loop-deletion -scalarizer -jump-threading -coro-elide -canonicalize-aliases -correlated-propagation -div-rem-pairs -instcombine -gvn -gvn -reassociate -newgvn -reassociate -barrier -instcombine -cross-dso-cfi -jump-threading -adce -loop-load-elim -strip-dead-prototypes -simplifycfg -mldst-motion -gvn-hoist -reassociate -dse -div-rem-pairs -loop-data-prefetch -loop-fusion -coro-split -name-anon-globals -guard-widening -dce -aggressive-instcombine -instcombine -slsr -jump-threading -prune-eh -mergereturn -ipsccp -simplifycfg -tailcallelim -loop-deletion -early-cse-memssa -simplifycfg -name-anon-globals -early-cse-memssa -newgvn -adce -pgo-memop-opt -functionattrs -float2int -consthoist -strip-dead-prototypes -partially-inline-libcalls -globalopt -libcalls-shrinkwrap -mergefunc -consthoist -die -simplifycfg -strip -infer-address-spaces -gvn -name-anon-globals -constprop -coro-early -instcombine -loop-data-prefetch -simplifycfg -dse -loop-data-prefetch -reassociate -prune-eh -sroa -sancov -dse -simplifycfg -constmerge -mem2reg -jump-threading -die -instcombine -jump-threading -lower-constant-intrinsics -jump-threading -instcombine -separate-const-offset-from-gep -bdce -sroa -strip-dead-prototypes -pgo-memop-opt -constmerge -lower-matrix-intrinsics -lower-guard-intrinsic -slp-vectorizer -rewrite-statepoints-for-gc -coro-split -gvn -loop-distribute -instcombine -simplifycfg -instcombine -ipconstprop -lower-matrix-intrinsics -instcombine -newgvn -pgo-memop-opt -coro-elide -jump-threading -ipconstprop -instcombine -argpromotion -redundant-dbg-inst-elim -instcombine -lower-matrix-intrinsics -loop-guard-widening -float2int -dse -sccp -early-cse -adce -gvn-hoist -early-cse-memssa -early-cse -lower-expect -mergeicmps -early-cse-memssa -dse -strip-nondebug -loop-versioning -loop-instsimplify -mem2reg -coro-elide -early-cse-memssa -consthoist -lowerinvoke -simplifycfg -simplifycfg -instcombine -dse -ipconstprop -slsr -mergereturn -ipconstprop -mergefunc -newgvn -gvn-hoist -ipsccp -early-cse-memssa -dce -early-cse-memssa -dce -sccp -slsr -guard-widening -callsite-splitting -sroa -mergeicmps -globaldce -ipsccp -simplifycfg -ipsccp -redundant-dbg-inst-elim -early-cse-memssa -separate-const-offset-from-gep -post-inline-ee-instrument -lowerinvoke -alignment-from-assumptions -deadargelim -constprop -instnamer -coro-elide -loop-data-prefetch -lowerinvoke -mem2reg -consthoist -gvn-hoist -sccp -instcombine -tailcallelim -dse -simplifycfg -forceattrs -strip-dead-prototypes -coro-split -newgvn -instcombine -gvn -ee-instrument -coro-cleanup -instcombine -nary-reassociate -instcombine -simplifycfg -adce -instcombine -coro-cleanup -loop-load-elim -instcombine -early-cse-memssa -adce -dse -mergeicmps -instcombine -globaldce -consthoist -div-rem-pairs -instcombine -instcombine -globalsplit -constmerge -memcpyopt -globalsplit -globalopt -always-inline -mergereturn -instsimplify -instcombine -loop-guard-widening -mergefunc -coro-elide -adce -aggressive-instcombine -dse -rpo-functionattrs -early-cse -instcombine -sroa -strip-dead-prototypes -instcombine -instcombine -flattencfg -sink -consthoist -coro-split -gvn -memcpyopt -instcombine -coro-cleanup -lower-widenable-condition -slsr -benchmark://cbench-v1/tiffmedian,1.0459000717188616,77.83211016654968,opt -reg2mem -sroa -globalopt -constprop -pgo-memop-opt -simplifycfg -simple-loop-unswitch -coro-early -sroa -argpromotion -scalarizer -strip-dead-prototypes -adce -loop-data-prefetch -gvn-hoist -gvn-hoist -newgvn -pgo-memop-opt -lower-matrix-intrinsics -licm -loop-versioning -called-value-propagation -coro-split -simplifycfg -speculative-execution -strip-nondebug -lowerinvoke -ipconstprop -lowerinvoke -instcombine -name-anon-globals -simplifycfg -gvn-hoist -lower-guard-intrinsic -float2int -coro-elide -ipconstprop -insert-gcov-profiling -name-anon-globals -flattencfg -mergefunc -barrier -instcombine -loop-versioning -die -instcombine -div-rem-pairs -loop-simplify -jump-threading -gvn-hoist -newgvn -simplifycfg -die -mergeicmps -globalsplit -coro-split -globaldce -instcombine -reassociate -gvn-hoist -simplifycfg -instcombine -sroa -coro-early -rewrite-statepoints-for-gc -lower-expect -scalarizer -dce -jump-threading -mldst-motion -gvn-hoist -gvn -instcombine -loop-versioning -pgo-memop-opt -early-cse-memssa -strip-debug-declare -sancov -instcombine -instnamer -callsite-splitting -mergefunc -globalopt -ipconstprop -loop-deletion -coro-elide -dce -lowerinvoke -consthoist -instcombine -aggressive-instcombine -early-cse-memssa -lower-expect -lower-expect -nary-reassociate -gvn-hoist -sancov -strip-dead-prototypes -mem2reg -loop-simplify -loop-interchange -jump-threading -instcombine -infer-address-spaces -loop-unroll-and-jam -called-value-propagation -instcombine -gvn-hoist -simplifycfg -early-cse-memssa -sink -rpo-functionattrs -dce -globalsplit -dse -instnamer -loop-versioning -slsr -attributor -loop-data-prefetch -strip-dead-prototypes -flattencfg -lower-matrix-intrinsics -coro-elide -sccp -jump-threading -sancov -early-cse-memssa -attributor -always-inline -simplifycfg -flattencfg -loop-versioning -ipconstprop -memcpyopt -instcombine -instcombine -lower-widenable-condition -strip -insert-gcov-profiling -simplifycfg -guard-widening -adce -mergereturn -aggressive-instcombine -instsimplify -early-cse -loop-interchange -instcombine -callsite-splitting -simplifycfg -globalopt -deadargelim -elim-avail-extern -loop-distribute -pgo-memop-opt -simplifycfg -mergeicmps -globaldce -simplifycfg -loweratomic -insert-gcov-profiling -bdce -gvn-hoist -simplifycfg -gvn-hoist -newgvn -early-cse-memssa -globalopt -instcombine -sroa -early-cse-memssa -sccp -ipconstprop -newgvn -dse -slp-vectorizer -simplifycfg -mldst-motion -mergeicmps -mergereturn -gvn-hoist -slp-vectorizer -coro-elide -loop-unroll-and-jam -coro-split -instcombine -simplifycfg -sccp -dce -globalopt -speculative-execution -lower-widenable-condition -instcombine -die -callsite-splitting -inject-tli-mappings -early-cse -callsite-splitting -coro-split -speculative-execution -tailcallelim -rewrite-statepoints-for-gc -early-cse-memssa -callsite-splitting -inject-tli-mappings -insert-gcov-profiling -simplifycfg -jump-threading -callsite-splitting -jump-threading -mergefunc -licm -mergefunc -dse -loop-load-elim -early-cse-memssa -strip-nondebug -slsr -instcombine -dse -float2int -nary-reassociate -ipsccp -early-cse -canonicalize-aliases -loop-data-prefetch -speculative-execution -die -loop-versioning -mergereturn -reassociate -functionattrs -constmerge -jump-threading -loop-versioning -die -instcombine -jump-threading -correlated-propagation -coro-elide -jump-threading -loop-interchange -lower-matrix-intrinsics -lower-expect -called-value-propagation -strip-debug-declare -jump-threading -coro-elide -tailcallelim -consthoist -bdce -die -memcpyopt -lower-matrix-intrinsics -add-discriminators -instsimplify -coro-early -jump-threading -simplifycfg -lower-matrix-intrinsics -consthoist -mergereturn -cross-dso-cfi -lowerinvoke -loop-simplify -separate-const-offset-from-gep -gvn-hoist -inject-tli-mappings -callsite-splitting -jump-threading -separate-const-offset-from-gep -globaldce -coro-early -simplifycfg -simplifycfg -sancov -barrier -early-cse-memssa -ipconstprop -simplifycfg -speculative-execution -consthoist -coro-elide -argpromotion -dse -lower-expect -simplifycfg -add-discriminators -reassociate -slsr -instnamer -tailcallelim -newgvn -loop-versioning -sroa -jump-threading -deadargelim -mergefunc -loop-sink -post-inline-ee-instrument -coro-early -instcombine -strip -indvars -newgvn -mldst-motion -aggressive-instcombine -loop-unroll-and-jam -cross-dso-cfi -lowerinvoke -dce -gvn-hoist -instcombine -early-cse-memssa -globalopt -simplifycfg -nary-reassociate -die -loop-versioning -strip -jump-threading -instcombine -aggressive-instcombine -instcombine -callsite-splitting -newgvn -aggressive-instcombine -globalopt -globalsplit -elim-avail-extern -newgvn -scalarizer -coro-split -dce -bdce -instcombine -early-cse -early-cse-memssa -sancov -constprop -instcombine -prune-eh -sancov -gvn-hoist -loop-load-elim -simplifycfg -sancov -float2int -coro-early -ipconstprop -strip-nondebug -functionattrs -irce -called-value-propagation -strip-nondebug -deadargelim -dce -cross-dso-cfi -gvn -strip-nondebug -loop-versioning -slsr -load-store-vectorizer -newgvn -pgo-memop-opt -prune-eh -simplifycfg -loop-interchange -ee-instrument -adce -strip-nondebug -instcombine -cross-dso-cfi -consthoist -constprop -aggressive-instcombine -early-cse -rewrite-statepoints-for-gc -lower-expect -dse -adce -always-inline -pgo-memop-opt -float2int -always-inline -instcombine -gvn-hoist -simple-loop-unswitch -newgvn -instcombine -simplifycfg -loop-versioning -instcombine -simplifycfg -reassociate -simplifycfg -simplifycfg -consthoist -prune-eh -ipconstprop -constmerge -instcombine -mem2reg -lower-matrix-intrinsics -sroa -coro-cleanup -lower-guard-intrinsic -sroa -alignment-from-assumptions -early-cse-memssa -sccp -correlated-propagation -constprop -coro-cleanup -indvars -constprop -loop-versioning-licm -loop-data-prefetch -simplifycfg -insert-gcov-profiling -instcombine -constprop -insert-gcov-profiling -redundant-dbg-inst-elim -partially-inline-libcalls -adce -early-cse-memssa -instcombine -reassociate -simplifycfg -newgvn -insert-gcov-profiling -globalsplit -gvn-hoist -loop-data-prefetch -lower-guard-intrinsic -gvn -coro-elide -dce -strip-nondebug -strip-dead-prototypes -forceattrs -post-inline-ee-instrument -loop-data-prefetch -instcombine -early-cse-memssa -scalarizer -inject-tli-mappings -constmerge -adce -rewrite-statepoints-for-gc -newgvn -newgvn -reassociate -simplifycfg -jump-threading -reassociate -gvn-hoist -slsr -redundant-dbg-inst-elim -simplifycfg -loop-versioning -coro-early -ipconstprop -mergereturn -rewrite-statepoints-for-gc -lowerinvoke -functionattrs -instcombine -newgvn -strip -simplifycfg -strip-nondebug -early-cse-memssa -early-cse-memssa -newgvn -instcombine -prune-eh -reassociate -consthoist -simplifycfg -reassociate -redundant-dbg-inst-elim -lowerinvoke -instsimplify -lower-guard-intrinsic -simplifycfg -inferattrs -callsite-splitting -callsite-splitting -newgvn -newgvn -simplifycfg -coro-cleanup -instcombine -loop-simplify -loweratomic -instsimplify -coro-cleanup -simplifycfg -instcombine -instnamer -coro-elide -simplifycfg -globaldce -simplifycfg -aggressive-instcombine -barrier -div-rem-pairs -loop-versioning -aggressive-instcombine -dse -inferattrs -simplifycfg -newgvn -newgvn -rewrite-statepoints-for-gc -pgo-memop-opt -inferattrs -tailcallelim -instcombine -instcombine -instcombine -jump-threading -gvn-hoist -dse -functionattrs -consthoist -newgvn -globalsplit -strip-nondebug -sccp -instcombine -coro-cleanup -strip-nondebug -newgvn -instcombine -aggressive-instcombine -coro-split -instcombine -die -prune-eh -deadargelim -simplifycfg -sancov -inferattrs -simplifycfg -sancov -newgvn -die -instcombine -instcombine -lowerinvoke -mem2reg -elim-avail-extern -loop-data-prefetch -instcombine -die -gvn -tailcallelim -instcombine -coro-split -ipconstprop -simplifycfg -early-cse-memssa -newgvn -instcombine -mem2reg -always-inline -gvn-hoist -sink -simplifycfg -newgvn -newgvn -early-cse-memssa -scalarizer -newgvn -globalsplit -early-cse -gvn -instcombine -insert-gcov-profiling -lower-constant-intrinsics -newgvn -functionattrs -elim-avail-extern -gvn-hoist -instcombine -early-cse-memssa -insert-gcov-profiling -post-inline-ee-instrument -name-anon-globals -instsimplify -lowerinvoke -flattencfg -coro-split -ipsccp -simplifycfg -post-inline-ee-instrument -slsr -early-cse -simplifycfg -simplifycfg -coro-elide -instcombine -instcombine -simplifycfg -early-cse -sancov -strip-dead-prototypes -callsite-splitting -prune-eh -infer-address-spaces -callsite-splitting -sroa -pgo-memop-opt -early-cse -callsite-splitting -lowerinvoke -sancov -lower-constant-intrinsics -nary-reassociate -globaldce -mergeicmps -strip-nondebug -memcpyopt -instsimplify -instcombine -simplifycfg -newgvn -post-inline-ee-instrument -nary-reassociate -gvn -simplifycfg -instcombine -newgvn -loop-versioning -coro-early -lower-matrix-intrinsics -mergefunc -loop-fusion -rewrite-statepoints-for-gc -sroa -mergefunc -instcombine -simplifycfg -nary-reassociate -lower-guard-intrinsic -sccp -simplifycfg -mem2reg -lower-guard-intrinsic -gvn -add-discriminators -consthoist -cross-dso-cfi -add-discriminators -early-cse -called-value-propagation -gvn-hoist -loop-data-prefetch -newgvn -gvn -strip-nondebug -simplifycfg -dce -slsr -nary-reassociate -jump-threading -sink -instcombine -loop-data-prefetch -simplifycfg -instcombine -forceattrs -mergefunc -coro-split -gvn-hoist -lower-constant-intrinsics -gvn-hoist -loop-versioning -nary-reassociate -early-cse -simplifycfg -always-inline -strip-nondebug -dse -licm -coro-cleanup -alignment-from-assumptions -newgvn -speculative-execution -globaldce -argpromotion -prune-eh -coro-elide -pgo-memop-opt -gvn-hoist -inferattrs -benchmark://cbench-v1/bitcount,1.0199115044247788,61.001503229141235,opt -sroa -early-cse -early-cse -infer-address-spaces -early-cse-memssa -strip-nondebug -gvn-hoist -bdce -indvars -instcombine -newgvn -newgvn -speculative-execution -newgvn -loop-load-elim -early-cse -simplifycfg -cross-dso-cfi -strip-nondebug -always-inline -dse -ipsccp -simplifycfg -early-cse -sroa -simplifycfg -mem2reg -early-cse -jump-threading -simplifycfg -mem2reg -redundant-dbg-inst-elim -sroa -adce -sroa -simplifycfg -dce -sink -ee-instrument -sroa -newgvn -constprop -bdce -deadargelim -simplifycfg -simplifycfg -sroa -inferattrs -aggressive-instcombine -post-inline-ee-instrument -ipsccp -instcombine -lower-expect -simplifycfg -sroa -instcombine -loop-distribute -globalopt -argpromotion -gvn-hoist -instcombine -mem2reg -alignment-from-assumptions -globalsplit -instcombine -coro-elide -simplifycfg -loop-fusion -simplifycfg -functionattrs -simplifycfg -loop-versioning -inject-tli-mappings -dse -loop-versioning -loop-sink -instcombine -consthoist -lcssa -nary-reassociate -early-cse -dce -coro-early -loop-simplifycfg -gvn-hoist -aggressive-instcombine -simplifycfg -newgvn -jump-threading -adce -simplifycfg -loop-data-prefetch -coro-cleanup -simplifycfg -slsr -simplifycfg -rpo-functionattrs -ipconstprop -simplifycfg -mergereturn -tailcallelim -simplifycfg -simplifycfg -loweratomic -instcombine -jump-threading -always-inline -prune-eh -simple-loop-unswitch -strip -prune-eh -rewrite-statepoints-for-gc -simplifycfg -partially-inline-libcalls -scalarizer -simplifycfg -lower-widenable-condition -ee-instrument -float2int -rpo-functionattrs -simplifycfg -reassociate -simplifycfg -reassociate -float2int -dce -bdce -ipsccp -bdce -dse -consthoist -gvn-hoist -lower-matrix-intrinsics -adce -early-cse-memssa -ipconstprop -early-cse-memssa -gvn-hoist -ipconstprop -argpromotion -instcombine -pgo-memop-opt -correlated-propagation -lowerinvoke -lcssa -newgvn -strip-nondebug -lower-matrix-intrinsics -sancov -simplifycfg -instcombine -consthoist -early-cse-memssa -loop-distribute -aggressive-instcombine -loop-distribute -aggressive-instcombine -ipsccp -ipconstprop -elim-avail-extern -instcombine -mergeicmps -called-value-propagation -aggressive-instcombine -die -simplifycfg -newgvn -consthoist -instcombine -libcalls-shrinkwrap -tailcallelim -name-anon-globals -early-cse -globaldce -bdce -jump-threading -lower-expect -redundant-dbg-inst-elim -adce -strip-dead-prototypes -globaldce -nary-reassociate -jump-threading -gvn -strip-debug-declare -sccp -pgo-memop-opt -always-inline -die -constprop -separate-const-offset-from-gep -gvn-hoist -strip-nondebug -consthoist -argpromotion -ipconstprop -libcalls-shrinkwrap -loop-load-elim -strip -simplifycfg -lcssa -pgo-memop-opt -sroa -infer-address-spaces -flattencfg -loop-unswitch -insert-gcov-profiling -coro-elide -indvars -early-cse -mldst-motion -add-discriminators -gvn-hoist -ipsccp -prune-eh -dse -early-cse -early-cse -mergereturn -ipsccp -strip-nondebug -loop-guard-widening -loop-distribute -instcombine -strip-nondebug -early-cse -mergefunc -instcombine -instcombine -barrier -infer-address-spaces -pgo-memop-opt -argpromotion -loop-data-prefetch -ee-instrument -loop-versioning -gvn-hoist -instcombine -constprop -gvn-hoist -simplifycfg -instsimplify -sroa -globalopt -instcombine -jump-threading -adce -indvars -loop-unroll-and-jam -sroa -dce -sroa -aggressive-instcombine -early-cse-memssa -instsimplify -insert-gcov-profiling -sink -sink -add-discriminators -barrier -sroa -loweratomic -dce -div-rem-pairs -dce -pgo-memop-opt -deadargelim -sroa -strip-nondebug -loweratomic -sroa -infer-address-spaces -gvn-hoist -early-cse -scalarizer -coro-cleanup -inject-tli-mappings -speculative-execution -sroa -newgvn -loop-predication -instcombine -dce -gvn -insert-gcov-profiling -coro-elide -lower-constant-intrinsics -insert-gcov-profiling -newgvn -loop-distribute -dce -loop-unroll-and-jam -inferattrs -loop-unroll-and-jam -globalopt -loop-unroll-and-jam -speculative-execution -post-inline-ee-instrument -insert-gcov-profiling -instcombine -hotcoldsplit -simple-loop-unswitch -sroa -globaldce -sroa -coro-split -guard-widening -loop-deletion -globalopt -sroa -loop-data-prefetch -loop-load-elim -coro-cleanup -simple-loop-unswitch -tailcallelim -loop-versioning -sroa -loop-sink -sroa -insert-gcov-profiling -sroa -coro-elide -scalarizer -newgvn -insert-gcov-profiling -loop-data-prefetch -coro-elide -sroa -separate-const-offset-from-gep -gvn-hoist -indvars -inject-tli-mappings -pgo-memop-opt -mem2reg -loop-predication -lcssa -ipconstprop -always-inline -dce -loop-versioning -dce -strip -sroa -loop-guard-widening -mergefunc -simplifycfg -lowerinvoke -globalsplit -coro-cleanup -partially-inline-libcalls -ee-instrument -simplifycfg -redundant-dbg-inst-elim -prune-eh -sroa -coro-early -loop-versioning -sink -coro-cleanup -reassociate -sroa -sroa -sroa -ipsccp -sroa -infer-address-spaces -argpromotion -loop-vectorize -sroa -early-cse -loop-data-prefetch -infer-address-spaces -functionattrs -early-cse -loop-versioning -simplifycfg -loop-reroll -scalarizer -called-value-propagation -ipsccp -correlated-propagation -coro-early -loop-data-prefetch -instnamer -coro-elide -insert-gcov-profiling -canonicalize-aliases -constprop -sroa -globaldce -constmerge -infer-address-spaces -globaldce -ee-instrument -instnamer -loop-versioning -reassociate -sroa -simplifycfg -newgvn -speculative-execution -adce -sroa -loop-versioning -die -barrier -ipconstprop -sroa -lowerinvoke -constmerge -sroa -alignment-from-assumptions -dce -instnamer -newgvn -sroa -infer-address-spaces -infer-address-spaces -prune-eh -instcombine -simplifycfg -loop-deletion -coro-cleanup -cross-dso-cfi -mergereturn -sroa -newgvn -inferattrs -bdce -tailcallelim -loop-unroll-and-jam -loop-versioning -reassociate -early-cse-memssa -early-cse -lower-matrix-intrinsics -insert-gcov-profiling -lower-guard-intrinsic -simplifycfg -loop-distribute -sroa -infer-address-spaces -float2int -coro-elide -gvn -jump-threading -simplifycfg -sancov -globalsplit -lower-guard-intrinsic -instcombine -called-value-propagation -coro-cleanup -newgvn -reassociate -strip-nondebug -forceattrs -gvn-hoist -early-cse -simplifycfg -instcombine -slsr -coro-cleanup -simple-loop-unswitch -called-value-propagation -early-cse-memssa -always-inline -reassociate -consthoist -gvn-hoist -loop-idiom -nary-reassociate -strip-nondebug -simplifycfg -simplifycfg -newgvn -strip-dead-prototypes -name-anon-globals -sroa -mem2reg -mergefunc -prune-eh -lcssa -early-cse-memssa -loop-versioning -loop-data-prefetch -loop-idiom -newgvn -adce -dse -add-discriminators -loop-interchange -insert-gcov-profiling -sroa -inferattrs -deadargelim -strip-nondebug -instcombine -simplifycfg -pgo-memop-opt -mergereturn -simplifycfg -deadargelim -newgvn -newgvn -rpo-functionattrs -coro-early -strip-nondebug -jump-threading -loop-guard-widening -sroa -early-cse -pgo-memop-opt -instcombine -early-cse-memssa -hotcoldsplit -mergereturn -instcombine -newgvn -instcombine -loop-unroll-and-jam -dce -newgvn -sroa -simplifycfg -instnamer -lower-widenable-condition -lcssa -instcombine -globalopt -simplifycfg -sroa -add-discriminators -insert-gcov-profiling -partially-inline-libcalls -guard-widening -lcssa -consthoist -early-cse -loop-data-prefetch -separate-const-offset-from-gep -post-inline-ee-instrument -mergeicmps -loop-guard-widening -sroa -instcombine -strip-nondebug -correlated-propagation -dce -alignment-from-assumptions -simplifycfg -newgvn -sroa -dce -sroa -ipsccp -newgvn -instcombine -dse -coro-cleanup -simplifycfg -rewrite-statepoints-for-gc -post-inline-ee-instrument -instcombine -simplifycfg -early-cse -loop-data-prefetch -newgvn -sancov -loop-data-prefetch -simplifycfg -ipconstprop -early-cse -rpo-functionattrs -instcombine -loop-idiom -licm -instcombine -ipsccp -post-inline-ee-instrument -instnamer -globaldce -lower-guard-intrinsic -consthoist -newgvn -adce -argpromotion -slsr -instsimplify -simplifycfg -early-cse -ipconstprop -coro-split -partially-inline-libcalls -functionattrs -lower-matrix-intrinsics -forceattrs -prune-eh -tailcallelim -simplifycfg -strip-debug-declare -post-inline-ee-instrument -simplifycfg -gvn-hoist -die -jump-threading -gvn-hoist -loop-guard-widening -memcpyopt -flattencfg -instcombine -gvn -strip-nondebug -adce -cross-dso-cfi -simplifycfg -globalopt -loop-versioning -sroa -name-anon-globals -mergereturn -ipconstprop -instcombine -name-anon-globals -ee-instrument -functionattrs -loop-deletion -ipsccp -sancov -instcombine -lower-widenable-condition -instcombine -tailcallelim -coro-elide -consthoist -prune-eh -redundant-dbg-inst-elim -ipsccp -newgvn -speculative-execution -sink -instcombine -instcombine -sink -consthoist -early-cse-memssa -loop-unroll-and-jam -simplifycfg -instsimplify -jump-threading -deadargelim -loop-vectorize -simplifycfg -ipsccp -coro-cleanup -strip-nondebug -globalopt -simplifycfg -newgvn -slsr -early-cse-memssa -consthoist -mldst-motion -lower-widenable-condition -dce -mldst-motion -lowerinvoke -rpo-functionattrs -redundant-dbg-inst-elim -consthoist -redundant-dbg-inst-elim -instcombine -lower-matrix-intrinsics -simplifycfg -pgo-memop-opt -float2int -mergeicmps -post-inline-ee-instrument -insert-gcov-profiling -lower-constant-intrinsics -slsr -loop-data-prefetch -lower-constant-intrinsics -deadargelim -lowerinvoke -die -float2int -add-discriminators -always-inline -simplifycfg -aggressive-instcombine -redundant-dbg-inst-elim -memcpyopt -irce -instsimplify -lower-matrix-intrinsics -constmerge -loop-versioning -slsr -loop-versioning -benchmark://cbench-v1/bzip2,1.2212154350882676,71.58076405525208,opt -add-discriminators -instnamer -lower-guard-intrinsic -add-discriminators -instnamer -partially-inline-libcalls -sroa -strip-nondebug -newgvn -bdce -dce -licm -loop-data-prefetch -instcombine -redundant-dbg-inst-elim -instcombine -instcombine -float2int -adce -simplifycfg -slp-vectorizer -newgvn -separate-const-offset-from-gep -barrier -loop-versioning -forceattrs -instcombine -sroa -rpo-functionattrs -memcpyopt -div-rem-pairs -name-anon-globals -newgvn -flattencfg -memcpyopt -redundant-dbg-inst-elim -sccp -early-cse-memssa -elim-avail-extern -mergefunc -coro-cleanup -always-inline -mergefunc -mergereturn -ee-instrument -reassociate -correlated-propagation -globalopt -post-inline-ee-instrument -callsite-splitting -instcombine -strip-debug-declare -loweratomic -slsr -called-value-propagation -forceattrs -strip -callsite-splitting -loop-data-prefetch -simplifycfg -lower-widenable-condition -constmerge -scalarizer -libcalls-shrinkwrap -early-cse -dse -simplifycfg -argpromotion -simplifycfg -globalsplit -div-rem-pairs -newgvn -coro-cleanup -loop-load-elim -newgvn -instsimplify -simplifycfg -aggressive-instcombine -pgo-memop-opt -mergefunc -lower-expect -gvn -lower-matrix-intrinsics -pgo-memop-opt -early-cse-memssa -insert-gcov-profiling -adce -newgvn -sroa -loop-versioning -globalopt -coro-elide -coro-split -speculative-execution -mldst-motion -nary-reassociate -sancov -adce -ipsccp -slp-vectorizer -cross-dso-cfi -instcombine -coro-elide -mem2reg -speculative-execution -mergereturn -simplifycfg -newgvn -newgvn -early-cse-memssa -simplifycfg -dce -lowerinvoke -constprop -instcombine -infer-address-spaces -lower-widenable-condition -newgvn -coro-split -newgvn -tailcallelim -lower-widenable-condition -newgvn -loop-load-elim -loop-load-elim -globalopt -jump-threading -instcombine -mergefunc -simplifycfg -simplifycfg -early-cse-memssa -nary-reassociate -jump-threading -slp-vectorizer -loop-versioning -simplifycfg -speculative-execution -libcalls-shrinkwrap -globaldce -slp-vectorizer -lower-matrix-intrinsics -alignment-from-assumptions -loop-data-prefetch -slsr -early-cse-memssa -coro-split -adce -functionattrs -simplifycfg -sccp -instcombine -ee-instrument -instcombine -cross-dso-cfi -functionattrs -gvn -slsr -sroa -partially-inline-libcalls -mergeicmps -loop-data-prefetch -deadargelim -jump-threading -callsite-splitting -argpromotion -alignment-from-assumptions -functionattrs -scalarizer -loop-versioning -instsimplify -simplifycfg -die -loweratomic -gvn-hoist -dce -strip-nondebug -loop-data-prefetch -functionattrs -early-cse-memssa -gvn-hoist -coro-elide -slp-vectorizer -simplifycfg -die -early-cse-memssa -gvn-hoist -loop-versioning -forceattrs -gvn -libcalls-shrinkwrap -gvn-hoist -slsr -barrier -instcombine -reassociate -gvn -slp-vectorizer -slp-vectorizer -strip-nondebug -consthoist -rewrite-statepoints-for-gc -dse -gvn-hoist -sancov -gvn-hoist -strip-nondebug -correlated-propagation -sroa -die -simple-loop-unswitch -early-cse-memssa -deadargelim -load-store-vectorizer -redundant-dbg-inst-elim -strip-nondebug -die -strip-nondebug -lower-widenable-condition -jump-threading -mergefunc -cross-dso-cfi -callsite-splitting -reassociate -instcombine -strip-nondebug -pgo-memop-opt -add-discriminators -dce -coro-elide -lowerinvoke -die -instcombine -die -insert-gcov-profiling -simplifycfg -instcombine -instcombine -jump-threading -early-cse-memssa -adce -coro-elide -prune-eh -instcombine -gvn-hoist -newgvn -newgvn -strip-nondebug -instcombine -instcombine -early-cse -early-cse-memssa -loop-data-prefetch -rewrite-statepoints-for-gc -simplifycfg -reassociate -rewrite-statepoints-for-gc -prune-eh -callsite-splitting -instcombine -loop-load-elim -jump-threading -early-cse -die -slsr -mem2reg -alignment-from-assumptions -early-cse-memssa -simplifycfg -aggressive-instcombine -pgo-memop-opt -jump-threading -pgo-memop-opt -sancov -slsr -loop-data-prefetch -coro-split -early-cse-memssa -simplifycfg -coro-elide -gvn-hoist -simplifycfg -sink -called-value-propagation -instcombine -early-cse -sccp -deadargelim -early-cse -globalopt -indvars -coro-cleanup -globalopt -elim-avail-extern -globalsplit -instcombine -pgo-memop-opt -dce -dse -newgvn -add-discriminators -newgvn -instnamer -early-cse -die -instcombine -instcombine -mem2reg -canonicalize-aliases -elim-avail-extern -functionattrs -infer-address-spaces -ipconstprop -prune-eh -loop-fusion -lower-expect -instnamer -die -instsimplify -libcalls-shrinkwrap -mergefunc -instcombine -newgvn -simplifycfg -inferattrs -deadargelim -newgvn -simplifycfg -correlated-propagation -mergereturn -reassociate -simplifycfg -lower-guard-intrinsic -early-cse -functionattrs -newgvn -simplifycfg -simplifycfg -gvn -jump-threading -coro-elide -lower-widenable-condition -globaldce -slp-vectorizer -ipconstprop -instnamer -alignment-from-assumptions -instnamer -dce -nary-reassociate -instcombine -loop-load-elim -gvn -die -callsite-splitting -inject-tli-mappings -globalopt -coro-split -loop-load-elim -pgo-memop-opt -loop-data-prefetch -flattencfg -loop-versioning -functionattrs -instcombine -early-cse-memssa -newgvn -newgvn -add-discriminators -coro-elide -newgvn -deadargelim -gvn-hoist -mergeicmps -instcombine -instcombine -newgvn -instcombine -coro-elide -instcombine -instcombine -globalopt -mergeicmps -instcombine -early-cse-memssa -lower-expect -strip -jump-threading -nary-reassociate -infer-address-spaces -coro-early -dce -instcombine -slsr -slsr -early-cse-memssa -die -newgvn -jump-threading -insert-gcov-profiling -constmerge -newgvn -instcombine -simplifycfg -strip-debug-declare -elim-avail-extern -die -memcpyopt -jump-threading -separate-const-offset-from-gep -slp-vectorizer -gvn-hoist -coro-cleanup -loop-idiom -early-cse-memssa -simplifycfg -simplifycfg -lower-guard-intrinsic -early-cse-memssa -coro-cleanup -jump-threading -gvn-hoist -insert-gcov-profiling -strip-dead-prototypes -die -memcpyopt -lower-guard-intrinsic -loop-data-prefetch -forceattrs -indvars -newgvn -tailcallelim -float2int -div-rem-pairs -simplifycfg -early-cse-memssa -loop-fusion -instcombine -speculative-execution -flattencfg -deadargelim -loop-distribute -jump-threading -gvn -die -early-cse -simplifycfg -instcombine -sink -dse -jump-threading -coro-elide -simplifycfg -lower-widenable-condition -globaldce -add-discriminators -instcombine -newgvn -lower-expect -constprop -ipsccp -argpromotion -strip-debug-declare -lower-expect -speculative-execution -sink -gvn -newgvn -gvn-hoist -redundant-dbg-inst-elim -speculative-execution -redundant-dbg-inst-elim -simplifycfg -mergefunc -jump-threading -functionattrs -instcombine -float2int -scalarizer -reassociate -newgvn -gvn -consthoist -rpo-functionattrs -simplifycfg -loop-simplifycfg -gvn -instcombine -memcpyopt -early-cse-memssa -dse -speculative-execution -early-cse-memssa -coro-elide -newgvn -instcombine -functionattrs -ipconstprop -newgvn -instcombine -slsr -coro-split -lowerinvoke -prune-eh -early-cse -jump-threading -newgvn -always-inline -sccp -loop-instsimplify -instcombine -ipsccp -loop-simplify -ipsccp -coro-elide -loop-predication -newgvn -mergefunc -loop-deletion -nary-reassociate -speculative-execution -aggressive-instcombine -load-store-vectorizer -instcombine -gvn-hoist -alignment-from-assumptions -coro-elide -coro-cleanup -gvn -flattencfg -simplifycfg -sroa -add-discriminators -gvn-hoist -simplifycfg -memcpyopt -sccp -early-cse-memssa -ipconstprop -newgvn -prune-eh -instsimplify -alignment-from-assumptions -aggressive-instcombine -pgo-memop-opt -simplifycfg -sroa -coro-split -aggressive-instcombine -simplifycfg -instcombine -strip-dead-prototypes -slsr -loop-data-prefetch -ee-instrument -deadargelim -speculative-execution -lower-widenable-condition -gvn-hoist -loweratomic -loop-distribute -lower-widenable-condition -simplifycfg -globalopt -early-cse-memssa -pgo-memop-opt -lower-matrix-intrinsics -instcombine -early-cse-memssa -newgvn -sink -lower-expect -gvn -slp-vectorizer -gvn-hoist -simplifycfg -early-cse-memssa -strip-debug-declare -canonicalize-aliases -sroa -instcombine -early-cse-memssa -reassociate -loop-fusion -loop-distribute -loop-simplify -mergefunc -gvn-hoist -lower-matrix-intrinsics -gvn-hoist -indvars -scalarizer -instcombine -callsite-splitting -reassociate -name-anon-globals -scalarizer -newgvn -licm -sccp -redundant-dbg-inst-elim -lowerinvoke -early-cse-memssa -simplifycfg -newgvn -prune-eh -simplifycfg -sccp -aggressive-instcombine -loop-unroll-and-jam -strip -instcombine -div-rem-pairs -adce -simplifycfg -gvn-hoist -instcombine -pgo-memop-opt -loop-deletion -instnamer -lower-matrix-intrinsics -strip-nondebug -coro-split -ipsccp -adce -newgvn -lower-widenable-condition -pgo-memop-opt -mergefunc -coro-elide -aggressive-instcombine -scalarizer -newgvn -loop-versioning-licm -globaldce -lower-widenable-condition -dse -constmerge -coro-elide -post-inline-ee-instrument -adce -hotcoldsplit -simplifycfg -reassociate -loop-versioning -elim-avail-extern -tailcallelim -jump-threading -scalarizer -div-rem-pairs -newgvn -instcombine -float2int -rpo-functionattrs -inject-tli-mappings -die -loweratomic -called-value-propagation -sink -instcombine -rpo-functionattrs -loop-vectorize -newgvn -functionattrs -globalsplit -constmerge -newgvn -instcombine -strip -simplifycfg -dce -instcombine -strip-dead-prototypes -jump-threading -mergefunc -gvn-hoist -die -cross-dso-cfi -flattencfg -lower-expect -globalsplit -redundant-dbg-inst-elim -mem2reg -reassociate -simplifycfg -adce -lower-constant-intrinsics -speculative-execution -prune-eh -lower-guard-intrinsic -rpo-functionattrs -prune-eh -ipconstprop -aggressive-instcombine -tailcallelim -consthoist -strip-nondebug -lower-constant-intrinsics -globalopt -ipsccp -benchmark://cbench-v1/dijkstra,0.9948979591836736,61.20203399658203,opt -sroa -simple-loop-unswitch -loop-reroll -sroa -sroa -early-cse -sroa -called-value-propagation -loop-simplifycfg -sroa -name-anon-globals -reassociate -sroa -rewrite-statepoints-for-gc -instsimplify -die -sroa -loop-guard-widening -mem2reg -sroa -coro-early -sroa -bdce -sroa -inferattrs -sroa -loop-load-elim -mem2reg -add-discriminators -sroa -sroa -simplifycfg -sroa -insert-gcov-profiling -die -reassociate -dce -loop-data-prefetch -partially-inline-libcalls -sroa -sroa -sroa -loop-predication -sroa -argpromotion -instsimplify -sroa -instsimplify -sink -early-cse -sroa -sink -sroa -sroa -sroa -argpromotion -loop-load-elim -sroa -dce -rpo-functionattrs -early-cse -rpo-functionattrs -sroa -sroa -infer-address-spaces -strip-dead-prototypes -globaldce -insert-gcov-profiling -sink -guard-widening -infer-address-spaces -gvn-hoist -rewrite-statepoints-for-gc -sroa -bdce -alignment-from-assumptions -gvn-hoist -mldst-motion -post-inline-ee-instrument -globalopt -insert-gcov-profiling -argpromotion -instcombine -loop-unroll-and-jam -pgo-memop-opt -infer-address-spaces -pgo-memop-opt -dce -loop-unroll-and-jam -reassociate -sroa -sroa -early-cse -instsimplify -globalopt -instnamer -sroa -early-cse -always-inline -gvn-hoist -sroa -adce -sroa -simplifycfg -inject-tli-mappings -canonicalize-aliases -early-cse -newgvn -mem2reg -sroa -alignment-from-assumptions -globalsplit -early-cse-memssa -early-cse -lowerinvoke -gvn-hoist -insert-gcov-profiling -sancov -early-cse -load-store-vectorizer -simplifycfg -inferattrs -early-cse -name-anon-globals -bdce -sancov -simplifycfg -coro-cleanup -instcombine -slp-vectorizer -lower-expect -indvars -mem2reg -coro-elide -loop-data-prefetch -forceattrs -attributor -infer-address-spaces -early-cse-memssa -dse -partially-inline-libcalls -reassociate -rewrite-statepoints-for-gc -correlated-propagation -div-rem-pairs -memcpyopt -strip-nondebug -early-cse-memssa -strip-nondebug -called-value-propagation -dse -instnamer -insert-gcov-profiling -lower-guard-intrinsic -coro-elide -early-cse -scalarizer -mem2reg -lcssa -mem2reg -forceattrs -indvars -early-cse-memssa -early-cse-memssa -instcombine -adce -lower-guard-intrinsic -loweratomic -functionattrs -sroa -float2int -lower-guard-intrinsic -called-value-propagation -prune-eh -dse -simplifycfg -pgo-memop-opt -globaldce -inferattrs -rewrite-statepoints-for-gc -mergefunc -instcombine -sink -insert-gcov-profiling -instcombine -instsimplify -redundant-dbg-inst-elim -correlated-propagation -instcombine -lcssa -infer-address-spaces -aggressive-instcombine -early-cse-memssa -mergefunc -coro-early -constprop -globaldce -cross-dso-cfi -coro-early -partially-inline-libcalls -loop-reroll -lcssa -insert-gcov-profiling -globalsplit -sroa -forceattrs -licm -loop-predication -sroa -sroa -simplifycfg -mem2reg -sroa -div-rem-pairs -sroa -simplifycfg -sroa -insert-gcov-profiling -sroa -sroa -sroa -reassociate -reassociate -sroa -simplifycfg -instsimplify -sroa -sancov -sroa -sroa -simplifycfg -loop-fusion -mem2reg -sroa -alignment-from-assumptions -sroa -ee-instrument -alignment-from-assumptions -lower-guard-intrinsic -sroa -loop-simplify -sroa -sroa -lower-guard-intrinsic -load-store-vectorizer -guard-widening -bdce -loop-guard-widening -simple-loop-unswitch -reassociate -loop-load-elim -constprop -sroa -barrier -scalarizer -mem2reg -sccp -called-value-propagation -loop-reduce -sroa -infer-address-spaces -loop-predication -sroa -sroa -lower-guard-intrinsic -early-cse -aggressive-instcombine -loop-guard-widening -sroa -name-anon-globals -sroa -sroa -sroa -instcombine -sroa -newgvn -add-discriminators -sroa -alignment-from-assumptions -sroa -sroa -loop-interchange -sroa -correlated-propagation -sroa -sroa -lcssa -sroa -alignment-from-assumptions -globaldce -simple-loop-unswitch -sroa -strip-nondebug -globalopt -sroa -simple-loop-unswitch -sroa -loop-sink -sroa -sroa -reassociate -sroa -sroa -loop-simplify -loop-sink -sroa -div-rem-pairs -sroa -loop-unswitch -lowerinvoke -mem2reg -sroa -strip-nondebug -insert-gcov-profiling -barrier -sroa -sroa -licm -insert-gcov-profiling -sroa -sroa -sink -sroa -loop-unroll-and-jam -loop-simplify -sroa -simplifycfg -strip-dead-prototypes -loop-predication -early-cse -sroa -sroa -licm -loop-unroll-and-jam -insert-gcov-profiling -reassociate -loop-fusion -hotcoldsplit -sroa -simplifycfg -sroa -always-inline -correlated-propagation -speculative-execution -constprop -sroa -sroa -forceattrs -sroa -sroa -dce -sroa -forceattrs -sroa -sroa -loop-versioning -called-value-propagation -lowerinvoke -sroa -mem2reg -sroa -sroa -sroa -aggressive-instcombine -sroa -sroa -sroa -sroa -sroa -sroa -indvars -sroa -sroa -guard-widening -sroa -globalopt -loop-guard-widening -newgvn -lower-guard-intrinsic -gvn-hoist -canonicalize-aliases -lowerinvoke -sroa -sroa -separate-const-offset-from-gep -speculative-execution -nary-reassociate -lowerinvoke -hotcoldsplit -loop-unroll-and-jam -pgo-memop-opt -gvn-hoist -called-value-propagation -instsimplify -sroa -globalopt -early-cse-memssa -sroa -mem2reg -loop-versioning -sroa -insert-gcov-profiling -load-store-vectorizer -sroa -add-discriminators -sroa -sroa -mergefunc -add-discriminators -sroa -sroa -insert-gcov-profiling -loop-vectorize -reassociate -lcssa -early-cse -mem2reg -add-discriminators -sroa -bdce -loop-interchange -instsimplify -sroa -inferattrs -sroa -gvn -sroa -reassociate -gvn-hoist -reassociate -lcssa -sroa -instnamer -sroa -sroa -sroa -reassociate -loop-guard-widening -rewrite-statepoints-for-gc -loop-unroll-and-jam -sroa -sroa -sroa -insert-gcov-profiling -reassociate -sroa -loop-load-elim -sroa -strip-nondebug -dce -sroa -sroa -dce -reassociate -always-inline -dce -instsimplify -sroa -alignment-from-assumptions -sroa -sroa -sroa -sroa -mem2reg -speculative-execution -sroa -sroa -coro-early -constprop -sroa -loop-deletion -sroa -sroa -inferattrs -sroa -sroa -sroa -lower-guard-intrinsic -argpromotion -sroa -speculative-execution -mem2reg -speculative-execution -loop-reroll -sroa -constprop -sroa -sroa -constprop -adce -coro-early -always-inline -sroa -sroa -sroa -mem2reg -barrier -sroa -sroa -infer-address-spaces -alignment-from-assumptions -sroa -sroa -sroa -loop-unroll-and-jam -instsimplify -reassociate -alignment-from-assumptions -sroa -sroa -mem2reg -sroa -pgo-memop-opt -sccp -sroa -bdce -simple-loop-unswitch -sroa -alignment-from-assumptions -add-discriminators -sroa -sroa -insert-gcov-profiling -loop-sink -gvn-hoist -sroa -sroa -loop-load-elim -mem2reg -mem2reg -sroa -sroa -sroa -sroa -sroa -insert-gcov-profiling -loop-guard-widening -sroa -sroa -indvars -strip-dead-prototypes -add-discriminators -loop-guard-widening -tailcallelim -loop-predication -sroa -mem2reg -mem2reg -globalsplit -sroa -mem2reg -sccp -loop-simplify -globalopt -simplifycfg -sroa -sroa -loop-data-prefetch -loop-data-prefetch -forceattrs -strip-nondebug -reassociate -loop-data-prefetch -instsimplify -insert-gcov-profiling -lcssa -insert-gcov-profiling -infer-address-spaces -coro-early -loop-load-elim -lower-guard-intrinsic -sroa -mem2reg -sroa -sroa -sroa -memcpyopt -instnamer -inferattrs -canonicalize-aliases -globalopt -dce -sroa -early-cse-memssa -simplifycfg -called-value-propagation -reassociate -consthoist -ipsccp -newgvn -sccp -barrier -lower-guard-intrinsic -sroa -scalarizer -bdce -speculative-execution -barrier -strip-nondebug -coro-cleanup -forceattrs -slsr -adce -loop-data-prefetch -sink -mergefunc -instsimplify -sroa -elim-avail-extern -scalarizer -aggressive-instcombine -sroa -early-cse-memssa -sroa -name-anon-globals -simplifycfg -gvn -coro-cleanup -ipsccp -sancov -lowerinvoke -mergefunc -sroa -instcombine -early-cse-memssa -slp-vectorizer -jump-threading -sccp -simplifycfg -early-cse -globalsplit -float2int -dse -sroa -coro-cleanup -name-anon-globals -gvn-hoist -jump-threading -mergereturn -separate-const-offset-from-gep -lcssa -reassociate -instsimplify -loop-unroll-and-jam -instsimplify -mem2reg -strip-dead-prototypes -early-cse-memssa -loop-load-elim -name-anon-globals -loop-unroll-and-jam -newgvn -sink -infer-address-spaces -constprop -tailcallelim -loop-data-prefetch -sroa -simplifycfg -early-cse -newgvn -newgvn -sroa -lowerinvoke -scalarizer -instcombine -early-cse-memssa -tailcallelim -rewrite-statepoints-for-gc -slp-vectorizer -simplifycfg -slsr -early-cse-memssa -add-discriminators -barrier -loop-deletion -sroa -lowerinvoke -adce -dse -early-cse -jump-threading -instcombine -newgvn -mergefunc -lower-matrix-intrinsics -lower-matrix-intrinsics -lower-constant-intrinsics -simplifycfg -simplifycfg -reassociate -flattencfg -sancov -callsite-splitting -instcombine -simplifycfg -early-cse-memssa -elim-avail-extern -loop-versioning -sancov -benchmark://cbench-v1/gsm,1.1296065737051797,64.22639560699463,opt -sroa -gvn-hoist -rpo-functionattrs -adce -coro-split -insert-gcov-profiling -instnamer -lower-expect -newgvn -strip-dead-prototypes -rpo-functionattrs -float2int -float2int -loop-data-prefetch -mergeicmps -gvn-hoist -strip-nondebug -indvars -sccp -float2int -mergereturn -simplifycfg -sancov -coro-split -simplifycfg -indvars -consthoist -instcombine -mem2reg -early-cse-memssa -pgo-memop-opt -rewrite-statepoints-for-gc -loop-simplifycfg -early-cse-memssa -gvn-hoist -lower-expect -functionattrs -speculative-execution -scalarizer -name-anon-globals -jump-threading -mergefunc -jump-threading -gvn-hoist -ipconstprop -lower-expect -simplifycfg -loop-predication -gvn -early-cse-memssa -sancov -newgvn -insert-gcov-profiling -ipconstprop -partially-inline-libcalls -dce -simplifycfg -early-cse -separate-const-offset-from-gep -lcssa -sancov -coro-elide -prune-eh -called-value-propagation -partially-inline-libcalls -early-cse -lcssa -sroa -globalsplit -coro-elide -post-inline-ee-instrument -newgvn -aggressive-instcombine -ipsccp -simplifycfg -instcombine -ipsccp -newgvn -float2int -ipsccp -early-cse-memssa -loweratomic -instcombine -separate-const-offset-from-gep -consthoist -sccp -scalarizer -name-anon-globals -mem2reg -slp-vectorizer -loop-data-prefetch -gvn -newgvn -coro-elide -deadargelim -mergeicmps -lower-widenable-condition -globalsplit -argpromotion -lower-matrix-intrinsics -lower-constant-intrinsics -dse -gvn-hoist -memcpyopt -insert-gcov-profiling -slsr -lower-guard-intrinsic -simplifycfg -insert-gcov-profiling -elim-avail-extern -strip-nondebug -sancov -instnamer -simplifycfg -aggressive-instcombine -simplifycfg -deadargelim -load-store-vectorizer -globalsplit -strip-nondebug -strip-nondebug -prune-eh -ipsccp -slsr -ipsccp -tailcallelim -simplifycfg -inject-tli-mappings -simplifycfg -gvn -instcombine -early-cse -bdce -slp-vectorizer -aggressive-instcombine -constprop -consthoist -adce -div-rem-pairs -loop-load-elim -tailcallelim -lcssa -mergefunc -tailcallelim -mldst-motion -mldst-motion -lower-constant-intrinsics -cross-dso-cfi -coro-cleanup -indvars -strip-nondebug -simplifycfg -bdce -strip-nondebug -simplifycfg -forceattrs -insert-gcov-profiling -consthoist -memcpyopt -ipconstprop -callsite-splitting -loop-interchange -callsite-splitting -ipconstprop -slp-vectorizer -nary-reassociate -coro-elide -callsite-splitting -called-value-propagation -jump-threading -instcombine -nary-reassociate -strip-dead-prototypes -simplifycfg -slsr -newgvn -correlated-propagation -instcombine -globalsplit -jump-threading -libcalls-shrinkwrap -dse -simplifycfg -instsimplify -load-store-vectorizer -loop-versioning -barrier -pgo-memop-opt -ipconstprop -instcombine -early-cse-memssa -argpromotion -simplifycfg -deadargelim -lower-widenable-condition -slp-vectorizer -jump-threading -prune-eh -early-cse-memssa -dse -simplifycfg -alignment-from-assumptions -die -aggressive-instcombine -sancov -instcombine -memcpyopt -insert-gcov-profiling -lowerinvoke -mem2reg -strip-debug-declare -ipsccp -globalsplit -inferattrs -instcombine -dse -ipconstprop -lowerinvoke -newgvn -flattencfg -guard-widening -globalsplit -tailcallelim -float2int -newgvn -mergeicmps -lower-expect -simplifycfg -lower-constant-intrinsics -partially-inline-libcalls -ipsccp -simplifycfg -lower-matrix-intrinsics -loop-versioning -partially-inline-libcalls -loweratomic -early-cse-memssa -post-inline-ee-instrument -scalarizer -lower-matrix-intrinsics -slp-vectorizer -instcombine -inferattrs -instcombine -coro-elide -gvn -slsr -lower-constant-intrinsics -newgvn -loop-versioning -sroa -deadargelim -functionattrs -name-anon-globals -adce -early-cse -prune-eh -callsite-splitting -functionattrs -ee-instrument -instcombine -simplifycfg -attributor -mergeicmps -lower-constant-intrinsics -sink -jump-threading -jump-threading -strip-dead-prototypes -coro-split -speculative-execution -functionattrs -instcombine -instsimplify -jump-threading -attributor -newgvn -instnamer -loop-data-prefetch -mldst-motion -simplifycfg -dce -float2int -gvn-hoist -consthoist -aggressive-instcombine -aggressive-instcombine -gvn-hoist -correlated-propagation -instsimplify -elim-avail-extern -slsr -ipsccp -simplifycfg -gvn -globalsplit -simplifycfg -sancov -gvn-hoist -float2int -dce -coro-elide -mergereturn -cross-dso-cfi -early-cse-memssa -early-cse-memssa -rewrite-statepoints-for-gc -early-cse-memssa -coro-split -licm -dce -functionattrs -early-cse-memssa -separate-const-offset-from-gep -consthoist -pgo-memop-opt -rpo-functionattrs -div-rem-pairs -insert-gcov-profiling -argpromotion -die -coro-early -ipconstprop -lower-expect -speculative-execution -gvn-hoist -consthoist -rpo-functionattrs -jump-threading -functionattrs -rpo-functionattrs -mldst-motion -dse -instcombine -speculative-execution -flattencfg -strip -lowerinvoke -instcombine -lower-widenable-condition -mergereturn -coro-cleanup -loop-versioning -dse -dse -consthoist -globalsplit -dce -libcalls-shrinkwrap -ipsccp -jump-threading -mergefunc -dse -lower-widenable-condition -insert-gcov-profiling -coro-elide -called-value-propagation -gvn-hoist -strip-debug-declare -coro-early -coro-early -slsr -lower-guard-intrinsic -newgvn -gvn -lower-constant-intrinsics -globaldce -loop-versioning -callsite-splitting -slp-vectorizer -prune-eh -strip -early-cse -lowerinvoke -early-cse-memssa -gvn-hoist -loop-versioning -globalsplit -loop-data-prefetch -dse -simplifycfg -strip-debug-declare -instcombine -constprop -jump-threading -simplifycfg -callsite-splitting -float2int -adce -name-anon-globals -functionattrs -lower-widenable-condition -ipconstprop -mergereturn -gvn -memcpyopt -instcombine -simplifycfg -globaldce -post-inline-ee-instrument -gvn-hoist -early-cse-memssa -redundant-dbg-inst-elim -early-cse-memssa -simplifycfg -consthoist -dse -strip -strip-nondebug -gvn-hoist -instcombine -lower-guard-intrinsic -name-anon-globals -loop-load-elim -die -simplifycfg -callsite-splitting -instcombine -partially-inline-libcalls -gvn -lower-widenable-condition -lower-widenable-condition -rewrite-statepoints-for-gc -slp-vectorizer -attributor -deadargelim -deadargelim -instcombine -die -instcombine -dse -instcombine -lower-constant-intrinsics -simplifycfg -coro-split -constprop -gvn-hoist -simplifycfg -simplifycfg -lower-widenable-condition -die -mem2reg -speculative-execution -strip-debug-declare -strip -callsite-splitting -slsr -instcombine -newgvn -slp-vectorizer -simplifycfg -slsr -loop-instsimplify -gvn-hoist -early-cse-memssa -post-inline-ee-instrument -lower-matrix-intrinsics -tailcallelim -attributor -consthoist -dse -jump-threading -loop-vectorize -rpo-functionattrs -globaldce -strip-nondebug -newgvn -lower-constant-intrinsics -cross-dso-cfi -strip-nondebug -dse -early-cse-memssa -simplifycfg -attributor -globalsplit -coro-elide -speculative-execution -loop-load-elim -rewrite-statepoints-for-gc -gvn -lower-constant-intrinsics -insert-gcov-profiling -early-cse-memssa -lowerinvoke -lower-matrix-intrinsics -redundant-dbg-inst-elim -loop-data-prefetch -lower-matrix-intrinsics -newgvn -inferattrs -adce -ipsccp -simplifycfg -newgvn -simplifycfg -early-cse-memssa -dse -pgo-memop-opt -instcombine -scalarizer -lower-constant-intrinsics -guard-widening -instcombine -newgvn -float2int -tailcallelim -aggressive-instcombine -gvn -loop-versioning -lowerinvoke -rewrite-statepoints-for-gc -post-inline-ee-instrument -coro-cleanup -coro-split -prune-eh -slp-vectorizer -redundant-dbg-inst-elim -separate-const-offset-from-gep -mldst-motion -sccp -coro-early -post-inline-ee-instrument -constprop -instcombine -newgvn -newgvn -sccp -deadargelim -gvn-hoist -loop-simplify -speculative-execution -loweratomic -simplifycfg -coro-elide -globalopt -adce -simplifycfg -instcombine -newgvn -libcalls-shrinkwrap -sroa -lowerinvoke -globalopt -consthoist -strip-debug-declare -reassociate -strip-nondebug -barrier -lower-widenable-condition -scalarizer -early-cse -mldst-motion -globalopt -insert-gcov-profiling -slsr -newgvn -die -simplifycfg -dse -lower-matrix-intrinsics -newgvn -jump-threading -pgo-memop-opt -newgvn -newgvn -loop-versioning -instcombine -globalsplit -loop-versioning -strip-dead-prototypes -instcombine -callsite-splitting -gvn-hoist -early-cse-memssa -instcombine -memcpyopt -mergeicmps -gvn -instcombine -sroa -lower-expect -break-crit-edges -lower-expect -loweratomic -mergeicmps -callsite-splitting -coro-elide -coro-elide -ipconstprop -early-cse-memssa -slp-vectorizer -constmerge -called-value-propagation -adce -newgvn -jump-threading -mergefunc -globalsplit -instcombine -sccp -tailcallelim -slsr -slp-vectorizer -newgvn -post-inline-ee-instrument -sccp -always-inline -die -loweratomic -coro-cleanup -die -instcombine -die -ee-instrument -prune-eh -nary-reassociate -early-cse-memssa -instcombine -slp-vectorizer -die -deadargelim -instcombine -die -cross-dso-cfi -die -newgvn -loop-data-prefetch -insert-gcov-profiling -instcombine -loweratomic -coro-elide -slp-vectorizer -globaldce -newgvn -infer-address-spaces -globaldce -slsr -loop-distribute -post-inline-ee-instrument -mergereturn -ipsccp -instcombine -globalopt -globaldce -rpo-functionattrs -strip-debug-declare -post-inline-ee-instrument -deadargelim -gvn-hoist -instcombine -jump-threading -lower-matrix-intrinsics -barrier -slp-vectorizer -jump-threading -instcombine -instcombine -coro-elide -dce -simplifycfg -instcombine -early-cse -simplifycfg -mldst-motion -simplifycfg -die -simplifycfg -dce -newgvn -jump-threading -float2int -rpo-functionattrs -name-anon-globals -mergeicmps -lcssa -sancov -name-anon-globals -slsr -sink -coro-cleanup -prune-eh -flattencfg -gvn-hoist -float2int -dse -consthoist -slsr -insert-gcov-profiling -callsite-splitting -dse -coro-cleanup -insert-gcov-profiling -gvn -simplifycfg -canonicalize-aliases -die -bdce -instcombine -cross-dso-cfi -loop-simplify -benchmark://cbench-v1/jpeg-c,1.0468425458040127,78.61691927909851,opt -sroa -sroa -nary-reassociate -consthoist -functionattrs -infer-address-spaces -functionattrs -instsimplify -simplifycfg -adce -simplifycfg -gvn-hoist -coro-elide -ipconstprop -hotcoldsplit -globalsplit -instcombine -instsimplify -redundant-dbg-inst-elim -lower-guard-intrinsic -jump-threading -instsimplify -inject-tli-mappings -mem2reg -instsimplify -newgvn -rpo-functionattrs -redundant-dbg-inst-elim -pgo-memop-opt -pgo-memop-opt -simplifycfg -forceattrs -scalarizer -simplifycfg -newgvn -die -globalsplit -instsimplify -loop-guard-widening -sroa -sroa -speculative-execution -constprop -speculative-execution -pgo-memop-opt -instcombine -newgvn -gvn-hoist -early-cse-memssa -lower-constant-intrinsics -early-cse-memssa -newgvn -sink -consthoist -loop-data-prefetch -ipsccp -rpo-functionattrs -inject-tli-mappings -sccp -lower-widenable-condition -newgvn -instcombine -newgvn -irce -instcombine -lower-guard-intrinsic -forceattrs -lcssa -gvn-hoist -simplifycfg -coro-split -slsr -simplifycfg -sccp -simplifycfg -globaldce -loop-unroll-and-jam -guard-widening -indvars -simplifycfg -scalarizer -loop-interchange -constprop -pgo-memop-opt -instcombine -sroa -dce -newgvn -instcombine -gvn -strip-nondebug -simplifycfg -slsr -insert-gcov-profiling -early-cse -forceattrs -lower-widenable-condition -nary-reassociate -loop-data-prefetch -adce -lower-matrix-intrinsics -ipsccp -canonicalize-aliases -simplifycfg -lower-matrix-intrinsics -gvn-hoist -dce -lower-expect -instcombine -loop-vectorize -pgo-memop-opt -sroa -instcombine -loop-predication -instcombine -licm -name-anon-globals -globalsplit -simplifycfg -dce -sroa -inferattrs -reassociate -sroa -mem2reg -prune-eh -jump-threading -licm -gvn-hoist -indvars -mergereturn -loop-simplify -lower-widenable-condition -sroa -early-cse-memssa -newgvn -coro-split -instcombine -gvn-hoist -strip -loop-versioning -elim-avail-extern -mergefunc -simplifycfg -loop-data-prefetch -adce -adce -aggressive-instcombine -pgo-memop-opt -loop-distribute -globalopt -sancov -alignment-from-assumptions -jump-threading -mergeicmps -licm -loop-versioning -strip-dead-prototypes -scalarizer -newgvn -simplifycfg -strip-debug-declare -functionattrs -simplifycfg -instcombine -loweratomic -gvn-hoist -tailcallelim -coro-cleanup -loop-data-prefetch -loop-versioning -simplifycfg -instcombine -partially-inline-libcalls -add-discriminators -newgvn -dce -ee-instrument -consthoist -slsr -consthoist -loop-data-prefetch -mldst-motion -correlated-propagation -loop-distribute -infer-address-spaces -infer-address-spaces -strip-debug-declare -simplifycfg -dse -slsr -gvn -separate-const-offset-from-gep -sancov -rpo-functionattrs -ipconstprop -loop-data-prefetch -globalsplit -deadargelim -cross-dso-cfi -ipconstprop -newgvn -globaldce -strip-debug-declare -loop-guard-widening -infer-address-spaces -strip-nondebug -alignment-from-assumptions -instcombine -infer-address-spaces -instnamer -early-cse -loop-versioning -loop-versioning -slsr -gvn -simplifycfg -strip-debug-declare -sroa -coro-early -lcssa -deadargelim -pgo-memop-opt -aggressive-instcombine -bdce -early-cse-memssa -sroa -strip-dead-prototypes -ipconstprop -mldst-motion -coro-elide -newgvn -instcombine -newgvn -simplifycfg -ipsccp -early-cse -partially-inline-libcalls -loop-distribute -mldst-motion -lcssa -callsite-splitting -loop-unroll-and-jam -nary-reassociate -sancov -cross-dso-cfi -coro-cleanup -early-cse-memssa -gvn-hoist -flattencfg -gvn-hoist -die -ipsccp -ee-instrument -strip -globalopt -sink -inject-tli-mappings -instcombine -coro-elide -canonicalize-aliases -strip-nondebug -instsimplify -simplifycfg -jump-threading -simplifycfg -sroa -strip-debug-declare -coro-split -loop-versioning -newgvn -instcombine -early-cse -sancov -simplifycfg -loop-load-elim -mem2reg -ipsccp -slp-vectorizer -early-cse -newgvn -functionattrs -inject-tli-mappings -partially-inline-libcalls -instcombine -post-inline-ee-instrument -instcombine -strip-nondebug -called-value-propagation -gvn-hoist -loop-reroll -barrier -alignment-from-assumptions -simplifycfg -simplifycfg -early-cse-memssa -newgvn -redundant-dbg-inst-elim -die -early-cse-memssa -mergeicmps -inject-tli-mappings -infer-address-spaces -loop-data-prefetch -gvn -lowerinvoke -gvn -guard-widening -aggressive-instcombine -simplifycfg -dce -scalarizer -guard-widening -dce -simplifycfg -pgo-memop-opt -always-inline -simplifycfg -slsr -correlated-propagation -coro-elide -canonicalize-aliases -simplifycfg -alignment-from-assumptions -mergefunc -slsr -indvars -simplifycfg -gvn-hoist -deadargelim -lower-constant-intrinsics -simplifycfg -newgvn -coro-split -loop-data-prefetch -newgvn -consthoist -instcombine -globaldce -div-rem-pairs -simplifycfg -coro-elide -gvn -redundant-dbg-inst-elim -newgvn -instcombine -gvn-hoist -mergefunc -flattencfg -lower-constant-intrinsics -consthoist -simple-loop-unswitch -mergereturn -early-cse-memssa -slsr -cross-dso-cfi -licm -mergefunc -dce -instcombine -simplifycfg -simplifycfg -loop-versioning -ipconstprop -pgo-memop-opt -scalarizer -early-cse -strip -coro-cleanup -strip-dead-prototypes -globalsplit -float2int -coro-elide -early-cse -mldst-motion -simplifycfg -callsite-splitting -deadargelim -sroa -slsr -guard-widening -gvn -loop-vectorize -coro-cleanup -div-rem-pairs -rewrite-statepoints-for-gc -mergereturn -forceattrs -loop-vectorize -mldst-motion -jump-threading -adce -instcombine -loop-versioning -barrier -strip-dead-prototypes -newgvn -instcombine -simplifycfg -flattencfg -pgo-memop-opt -gvn -prune-eh -sccp -newgvn -sroa -early-cse-memssa -instcombine -simplifycfg -newgvn -mem2reg -coro-elide -deadargelim -simplifycfg -newgvn -infer-address-spaces -reassociate -jump-threading -functionattrs -jump-threading -simple-loop-unswitch -loop-simplify -always-inline -lower-constant-intrinsics -simplifycfg -globalopt -newgvn -loop-versioning -lowerinvoke -loop-unroll-and-jam -gvn-hoist -pgo-memop-opt -loop-load-elim -bdce -consthoist -early-cse -gvn-hoist -ipconstprop -lcssa -mergeicmps -instcombine -always-inline -instcombine -insert-gcov-profiling -pgo-memop-opt -simplifycfg -lower-guard-intrinsic -globalopt -mem2reg -constmerge -bdce -lower-constant-intrinsics -strip-nondebug -lower-matrix-intrinsics -mergereturn -lower-constant-intrinsics -elim-avail-extern -instcombine -ipconstprop -early-cse-memssa -redundant-dbg-inst-elim -strip-nondebug -inferattrs -called-value-propagation -globalsplit -instcombine -strip-dead-prototypes -instsimplify -instcombine -simplifycfg -sccp -newgvn -coro-cleanup -instcombine -reassociate -argpromotion -loop-data-prefetch -add-discriminators -infer-address-spaces -float2int -inject-tli-mappings -float2int -sancov -adce -newgvn -coro-cleanup -ipconstprop -aggressive-instcombine -simplifycfg -gvn-hoist -lcssa -adce -slsr -strip-dead-prototypes -gvn-hoist -sccp -simplifycfg -gvn-hoist -simplifycfg -add-discriminators -consthoist -cross-dso-cfi -instcombine -pgo-memop-opt -instsimplify -constprop -simplifycfg -early-cse-memssa -mergereturn -coro-split -loop-sink -simplifycfg -simplifycfg -sroa -lower-expect -flattencfg -instcombine -sroa -functionattrs -cross-dso-cfi -newgvn -jump-threading -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -callsite-splitting -coro-cleanup -instcombine -mergefunc -ipsccp -mem2reg -nary-reassociate -loop-vectorize -constmerge -insert-gcov-profiling -instcombine -dce -callsite-splitting -early-cse -simplifycfg -adce -flattencfg -loop-simplify -lower-matrix-intrinsics -gvn -early-cse -instcombine -loop-fusion -coro-cleanup -lower-matrix-intrinsics -forceattrs -globalsplit -sroa -strip-dead-prototypes -gvn -float2int -instcombine -loop-predication -jump-threading -early-cse-memssa -flattencfg -simplifycfg -pgo-memop-opt -barrier -always-inline -deadargelim -newgvn -instsimplify -simplifycfg -nary-reassociate -early-cse-memssa -float2int -consthoist -redundant-dbg-inst-elim -simplifycfg -tailcallelim -jump-threading -barrier -newgvn -prune-eh -early-cse-memssa -always-inline -instcombine -aggressive-instcombine -simplifycfg -float2int -pgo-memop-opt -lower-matrix-intrinsics -lower-expect -alignment-from-assumptions -rewrite-statepoints-for-gc -indvars -nary-reassociate -consthoist -adce -coro-elide -globaldce -newgvn -tailcallelim -loop-fusion -post-inline-ee-instrument -early-cse -dce -instcombine -loop-load-elim -simplifycfg -simplifycfg -lower-constant-intrinsics -loop-versioning -bdce -newgvn -instsimplify -dce -simplifycfg -rpo-functionattrs -tailcallelim -simplifycfg -instcombine -loop-data-prefetch -jump-threading -newgvn -gvn -early-cse-memssa -guard-widening -mem2reg -slsr -early-cse-memssa -indvars -reassociate -aggressive-instcombine -globalopt -dce -sccp -reassociate -newgvn -consthoist -rewrite-statepoints-for-gc -reassociate -callsite-splitting -instcombine -instsimplify -simplifycfg -gvn -lower-expect -rpo-functionattrs -jump-threading -strip-debug-declare -inferattrs -globalsplit -simplifycfg -deadargelim -deadargelim -rewrite-statepoints-for-gc -barrier -cross-dso-cfi -loweratomic -scalarizer -strip -gvn-hoist -strip -ipconstprop -bdce -insert-gcov-profiling -instcombine -partially-inline-libcalls -insert-gcov-profiling -loop-interchange -early-cse -scalarizer -newgvn -sroa -pgo-memop-opt -canonicalize-aliases -inject-tli-mappings -ipconstprop -ipconstprop -correlated-propagation -instcombine -simplifycfg -strip-nondebug -instcombine -slp-vectorizer -pgo-memop-opt -early-cse -slsr -loweratomic -early-cse-memssa -loweratomic -strip -instcombine -argpromotion -gvn-hoist -lower-matrix-intrinsics -scalarizer -dse -reassociate -instcombine -lower-matrix-intrinsics -insert-gcov-profiling -consthoist -benchmark://cbench-v1/lame,1.0789493661276837,77.61762881278992,opt -float2int -called-value-propagation -forceattrs -sroa -sancov -partially-inline-libcalls -correlated-propagation -ipsccp -instcombine -sccp -instcombine -sink -newgvn -simplifycfg -gvn-hoist -lowerinvoke -instcombine -guard-widening -div-rem-pairs -slp-vectorizer -inferattrs -jump-threading -globaldce -indvars -early-cse-memssa -nary-reassociate -loop-distribute -gvn-hoist -speculative-execution -loop-distribute -lower-widenable-condition -globaldce -inject-tli-mappings -instcombine -instcombine -early-cse-memssa -inferattrs -float2int -adce -callsite-splitting -memcpyopt -prune-eh -loop-versioning -consthoist -newgvn -gvn -strip-nondebug -ipsccp -strip -sccp -loop-vectorize -simplifycfg -lower-guard-intrinsic -instnamer -coro-elide -loop-data-prefetch -alignment-from-assumptions -jump-threading -instcombine -aggressive-instcombine -simplifycfg -simplifycfg -forceattrs -rewrite-statepoints-for-gc -slsr -mergefunc -add-discriminators -loweratomic -lower-expect -coro-split -sccp -partially-inline-libcalls -infer-address-spaces -gvn -sroa -slsr -indvars -newgvn -bdce -ipconstprop -redundant-dbg-inst-elim -instcombine -newgvn -gvn -early-cse-memssa -licm -pgo-memop-opt -float2int -jump-threading -mergefunc -cross-dso-cfi -prune-eh -lowerinvoke -early-cse -gvn -globalsplit -nary-reassociate -bdce -instnamer -strip-dead-prototypes -deadargelim -adce -sroa -pgo-memop-opt -deadargelim -lower-matrix-intrinsics -instcombine -float2int -simplifycfg -early-cse-memssa -ipconstprop -reassociate -lower-constant-intrinsics -strip-dead-prototypes -speculative-execution -coro-cleanup -name-anon-globals -globaldce -simplifycfg -guard-widening -always-inline -coro-elide -mergeicmps -slp-vectorizer -sancov -strip -newgvn -dce -div-rem-pairs -lower-expect -jump-threading -sccp -cross-dso-cfi -newgvn -ipconstprop -strip-dead-prototypes -strip-nondebug -flattencfg -early-cse-memssa -deadargelim -name-anon-globals -coro-split -jump-threading -early-cse-memssa -coro-elide -libcalls-shrinkwrap -lower-constant-intrinsics -functionattrs -rewrite-statepoints-for-gc -partially-inline-libcalls -die -early-cse-memssa -correlated-propagation -instcombine -newgvn -mldst-motion -sroa -lower-constant-intrinsics -gvn-hoist -name-anon-globals -loop-load-elim -cross-dso-cfi -canonicalize-aliases -scalarizer -early-cse-memssa -jump-threading -simplifycfg -lower-expect -simplifycfg -jump-threading -lower-guard-intrinsic -early-cse-memssa -gvn -coro-cleanup -early-cse-memssa -scalarizer -indvars -loop-fusion -instcombine -aggressive-instcombine -inferattrs -rpo-functionattrs -strip -deadargelim -callsite-splitting -jump-threading -prune-eh -nary-reassociate -consthoist -newgvn -simplifycfg -post-inline-ee-instrument -adce -instcombine -newgvn -instcombine -lowerinvoke -dse -lower-expect -redundant-dbg-inst-elim -loweratomic -sancov -rpo-functionattrs -strip-debug-declare -scalarizer -ipconstprop -strip-nondebug -post-inline-ee-instrument -early-cse-memssa -gvn -separate-const-offset-from-gep -flattencfg -callsite-splitting -slp-vectorizer -indvars -ipconstprop -aggressive-instcombine -early-cse -newgvn -jump-threading -consthoist -callsite-splitting -loweratomic -globalsplit -callsite-splitting -coro-early -lower-constant-intrinsics -sancov -guard-widening -die -globalsplit -lower-widenable-condition -pgo-memop-opt -early-cse -strip-nondebug -loop-data-prefetch -simplifycfg -adce -callsite-splitting -globalopt -slsr -div-rem-pairs -memcpyopt -aggressive-instcombine -strip-nondebug -deadargelim -gvn -partially-inline-libcalls -reassociate -partially-inline-libcalls -die -flattencfg -partially-inline-libcalls -inferattrs -mergefunc -early-cse-memssa -coro-elide -deadargelim -mergefunc -scalarizer -aggressive-instcombine -strip -deadargelim -early-cse-memssa -strip-nondebug -barrier -inferattrs -sancov -mergeicmps -loop-fusion -mldst-motion -called-value-propagation -globalsplit -coro-split -ipsccp -jump-threading -canonicalize-aliases -slsr -newgvn -sancov -coro-early -gvn-hoist -gvn -cross-dso-cfi -mldst-motion -ipconstprop -post-inline-ee-instrument -flattencfg -scalarizer -slp-vectorizer -gvn -loop-versioning -lower-guard-intrinsic -simplifycfg -lower-widenable-condition -instcombine -coro-cleanup -constprop -instcombine -gvn -gvn -loop-versioning -globaldce -newgvn -instcombine -simplifycfg -loop-versioning -newgvn -globaldce -strip-nondebug -consthoist -prune-eh -tailcallelim -sancov -newgvn -mergereturn -deadargelim -instcombine -dse -ipconstprop -coro-cleanup -simplifycfg -sancov -globaldce -elim-avail-extern -globalsplit -mergefunc -gvn-hoist -gvn -loop-versioning -callsite-splitting -newgvn -prune-eh -lower-widenable-condition -jump-threading -loop-simplify -slsr -pgo-memop-opt -jump-threading -adce -pgo-memop-opt -lowerinvoke -speculative-execution -sink -newgvn -flattencfg -insert-gcov-profiling -consthoist -indvars -coro-elide -mergefunc -newgvn -scalarizer -memcpyopt -mem2reg -ipsccp -add-discriminators -insert-gcov-profiling -globaldce -instsimplify -lower-matrix-intrinsics -early-cse-memssa -lower-expect -sink -float2int -gvn-hoist -lower-matrix-intrinsics -globaldce -jump-threading -globaldce -coro-split -simplifycfg -dse -aggressive-instcombine -die -slp-vectorizer -instcombine -aggressive-instcombine -inferattrs -partially-inline-libcalls -mem2reg -scalarizer -slsr -newgvn -newgvn -coro-cleanup -instcombine -coro-elide -callsite-splitting -slsr -callsite-splitting -ipconstprop -constmerge -loop-interchange -lower-expect -instsimplify -strip-nondebug -slsr -memcpyopt -mergeicmps -reassociate -separate-const-offset-from-gep -loop-data-prefetch -adce -dse -sancov -globaldce -loop-fusion -post-inline-ee-instrument -nary-reassociate -early-cse-memssa -strip-nondebug -newgvn -newgvn -simplifycfg -gvn -early-cse -instcombine -jump-threading -simplifycfg -early-cse-memssa -pgo-memop-opt -instsimplify -elim-avail-extern -jump-threading -instcombine -float2int -called-value-propagation -called-value-propagation -early-cse-memssa -callsite-splitting -simplifycfg -scalarizer -instcombine -coro-elide -aggressive-instcombine -loop-unroll-and-jam -globaldce -mergeicmps -strip-nondebug -slsr -instcombine -separate-const-offset-from-gep -simplifycfg -redundant-dbg-inst-elim -dse -newgvn -attributor -dse -loop-simplify -post-inline-ee-instrument -guard-widening -loop-versioning -sroa -loop-guard-widening -speculative-execution -globaldce -reassociate -gvn-hoist -globaldce -inferattrs -argpromotion -sink -jump-threading -lower-constant-intrinsics -strip-nondebug -gvn-hoist -constmerge -strip-nondebug -bdce -cross-dso-cfi -globalopt -consthoist -div-rem-pairs -jump-threading -lower-matrix-intrinsics -lower-expect -pgo-memop-opt -deadargelim -loop-unroll-and-jam -elim-avail-extern -aggressive-instcombine -mem2reg -dse -functionattrs -prune-eh -loop-versioning -prune-eh -libcalls-shrinkwrap -mergefunc -gvn-hoist -gvn -forceattrs -consthoist -loop-vectorize -deadargelim -aggressive-instcombine -instcombine -instcombine -pgo-memop-opt -elim-avail-extern -jump-threading -lower-matrix-intrinsics -lowerinvoke -elim-avail-extern -loop-simplify -early-cse -loop-data-prefetch -early-cse-memssa -coro-split -insert-gcov-profiling -dce -pgo-memop-opt -instnamer -redundant-dbg-inst-elim -ipsccp -coro-elide -flattencfg -tailcallelim -adce -strip-nondebug -post-inline-ee-instrument -deadargelim -libcalls-shrinkwrap -simplifycfg -early-cse -functionattrs -lower-widenable-condition -callsite-splitting -partially-inline-libcalls -coro-split -mergeicmps -instcombine -instcombine -float2int -jump-threading -gvn-hoist -inferattrs -nary-reassociate -called-value-propagation -mldst-motion -partially-inline-libcalls -scalarizer -consthoist -simplifycfg -strip -prune-eh -die -lowerinvoke -instcombine -newgvn -simplifycfg -partially-inline-libcalls -slp-vectorizer -die -irce -redundant-dbg-inst-elim -instcombine -inject-tli-mappings -early-cse-memssa -ipsccp -loop-load-elim -mergefunc -loweratomic -inferattrs -globalopt -adce -jump-threading -dse -loweratomic -dse -coro-elide -float2int -strip-dead-prototypes -early-cse-memssa -callsite-splitting -loop-interchange -cross-dso-cfi -early-cse-memssa -instnamer -instcombine -ipconstprop -consthoist -dce -functionattrs -barrier -simplifycfg -consthoist -early-cse-memssa -newgvn -die -irce -lcssa -insert-gcov-profiling -constprop -cross-dso-cfi -loop-distribute -float2int -sroa -sccp -lower-constant-intrinsics -sancov -simplifycfg -die -instcombine -strip -slsr -simplifycfg -lowerinvoke -jump-threading -newgvn -barrier -slp-vectorizer -globalopt -simplifycfg -rpo-functionattrs -callsite-splitting -libcalls-shrinkwrap -lower-matrix-intrinsics -insert-gcov-profiling -elim-avail-extern -instsimplify -coro-elide -rpo-functionattrs -die -gvn -functionattrs -adce -canonicalize-aliases -flattencfg -mergeicmps -simplifycfg -simplifycfg -die -strip-dead-prototypes -jump-threading -early-cse -deadargelim -canonicalize-aliases -gvn-hoist -mem2reg -simplifycfg -post-inline-ee-instrument -reassociate -scalarizer -aggressive-instcombine -coro-split -gvn -rewrite-statepoints-for-gc -simplifycfg -deadargelim -float2int -inferattrs -tailcallelim -instcombine -loop-versioning -constmerge -loop-guard-widening -gvn -flattencfg -lower-expect -inferattrs -instcombine -forceattrs -infer-address-spaces -div-rem-pairs -loop-data-prefetch -rewrite-statepoints-for-gc -lower-matrix-intrinsics -coro-cleanup -lower-matrix-intrinsics -newgvn -loop-data-prefetch -lower-widenable-condition -inject-tli-mappings -die -lower-guard-intrinsic -loop-data-prefetch -newgvn -canonicalize-aliases -sccp -simplifycfg -load-store-vectorizer -sroa -mergefunc -callsite-splitting -loop-distribute -newgvn -simplifycfg -strip-dead-prototypes -loop-load-elim -coro-early -lower-constant-intrinsics -jump-threading -pgo-memop-opt -instcombine -mergefunc -newgvn -jump-threading -coro-split -benchmark://cbench-v1/qsort,1.136222910216718,60.9553701877594,opt -alignment-from-assumptions -loop-versioning -mem2reg -strip-debug-declare -gvn-hoist -simplifycfg -sroa -coro-elide -sroa -sroa -sroa -lcssa -early-cse -sroa -lower-guard-intrinsic -mem2reg -jump-threading -coro-cleanup -memcpyopt -name-anon-globals -adce -inferattrs -newgvn -sroa -insert-gcov-profiling -sroa -always-inline -mem2reg -sroa -pgo-memop-opt -early-cse -tailcallelim -hotcoldsplit -insert-gcov-profiling -reassociate -coro-cleanup -lcssa -sroa -ipsccp -sroa -instsimplify -constprop -mergefunc -sroa -simplifycfg -sroa -mergereturn -add-discriminators -argpromotion -sroa -forceattrs -sroa -loweratomic -deadargelim -coro-early -instcombine -sroa -reassociate -ipsccp -sroa -scalarizer -globalsplit -insert-gcov-profiling -sroa -correlated-propagation -post-inline-ee-instrument -sroa -forceattrs -simplifycfg -gvn-hoist -coro-cleanup -newgvn -loop-unroll-and-jam -indvars -loop-vectorize -instcombine -gvn-hoist -sroa -sroa -early-cse-memssa -loop-load-elim -sccp -instcombine -sroa -strip-dead-prototypes -newgvn -licm -infer-address-spaces -speculative-execution -simplifycfg -dce -loop-deletion -loop-data-prefetch -scalarizer -early-cse-memssa -infer-address-spaces -simplifycfg -strip-nondebug -rpo-functionattrs -constprop -instcombine -simplifycfg -instcombine -simplifycfg -simplifycfg -loop-sink -loop-unroll-and-jam -coro-early -lower-guard-intrinsic -sancov -instcombine -aggressive-instcombine -gvn-hoist -sccp -lower-matrix-intrinsics -ipsccp -constprop -adce -div-rem-pairs -dse -early-cse-memssa -strip-nondebug -inferattrs -early-cse-memssa -barrier -newgvn -simplifycfg -mergefunc -loop-vectorize -simplifycfg -globalopt -rpo-functionattrs -elim-avail-extern -reassociate -simplifycfg -instcombine -instcombine -lower-expect -div-rem-pairs -early-cse -sccp -jump-threading -loop-data-prefetch -libcalls-shrinkwrap -functionattrs -float2int -instcombine -speculative-execution -reassociate -simplifycfg -pgo-memop-opt -constprop -newgvn -gvn -infer-address-spaces -newgvn -sancov -simplifycfg -early-cse -strip-nondebug -simplifycfg -simplifycfg -loop-fusion -loop-load-elim -slp-vectorizer -simplifycfg -lower-constant-intrinsics -sancov -strip-nondebug -die -rpo-functionattrs -sink -globalopt -barrier -alignment-from-assumptions -simplifycfg -inject-tli-mappings -add-discriminators -mergefunc -simplifycfg -simplifycfg -gvn -deadargelim -sroa -forceattrs -newgvn -die -jump-threading -early-cse -attributor -lower-widenable-condition -pgo-memop-opt -tailcallelim -adce -gvn -callsite-splitting -deadargelim -separate-const-offset-from-gep -dse -instsimplify -sroa -lower-matrix-intrinsics -loop-sink -sroa -sroa -sroa -loop-fusion -sroa -loop-simplifycfg -sroa -gvn-hoist -loop-predication -globaldce -newgvn -simplifycfg -mem2reg -mergefunc -constprop -sroa -reassociate -cross-dso-cfi -sroa -constprop -sroa -loop-interchange -inferattrs -sroa -loop-reroll -simple-loop-unswitch -instsimplify -early-cse-memssa -sccp -sroa -reassociate -sroa -strip-nondebug -add-discriminators -strip-dead-prototypes -simplifycfg -newgvn -globalsplit -constprop -div-rem-pairs -insert-gcov-profiling -loop-guard-widening -strip-dead-prototypes -sroa -loop-reduce -add-discriminators -sroa -simple-loop-unswitch -strip-dead-prototypes -loop-versioning-licm -sroa -mem2reg -sroa -sroa -sroa -forceattrs -insert-gcov-profiling -sroa -sroa -simplifycfg -coro-elide -canonicalize-aliases -sroa -loop-idiom -loop-guard-widening -prune-eh -loop-deletion -sroa -sroa -reassociate -infer-address-spaces -loop-load-elim -mem2reg -sroa -insert-gcov-profiling -loop-guard-widening -mem2reg -loop-unroll-and-jam -lowerinvoke -reassociate -loop-guard-widening -sccp -reassociate -barrier -insert-gcov-profiling -sroa -sroa -constprop -reassociate -sroa -early-cse -sroa -sroa -globaldce -early-cse -reassociate -lower-guard-intrinsic -sroa -sroa -mldst-motion -strip -indvars -strip -sroa -loop-unroll-and-jam -scalarizer -loop-unroll-and-jam -jump-threading -sroa -early-cse -sroa -sroa -sroa -sroa -indvars -insert-gcov-profiling -sroa -sroa -loop-data-prefetch -sroa -bdce -sroa -sroa -insert-gcov-profiling -sroa -alignment-from-assumptions -coro-elide -alignment-from-assumptions -infer-address-spaces -add-discriminators -coro-cleanup -mem2reg -strip -instsimplify -coro-early -lower-guard-intrinsic -sroa -loop-deletion -sroa -mem2reg -lowerinvoke -sancov -strip-dead-prototypes -instcombine -sroa -reassociate -loop-predication -coro-cleanup -alignment-from-assumptions -pgo-memop-opt -scalarizer -correlated-propagation -mem2reg -loop-simplifycfg -simple-loop-unswitch -pgo-memop-opt -constmerge -lower-guard-intrinsic -coro-cleanup -inferattrs -globalopt -forceattrs -instnamer -sroa -ee-instrument -loop-load-elim -indvars -sroa -sroa -insert-gcov-profiling -constprop -sroa -sroa -sroa -early-cse -coro-cleanup -sroa -sroa -sroa -lower-guard-intrinsic -sroa -reassociate -loop-data-prefetch -dce -sroa -barrier -tailcallelim -barrier -sroa -sroa -lower-matrix-intrinsics -simplifycfg -sroa -sccp -reassociate -deadargelim -early-cse-memssa -gvn-hoist -instsimplify -adce -mem2reg -redundant-dbg-inst-elim -simplifycfg -loop-fusion -loop-unroll-and-jam -early-cse -hotcoldsplit -mergefunc -sroa -loop-simplifycfg -sroa -simple-loop-unswitch -argpromotion -mem2reg -reassociate -reassociate -sroa -loop-predication -sroa -loop-data-prefetch -lcssa -simplifycfg -mem2reg -jump-threading -mem2reg -globaldce -alignment-from-assumptions -alignment-from-assumptions -sroa -gvn-hoist -loop-vectorize -simplifycfg -instsimplify -mem2reg -sroa -sroa -sroa -forceattrs -sroa -loop-load-elim -mem2reg -barrier -mem2reg -loop-deletion -sroa -sroa -sroa -sroa -sroa -barrier -lcssa -sroa -instsimplify -correlated-propagation -sroa -loop-vectorize -loop-guard-widening -sroa -sink -loop-vectorize -sancov -sroa -mergefunc -reassociate -sroa -insert-gcov-profiling -inferattrs -simplifycfg -inject-tli-mappings -sroa -sroa -sroa -sroa -sroa -insert-gcov-profiling -simplifycfg -early-cse -loop-predication -mem2reg -constprop -licm -loop-unroll-and-jam -constmerge -gvn-hoist -sroa -loop-versioning -constmerge -sroa -sroa -mem2reg -strip-dead-prototypes -sroa -mergereturn -inject-tli-mappings -sroa -newgvn -sroa -sroa -insert-gcov-profiling -loop-vectorize -ee-instrument -licm -sroa -sroa -globalsplit -simplifycfg -instnamer -insert-gcov-profiling -sroa -inject-tli-mappings -sroa -ee-instrument -sroa -rpo-functionattrs -sroa -forceattrs -insert-gcov-profiling -newgvn -gvn-hoist -inferattrs -sroa -early-cse -loop-predication -lower-matrix-intrinsics -sroa -forceattrs -mem2reg -rewrite-statepoints-for-gc -sroa -loop-fusion -lowerinvoke -adce -sroa -ee-instrument -forceattrs -dse -dce -lower-matrix-intrinsics -mem2reg -early-cse -forceattrs -sroa -sroa -adce -guard-widening -simplifycfg -called-value-propagation -inject-tli-mappings -sroa -strip-dead-prototypes -gvn-hoist -sroa -alignment-from-assumptions -sroa -sroa -insert-gcov-profiling -sroa -globalsplit -strip-nondebug -inferattrs -sroa -gvn-hoist -sroa -simplifycfg -insert-gcov-profiling -inject-tli-mappings -loop-data-prefetch -insert-gcov-profiling -globalopt -loop-unroll-and-jam -functionattrs -gvn-hoist -coro-split -gvn-hoist -speculative-execution -simplifycfg -instcombine -rpo-functionattrs -instcombine -consthoist -early-cse-memssa -instcombine -speculative-execution -instcombine -instcombine -consthoist -rpo-functionattrs -redundant-dbg-inst-elim -inferattrs -functionattrs -simplifycfg -coro-elide -coro-early -simplifycfg -simplifycfg -strip-dead-prototypes -instcombine -instcombine -forceattrs -jump-threading -dse -add-discriminators -coro-split -gvn-hoist -simplifycfg -post-inline-ee-instrument -simplifycfg -early-cse-memssa -ee-instrument -coro-elide -gvn-hoist -licm -instcombine -simplifycfg -instcombine -slsr -instsimplify -instcombine -instcombine -instsimplify -ipconstprop -ipsccp -newgvn -globalsplit -sroa -dse -mem2reg -gvn -lower-guard-intrinsic -post-inline-ee-instrument -gvn-hoist -instcombine -ipsccp -loop-predication -strip -simplifycfg -inferattrs -simplifycfg -simplifycfg -gvn -mergereturn -globalopt -jump-threading -simplifycfg -consthoist -div-rem-pairs -loop-distribute -globalsplit -consthoist -lower-expect -gvn -gvn-hoist -simplifycfg -sroa -jump-threading -newgvn -aggressive-instcombine -aggressive-instcombine -loop-versioning -early-cse-memssa -reassociate -globaldce -coro-cleanup -consthoist -instcombine -dse -pgo-memop-opt -jump-threading -instcombine -constprop -loop-versioning -sancov -reassociate -ipsccp -simplifycfg -simple-loop-unswitch -newgvn -simplifycfg -sancov -callsite-splitting -cross-dso-cfi -jump-threading -early-cse-memssa -coro-split -dse -add-discriminators -add-discriminators -slsr -reassociate -partially-inline-libcalls -cross-dso-cfi -jump-threading -nary-reassociate -die -partially-inline-libcalls -consthoist -slsr -benchmark://cbench-v1/sha,1.5250836120401337,61.03710389137268,opt -correlated-propagation -sroa -simplifycfg -gvn-hoist -dse -reassociate -adce -loop-versioning -constprop -speculative-execution -early-cse-memssa -early-cse-memssa -argpromotion -loop-unroll-and-jam -sroa -constprop -newgvn -loop-vectorize -instcombine -coro-elide -scalarizer -strip -sccp -coro-cleanup -infer-address-spaces -simplifycfg -coro-cleanup -mem2reg -loop-distribute -strip-nondebug -instcombine -mergeicmps -reassociate -loop-vectorize -simplifycfg -tailcallelim -instcombine -sroa -dce -sroa -gvn-hoist -simple-loop-unswitch -loop-guard-widening -die -add-discriminators -adce -early-cse-memssa -ee-instrument -gvn-hoist -die -instsimplify -loop-guard-widening -float2int -instsimplify -prune-eh -gvn-hoist -gvn -strip-dead-prototypes -coro-cleanup -lower-guard-intrinsic -strip-dead-prototypes -instcombine -lower-matrix-intrinsics -dce -lower-guard-intrinsic -prune-eh -early-cse -mergefunc -dce -load-store-vectorizer -gvn-hoist -reassociate -simplifycfg -loop-guard-widening -loweratomic -instcombine -simplifycfg -globalopt -loop-simplify -loop-unroll-and-jam -ipconstprop -mergefunc -instcombine -simple-loop-unswitch -alignment-from-assumptions -gvn-hoist -instcombine -sink -sroa -scalarizer -infer-address-spaces -newgvn -jump-threading -dce -loop-data-prefetch -instcombine -dse -mem2reg -loweratomic -sroa -mldst-motion -elim-avail-extern -instcombine -pgo-memop-opt -newgvn -loop-deletion -lowerinvoke -sccp -nary-reassociate -dse -simplifycfg -simplifycfg -ipconstprop -early-cse-memssa -newgvn -rewrite-statepoints-for-gc -pgo-memop-opt -newgvn -lower-constant-intrinsics -simplifycfg -lowerinvoke -slsr -lower-matrix-intrinsics -instcombine -canonicalize-aliases -loop-versioning -simplifycfg -sccp -lower-matrix-intrinsics -loop-guard-widening -indvars -ipconstprop -coro-split -newgvn -sroa -mergereturn -instcombine -simplifycfg -simplifycfg -adce -deadargelim -die -rpo-functionattrs -lower-guard-intrinsic -pgo-memop-opt -instcombine -add-discriminators -float2int -simplifycfg -lower-expect -slp-vectorizer -ipconstprop -redundant-dbg-inst-elim -elim-avail-extern -simplifycfg -functionattrs -gvn -lower-expect -coro-elide -early-cse-memssa -nary-reassociate -lowerinvoke -globalopt -elim-avail-extern -loop-data-prefetch -lower-matrix-intrinsics -rpo-functionattrs -mergeicmps -barrier -globalopt -consthoist -instsimplify -globaldce -alignment-from-assumptions -inferattrs -sccp -sancov -called-value-propagation -slsr -coro-cleanup -callsite-splitting -redundant-dbg-inst-elim -lower-expect -pgo-memop-opt -partially-inline-libcalls -instcombine -newgvn -dse -globalsplit -ipsccp -newgvn -rewrite-statepoints-for-gc -aggressive-instcombine -flattencfg -lower-matrix-intrinsics -early-cse-memssa -gvn -jump-threading -called-value-propagation -mergefunc -sroa -early-cse -simple-loop-unswitch -sroa -sroa -attributor -strip -infer-address-spaces -pgo-memop-opt -sroa -sroa -sroa -loop-deletion -insert-gcov-profiling -hotcoldsplit -reassociate -loop-reroll -reassociate -simplifycfg -sroa -loop-predication -loop-interchange -sroa -mergefunc -lower-expect -instcombine -sroa -sroa -instsimplify -sancov -lower-guard-intrinsic -sroa -dce -loop-vectorize -float2int -early-cse -sroa -prune-eh -loop-simplifycfg -gvn-hoist -dce -instcombine -lcssa -simplifycfg -barrier -consthoist -scalarizer -dce -strip -attributor -loop-interchange -loop-guard-widening -simplifycfg -loop-deletion -dce -hotcoldsplit -sroa -insert-gcov-profiling -loop-guard-widening -sroa -instcombine -forceattrs -constmerge -infer-address-spaces -early-cse-memssa -loop-guard-widening -instsimplify -sroa -sroa -loop-unroll -mldst-motion -sroa -sroa -strip-debug-declare -reassociate -consthoist -early-cse -loop-deletion -lcssa -sancov -coro-early -newgvn -coro-cleanup -sroa -licm -early-cse -sroa -lcssa -mergereturn -sroa -sroa -mldst-motion -insert-gcov-profiling -scalarizer -instcombine -strip-nondebug -sroa -simplifycfg -sroa -sroa -loop-load-elim -insert-gcov-profiling -sroa -alignment-from-assumptions -sroa -reassociate -loop-unroll-and-jam -mem2reg -coro-cleanup -sroa -lower-guard-intrinsic -dce -barrier -loop-guard-widening -dce -dce -infer-address-spaces -loop-fusion -bdce -dce -early-cse -strip-nondebug -scalarizer -simplifycfg -simplifycfg -loop-deletion -forceattrs -post-inline-ee-instrument -newgvn -reassociate -sroa -early-cse -sroa -early-cse -dce -infer-address-spaces -mergefunc -bdce -indvars -sroa -constprop -nary-reassociate -sroa -loop-data-prefetch -simplifycfg -globalsplit -libcalls-shrinkwrap -sroa -gvn-hoist -constprop -loop-simplifycfg -simplifycfg -libcalls-shrinkwrap -dce -simplifycfg -early-cse -sink -add-discriminators -inferattrs -newgvn -sroa -simplifycfg -lower-constant-intrinsics -sroa -loop-distribute -gvn-hoist -loop-simplifycfg -loop-versioning -coro-split -correlated-propagation -simplifycfg -simplifycfg -lower-guard-intrinsic -adce -simplifycfg -gvn-hoist -mergeicmps -canonicalize-aliases -simplifycfg -inject-tli-mappings -forceattrs -libcalls-shrinkwrap -early-cse -insert-gcov-profiling -adce -lower-widenable-condition -scalarizer -dce -sroa -loop-load-elim -loop-sink -newgvn -inject-tli-mappings -lower-matrix-intrinsics -loweratomic -ipconstprop -sroa -coro-early -sroa -early-cse-memssa -sroa -globaldce -sroa -sroa -lcssa -sroa -loop-data-prefetch -globalopt -ee-instrument -sroa -gvn-hoist -lcssa -licm -rewrite-statepoints-for-gc -loop-idiom -sroa -loop-deletion -sccp -sroa -simplifycfg -globalsplit -correlated-propagation -loop-simplifycfg -coro-split -barrier -mergereturn -instcombine -globaldce -sroa -instcombine -simplifycfg -newgvn -hotcoldsplit -instcombine -simplifycfg -loop-idiom -canonicalize-aliases -sroa -instcombine -canonicalize-aliases -loop-deletion -mem2reg -adce -newgvn -constmerge -sroa -loop-data-prefetch -loop-data-prefetch -reassociate -canonicalize-aliases -forceattrs -sccp -sroa -insert-gcov-profiling -loop-data-prefetch -consthoist -loop-guard-widening -coro-cleanup -loop-unroll-and-jam -lower-widenable-condition -constmerge -strip -loop-data-prefetch -sccp -flattencfg -instcombine -loop-load-elim -dse -early-cse -simplifycfg -instcombine -gvn-hoist -correlated-propagation -nary-reassociate -jump-threading -loop-data-prefetch -instsimplify -consthoist -adce -coro-cleanup -pgo-memop-opt -alignment-from-assumptions -simplifycfg -instcombine -lower-guard-intrinsic -lower-guard-intrinsic -mergereturn -sroa -name-anon-globals -gvn-hoist -div-rem-pairs -consthoist -sroa -sccp -prune-eh -instcombine -insert-gcov-profiling -ipconstprop -early-cse -mergefunc -early-cse -consthoist -lcssa -flattencfg -early-cse-memssa -lowerinvoke -loop-fusion -tailcallelim -tailcallelim -sroa -simplifycfg -tailcallelim -sroa -correlated-propagation -coro-early -mergefunc -simplifycfg -ipsccp -gvn-hoist -lcssa -instcombine -instcombine -lowerinvoke -consthoist -sccp -correlated-propagation -early-cse-memssa -strip -indvars -bdce -newgvn -infer-address-spaces -coro-split -ee-instrument -gvn-hoist -mergefunc -loop-deletion -loop-load-elim -gvn-hoist -instcombine -mergefunc -gvn-hoist -alignment-from-assumptions -memcpyopt -consthoist -simplifycfg -globaldce -strip-dead-prototypes -loop-data-prefetch -sroa -sroa -loop-interchange -simplifycfg -early-cse -mem2reg -jump-threading -dse -sroa -aggressive-instcombine -globaldce -jump-threading -early-cse -loop-sink -ee-instrument -strip-debug-declare -sroa -insert-gcov-profiling -sancov -inferattrs -speculative-execution -mergeicmps -lower-matrix-intrinsics -loop-guard-widening -constprop -barrier -coro-cleanup -dce -loop-guard-widening -sroa -early-cse -instsimplify -sccp -sroa -gvn-hoist -sroa -loop-data-prefetch -sroa -loop-distribute -sroa -prune-eh -ipconstprop -jump-threading -instcombine -inject-tli-mappings -sroa -dce -newgvn -loop-deletion -barrier -infer-address-spaces -mergereturn -instsimplify -strip-dead-prototypes -nary-reassociate -consthoist -ipsccp -aggressive-instcombine -sroa -lower-guard-intrinsic -simplifycfg -early-cse-memssa -gvn-hoist -reassociate -sroa -sroa -canonicalize-aliases -constprop -called-value-propagation -bdce -lcssa -sroa -gvn-hoist -rewrite-statepoints-for-gc -instsimplify -dce -sroa -sroa -memcpyopt -early-cse-memssa -lower-guard-intrinsic -gvn-hoist -pgo-memop-opt -lower-widenable-condition -sroa -instcombine -coro-elide -early-cse -licm -instcombine -guard-widening -early-cse-memssa -newgvn -instcombine -mem2reg -globaldce -simplifycfg -early-cse-memssa -sroa -lower-guard-intrinsic -sroa -lowerinvoke -rewrite-statepoints-for-gc -ipconstprop -barrier -sroa -globalopt -div-rem-pairs -gvn -gvn-hoist -gvn -inferattrs -globaldce -mergeicmps -mldst-motion -instcombine -strip-nondebug -newgvn -die -nary-reassociate -strip-debug-declare -gvn-hoist -instnamer -mergefunc -cross-dso-cfi -jump-threading -early-cse-memssa -dse -die -consthoist -loop-versioning -mergeicmps -strip-nondebug -sancov -globalopt -jump-threading -simplifycfg -slp-vectorizer -slsr -instcombine -libcalls-shrinkwrap -attributor -gvn -early-cse -sancov -constprop -newgvn -simplifycfg -slp-vectorizer -loop-interchange -tailcallelim -benchmark://cbench-v1/stringsearch,1.0163934426229506,61.0886914730072,opt -sroa -simplifycfg -div-rem-pairs -instcombine -jump-threading -simplifycfg -called-value-propagation -deadargelim -loop-simplifycfg -name-anon-globals -cross-dso-cfi -argpromotion -reassociate -loop-data-prefetch -globalopt -simplifycfg -redundant-dbg-inst-elim -simplifycfg -name-anon-globals -die -lowerinvoke -instcombine -newgvn -instcombine -elim-avail-extern -simplifycfg -speculative-execution -ipconstprop -gvn-hoist -rpo-functionattrs -reassociate -gvn -loop-load-elim -float2int -infer-address-spaces -coro-cleanup -strip-dead-prototypes -lower-expect -strip -instcombine -simplifycfg -dse -lcssa -loop-load-elim -instcombine -dce -slsr -coro-elide -early-cse -sroa -early-cse -memcpyopt -dce -simplifycfg -gvn-hoist -newgvn -forceattrs -consthoist -insert-gcov-profiling -newgvn -early-cse-memssa -sroa -tailcallelim -called-value-propagation -barrier -loweratomic -licm -dce -aggressive-instcombine -instcombine -strip-nondebug -dce -coro-elide -globalopt -simplifycfg -mldst-motion -prune-eh -lowerinvoke -reassociate -early-cse-memssa -nary-reassociate -lower-constant-intrinsics -dce -instcombine -sancov -loop-simplify -lower-constant-intrinsics -nary-reassociate -lowerinvoke -loop-deletion -insert-gcov-profiling -lower-expect -loop-data-prefetch -licm -globalsplit -globaldce -always-inline -adce -infer-address-spaces -sancov -die -sink -redundant-dbg-inst-elim -simplifycfg -functionattrs -callsite-splitting -globalsplit -die -sroa -simplifycfg -sink -reassociate -gvn-hoist -strip-debug-declare -simplifycfg -lower-expect -post-inline-ee-instrument -float2int -simplifycfg -always-inline -mergefunc -gvn -strip-nondebug -loop-simplify -aggressive-instcombine -inferattrs -scalarizer -mldst-motion -jump-threading -instcombine -dse -gvn-hoist -instcombine -elim-avail-extern -simplifycfg -gvn-hoist -simplifycfg -lower-matrix-intrinsics -barrier -separate-const-offset-from-gep -jump-threading -gvn-hoist -consthoist -early-cse -instcombine -loop-idiom -loop-unroll-and-jam -lower-constant-intrinsics -slsr -consthoist -loop-fusion -lower-constant-intrinsics -newgvn -prune-eh -sancov -gvn -loweratomic -coro-split -float2int -dse -instcombine -newgvn -simplifycfg -globaldce -globalsplit -name-anon-globals -post-inline-ee-instrument -simplifycfg -instcombine -separate-const-offset-from-gep -coro-split -gvn -dse -called-value-propagation -instcombine -correlated-propagation -mergereturn -redundant-dbg-inst-elim -gvn -newgvn -coro-cleanup -strip-dead-prototypes -callsite-splitting -gvn-hoist -instcombine -loop-versioning -mergefunc -sancov -tailcallelim -callsite-splitting -instcombine -loop-simplify -instcombine -early-cse -coro-early -coro-elide -simplifycfg -globalsplit -forceattrs -simplifycfg -sroa -loop-load-elim -globalopt -lcssa -infer-address-spaces -sroa -lower-widenable-condition -sccp -sroa -inject-tli-mappings -forceattrs -infer-address-spaces -sroa -insert-gcov-profiling -sroa -globaldce -sroa -sroa -instsimplify -lower-guard-intrinsic -loop-load-elim -sroa -loop-idiom -sroa -constprop -reassociate -sroa -loop-vectorize -loop-reduce -lower-matrix-intrinsics -rewrite-statepoints-for-gc -sroa -break-crit-edges -inject-tli-mappings -coro-cleanup -speculative-execution -deadargelim -sroa -sroa -early-cse -loop-data-prefetch -mem2reg -lcssa -sroa -scalarizer -sroa -instsimplify -always-inline -lcssa -gvn-hoist -reassociate -gvn-hoist -mem2reg -sroa -float2int -loop-load-elim -pgo-memop-opt -loop-unroll-and-jam -lcssa -sroa -coro-early -coro-cleanup -correlated-propagation -early-cse-memssa -mergereturn -early-cse -mergereturn -strip-nondebug -indvars -sroa -nary-reassociate -sroa -sccp -dce -sroa -slp-vectorizer -ee-instrument -reassociate -dce -ipsccp -infer-address-spaces -lower-constant-intrinsics -speculative-execution -sroa -loop-versioning -globalopt -indvars -instcombine -scalarizer -constprop -functionattrs -lower-guard-intrinsic -forceattrs -ee-instrument -aggressive-instcombine -loop-data-prefetch -prune-eh -infer-address-spaces -constprop -tailcallelim -consthoist -sccp -dce -simplifycfg -sroa -strip-dead-prototypes -lcssa -forceattrs -mem2reg -simple-loop-unswitch -nary-reassociate -sroa -load-store-vectorizer -infer-address-spaces -loop-interchange -newgvn -infer-address-spaces -loop-guard-widening -ee-instrument -indvars -sroa -instcombine -sroa -sroa -lowerinvoke -simplifycfg -div-rem-pairs -insert-gcov-profiling -speculative-execution -loop-unroll-and-jam -simplifycfg -argpromotion -indvars -coro-cleanup -aggressive-instcombine -lcssa -instcombine -correlated-propagation -barrier -early-cse -loop-unroll-and-jam -simplifycfg -instsimplify -sroa -insert-gcov-profiling -correlated-propagation -sroa -pgo-memop-opt -gvn-hoist -gvn-hoist -coro-cleanup -sroa -simplifycfg -gvn-hoist -mem2reg -insert-gcov-profiling -lcssa -adce -speculative-execution -argpromotion -globalsplit -lower-constant-intrinsics -prune-eh -simplifycfg -argpromotion -globaldce -lcssa -instsimplify -lowerinvoke -dse -instcombine -sroa -partially-inline-libcalls -loop-load-elim -dce -insert-gcov-profiling -sroa -sroa -correlated-propagation -sink -sroa -gvn-hoist -ipsccp -loop-predication -simplifycfg -dse -sroa -sancov -instnamer -simplifycfg -barrier -sink -early-cse -early-cse-memssa -pgo-memop-opt -lowerinvoke -early-cse-memssa -inferattrs -loop-data-prefetch -scalarizer -pgo-memop-opt -coro-early -newgvn -newgvn -cross-dso-cfi -loop-distribute -instcombine -reassociate -dse -newgvn -cross-dso-cfi -strip-nondebug -simplifycfg -instcombine -simplifycfg -adce -sancov -loop-distribute -instsimplify -ipconstprop -adce -jump-threading -newgvn -early-cse-memssa -loop-load-elim -instcombine -lower-matrix-intrinsics -loop-data-prefetch -simplifycfg -insert-gcov-profiling -gvn-hoist -globaldce -coro-elide -instcombine -sink -coro-elide -sancov -instcombine -consthoist -gvn-hoist -early-cse-memssa -early-cse -dse -gvn-hoist -barrier -infer-address-spaces -inject-tli-mappings -instsimplify -barrier -loop-load-elim -lowerinvoke -newgvn -instcombine -flattencfg -simplifycfg -indvars -globalsplit -prune-eh -lower-matrix-intrinsics -lower-expect -sancov -dce -load-store-vectorizer -inferattrs -adce -loop-data-prefetch -mergefunc -loop-sink -sancov -mem2reg -loop-data-prefetch -lower-guard-intrinsic -pgo-memop-opt -div-rem-pairs -loop-load-elim -simplifycfg -globalopt -simplifycfg -simplifycfg -mergefunc -loweratomic -strip-nondebug -loop-unroll-and-jam -early-cse -ipsccp -forceattrs -globalopt -simplifycfg -coro-elide -simplifycfg -canonicalize-aliases -simplifycfg -instcombine -newgvn -gvn -simplifycfg -barrier -early-cse -loop-guard-widening -simplifycfg -instcombine -callsite-splitting -instcombine -instsimplify -always-inline -scalarizer -simplifycfg -early-cse -correlated-propagation -simplifycfg -instcombine -sccp -simplifycfg -mergefunc -simplifycfg -instcombine -newgvn -canonicalize-aliases -gvn-hoist -dse -simplifycfg -dse -lower-expect -simplifycfg -slsr -newgvn -mergefunc -newgvn -reassociate -ipsccp -simplifycfg -mergeicmps -aggressive-instcombine -simplifycfg -newgvn -gvn -newgvn -simplifycfg -tailcallelim -simplifycfg -consthoist -loop-instsimplify -jump-threading -callsite-splitting -sink -instcombine -simplifycfg -newgvn -coro-split -float2int -redundant-dbg-inst-elim -lower-matrix-intrinsics -loop-load-elim -loop-guard-widening -pgo-memop-opt -simplifycfg -simplifycfg -lower-widenable-condition -simplifycfg -canonicalize-aliases -die -simplifycfg -instsimplify -simplifycfg -instcombine -newgvn -newgvn -redundant-dbg-inst-elim -strip-nondebug -mergeicmps -simplifycfg -tailcallelim -loop-guard-widening -lower-expect -called-value-propagation -dse -ipconstprop -post-inline-ee-instrument -instcombine -lowerinvoke -slp-vectorizer -ipsccp -instcombine -canonicalize-aliases -strip-dead-prototypes -loop-guard-widening -tailcallelim -newgvn -lower-constant-intrinsics -float2int -prune-eh -ipsccp -coro-split -gvn-hoist -coro-cleanup -simplifycfg -loop-guard-widening -simplifycfg -libcalls-shrinkwrap -sccp -lowerinvoke -slsr -bdce -instcombine -sink -strip-dead-prototypes -gvn-hoist -inferattrs -instsimplify -sccp -instcombine -sccp -pgo-memop-opt -lower-constant-intrinsics -ipsccp -instcombine -adce -simplifycfg -early-cse-memssa -instcombine -die -float2int -simplifycfg -simplifycfg -always-inline -early-cse-memssa -nary-reassociate -pgo-memop-opt -newgvn -strip-nondebug -instcombine -float2int -newgvn -loop-guard-widening -simplifycfg -simplifycfg -loop-guard-widening -scalarizer -simplifycfg -mergefunc -jump-threading -infer-address-spaces -newgvn -early-cse-memssa -aggressive-instcombine -strip-debug-declare -sancov -strip-dead-prototypes -sccp -consthoist -early-cse -lower-matrix-intrinsics -insert-gcov-profiling -sroa -slsr -dce -strip-dead-prototypes -early-cse -early-cse-memssa -post-inline-ee-instrument -partially-inline-libcalls -lower-matrix-intrinsics -lower-matrix-intrinsics -dse -strip-nondebug -slsr -loop-versioning -post-inline-ee-instrument -elim-avail-extern -strip -lower-expect -gvn -loop-distribute -early-cse-memssa -post-inline-ee-instrument -newgvn -flattencfg -slp-vectorizer -lower-constant-intrinsics -name-anon-globals -gvn -jump-threading -consthoist -gvn -adce -sroa -simplifycfg -early-cse -tailcallelim -dse -slp-vectorizer -lower-widenable-condition -instcombine -partially-inline-libcalls -lower-widenable-condition -tailcallelim -simplifycfg -pgo-memop-opt -name-anon-globals -cross-dso-cfi -benchmark://cbench-v1/tiff2bw,1.0445932877252035,81.18065047264099,opt -loop-vectorize -div-rem-pairs -separate-const-offset-from-gep -sroa -instcombine -newgvn -loop-guard-widening -reassociate -simplifycfg -lower-expect -lower-widenable-condition -lower-expect -bdce -newgvn -early-cse -gvn -mergeicmps -guard-widening -libcalls-shrinkwrap -loop-versioning -attributor -constmerge -rpo-functionattrs -speculative-execution -early-cse-memssa -gvn -rewrite-statepoints-for-gc -gvn -loop-versioning -scalarizer -lower-constant-intrinsics -lower-widenable-condition -simplifycfg -redundant-dbg-inst-elim -pgo-memop-opt -slp-vectorizer -float2int -adce -deadargelim -float2int -strip-debug-declare -redundant-dbg-inst-elim -slsr -rewrite-statepoints-for-gc -die -instcombine -slsr -dce -loweratomic -add-discriminators -lower-constant-intrinsics -sccp -constprop -aggressive-instcombine -lower-widenable-condition -cross-dso-cfi -coro-elide -newgvn -dce -reassociate -sccp -instsimplify -lower-expect -strip-dead-prototypes -strip-debug-declare -coro-elide -instsimplify -mldst-motion -early-cse-memssa -globalsplit -insert-gcov-profiling -sroa -always-inline -slp-vectorizer -callsite-splitting -newgvn -mldst-motion -simplifycfg -strip-dead-prototypes -aggressive-instcombine -called-value-propagation -newgvn -callsite-splitting -loop-versioning -early-cse -gvn -newgvn -flattencfg -rpo-functionattrs -globalopt -mergereturn -strip-dead-prototypes -die -instsimplify -redundant-dbg-inst-elim -reassociate -newgvn -cross-dso-cfi -instcombine -redundant-dbg-inst-elim -loop-data-prefetch -simplifycfg -slsr -strip-nondebug -simplifycfg -mergereturn -loop-guard-widening -insert-gcov-profiling -simplifycfg -scalarizer -instcombine -partially-inline-libcalls -pgo-memop-opt -early-cse-memssa -coro-cleanup -sink -newgvn -mergereturn -prune-eh -loweratomic -gvn-hoist -simplifycfg -guard-widening -sccp -add-discriminators -instcombine -inject-tli-mappings -constmerge -simplifycfg -loop-versioning -instcombine -gvn -newgvn -ipconstprop -lower-matrix-intrinsics -loop-versioning -adce -reassociate -slp-vectorizer -gvn -licm -simplifycfg -loop-versioning -redundant-dbg-inst-elim -gvn -loop-load-elim -instcombine -newgvn -strip-nondebug -inject-tli-mappings -newgvn -simplifycfg -pgo-memop-opt -barrier -reassociate -gvn-hoist -ipconstprop -globaldce -float2int -always-inline -infer-address-spaces -lower-matrix-intrinsics -loop-data-prefetch -jump-threading -lowerinvoke -simplifycfg -constprop -globalopt -gvn-hoist -lower-guard-intrinsic -mergereturn -lower-expect -float2int -instcombine -instcombine -gvn -early-cse-memssa -cross-dso-cfi -simplifycfg -always-inline -rpo-functionattrs -instcombine -aggressive-instcombine -early-cse-memssa -flattencfg -simplifycfg -inject-tli-mappings -newgvn -newgvn -instcombine -instnamer -rpo-functionattrs -instcombine -early-cse-memssa -instcombine -die -aggressive-instcombine -adce -separate-const-offset-from-gep -speculative-execution -lowerinvoke -globalopt -ipconstprop -strip-nondebug -early-cse-memssa -simple-loop-unswitch -loop-load-elim -loop-unroll-and-jam -post-inline-ee-instrument -gvn -gvn -loop-versioning -licm -adce -indvars -lower-expect -coro-elide -gvn-hoist -gvn-hoist -instsimplify -canonicalize-aliases -callsite-splitting -strip-debug-declare -globalsplit -add-discriminators -instnamer -aggressive-instcombine -instcombine -early-cse-memssa -die -callsite-splitting -consthoist -pgo-memop-opt -strip-debug-declare -tailcallelim -aggressive-instcombine -jump-threading -loop-vectorize -simplifycfg -loop-deletion -licm -elim-avail-extern -name-anon-globals -speculative-execution -simplifycfg -consthoist -functionattrs -sroa -alignment-from-assumptions -loop-versioning -float2int -functionattrs -guard-widening -ipsccp -early-cse -coro-elide -name-anon-globals -sancov -deadargelim -strip-nondebug -memcpyopt -strip-nondebug -argpromotion -globalsplit -strip-dead-prototypes -nary-reassociate -called-value-propagation -speculative-execution -float2int -div-rem-pairs -jump-threading -elim-avail-extern -die -newgvn -always-inline -lowerinvoke -inferattrs -pgo-memop-opt -speculative-execution -early-cse-memssa -gvn -simplifycfg -instcombine -lower-expect -globaldce -simplifycfg -simple-loop-unswitch -early-cse -scalarizer -dse -loop-unroll-and-jam -elim-avail-extern -gvn-hoist -newgvn -alignment-from-assumptions -ipconstprop -simplifycfg -redundant-dbg-inst-elim -rpo-functionattrs -jump-threading -slsr -dse -dse -reassociate -gvn -always-inline -cross-dso-cfi -elim-avail-extern -loop-data-prefetch -redundant-dbg-inst-elim -aggressive-instcombine -simplifycfg -redundant-dbg-inst-elim -sancov -insert-gcov-profiling -jump-threading -early-cse -inferattrs -callsite-splitting -gvn-hoist -slp-vectorizer -ipsccp -float2int -ipconstprop -jump-threading -speculative-execution -callsite-splitting -coro-split -canonicalize-aliases -instcombine -dse -scalarizer -dce -lowerinvoke -simplifycfg -simplifycfg -loop-versioning -flattencfg -die -die -rewrite-statepoints-for-gc -newgvn -prune-eh -simplifycfg -die -gvn-hoist -sroa -consthoist -post-inline-ee-instrument -instcombine -coro-split -cross-dso-cfi -jump-threading -reassociate -prune-eh -pgo-memop-opt -loweratomic -lower-expect -strip -mergeicmps -argpromotion -float2int -reassociate -sancov -globalsplit -argpromotion -slp-vectorizer -rewrite-statepoints-for-gc -early-cse-memssa -indvars -globaldce -cross-dso-cfi -loop-vectorize -instsimplify -elim-avail-extern -strip-nondebug -jump-threading -lower-widenable-condition -instsimplify -speculative-execution -argpromotion -early-cse -mergeicmps -barrier -lower-constant-intrinsics -early-cse-memssa -loop-versioning -guard-widening -instcombine -partially-inline-libcalls -callsite-splitting -flattencfg -lower-expect -lcssa -reassociate -newgvn -ipsccp -elim-avail-extern -coro-elide -strip-debug-declare -simplifycfg -simplifycfg -gvn -instsimplify -gvn -sancov -coro-elide -prune-eh -lowerinvoke -loop-data-prefetch -loop-simplify -adce -early-cse-memssa -adce -coro-elide -gvn -redundant-dbg-inst-elim -post-inline-ee-instrument -adce -callsite-splitting -instsimplify -float2int -forceattrs -prune-eh -coro-cleanup -early-cse-memssa -prune-eh -jump-threading -mergeicmps -loop-instsimplify -simplifycfg -lower-guard-intrinsic -simplifycfg -lower-expect -rpo-functionattrs -prune-eh -strip-dead-prototypes -loop-unroll-and-jam -instcombine -gvn-hoist -partially-inline-libcalls -float2int -simplifycfg -div-rem-pairs -slp-vectorizer -gvn-hoist -gvn -loop-sink -instcombine -die -lower-widenable-condition -early-cse-memssa -loop-fusion -elim-avail-extern -functionattrs -newgvn -lower-constant-intrinsics -dse -instcombine -inject-tli-mappings -instcombine -die -lowerinvoke -simplifycfg -early-cse-memssa -gvn -globalopt -gvn -gvn -early-cse-memssa -flattencfg -coro-cleanup -constprop -loop-data-prefetch -loop-versioning -pgo-memop-opt -gvn-hoist -gvn -scalarizer -early-cse-memssa -slsr -instcombine -newgvn -slp-vectorizer -die -instnamer -loop-versioning -constmerge -guard-widening -always-inline -elim-avail-extern -slp-vectorizer -callsite-splitting -simplifycfg -reassociate -callsite-splitting -speculative-execution -partially-inline-libcalls -callsite-splitting -adce -functionattrs -lower-guard-intrinsic -slp-vectorizer -prune-eh -loop-versioning -pgo-memop-opt -instcombine -simple-loop-unswitch -coro-split -aggressive-instcombine -die -globalopt -simplifycfg -instcombine -loop-data-prefetch -aggressive-instcombine -gvn -slsr -lower-matrix-intrinsics -strip -redundant-dbg-inst-elim -reassociate -strip-nondebug -die -nary-reassociate -simplifycfg -lower-constant-intrinsics -alignment-from-assumptions -sccp -die -inferattrs -separate-const-offset-from-gep -redundant-dbg-inst-elim -slp-vectorizer -sroa -mergefunc -sroa -sccp -loweratomic -instnamer -post-inline-ee-instrument -dce -consthoist -early-cse-memssa -gvn -barrier -cross-dso-cfi -sancov -gvn-hoist -strip-debug-declare -lower-matrix-intrinsics -loop-unroll-and-jam -mergereturn -early-cse -newgvn -loop-versioning -memcpyopt -scalarizer -lower-expect -globalopt -deadargelim -instsimplify -post-inline-ee-instrument -slsr -correlated-propagation -early-cse -callsite-splitting -globaldce -coro-cleanup -gvn -instcombine -coro-split -cross-dso-cfi -simplifycfg -newgvn -aggressive-instcombine -name-anon-globals -newgvn -slsr -instcombine -mem2reg -instcombine -mergefunc -aggressive-instcombine -mergeicmps -coro-elide -lower-guard-intrinsic -globaldce -callsite-splitting -sroa -loop-versioning -nary-reassociate -strip -gvn -adce -instcombine -gvn-hoist -gvn-hoist -die -functionattrs -jump-threading -gvn-hoist -early-cse-memssa -prune-eh -consthoist -dce -add-discriminators -reassociate -slsr -sancov -globaldce -memcpyopt -instcombine -globaldce -lower-constant-intrinsics -jump-threading -early-cse -globaldce -coro-elide -name-anon-globals -die -pgo-memop-opt -lower-expect -strip-dead-prototypes -separate-const-offset-from-gep -float2int -aggressive-instcombine -newgvn -scalarizer -instcombine -correlated-propagation -strip-dead-prototypes -aggressive-instcombine -instcombine -gvn-hoist -instnamer -post-inline-ee-instrument -gvn-hoist -inject-tli-mappings -gvn -post-inline-ee-instrument -ipconstprop -sancov -nary-reassociate -newgvn -coro-elide -simplifycfg -die -elim-avail-extern -strip -callsite-splitting -coro-split -mergefunc -gvn-hoist -lower-constant-intrinsics -dse -slp-vectorizer -partially-inline-libcalls -instcombine -slsr -lowerinvoke -partially-inline-libcalls -adce -newgvn -pgo-memop-opt -aggressive-instcombine -canonicalize-aliases -strip-dead-prototypes -sccp -aggressive-instcombine -float2int -deadargelim -aggressive-instcombine -separate-const-offset-from-gep -simplifycfg -gvn -redundant-dbg-inst-elim -inferattrs -nary-reassociate -adce -dse -simplifycfg -newgvn -simplifycfg -simplifycfg -instcombine -simplifycfg -adce -ipconstprop -redundant-dbg-inst-elim -loop-vectorize -mergereturn -functionattrs -guard-widening -sroa -instcombine -lower-expect -pgo-memop-opt -early-cse-memssa -gvn -benchmark://cbench-v1/tiffdither,1.0488754325259517,80.645259141922,opt -sroa -simplifycfg -forceattrs -rpo-functionattrs -dse -adce -jump-threading -mergefunc -simplifycfg -instnamer -early-cse-memssa -early-cse -simplifycfg -early-cse-memssa -loweratomic -gvn-hoist -dse -simplifycfg -loop-distribute -dse -sroa -gvn-hoist -consthoist -div-rem-pairs -early-cse-memssa -gvn-hoist -separate-const-offset-from-gep -loop-guard-widening -add-discriminators -globalopt -coro-split -coro-split -early-cse -strip-nondebug -correlated-propagation -prune-eh -adce -simplifycfg -aggressive-instcombine -instsimplify -lowerinvoke -callsite-splitting -constprop -simplifycfg -forceattrs -gvn-hoist -tailcallelim -sroa -early-cse -lower-matrix-intrinsics -early-cse-memssa -loop-unroll-and-jam -slsr -rpo-functionattrs -simple-loop-unswitch -early-cse-memssa -name-anon-globals -early-cse -instcombine -newgvn -strip-dead-prototypes -loop-load-elim -strip-nondebug -alignment-from-assumptions -strip -gvn-hoist -jump-threading -simplifycfg -simplifycfg -licm -newgvn -tailcallelim -instcombine -simplifycfg -deadargelim -elim-avail-extern -instcombine -sroa -mergefunc -redundant-dbg-inst-elim -correlated-propagation -memcpyopt -loop-unroll-and-jam -instcombine -adce -rewrite-statepoints-for-gc -strip-debug-declare -elim-avail-extern -simplifycfg -jump-threading -newgvn -forceattrs -simplifycfg -lower-guard-intrinsic -instnamer -redundant-dbg-inst-elim -globalopt -loop-guard-widening -nary-reassociate -called-value-propagation -nary-reassociate -mergefunc -ipsccp -scalarizer -globalsplit -mergefunc -mergeicmps -dce -simplifycfg -mem2reg -consthoist -gvn -slp-vectorizer -infer-address-spaces -aggressive-instcombine -simplifycfg -ipsccp -constmerge -loop-load-elim -loop-data-prefetch -ipconstprop -loop-versioning -rpo-functionattrs -reassociate -gvn -sccp -aggressive-instcombine -sroa -pgo-memop-opt -gvn -pgo-memop-opt -rpo-functionattrs -guard-widening -deadargelim -early-cse -loop-data-prefetch -slp-vectorizer -simplifycfg -gvn -loop-versioning-licm -div-rem-pairs -float2int -simplifycfg -instcombine -callsite-splitting -prune-eh -die -die -called-value-propagation -pgo-memop-opt -strip-dead-prototypes -instsimplify -lower-expect -early-cse -rpo-functionattrs -mergereturn -lower-expect -loop-fusion -instcombine -div-rem-pairs -coro-elide -sroa -scalarizer -speculative-execution -die -simple-loop-unswitch -simplifycfg -reassociate -sccp -consthoist -instcombine -instsimplify -mergeicmps -lower-expect -sccp -mergeicmps -simplifycfg -coro-cleanup -lcssa -redundant-dbg-inst-elim -gvn-hoist -inferattrs -deadargelim -newgvn -gvn -strip-debug-declare -coro-split -tailcallelim -mergeicmps -lower-constant-intrinsics -consthoist -lower-matrix-intrinsics -early-cse-memssa -reassociate -sroa -loop-vectorize -lower-matrix-intrinsics -aggressive-instcombine -globalopt -strip-dead-prototypes -ipsccp -simplifycfg -speculative-execution -inferattrs -early-cse-memssa -callsite-splitting -gvn-hoist -mergefunc -strip-dead-prototypes -add-discriminators -gvn -jump-threading -dce -loop-data-prefetch -inferattrs -canonicalize-aliases -gvn-hoist -float2int -instcombine -lower-matrix-intrinsics -post-inline-ee-instrument -early-cse-memssa -nary-reassociate -loop-versioning -lower-matrix-intrinsics -libcalls-shrinkwrap -instcombine -globaldce -gvn -instcombine -strip-dead-prototypes -strip-dead-prototypes -jump-threading -scalarizer -post-inline-ee-instrument -infer-address-spaces -loop-guard-widening -coro-cleanup -consthoist -simplifycfg -instcombine -partially-inline-libcalls -slp-vectorizer -post-inline-ee-instrument -div-rem-pairs -functionattrs -elim-avail-extern -constprop -newgvn -insert-gcov-profiling -callsite-splitting -lower-widenable-condition -globalopt -float2int -globaldce -argpromotion -instsimplify -consthoist -strip-nondebug -deadargelim -simplifycfg -lower-widenable-condition -deadargelim -coro-elide -correlated-propagation -loop-fusion -early-cse-memssa -jump-threading -loop-versioning -coro-elide -dse -adce -globaldce -newgvn -early-cse-memssa -inject-tli-mappings -slsr -simplifycfg -rewrite-statepoints-for-gc -functionattrs -mergefunc -globalsplit -dce -gvn -gvn-hoist -separate-const-offset-from-gep -reassociate -mergefunc -instcombine -simplifycfg -strip-nondebug -early-cse-memssa -mergefunc -cross-dso-cfi -tailcallelim -newgvn -post-inline-ee-instrument -mergefunc -die -globaldce -mergefunc -instcombine -mergereturn -lowerinvoke -prune-eh -indvars -sancov -break-crit-edges -instsimplify -sroa -strip-nondebug -gvn-hoist -dce -insert-gcov-profiling -loop-load-elim -gvn-hoist -simplifycfg -strip-nondebug -globalopt -consthoist -pgo-memop-opt -lower-matrix-intrinsics -loweratomic -cross-dso-cfi -instcombine -lower-widenable-condition -sccp -cross-dso-cfi -simplifycfg -flattencfg -div-rem-pairs -die -callsite-splitting -newgvn -insert-gcov-profiling -globalsplit -sancov -gvn-hoist -lower-expect -simplifycfg -simplifycfg -gvn-hoist -redundant-dbg-inst-elim -instnamer -gvn -libcalls-shrinkwrap -post-inline-ee-instrument -newgvn -newgvn -newgvn -slsr -mergefunc -newgvn -mergefunc -globalsplit -sancov -strip-nondebug -lower-constant-intrinsics -instnamer -lower-widenable-condition -instcombine -memcpyopt -slp-vectorizer -libcalls-shrinkwrap -rpo-functionattrs -newgvn -early-cse-memssa -lower-constant-intrinsics -instnamer -aggressive-instcombine -ipsccp -gvn-hoist -redundant-dbg-inst-elim -simplifycfg -loop-unroll-and-jam -simplifycfg -sccp -lower-expect -partially-inline-libcalls -simplifycfg -mem2reg -separate-const-offset-from-gep -early-cse-memssa -simplifycfg -lower-matrix-intrinsics -gvn-hoist -globalopt -ipsccp -redundant-dbg-inst-elim -callsite-splitting -inferattrs -simplifycfg -deadargelim -globaldce -gvn-hoist -rpo-functionattrs -simplifycfg -die -indvars -elim-avail-extern -early-cse-memssa -coro-split -early-cse-memssa -simplifycfg -callsite-splitting -simplifycfg -scalarizer -instcombine -gvn-hoist -die -die -lower-widenable-condition -alignment-from-assumptions -simplifycfg -dse -strip -redundant-dbg-inst-elim -simplifycfg -canonicalize-aliases -instcombine -early-cse -correlated-propagation -add-discriminators -consthoist -constmerge -scalarizer -gvn-hoist -float2int -nary-reassociate -functionattrs -simplifycfg -strip-dead-prototypes -globalsplit -consthoist -gvn-hoist -loop-data-prefetch -partially-inline-libcalls -rewrite-statepoints-for-gc -coro-elide -ee-instrument -consthoist -instcombine -jump-threading -canonicalize-aliases -guard-widening -elim-avail-extern -early-cse-memssa -callsite-splitting -libcalls-shrinkwrap -slp-vectorizer -jump-threading -cross-dso-cfi -early-cse -instsimplify -sccp -mergeicmps -redundant-dbg-inst-elim -consthoist -simple-loop-unswitch -newgvn -flattencfg -strip-dead-prototypes -sroa -speculative-execution -strip-nondebug -simplifycfg -instcombine -newgvn -speculative-execution -instcombine -instcombine -lower-matrix-intrinsics -insert-gcov-profiling -slsr -elim-avail-extern -loop-data-prefetch -instsimplify -irce -simplifycfg -correlated-propagation -simplifycfg -instcombine -ipconstprop -tailcallelim -strip-dead-prototypes -functionattrs -prune-eh -jump-threading -scalarizer -strip-dead-prototypes -instcombine -inferattrs -loop-versioning -guard-widening -correlated-propagation -early-cse-memssa -newgvn -scalarizer -float2int -strip-dead-prototypes -simplifycfg -callsite-splitting -consthoist -partially-inline-libcalls -ipconstprop -sink -coro-split -sancov -jump-threading -aggressive-instcombine -mergefunc -called-value-propagation -early-cse-memssa -consthoist -newgvn -early-cse -simplifycfg -early-cse -instnamer -loop-versioning-licm -licm -callsite-splitting -instcombine -jump-threading -simplifycfg -globalsplit -sancov -load-store-vectorizer -coro-elide -jump-threading -loop-data-prefetch -dse -simplifycfg -simplifycfg -slsr -jump-threading -globalopt -coro-elide -reassociate -simplifycfg -jump-threading -early-cse-memssa -infer-address-spaces -lower-widenable-condition -adce -newgvn -float2int -post-inline-ee-instrument -barrier -prune-eh -memcpyopt -pgo-memop-opt -lower-matrix-intrinsics -deadargelim -gvn-hoist -nary-reassociate -jump-threading -guard-widening -jump-threading -insert-gcov-profiling -gvn -constmerge -newgvn -slsr -tailcallelim -scalarizer -rpo-functionattrs -gvn-hoist -argpromotion -instcombine -gvn -nary-reassociate -slsr -newgvn -barrier -div-rem-pairs -simplifycfg -coro-split -instsimplify -coro-cleanup -deadargelim -loop-simplify -reassociate -lowerinvoke -adce -lower-matrix-intrinsics -loop-data-prefetch -lower-matrix-intrinsics -newgvn -coro-split -globalsplit -sancov -consthoist -name-anon-globals -nary-reassociate -newgvn -globalsplit -strip -lower-matrix-intrinsics -strip-dead-prototypes -loop-data-prefetch -instcombine -instnamer -instcombine -loop-data-prefetch -instcombine -float2int -scalarizer -coro-cleanup -gvn -coro-split -scalarizer -globaldce -post-inline-ee-instrument -pgo-memop-opt -loop-data-prefetch -pgo-memop-opt -globalopt -newgvn -aggressive-instcombine -add-discriminators -newgvn -coro-elide -rewrite-statepoints-for-gc -die -deadargelim -coro-elide -mergeicmps -gvn-hoist -pgo-memop-opt -instcombine -loop-sink -instsimplify -strip-debug-declare -instnamer -globalsplit -consthoist -tailcallelim -always-inline -forceattrs -dse -simplifycfg -float2int -simplifycfg -ipconstprop -instcombine -aggressive-instcombine -early-cse -instcombine -newgvn -deadargelim -ipsccp -instcombine -consthoist -forceattrs -early-cse-memssa -instcombine -instcombine -die -instcombine -coro-elide -coro-split -simplifycfg -ipsccp -gvn-hoist -adce -instcombine -sink -loop-interchange -speculative-execution -lcssa -instcombine -gvn-hoist -loop-guard-widening -instcombine -redundant-dbg-inst-elim -separate-const-offset-from-gep -gvn-hoist -redundant-dbg-inst-elim -simplifycfg -instcombine -forceattrs -dse -coro-elide -post-inline-ee-instrument -rpo-functionattrs -loop-versioning -sroa -dse -strip-nondebug -newgvn -simplifycfg -simplifycfg -adce -instcombine -simplifycfg -strip-nondebug -simplifycfg -prune-eh -ee-instrument +benchmark,reward,walltime,commandline +benchmark://cbench-v1/adpcm,1.0083798882681567,60.93814396858215,opt -sroa -mem2reg -insert-gcov-profiling -add-discriminators -prune-eh -jump-threading -dce -sroa -dce -insert-gcov-profiling -reassociate -lcssa -jump-threading -instcombine -mergefunc -sroa -canonicalize-aliases -loop-load-elim -consthoist -newgvn -dce -lower-matrix-intrinsics -sroa -sroa -instsimplify -dce -gvn-hoist -simplifycfg -sink -coro-split -rewrite-statepoints-for-gc -newgvn -instnamer -forceattrs -loop-distribute -simplifycfg -inject-tli-mappings -bdce -ipconstprop -scalarizer -reassociate -prune-eh -cross-dso-cfi -pgo-memop-opt -early-cse -instcombine -simplifycfg -speculative-execution -instcombine -newgvn -constmerge -coro-elide -partially-inline-libcalls -insert-gcov-profiling -newgvn -ipsccp -early-cse -redundant-dbg-inst-elim -aggressive-instcombine -coro-elide -dce -loop-guard-widening -cross-dso-cfi -newgvn -newgvn -simplifycfg -mergeicmps -speculative-execution -instnamer -simplifycfg -loop-data-prefetch -sccp -post-inline-ee-instrument -newgvn -sroa -consthoist -mem2reg -simplifycfg -gvn-hoist -loop-data-prefetch -constprop -early-cse -loop-unroll-and-jam -inferattrs -instcombine -simplifycfg -simplifycfg -lower-constant-intrinsics -simplifycfg -simplifycfg -newgvn input.bc -o output.bc +benchmark://cbench-v1/blowfish,1.10178117048346,61.936835527420044,opt -mem2reg -callsite-splitting -simplifycfg -slsr -sancov -barrier -loop-data-prefetch -die -coro-elide -instsimplify -early-cse-memssa -gvn-hoist -instcombine -add-discriminators -globalsplit -globaldce -deadargelim -lower-widenable-condition -jump-threading -simplifycfg -hotcoldsplit -newgvn -partially-inline-libcalls -dse -functionattrs -scalarizer -coro-elide -newgvn -separate-const-offset-from-gep -rpo-functionattrs -instcombine -dse -simplifycfg -globalopt -loop-versioning -newgvn -reassociate -consthoist -forceattrs -lower-guard-intrinsic -instcombine -loop-versioning -pgo-memop-opt -instcombine -gvn-hoist -dse -consthoist -memcpyopt -jump-threading -dse -instcombine -mergefunc -gvn -aggressive-instcombine -mldst-motion -prune-eh -rpo-functionattrs -simplifycfg -loop-unroll-and-jam -insert-gcov-profiling -gvn -strip-dead-prototypes -dce -gvn-hoist -ipsccp -globaldce -sroa -strip-nondebug -insert-gcov-profiling -gvn-hoist -functionattrs -instcombine -callsite-splitting -sink -name-anon-globals -insert-gcov-profiling -infer-address-spaces -lower-constant-intrinsics -instsimplify -coro-cleanup -deadargelim -div-rem-pairs -callsite-splitting -lower-widenable-condition -alignment-from-assumptions -loop-versioning -add-discriminators -globaldce -sroa -simplifycfg -instcombine -flattencfg -early-cse-memssa -mergereturn -loop-data-prefetch -constmerge -dse -coro-elide -early-cse-memssa -callsite-splitting -early-cse-memssa -reassociate -coro-early -early-cse -loop-data-prefetch -div-rem-pairs -globalsplit -instcombine -newgvn -instcombine -instcombine -sccp -gvn-hoist -dse -instcombine -barrier -pgo-memop-opt -newgvn -redundant-dbg-inst-elim -gvn-hoist -pgo-memop-opt -mergefunc -lower-matrix-intrinsics -redundant-dbg-inst-elim -load-store-vectorizer -instcombine -correlated-propagation -newgvn -instcombine -instcombine -pgo-memop-opt -gvn -jump-threading -indvars -argpromotion -add-discriminators -argpromotion -jump-threading -constprop -speculative-execution -instnamer -sink -consthoist -gvn-hoist -add-discriminators -simplifycfg -gvn-hoist -loop-interchange -lowerinvoke -simplifycfg -sroa -loop-distribute -load-store-vectorizer -jump-threading -nary-reassociate -simple-loop-unswitch -slp-vectorizer -early-cse-memssa -instcombine -consthoist -gvn-hoist -globaldce -gvn -gvn -instcombine -die -instcombine -simplifycfg -loop-data-prefetch -instnamer -rpo-functionattrs -instcombine -lower-matrix-intrinsics -adce -scalarizer -early-cse -insert-gcov-profiling -instsimplify -aggressive-instcombine -simplifycfg -instcombine -rpo-functionattrs -libcalls-shrinkwrap -simplifycfg -coro-split -gvn-hoist -aggressive-instcombine -deadargelim -simplifycfg -pgo-memop-opt -instsimplify -gvn-hoist -lcssa -sink -gvn -newgvn -simplifycfg -gvn-hoist -speculative-execution -jump-threading -instcombine -globalsplit -indvars -globalopt -jump-threading -ee-instrument -dce -simple-loop-unswitch -lower-guard-intrinsic -simplifycfg -coro-cleanup -jump-threading -pgo-memop-opt -jump-threading -flattencfg -mergereturn -instcombine -reassociate -lower-matrix-intrinsics -simplifycfg -mergefunc -simplifycfg -instcombine -simplifycfg -sccp -dse -mergefunc -gvn-hoist -sroa -irce -redundant-dbg-inst-elim -die -callsite-splitting -ee-instrument -strip-dead-prototypes -coro-elide -coro-split -slsr -simplifycfg -simplifycfg -loop-vectorize -lower-matrix-intrinsics -sink -instcombine -callsite-splitting -lower-guard-intrinsic -instcombine -jump-threading -simplifycfg -gvn-hoist -slp-vectorizer -insert-gcov-profiling -sroa -loop-data-prefetch -instsimplify -insert-gcov-profiling -mergefunc -sroa -strip-debug-declare -simplifycfg -tailcallelim -simplifycfg -pgo-memop-opt -newgvn -coro-elide -die -early-cse-memssa -bdce -gvn-hoist -name-anon-globals -sroa -redundant-dbg-inst-elim -newgvn -loop-data-prefetch -consthoist -simplifycfg -sroa -pgo-memop-opt -constprop -early-cse -coro-elide -simplifycfg -simplifycfg -lower-expect -instcombine -instcombine -instcombine -pgo-memop-opt -simplifycfg -dse -instcombine -early-cse-memssa -simplifycfg -instcombine -simplifycfg -coro-split -adce -early-cse-memssa -instnamer -newgvn -lcssa -scalarizer -pgo-memop-opt -newgvn -rewrite-statepoints-for-gc -mldst-motion -instcombine -strip-nondebug -functionattrs -gvn-hoist -gvn-hoist -instcombine -mergefunc -loop-versioning -newgvn -instcombine -indvars -mergereturn -coro-split -simplifycfg -callsite-splitting -coro-early -flattencfg -licm -argpromotion -consthoist -partially-inline-libcalls -elim-avail-extern -early-cse-memssa -loop-guard-widening -instcombine -libcalls-shrinkwrap -instcombine -instcombine -coro-elide -inferattrs -simplifycfg -adce -newgvn -lower-widenable-condition -lowerinvoke -instcombine -instcombine -simplifycfg -constmerge -simplifycfg -coro-cleanup -early-cse-memssa -coro-elide -early-cse-memssa -simplifycfg -consthoist -consthoist -scalarizer -newgvn -instcombine -loop-versioning -prune-eh -loop-load-elim -add-discriminators -loop-distribute -loop-deletion -simplifycfg -instsimplify -canonicalize-aliases -instnamer -instcombine -functionattrs -instcombine -dce -instcombine -indvars -simplifycfg -gvn-hoist -instcombine -simplifycfg -tailcallelim -instcombine -loop-data-prefetch -forceattrs -strip-dead-prototypes -gvn-hoist -instsimplify -coro-elide -instcombine -coro-elide -sroa -strip-dead-prototypes -newgvn -simplifycfg -dce -coro-elide -jump-threading -coro-split -slp-vectorizer -bdce -sroa -coro-elide -load-store-vectorizer -coro-split -coro-split -newgvn -scalarizer -ipsccp -instsimplify -instcombine -reassociate -constmerge -instcombine -consthoist -called-value-propagation -loop-deletion -lowerinvoke -gvn-hoist -functionattrs -instcombine -jump-threading -ipsccp -strip-nondebug -scalarizer -jump-threading -mergeicmps -coro-cleanup -newgvn -bdce -pgo-memop-opt -instcombine -adce -loop-data-prefetch -reassociate -infer-address-spaces -simplifycfg -forceattrs -lower-matrix-intrinsics -instcombine -flattencfg -consthoist -gvn-hoist -infer-address-spaces -simplifycfg -sancov -instcombine -separate-const-offset-from-gep -loop-versioning -tailcallelim -redundant-dbg-inst-elim -mergefunc -sancov -early-cse -instcombine -pgo-memop-opt -canonicalize-aliases -instnamer -simplifycfg -sccp -gvn-hoist -post-inline-ee-instrument -infer-address-spaces -dse -loop-data-prefetch -simplifycfg -constprop -gvn -sccp -loop-versioning -coro-cleanup -dse -instcombine -speculative-execution -gvn-hoist -newgvn -loop-versioning -gvn-hoist -name-anon-globals -strip-nondebug -simplifycfg -adce -instcombine -loop-versioning -lower-guard-intrinsic -globalsplit -instcombine -reassociate -ipsccp -coro-elide -consthoist -called-value-propagation -add-discriminators -consthoist -consthoist -early-cse-memssa -instsimplify -instcombine -loweratomic -simplifycfg -loop-data-prefetch -strip-dead-prototypes -div-rem-pairs -early-cse-memssa -instcombine -simplifycfg -nary-reassociate -instcombine -gvn-hoist -barrier -instcombine -bdce -newgvn -lcssa -loop-idiom -mergefunc -dce -redundant-dbg-inst-elim -simplifycfg -scalarizer -early-cse-memssa -bdce -constmerge -lower-guard-intrinsic -instnamer -early-cse -gvn -simplifycfg -ee-instrument -gvn-hoist -inject-tli-mappings -coro-elide -simplifycfg -simplifycfg -consthoist -coro-cleanup -lcssa -adce -instcombine -simplifycfg -instcombine -instcombine -guard-widening -loop-sink -slp-vectorizer -libcalls-shrinkwrap -instcombine -consthoist -lcssa -constprop -canonicalize-aliases -simplifycfg -early-cse-memssa input.bc -o output.bc +benchmark://cbench-v1/crc32,1.0,60.860716819763184,opt -sroa -insert-gcov-profiling -sroa -consthoist -sroa -pgo-memop-opt -called-value-propagation -sroa -sroa -bdce -gvn-hoist -strip-dead-prototypes -coro-elide -barrier -sroa -sink -reassociate -barrier -gvn-hoist -dce -loop-reroll -instsimplify -ee-instrument -mem2reg -speculative-execution -sroa -sroa -mem2reg -loop-interchange -mem2reg -sroa -loop-deletion -lower-guard-intrinsic -sroa -strip-nondebug -simple-loop-unswitch -sancov -sancov -sroa -sroa -sroa -forceattrs -sroa -insert-gcov-profiling -infer-address-spaces -sroa -tailcallelim -loop-interchange -globalopt -loop-guard-widening -loop-idiom -sroa -newgvn -insert-gcov-profiling -inject-tli-mappings -indvars -loop-vectorize -lower-matrix-intrinsics -lcssa -loop-deletion -bdce -bdce -sroa -sroa -mergereturn -constprop -sroa -mergereturn -lcssa -loop-load-elim -insert-gcov-profiling -mem2reg -instsimplify -ipsccp -sroa -simplifycfg -sroa -instsimplify -loop-load-elim -lowerinvoke -sroa -sroa -scalarizer -ee-instrument -early-cse -alignment-from-assumptions -alignment-from-assumptions -sroa -always-inline -dce -lcssa -early-cse -sroa -alignment-from-assumptions -sccp -pgo-memop-opt -mem2reg -reassociate -sroa -constprop -indvars -newgvn -reassociate -loop-guard-widening -called-value-propagation -loop-guard-widening -strip-nondebug -reassociate -adce -sroa -sroa -instcombine -sroa -sroa -sroa -partially-inline-libcalls -gvn-hoist -sroa -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/ghostscript,1.0296089727338689,110.89521312713623,opt -loop-interchange -sroa -adce -early-cse-memssa -simplifycfg -loop-guard-widening -globalsplit -coro-elide -coro-elide -jump-threading -instcombine -globalsplit -sancov -slsr -speculative-execution -gvn -simplifycfg -instcombine -separate-const-offset-from-gep -instcombine -jump-threading -lower-constant-intrinsics -early-cse-memssa -float2int -gvn -deadargelim -partially-inline-libcalls -die -simplifycfg -loop-versioning -lower-constant-intrinsics -lower-constant-intrinsics -coro-cleanup -simplifycfg -coro-elide -prune-eh -jump-threading -simplifycfg -die -reassociate -loop-versioning -ipconstprop -rpo-functionattrs -loop-versioning -callsite-splitting -simplifycfg -gvn -early-cse-memssa -sancov -instnamer -ipconstprop -loop-data-prefetch -dse -adce -globalsplit -slp-vectorizer -rpo-functionattrs -functionattrs -called-value-propagation -loop-sink -simplifycfg -deadargelim -sancov -name-anon-globals -instcombine -callsite-splitting -gvn -coro-split -always-inline -rpo-functionattrs -sccp -insert-gcov-profiling -coro-split -early-cse-memssa -instnamer -early-cse -lower-expect -die -instsimplify -mldst-motion -instcombine -dse -coro-early -mergefunc -newgvn -gvn-hoist -callsite-splitting -newgvn -separate-const-offset-from-gep -die -sancov -instcombine -forceattrs -newgvn -jump-threading -coro-cleanup -aggressive-instcombine -float2int -strip-nondebug -instcombine -simple-loop-unswitch -simplifycfg -loop-load-elim -redundant-dbg-inst-elim -sancov -rpo-functionattrs -dse -mergefunc -lowerinvoke -instcombine -early-cse -strip-nondebug -early-cse -adce -simplifycfg -die -mergereturn -always-inline -licm -instnamer -insert-gcov-profiling -simple-loop-unswitch -reassociate -newgvn -coro-split -functionattrs -newgvn -simplifycfg -simplifycfg -dce -nary-reassociate -coro-split -newgvn -lower-widenable-condition -jump-threading -consthoist -separate-const-offset-from-gep -globalsplit -simplifycfg -dse -jump-threading -loop-load-elim -early-cse-memssa -gvn -instcombine -loweratomic -simplifycfg -functionattrs -consthoist -jump-threading -lower-expect -ipsccp -jump-threading -gvn -adce -newgvn -rpo-functionattrs -sccp -simplifycfg -prune-eh -early-cse-memssa -coro-split -simplifycfg -globaldce -sancov -speculative-execution -coro-elide -slp-vectorizer -name-anon-globals -globalsplit -consthoist -loop-data-prefetch -name-anon-globals -simplifycfg -simplifycfg -instcombine -instcombine -instcombine -mergefunc -canonicalize-aliases -functionattrs -instcombine -strip-debug-declare -prune-eh -infer-address-spaces -rpo-functionattrs -canonicalize-aliases -mergefunc -callsite-splitting -dce -loop-versioning -loop-load-elim -gvn-hoist -simplifycfg -lower-matrix-intrinsics -float2int -dse -simplifycfg -instsimplify input.bc -o output.bc +benchmark://cbench-v1/ispell,1.028289936664321,66.57882642745972,opt -loop-data-prefetch -barrier -forceattrs -sroa -instcombine -instcombine -bdce -strip-dead-prototypes -early-cse-memssa -strip-debug-declare -add-discriminators -instcombine -simplifycfg -memcpyopt -jump-threading -forceattrs -strip-dead-prototypes -newgvn -redundant-dbg-inst-elim -post-inline-ee-instrument -instsimplify -newgvn -strip-nondebug -early-cse-memssa -coro-elide -instcombine -constmerge -cross-dso-cfi -load-store-vectorizer -deadargelim -strip-dead-prototypes -name-anon-globals -reassociate -redundant-dbg-inst-elim -adce -separate-const-offset-from-gep -instcombine -lower-expect -ipconstprop -name-anon-globals -aggressive-instcombine -functionattrs -mldst-motion -aggressive-instcombine -inferattrs -die -die -constprop -redundant-dbg-inst-elim -lower-widenable-condition -simplifycfg -lcssa -mldst-motion -functionattrs -add-discriminators -instcombine -strip-dead-prototypes -instsimplify -loop-versioning -inferattrs -redundant-dbg-inst-elim -attributor -jump-threading -licm -callsite-splitting -globalopt -dse -partially-inline-libcalls -ipsccp -rewrite-statepoints-for-gc -instcombine -name-anon-globals -sroa -lower-constant-intrinsics -pgo-memop-opt -mergefunc -slp-vectorizer -mergefunc -insert-gcov-profiling -instcombine -ipconstprop -scalarizer -libcalls-shrinkwrap -lowerinvoke -elim-avail-extern -memcpyopt -mem2reg -adce -aggressive-instcombine -libcalls-shrinkwrap -newgvn -mem2reg -flattencfg -loop-unroll-and-jam -newgvn -newgvn -loop-distribute -called-value-propagation -lowerinvoke -float2int -consthoist -bdce -jump-threading -simplifycfg -rpo-functionattrs -simplifycfg -coro-split -mergefunc -simple-loop-unswitch -loop-versioning -lower-matrix-intrinsics -simplifycfg -simplifycfg -adce -jump-threading -gvn-hoist -mergereturn -simplifycfg -simplifycfg -instcombine -newgvn -rewrite-statepoints-for-gc -globalopt -aggressive-instcombine -callsite-splitting -newgvn -consthoist -sancov -globalopt -gvn-hoist input.bc -o output.bc +benchmark://cbench-v1/jpeg-d,1.0493254773173644,79.56333637237549,opt -sroa -loop-data-prefetch -instcombine -mergeicmps -always-inline -pgo-memop-opt -sroa -gvn-hoist -strip-nondebug -simplifycfg -lower-matrix-intrinsics -instcombine -mergereturn -mergereturn -newgvn -lower-matrix-intrinsics -loop-guard-widening -sroa -simplifycfg -bdce -consthoist -mem2reg -instcombine -loop-data-prefetch -early-cse-memssa -slp-vectorizer -lower-expect -functionattrs -sink -instcombine -gvn-hoist -dce -gvn -newgvn -instcombine -loop-fusion -simplifycfg -pgo-memop-opt -simplifycfg -instcombine -lowerinvoke -sroa -loop-vectorize -newgvn -dse -redundant-dbg-inst-elim -loop-data-prefetch -aggressive-instcombine -simplifycfg -instcombine -dse -name-anon-globals -simplifycfg -globalopt -aggressive-instcombine -simplifycfg -newgvn -gvn -simplifycfg -simplifycfg -ipsccp -mem2reg -add-discriminators -instcombine -simplifycfg -coro-cleanup -loop-interchange -strip-dead-prototypes -gvn-hoist -add-discriminators -jump-threading -simplifycfg -simplifycfg -mergeicmps -simplifycfg -instcombine -strip-nondebug -instcombine -licm -lower-expect -instcombine -insert-gcov-profiling -instcombine -instcombine -mem2reg -always-inline -loop-fusion -adce -mergefunc -instcombine -nary-reassociate -early-cse-memssa -instcombine -ipconstprop -lower-matrix-intrinsics -instsimplify -gvn-hoist -pgo-memop-opt -redundant-dbg-inst-elim -strip-nondebug -gvn-hoist -mldst-motion -sroa -lower-constant-intrinsics -aggressive-instcombine -reassociate -float2int -simplifycfg -dse -gvn-hoist -always-inline -loop-versioning -early-cse-memssa -inferattrs -mergeicmps -instcombine -mergefunc -lower-guard-intrinsic -lower-widenable-condition -newgvn -sroa -loop-idiom -simplifycfg -speculative-execution -instcombine -coro-split -loop-data-prefetch -instcombine -strip -indvars -lowerinvoke -ipconstprop -loop-fusion -slsr -sroa -loop-guard-widening -coro-split -early-cse-memssa -deadargelim -simplifycfg -rewrite-statepoints-for-gc -globaldce -infer-address-spaces -early-cse-memssa -gvn-hoist -adce -partially-inline-libcalls -lower-expect -lowerinvoke -instcombine -strip-dead-prototypes -coro-elide -globaldce -lower-widenable-condition -instcombine -elim-avail-extern -speculative-execution -globaldce -slsr -early-cse -infer-address-spaces -float2int -simplifycfg -elim-avail-extern -mergefunc -coro-cleanup -instcombine -globalsplit -slsr -ipconstprop -prune-eh -flattencfg -globalopt -insert-gcov-profiling -lower-expect -simplifycfg -early-cse-memssa -gvn-hoist -coro-elide -memcpyopt -early-cse-memssa -aggressive-instcombine -loop-unroll-and-jam -mergefunc -sroa -sroa -instcombine -gvn-hoist -sroa -loop-sink -simplifycfg -instcombine -simple-loop-unswitch -newgvn -instsimplify -forceattrs -sink -inject-tli-mappings -sroa -newgvn -gvn -mergereturn -gvn-hoist -always-inline -instnamer -loop-sink -adce -mem2reg -mldst-motion -sccp -inject-tli-mappings -consthoist -gvn -loop-data-prefetch -newgvn -instcombine -pgo-memop-opt -adce -adce -gvn-hoist -reassociate -instcombine -speculative-execution -loop-load-elim -dce -simplifycfg -reassociate -instcombine -simplifycfg -newgvn -prune-eh -adce -inject-tli-mappings -mem2reg -gvn-hoist -sroa -float2int -rewrite-statepoints-for-gc -simplifycfg -mldst-motion -simplifycfg -instcombine -simplifycfg -sroa -licm -libcalls-shrinkwrap -slp-vectorizer -simplifycfg -newgvn -adce -early-cse -simplifycfg -globalopt -inferattrs -dse -inject-tli-mappings -coro-cleanup -ipconstprop -slp-vectorizer -partially-inline-libcalls -simplifycfg -gvn -pgo-memop-opt -mergefunc -loop-data-prefetch -instcombine -lower-matrix-intrinsics -alignment-from-assumptions -newgvn -globalsplit -lower-constant-intrinsics -pgo-memop-opt -strip-dead-prototypes -coro-split -consthoist -loop-simplify -sccp -sink -inject-tli-mappings -lcssa -globaldce -consthoist -newgvn -consthoist -loop-distribute -adce -simplifycfg -elim-avail-extern -instcombine -constmerge -instcombine -instcombine -strip -simplifycfg -gvn -sroa -loop-vectorize -simplifycfg -instcombine -early-cse -instcombine -ipsccp -simplifycfg -consthoist -gvn-hoist -inject-tli-mappings -early-cse -dse -simplifycfg -lower-matrix-intrinsics -sroa -reassociate -barrier -simplifycfg -ipsccp -simplifycfg -barrier -gvn -sroa -simplifycfg -coro-cleanup -simplifycfg -simplifycfg -constprop -lower-matrix-intrinsics -instcombine -scalarizer -die -adce -gvn-hoist -loop-versioning -float2int -instsimplify -name-anon-globals -lowerinvoke -float2int -jump-threading -barrier -slsr -simple-loop-unswitch -ipconstprop -gvn-hoist -ipconstprop -rewrite-statepoints-for-gc -barrier -coro-split -inferattrs -instnamer -sroa -lower-widenable-condition -consthoist -always-inline -speculative-execution -newgvn -simplifycfg -loop-distribute -gvn-hoist -instcombine -early-cse-memssa -sccp -scalarizer -called-value-propagation -simplifycfg -instcombine -simplifycfg -globaldce -slsr -instcombine -newgvn -pgo-memop-opt -strip -inferattrs -lower-constant-intrinsics -jump-threading -strip-dead-prototypes -prune-eh -simplifycfg -lower-matrix-intrinsics -mergefunc -globalsplit -loop-sink -adce -slsr -instcombine -partially-inline-libcalls -sroa -newgvn -adce -newgvn -ipsccp -adce -tailcallelim -loop-sink -speculative-execution -gvn -lower-guard-intrinsic -simplifycfg -coro-split -consthoist -functionattrs -lower-guard-intrinsic -callsite-splitting -instcombine -sancov -mem2reg -strip-debug-declare -strip -globaldce -mem2reg -add-discriminators -consthoist -always-inline -dse -slp-vectorizer -sroa -strip -alignment-from-assumptions -jump-threading -jump-threading -instsimplify -newgvn -callsite-splitting -instcombine -loop-fusion -instcombine -barrier -lower-guard-intrinsic -consthoist -tailcallelim -loop-data-prefetch -simplifycfg -reassociate -newgvn -instcombine -functionattrs -simplifycfg -globalsplit -loop-versioning -newgvn -constmerge -simplifycfg -slp-vectorizer -coro-elide -simplifycfg -simplifycfg -instcombine -early-cse-memssa -instcombine -jump-threading -consthoist -strip-dead-prototypes -instnamer -loop-versioning -newgvn -barrier -div-rem-pairs -ipsccp -consthoist -slp-vectorizer -mergefunc -loweratomic -globalopt -coro-split -gvn -strip-dead-prototypes -guard-widening -lower-constant-intrinsics -loop-versioning -dse -instcombine -instcombine -lcssa -simplifycfg -instcombine -gvn -lower-constant-intrinsics -globaldce -newgvn -speculative-execution -deadargelim -callsite-splitting -sancov -mergeicmps -coro-elide -consthoist -inject-tli-mappings -strip-nondebug -consthoist -sancov -inject-tli-mappings -simplifycfg -speculative-execution -simplifycfg -globalopt -lowerinvoke -gvn-hoist -simplifycfg -instcombine -prune-eh -redundant-dbg-inst-elim -correlated-propagation -sancov -loop-simplifycfg -cross-dso-cfi -ipconstprop -simplifycfg -instcombine -ipconstprop -indvars -argpromotion -early-cse -sccp -early-cse -sccp -globalopt -newgvn -newgvn -infer-address-spaces -rpo-functionattrs -lower-widenable-condition -gvn-hoist -nary-reassociate -consthoist -lower-matrix-intrinsics -mergereturn -forceattrs -mem2reg -gvn-hoist -jump-threading -infer-address-spaces -float2int -mergereturn -sroa -coro-cleanup -nary-reassociate -ipsccp -instcombine -simplifycfg -loop-versioning -slp-vectorizer -slsr -early-cse-memssa -simplifycfg -early-cse-memssa -lower-constant-intrinsics -loweratomic -rpo-functionattrs -scalarizer -pgo-memop-opt -loop-versioning -indvars -float2int -simplifycfg -speculative-execution -newgvn -strip -mldst-motion -scalarizer -lower-matrix-intrinsics -argpromotion -lower-constant-intrinsics -sroa -aggressive-instcombine -mergefunc -newgvn -coro-split -jump-threading -reassociate -constprop -sccp -lowerinvoke -attributor -loop-data-prefetch -die -callsite-splitting -coro-split -simplifycfg -slp-vectorizer -simplifycfg -lower-matrix-intrinsics -early-cse-memssa -adce -newgvn -jump-threading -aggressive-instcombine -slp-vectorizer -loop-data-prefetch -rpo-functionattrs -insert-gcov-profiling -jump-threading -newgvn -jump-threading -mergefunc -sancov -post-inline-ee-instrument -callsite-splitting -strip-nondebug -die -jump-threading -mergeicmps -lower-widenable-condition -dse -always-inline -scalarizer -lower-guard-intrinsic -elim-avail-extern -strip-dead-prototypes -dse -strip-nondebug -coro-elide -gvn -loop-guard-widening -instcombine -instcombine -consthoist -lowerinvoke -instcombine -sroa -newgvn -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/patricia,1.0111234705228032,60.98874354362488,opt -sroa -sccp -sroa -loop-guard-widening -instsimplify -early-cse -sroa -called-value-propagation -newgvn -rewrite-statepoints-for-gc -gvn-hoist -loop-sink -loop-deletion -indvars -sroa -add-discriminators -sroa -sancov -sroa -instsimplify -sroa -sroa -reassociate -sroa -barrier -guard-widening -coro-cleanup -dce -called-value-propagation -loweratomic -ipconstprop -post-inline-ee-instrument -correlated-propagation -lower-widenable-condition -instsimplify -early-cse-memssa -early-cse -globalsplit -early-cse -adce -sroa -loop-unroll-and-jam -jump-threading -lcssa -alignment-from-assumptions -name-anon-globals -sancov -sink -sroa -licm -simplifycfg -newgvn -strip -newgvn -loop-unroll-and-jam -loop-distribute -pgo-memop-opt -flattencfg -simplifycfg -sroa -consthoist -adce -sroa -mldst-motion -strip-debug-declare -newgvn -sroa -loop-sink -loop-deletion -sroa -mem2reg -instcombine -loop-load-elim -strip-nondebug -sroa -name-anon-globals -newgvn -sroa -strip-nondebug -sroa -loop-guard-widening -aggressive-instcombine -indvars -loop-simplifycfg -insert-gcov-profiling -indvars -prune-eh -ee-instrument -tailcallelim -reassociate -loop-idiom -early-cse -sroa -instcombine -sroa -loop-distribute -redundant-dbg-inst-elim -pgo-memop-opt -sroa -functionattrs -tailcallelim -lower-matrix-intrinsics -strip-nondebug -dse -lower-constant-intrinsics -alignment-from-assumptions -float2int -sroa -dse -cross-dso-cfi -argpromotion -globalsplit -strip -globalsplit -lower-matrix-intrinsics -canonicalize-aliases -name-anon-globals -mldst-motion -ee-instrument -infer-address-spaces -indvars -inferattrs -div-rem-pairs -reassociate -ee-instrument -simplifycfg -strip-nondebug -die -callsite-splitting -rpo-functionattrs -loop-simplify -jump-threading -strip-nondebug -sancov -insert-gcov-profiling -loop-guard-widening -attributor -adce -sancov -div-rem-pairs -strip-dead-prototypes -dse -speculative-execution -gvn-hoist -reassociate -lower-matrix-intrinsics -gvn-hoist -lowerinvoke -scalarizer -consthoist -gvn -lower-matrix-intrinsics -sccp -gvn-hoist -simplifycfg -deadargelim -coro-split -correlated-propagation -lowerinvoke -instcombine -coro-split -loop-data-prefetch -globalopt -early-cse input.bc -o output.bc +benchmark://cbench-v1/rijndael,1.1092372556535077,62.701143980026245,opt -sroa -loop-versioning -gvn-hoist -simplifycfg -lower-widenable-condition -early-cse-memssa -consthoist -instcombine -globaldce -flattencfg -loop-data-prefetch -loop-versioning -instsimplify -gvn-hoist -simplifycfg -pgo-memop-opt -nary-reassociate -scalarizer -correlated-propagation -attributor -callsite-splitting -redundant-dbg-inst-elim -sancov -die -insert-gcov-profiling -instsimplify -redundant-dbg-inst-elim -jump-threading -early-cse-memssa -simplifycfg -slsr -scalarizer -mergefunc -called-value-propagation -simplifycfg -speculative-execution -slp-vectorizer -coro-elide -simplifycfg -mem2reg -coro-split -scalarizer -functionattrs -prune-eh -ipsccp -early-cse-memssa -callsite-splitting -name-anon-globals -slsr -slp-vectorizer -deadargelim -simplifycfg -newgvn -die -mergereturn -simplifycfg -callsite-splitting -name-anon-globals -slsr -adce -mldst-motion -simplifycfg -ipconstprop -constprop -simplifycfg -partially-inline-libcalls -insert-gcov-profiling -globalopt -post-inline-ee-instrument -simplifycfg -simplifycfg -constprop -die -lowerinvoke -strip-nondebug -globaldce -cross-dso-cfi -newgvn -jump-threading -simplifycfg -speculative-execution -loop-vectorize -die -instcombine -slp-vectorizer -simplifycfg -instcombine -irce -ipconstprop -newgvn -gvn-hoist -slp-vectorizer -rpo-functionattrs -instcombine -ipconstprop -simplifycfg -sccp -pgo-memop-opt -ipsccp -lower-constant-intrinsics -simplifycfg -always-inline -simplifycfg -lcssa -constmerge -gvn-hoist -simplifycfg -instcombine -dse -aggressive-instcombine -coro-elide -speculative-execution -callsite-splitting -consthoist -callsite-splitting -callsite-splitting -prune-eh -globalopt -reassociate -instnamer -early-cse -pgo-memop-opt -instcombine input.bc -o output.bc +benchmark://cbench-v1/stringsearch2,0.9962686567164181,60.92854332923889,opt -partially-inline-libcalls -mem2reg -simple-loop-unswitch -mem2reg -add-discriminators -sroa -alignment-from-assumptions -sroa -bdce -gvn-hoist -separate-const-offset-from-gep -loop-reroll -early-cse-memssa -pgo-memop-opt -early-cse -inferattrs -cross-dso-cfi -early-cse -coro-cleanup -lcssa -scalarizer -sccp -lower-guard-intrinsic -adce -indvars -constprop -dce -early-cse -sroa -correlated-propagation -lower-guard-intrinsic -sroa -sroa -lower-matrix-intrinsics -sroa -inject-tli-mappings -loop-unroll-and-jam -newgvn -simplifycfg -aggressive-instcombine -sroa -strip-dead-prototypes -canonicalize-aliases -jump-threading -argpromotion -hotcoldsplit -loop-predication -loop-guard-widening -globalopt -newgvn -div-rem-pairs -mergereturn -sroa -coro-split -indvars -sroa -sccp -lower-matrix-intrinsics -coro-cleanup -strip-dead-prototypes -early-cse -loop-idiom -sroa -prune-eh -simplifycfg -lcssa -mergereturn -barrier -name-anon-globals -bdce -loop-guard-widening -loop-idiom -alignment-from-assumptions -instcombine -sroa -canonicalize-aliases -sroa -simplifycfg -prune-eh -loop-versioning-licm -insert-gcov-profiling -simple-loop-unswitch -sroa -globalopt -sroa -loweratomic -instcombine -mem2reg -sroa -cross-dso-cfi -callsite-splitting -prune-eh -alignment-from-assumptions -mergeicmps -consthoist -strip -constprop -insert-gcov-profiling -sroa -reassociate -infer-address-spaces -globalsplit -forceattrs -correlated-propagation -mergefunc -loop-sink -sccp -called-value-propagation -ipconstprop -memcpyopt -memcpyopt -lcssa -globalsplit -cross-dso-cfi -globalopt -mergeicmps -newgvn -mem2reg -instnamer -speculative-execution -loop-fusion -early-cse-memssa -canonicalize-aliases -sroa -sink -elim-avail-extern -sroa -gvn-hoist -adce -lowerinvoke -constmerge -callsite-splitting -deadargelim -instcombine -consthoist -early-cse-memssa -early-cse-memssa -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/susan,1.026874840030715,65.63927268981934,opt -sroa -lower-matrix-intrinsics -ipsccp -instcombine -early-cse -coro-split -simplifycfg -loop-sink -indvars -instcombine -sccp -coro-elide -coro-split -indvars -strip-nondebug -functionattrs -gvn -prune-eh -consthoist -early-cse-memssa -early-cse-memssa -reassociate -aggressive-instcombine -instsimplify -insert-gcov-profiling -simplifycfg -float2int -gvn -strip-dead-prototypes -die -gvn-hoist -guard-widening -loop-deletion -post-inline-ee-instrument -indvars -newgvn -newgvn -lower-matrix-intrinsics -early-cse -globalopt -instcombine -simplifycfg -simplifycfg -div-rem-pairs -globalsplit -lowerinvoke -add-discriminators -early-cse-memssa -partially-inline-libcalls -sink -jump-threading -callsite-splitting -add-discriminators -early-cse-memssa -cross-dso-cfi -simplifycfg -jump-threading -simplifycfg -instcombine -aggressive-instcombine -licm -simple-loop-unswitch -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -reassociate -constprop -callsite-splitting -elim-avail-extern -memcpyopt -globalsplit -memcpyopt -loop-data-prefetch -globalopt -slsr -consthoist -partially-inline-libcalls -lower-matrix-intrinsics -newgvn -lower-widenable-condition -simplifycfg -loop-versioning -load-store-vectorizer -lower-constant-intrinsics -instsimplify -globalopt -newgvn -pgo-memop-opt -redundant-dbg-inst-elim -newgvn -sink -lowerinvoke -adce -globalsplit -aggressive-instcombine -gvn -lcssa -sancov -coro-elide -sink -barrier -mergereturn -coro-split -gvn-hoist -partially-inline-libcalls -strip-nondebug -scalarizer -lower-matrix-intrinsics -simplifycfg -irce -loop-unroll-and-jam -strip-debug-declare -flattencfg -coro-cleanup -guard-widening -newgvn -speculative-execution -gvn -ipconstprop -instcombine -early-cse-memssa -simplifycfg -flattencfg -name-anon-globals -simplifycfg -div-rem-pairs -loop-versioning -simplifycfg -jump-threading -memcpyopt -instcombine -ipsccp -simplifycfg -sccp -pgo-memop-opt -early-cse-memssa -mldst-motion -float2int -loop-versioning -aggressive-instcombine -sroa -early-cse-memssa -strip -globaldce -scalarizer -instcombine -globalopt -lowerinvoke -inferattrs -elim-avail-extern -pgo-memop-opt -loop-load-elim -strip-dead-prototypes -slp-vectorizer -lower-widenable-condition -sancov -inject-tli-mappings -name-anon-globals -sroa -lower-matrix-intrinsics -sancov -slp-vectorizer -callsite-splitting -callsite-splitting -lower-expect -nary-reassociate -newgvn -lowerinvoke -gvn-hoist -early-cse-memssa -speculative-execution -callsite-splitting -speculative-execution -loweratomic -slsr -sroa -infer-address-spaces -instcombine -gvn -simplifycfg -libcalls-shrinkwrap -newgvn -instcombine -loop-data-prefetch -newgvn -globalopt -constprop -lower-matrix-intrinsics -lower-expect -globalsplit -coro-split -partially-inline-libcalls -lower-expect -always-inline -partially-inline-libcalls -add-discriminators -newgvn -gvn-hoist -gvn -libcalls-shrinkwrap -pgo-memop-opt -slp-vectorizer -insert-gcov-profiling -functionattrs -dse -gvn-hoist -add-discriminators -inferattrs -gvn -lower-matrix-intrinsics -early-cse-memssa -early-cse-memssa -lower-expect -correlated-propagation -pgo-memop-opt -newgvn -aggressive-instcombine -slsr -globalsplit -strip-nondebug -strip-debug-declare -instcombine -gvn -prune-eh -loop-versioning -instsimplify -ipsccp -flattencfg -forceattrs -strip -loop-simplify -float2int -jump-threading -gvn -nary-reassociate -lower-widenable-condition -dse -loop-deletion -lower-matrix-intrinsics -slp-vectorizer -adce -loop-interchange -gvn-hoist -gvn-hoist -loop-versioning -simplifycfg -infer-address-spaces -lower-widenable-condition -consthoist -lowerinvoke -libcalls-shrinkwrap -instcombine -lower-widenable-condition -strip-dead-prototypes -mergefunc -early-cse -elim-avail-extern -coro-elide -globaldce -gvn-hoist -instcombine -early-cse-memssa -instcombine -newgvn -argpromotion -jump-threading -simplifycfg -early-cse-memssa -coro-elide -instcombine -loop-data-prefetch -pgo-memop-opt -gvn -aggressive-instcombine -rewrite-statepoints-for-gc -lower-matrix-intrinsics -early-cse-memssa -rpo-functionattrs -coro-elide -dse -inferattrs -early-cse-memssa -slsr -callsite-splitting -speculative-execution -instcombine -adce -instcombine -post-inline-ee-instrument -tailcallelim -float2int -instcombine -instcombine -slp-vectorizer -sancov -coro-elide -functionattrs -scalarizer -lower-guard-intrinsic -always-inline -lower-matrix-intrinsics -instnamer -jump-threading -simplifycfg -instcombine -sccp -sancov -jump-threading -ipconstprop -callsite-splitting -newgvn -post-inline-ee-instrument -early-cse-memssa -globalsplit -consthoist -sancov -gvn-hoist -sink -functionattrs -cross-dso-cfi -early-cse-memssa -coro-split -reassociate -instcombine -callsite-splitting -pgo-memop-opt -memcpyopt -gvn-hoist -adce -infer-address-spaces -flattencfg -slp-vectorizer -lower-matrix-intrinsics -simplifycfg -callsite-splitting -loop-fusion -newgvn -instcombine -globalsplit -lower-guard-intrinsic -adce -jump-threading -deadargelim -loop-interchange -sancov -prune-eh -callsite-splitting -licm -lower-widenable-condition -post-inline-ee-instrument -jump-threading -ee-instrument -coro-elide -aggressive-instcombine -lowerinvoke -sink -early-cse-memssa -simplifycfg -loop-versioning -prune-eh -early-cse-memssa -constmerge -instcombine -mergefunc -jump-threading -nary-reassociate -newgvn -consthoist -rpo-functionattrs -simplifycfg -simplifycfg -coro-elide -instcombine -strip-dead-prototypes -partially-inline-libcalls -libcalls-shrinkwrap -strip -jump-threading -loop-load-elim -insert-gcov-profiling -simplifycfg -early-cse-memssa -alignment-from-assumptions -early-cse-memssa -rpo-functionattrs -early-cse-memssa -newgvn -early-cse-memssa -barrier -reassociate -gvn -strip-dead-prototypes -div-rem-pairs -globalopt -early-cse-memssa -loop-unroll-and-jam -early-cse-memssa -constprop -strip -partially-inline-libcalls -float2int -lower-widenable-condition -barrier -slsr -early-cse -simplifycfg -mergefunc -aggressive-instcombine -lower-widenable-condition -elim-avail-extern -dse -instcombine -loop-interchange -lowerinvoke -reassociate -instcombine -rpo-functionattrs -instcombine -jump-threading -simplifycfg -nary-reassociate -dse -strip-nondebug -always-inline -instsimplify -early-cse-memssa -globalopt -sancov -flattencfg -slsr -simplifycfg -strip-dead-prototypes -functionattrs -coro-elide -callsite-splitting -early-cse-memssa -loop-data-prefetch -instcombine -jump-threading -elim-avail-extern -slp-vectorizer -separate-const-offset-from-gep -gvn -always-inline -simplifycfg -newgvn -loop-load-elim -lower-widenable-condition -deadargelim -loop-versioning -early-cse -coro-elide -instnamer -cross-dso-cfi -adce -loop-load-elim -ipconstprop -lower-constant-intrinsics -strip-debug-declare -early-cse -inferattrs -instcombine -elim-avail-extern -instcombine -coro-elide -newgvn -instcombine -consthoist -bdce -rpo-functionattrs -globaldce -newgvn -adce -loop-data-prefetch -infer-address-spaces -gvn-hoist -strip -speculative-execution -sccp -lower-matrix-intrinsics -libcalls-shrinkwrap -newgvn -indvars -instcombine -simplifycfg -instcombine -partially-inline-libcalls -separate-const-offset-from-gep -mergefunc -canonicalize-aliases -dce -sancov -consthoist -infer-address-spaces -mergefunc -ipsccp -float2int -simplifycfg -slsr -div-rem-pairs -early-cse -lower-widenable-condition -instcombine -sancov -globalopt -coro-elide -dse -globalsplit -instcombine -instcombine -newgvn -rpo-functionattrs -speculative-execution -callsite-splitting -gvn -lower-expect -prune-eh -aggressive-instcombine -lowerinvoke -coro-elide -constprop -pgo-memop-opt -early-cse -lower-matrix-intrinsics -guard-widening -early-cse-memssa -coro-elide -callsite-splitting -simplifycfg -lower-widenable-condition -rewrite-statepoints-for-gc -constmerge -sink -lower-widenable-condition -slsr -indvars -deadargelim -simplifycfg -globalopt -rewrite-statepoints-for-gc -inject-tli-mappings -adce -lower-expect -cross-dso-cfi -coro-split -partially-inline-libcalls -ipconstprop -die -coro-cleanup -insert-gcov-profiling -aggressive-instcombine -simplifycfg -jump-threading -argpromotion -simplifycfg -name-anon-globals -sccp -newgvn -scalarizer -div-rem-pairs -strip-dead-prototypes -ipconstprop -prune-eh -inferattrs -lowerinvoke -globalsplit -adce -constprop -insert-gcov-profiling -partially-inline-libcalls -newgvn -dce -loop-versioning -callsite-splitting -pgo-memop-opt -die -lowerinvoke -aggressive-instcombine -die -callsite-splitting -partially-inline-libcalls -slsr -jump-threading -ipconstprop -instcombine -instnamer -elim-avail-extern -globalopt -die -loop-versioning -instcombine -deadargelim -sroa -partially-inline-libcalls -jump-threading -reassociate -newgvn -rpo-functionattrs -nary-reassociate -loop-data-prefetch -globaldce -instcombine -early-cse-memssa -gvn-hoist -gvn -float2int -licm -consthoist -newgvn -insert-gcov-profiling -sccp -slp-vectorizer -prune-eh -lowerinvoke -ipsccp -gvn -loop-data-prefetch -mergefunc -sink -lower-guard-intrinsic -redundant-dbg-inst-elim -early-cse-memssa -coro-early -instcombine -prune-eh -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/tiff2rgba,1.0461367226770069,77.85855555534363,opt -sroa -mem2reg -coro-split -instcombine -attributor -newgvn -guard-widening -lower-expect -float2int -gvn-hoist -simplifycfg -pgo-memop-opt -newgvn -globalopt -ipsccp -gvn-hoist -dse -loop-idiom -early-cse-memssa -dce -consthoist -lower-constant-intrinsics -gvn-hoist -simplifycfg -guard-widening -gvn-hoist -loop-versioning -slp-vectorizer -instcombine -always-inline -newgvn -rpo-functionattrs -consthoist -mergereturn -instcombine -infer-address-spaces -deadargelim -pgo-memop-opt -separate-const-offset-from-gep -strip-nondebug -called-value-propagation -rpo-functionattrs -ipconstprop -sink -ipsccp -forceattrs -add-discriminators -early-cse -flattencfg -dce -licm -instcombine -jump-threading -name-anon-globals -simplifycfg -dse -ipconstprop -simplifycfg -die -jump-threading -pgo-memop-opt -sink -slsr -lower-constant-intrinsics -simplifycfg -consthoist -constmerge -newgvn -post-inline-ee-instrument -coro-elide -pgo-memop-opt -adce -slsr -div-rem-pairs -ipsccp -reassociate -simplifycfg -sroa -newgvn -lower-matrix-intrinsics -lower-constant-intrinsics -pgo-memop-opt -strip-nondebug -lower-widenable-condition -dce -simplifycfg -consthoist -ipconstprop -lowerinvoke -slsr -ipsccp -float2int -instcombine -strip-dead-prototypes -infer-address-spaces -instnamer -reassociate -gvn-hoist -early-cse -alignment-from-assumptions -loop-versioning -barrier -mergeicmps -rpo-functionattrs -instcombine -newgvn -callsite-splitting -float2int -instcombine -strip-nondebug -jump-threading -die -gvn-hoist -instcombine -newgvn input.bc -o output.bc +benchmark://cbench-v1/tiffmedian,1.0459000717188616,77.83211016654968,opt -reg2mem -sroa -globalopt -constprop -pgo-memop-opt -simplifycfg -simple-loop-unswitch -coro-early -sroa -argpromotion -scalarizer -strip-dead-prototypes -adce -loop-data-prefetch -gvn-hoist -gvn-hoist -newgvn -pgo-memop-opt -lower-matrix-intrinsics -licm -loop-versioning -called-value-propagation -coro-split -simplifycfg -speculative-execution -strip-nondebug -lowerinvoke -ipconstprop -lowerinvoke -instcombine -name-anon-globals -simplifycfg -gvn-hoist -lower-guard-intrinsic -float2int -coro-elide -ipconstprop -insert-gcov-profiling -name-anon-globals -flattencfg -mergefunc -barrier -instcombine -loop-versioning -die -instcombine -div-rem-pairs -loop-simplify -jump-threading -gvn-hoist -newgvn -simplifycfg -die -mergeicmps -globalsplit -coro-split -globaldce -instcombine -reassociate -gvn-hoist -simplifycfg -instcombine -sroa -coro-early -rewrite-statepoints-for-gc -lower-expect -scalarizer -dce -jump-threading -mldst-motion input.bc -o output.bc +benchmark://cbench-v1/bitcount,1.0199115044247788,61.001503229141235,opt -sroa -early-cse -early-cse -infer-address-spaces -early-cse-memssa -strip-nondebug -gvn-hoist -bdce -indvars -instcombine -newgvn -newgvn -speculative-execution -newgvn -loop-load-elim -early-cse -simplifycfg -cross-dso-cfi -strip-nondebug -always-inline -dse -ipsccp -simplifycfg -early-cse -sroa -simplifycfg -mem2reg -early-cse -jump-threading -simplifycfg -mem2reg -redundant-dbg-inst-elim -sroa -adce -sroa -simplifycfg -dce -sink -ee-instrument -sroa -newgvn -constprop -bdce -deadargelim -simplifycfg -simplifycfg -sroa -inferattrs -aggressive-instcombine -post-inline-ee-instrument -ipsccp -instcombine -lower-expect -simplifycfg -sroa -instcombine -loop-distribute -globalopt -argpromotion -gvn-hoist -instcombine -mem2reg -alignment-from-assumptions -globalsplit -instcombine -coro-elide -simplifycfg -loop-fusion -simplifycfg -functionattrs -simplifycfg -loop-versioning -inject-tli-mappings -dse -loop-versioning -loop-sink -instcombine -consthoist -lcssa -nary-reassociate -early-cse -dce -coro-early -loop-simplifycfg -gvn-hoist -aggressive-instcombine -simplifycfg -newgvn -jump-threading -adce -simplifycfg -loop-data-prefetch -coro-cleanup -simplifycfg -slsr -simplifycfg -rpo-functionattrs -ipconstprop -simplifycfg -mergereturn -tailcallelim -simplifycfg -simplifycfg -loweratomic -instcombine -jump-threading -always-inline -prune-eh -simple-loop-unswitch -strip -prune-eh -rewrite-statepoints-for-gc -simplifycfg -partially-inline-libcalls -scalarizer -simplifycfg -lower-widenable-condition -ee-instrument -float2int -rpo-functionattrs -simplifycfg -reassociate -simplifycfg -reassociate -float2int -dce -bdce -ipsccp -bdce -dse -consthoist -gvn-hoist -lower-matrix-intrinsics -adce -early-cse-memssa -ipconstprop -early-cse-memssa -gvn-hoist -ipconstprop -argpromotion -instcombine -pgo-memop-opt -correlated-propagation -lowerinvoke -lcssa -newgvn -strip-nondebug -lower-matrix-intrinsics -sancov -simplifycfg -instcombine -consthoist -early-cse-memssa -loop-distribute -aggressive-instcombine -loop-distribute -aggressive-instcombine -ipsccp -ipconstprop -elim-avail-extern input.bc -o output.bc +benchmark://cbench-v1/bzip2,1.2212154350882676,71.58076405525208,opt -add-discriminators -instnamer -lower-guard-intrinsic -add-discriminators -instnamer -partially-inline-libcalls -sroa -strip-nondebug -newgvn -bdce -dce -licm -loop-data-prefetch -instcombine -redundant-dbg-inst-elim -instcombine -instcombine -float2int -adce -simplifycfg -slp-vectorizer -newgvn -separate-const-offset-from-gep -barrier -loop-versioning -forceattrs -instcombine -sroa -rpo-functionattrs -memcpyopt -div-rem-pairs -name-anon-globals -newgvn -flattencfg -memcpyopt -redundant-dbg-inst-elim -sccp -early-cse-memssa -elim-avail-extern -mergefunc -coro-cleanup -always-inline -mergefunc -mergereturn -ee-instrument -reassociate -correlated-propagation -globalopt -post-inline-ee-instrument -callsite-splitting -instcombine -strip-debug-declare -loweratomic -slsr -called-value-propagation -forceattrs -strip -callsite-splitting -loop-data-prefetch -simplifycfg -lower-widenable-condition -constmerge -scalarizer -libcalls-shrinkwrap -early-cse -dse -simplifycfg -argpromotion -simplifycfg -globalsplit -div-rem-pairs -newgvn -coro-cleanup -loop-load-elim -newgvn -instsimplify -simplifycfg -aggressive-instcombine -pgo-memop-opt -mergefunc -lower-expect -gvn -lower-matrix-intrinsics -pgo-memop-opt -early-cse-memssa -insert-gcov-profiling -adce -newgvn -sroa -loop-versioning -globalopt -coro-elide -coro-split -speculative-execution -mldst-motion -nary-reassociate -sancov -adce -ipsccp -slp-vectorizer -cross-dso-cfi -instcombine -coro-elide -mem2reg -speculative-execution -mergereturn -simplifycfg -newgvn -newgvn -early-cse-memssa -simplifycfg -dce -lowerinvoke -constprop -instcombine -infer-address-spaces -lower-widenable-condition -newgvn -coro-split -newgvn -tailcallelim -lower-widenable-condition -newgvn -loop-load-elim -loop-load-elim -globalopt -jump-threading -instcombine -mergefunc -simplifycfg -simplifycfg -early-cse-memssa -nary-reassociate -jump-threading -slp-vectorizer -loop-versioning -simplifycfg -speculative-execution -libcalls-shrinkwrap -globaldce -slp-vectorizer -lower-matrix-intrinsics -alignment-from-assumptions -loop-data-prefetch -slsr -early-cse-memssa -coro-split -adce -functionattrs -simplifycfg -sccp -instcombine -ee-instrument -instcombine -cross-dso-cfi -functionattrs -gvn -slsr -sroa -partially-inline-libcalls -mergeicmps -loop-data-prefetch -deadargelim -jump-threading -callsite-splitting -argpromotion -alignment-from-assumptions -functionattrs -scalarizer -loop-versioning -instsimplify -simplifycfg -die -loweratomic -gvn-hoist -dce -strip-nondebug -loop-data-prefetch -functionattrs -early-cse-memssa -gvn-hoist -coro-elide -slp-vectorizer -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/dijkstra,0.9948979591836736,61.20203399658203,opt -sroa -simple-loop-unswitch -loop-reroll -sroa -sroa -early-cse -sroa -called-value-propagation -loop-simplifycfg -sroa -name-anon-globals -reassociate -sroa -rewrite-statepoints-for-gc -instsimplify -die -sroa -loop-guard-widening -mem2reg -sroa -coro-early -sroa -bdce -sroa -inferattrs -sroa -loop-load-elim -mem2reg -add-discriminators -sroa -sroa -simplifycfg -sroa -insert-gcov-profiling -die -reassociate -dce -loop-data-prefetch -partially-inline-libcalls -sroa -sroa -sroa -loop-predication -sroa -argpromotion -instsimplify -sroa -instsimplify -sink -early-cse -sroa -sink -sroa -sroa -sroa -argpromotion -loop-load-elim -sroa -dce -rpo-functionattrs -early-cse -rpo-functionattrs -sroa -sroa -infer-address-spaces -strip-dead-prototypes -globaldce -insert-gcov-profiling -sink -guard-widening -infer-address-spaces -gvn-hoist -rewrite-statepoints-for-gc -sroa -bdce -alignment-from-assumptions -gvn-hoist -mldst-motion -post-inline-ee-instrument -globalopt -insert-gcov-profiling -argpromotion -instcombine -loop-unroll-and-jam -pgo-memop-opt -infer-address-spaces -pgo-memop-opt -dce -loop-unroll-and-jam -reassociate -sroa -sroa -early-cse -instsimplify -globalopt -instnamer -sroa -early-cse -always-inline -gvn-hoist -sroa -adce -sroa -simplifycfg -inject-tli-mappings -canonicalize-aliases -early-cse -newgvn -mem2reg -sroa -alignment-from-assumptions -globalsplit -early-cse-memssa -early-cse -lowerinvoke -gvn-hoist -insert-gcov-profiling -sancov -early-cse -load-store-vectorizer -simplifycfg -inferattrs -early-cse -name-anon-globals -bdce -sancov -simplifycfg -coro-cleanup -instcombine input.bc -o output.bc +benchmark://cbench-v1/gsm,1.1296065737051797,64.22639560699463,opt -sroa -gvn-hoist -rpo-functionattrs -adce -coro-split -insert-gcov-profiling -instnamer -lower-expect -newgvn -strip-dead-prototypes -rpo-functionattrs -float2int -float2int -loop-data-prefetch -mergeicmps -gvn-hoist -strip-nondebug -indvars -sccp -float2int -mergereturn -simplifycfg -sancov -coro-split -simplifycfg -indvars -consthoist -instcombine -mem2reg -early-cse-memssa -pgo-memop-opt -rewrite-statepoints-for-gc -loop-simplifycfg -early-cse-memssa -gvn-hoist -lower-expect -functionattrs -speculative-execution -scalarizer -name-anon-globals -jump-threading -mergefunc -jump-threading -gvn-hoist -ipconstprop -lower-expect -simplifycfg -loop-predication -gvn -early-cse-memssa -sancov -newgvn -insert-gcov-profiling -ipconstprop -partially-inline-libcalls -dce -simplifycfg -early-cse -separate-const-offset-from-gep -lcssa -sancov -coro-elide -prune-eh -called-value-propagation -partially-inline-libcalls -early-cse -lcssa -sroa -globalsplit -coro-elide -post-inline-ee-instrument -newgvn -aggressive-instcombine -ipsccp -simplifycfg -instcombine -ipsccp -newgvn -float2int -ipsccp -early-cse-memssa -loweratomic -instcombine -separate-const-offset-from-gep -consthoist -sccp -scalarizer -name-anon-globals -mem2reg -slp-vectorizer -loop-data-prefetch -gvn -newgvn -coro-elide -deadargelim -mergeicmps -lower-widenable-condition -globalsplit -argpromotion -lower-matrix-intrinsics -lower-constant-intrinsics -dse -gvn-hoist -memcpyopt -insert-gcov-profiling -slsr -lower-guard-intrinsic -simplifycfg -insert-gcov-profiling -elim-avail-extern -strip-nondebug -sancov -instnamer -simplifycfg -aggressive-instcombine -simplifycfg -deadargelim -load-store-vectorizer -globalsplit -strip-nondebug -strip-nondebug -prune-eh -ipsccp -slsr -ipsccp -tailcallelim -simplifycfg -inject-tli-mappings -simplifycfg -gvn -instcombine -early-cse -bdce -slp-vectorizer -aggressive-instcombine -constprop -consthoist -adce -div-rem-pairs -loop-load-elim -tailcallelim -lcssa -mergefunc -tailcallelim -mldst-motion -mldst-motion -lower-constant-intrinsics -cross-dso-cfi -coro-cleanup -indvars -strip-nondebug -simplifycfg -bdce -strip-nondebug -simplifycfg -forceattrs -insert-gcov-profiling -consthoist -memcpyopt -ipconstprop -callsite-splitting -loop-interchange -callsite-splitting -ipconstprop -slp-vectorizer -nary-reassociate -coro-elide -callsite-splitting -called-value-propagation -jump-threading -instcombine -nary-reassociate -strip-dead-prototypes -simplifycfg -slsr -newgvn -correlated-propagation -instcombine -globalsplit -jump-threading -libcalls-shrinkwrap -dse -simplifycfg -instsimplify -load-store-vectorizer -loop-versioning -barrier -pgo-memop-opt -ipconstprop -instcombine -early-cse-memssa -argpromotion -simplifycfg -deadargelim -lower-widenable-condition -slp-vectorizer -jump-threading -prune-eh -early-cse-memssa -dse -simplifycfg -alignment-from-assumptions -die -aggressive-instcombine -sancov -instcombine -memcpyopt -insert-gcov-profiling -lowerinvoke -mem2reg -strip-debug-declare -ipsccp -globalsplit -inferattrs -instcombine -dse -ipconstprop -lowerinvoke -newgvn input.bc -o output.bc +benchmark://cbench-v1/jpeg-c,1.0468425458040127,78.61691927909851,opt -sroa -sroa -nary-reassociate -consthoist -functionattrs -infer-address-spaces -functionattrs -instsimplify -simplifycfg -adce -simplifycfg -gvn-hoist -coro-elide -ipconstprop -hotcoldsplit -globalsplit -instcombine -instsimplify -redundant-dbg-inst-elim -lower-guard-intrinsic -jump-threading -instsimplify -inject-tli-mappings -mem2reg -instsimplify -newgvn -rpo-functionattrs -redundant-dbg-inst-elim -pgo-memop-opt -pgo-memop-opt -simplifycfg -forceattrs -scalarizer -simplifycfg -newgvn -die -globalsplit -instsimplify -loop-guard-widening -sroa -sroa -speculative-execution -constprop -speculative-execution -pgo-memop-opt -instcombine -newgvn -gvn-hoist -early-cse-memssa -lower-constant-intrinsics -early-cse-memssa -newgvn -sink -consthoist -loop-data-prefetch -ipsccp -rpo-functionattrs -inject-tli-mappings -sccp -lower-widenable-condition -newgvn -instcombine -newgvn -irce -instcombine -lower-guard-intrinsic -forceattrs -lcssa -gvn-hoist -simplifycfg -coro-split -slsr -simplifycfg -sccp -simplifycfg -globaldce -loop-unroll-and-jam -guard-widening -indvars -simplifycfg -scalarizer -loop-interchange -constprop -pgo-memop-opt -instcombine -sroa -dce -newgvn -instcombine -gvn -strip-nondebug -simplifycfg -slsr -insert-gcov-profiling -early-cse -forceattrs -lower-widenable-condition -nary-reassociate -loop-data-prefetch -adce -lower-matrix-intrinsics -ipsccp -canonicalize-aliases -simplifycfg -lower-matrix-intrinsics -gvn-hoist -dce -lower-expect -instcombine -loop-vectorize -pgo-memop-opt -sroa -instcombine -loop-predication -instcombine -licm -name-anon-globals -globalsplit -simplifycfg -dce -sroa -inferattrs -reassociate -sroa -mem2reg -prune-eh -jump-threading -licm -gvn-hoist -indvars -mergereturn -loop-simplify -lower-widenable-condition -sroa -early-cse-memssa -newgvn -coro-split -instcombine -gvn-hoist -strip -loop-versioning -elim-avail-extern -mergefunc -simplifycfg -loop-data-prefetch -adce -adce -aggressive-instcombine -pgo-memop-opt -loop-distribute -globalopt -sancov -alignment-from-assumptions -jump-threading -mergeicmps -licm -loop-versioning -strip-dead-prototypes -scalarizer -newgvn -simplifycfg -strip-debug-declare -functionattrs -simplifycfg -instcombine -loweratomic -gvn-hoist -tailcallelim -coro-cleanup -loop-data-prefetch -loop-versioning -simplifycfg -instcombine -partially-inline-libcalls -add-discriminators -newgvn -dce -ee-instrument -consthoist -slsr -consthoist -loop-data-prefetch -mldst-motion -correlated-propagation -loop-distribute -infer-address-spaces -infer-address-spaces -strip-debug-declare -simplifycfg -dse -slsr -gvn -separate-const-offset-from-gep -sancov -rpo-functionattrs -ipconstprop -loop-data-prefetch -globalsplit -deadargelim -cross-dso-cfi -ipconstprop -newgvn -globaldce -strip-debug-declare -loop-guard-widening -infer-address-spaces -strip-nondebug -alignment-from-assumptions -instcombine -infer-address-spaces -instnamer -early-cse -loop-versioning -loop-versioning -slsr -gvn -simplifycfg -strip-debug-declare -sroa -coro-early -lcssa -deadargelim -pgo-memop-opt -aggressive-instcombine -bdce -early-cse-memssa -sroa -strip-dead-prototypes -ipconstprop -mldst-motion -coro-elide -newgvn -instcombine -newgvn -simplifycfg -ipsccp -early-cse -partially-inline-libcalls -loop-distribute -mldst-motion -lcssa -callsite-splitting -loop-unroll-and-jam -nary-reassociate -sancov -cross-dso-cfi -coro-cleanup -early-cse-memssa -gvn-hoist -flattencfg -gvn-hoist -die -ipsccp -ee-instrument -strip -globalopt -sink -inject-tli-mappings -instcombine -coro-elide -canonicalize-aliases -strip-nondebug -instsimplify -simplifycfg -jump-threading -simplifycfg -sroa -strip-debug-declare -coro-split -loop-versioning -newgvn -instcombine -early-cse -sancov -simplifycfg -loop-load-elim -mem2reg -ipsccp -slp-vectorizer -early-cse -newgvn -functionattrs -inject-tli-mappings -partially-inline-libcalls -instcombine -post-inline-ee-instrument -instcombine -strip-nondebug -called-value-propagation -gvn-hoist -loop-reroll -barrier -alignment-from-assumptions -simplifycfg -simplifycfg -early-cse-memssa -newgvn -redundant-dbg-inst-elim -die -early-cse-memssa -mergeicmps -inject-tli-mappings -infer-address-spaces -loop-data-prefetch -gvn -lowerinvoke -gvn -guard-widening -aggressive-instcombine -simplifycfg -dce -scalarizer -guard-widening -dce -simplifycfg -pgo-memop-opt -always-inline -simplifycfg -slsr -correlated-propagation -coro-elide -canonicalize-aliases -simplifycfg -alignment-from-assumptions -mergefunc -slsr -indvars -simplifycfg -gvn-hoist -deadargelim -lower-constant-intrinsics -simplifycfg -newgvn -coro-split -loop-data-prefetch -newgvn -consthoist -instcombine -globaldce -div-rem-pairs -simplifycfg -coro-elide -gvn -redundant-dbg-inst-elim -newgvn -instcombine -gvn-hoist -mergefunc -flattencfg -lower-constant-intrinsics -consthoist -simple-loop-unswitch -mergereturn -early-cse-memssa -slsr -cross-dso-cfi -licm -mergefunc -dce -instcombine -simplifycfg -simplifycfg -loop-versioning -ipconstprop -pgo-memop-opt -scalarizer -early-cse -strip -coro-cleanup -strip-dead-prototypes -globalsplit -float2int -coro-elide -early-cse -mldst-motion -simplifycfg -callsite-splitting -deadargelim -sroa -slsr -guard-widening -gvn -loop-vectorize -coro-cleanup -div-rem-pairs -rewrite-statepoints-for-gc -mergereturn -forceattrs -loop-vectorize -mldst-motion -jump-threading -adce -instcombine -loop-versioning -barrier -strip-dead-prototypes -newgvn -instcombine -simplifycfg -flattencfg -pgo-memop-opt -gvn -prune-eh -sccp -newgvn -sroa -early-cse-memssa -instcombine -simplifycfg -newgvn -mem2reg -coro-elide -deadargelim -simplifycfg -newgvn -infer-address-spaces -reassociate -jump-threading -functionattrs -jump-threading -simple-loop-unswitch -loop-simplify -always-inline -lower-constant-intrinsics -simplifycfg -globalopt -newgvn -loop-versioning -lowerinvoke -loop-unroll-and-jam -gvn-hoist -pgo-memop-opt -loop-load-elim -bdce -consthoist -early-cse -gvn-hoist -ipconstprop -lcssa -mergeicmps -instcombine -always-inline -instcombine -insert-gcov-profiling -pgo-memop-opt -simplifycfg -lower-guard-intrinsic -globalopt -mem2reg -constmerge -bdce -lower-constant-intrinsics -strip-nondebug -lower-matrix-intrinsics -mergereturn -lower-constant-intrinsics -elim-avail-extern -instcombine -ipconstprop -early-cse-memssa -redundant-dbg-inst-elim -strip-nondebug -inferattrs -called-value-propagation -globalsplit -instcombine -strip-dead-prototypes -instsimplify -instcombine -simplifycfg -sccp -newgvn -coro-cleanup -instcombine -reassociate -argpromotion -loop-data-prefetch -add-discriminators -infer-address-spaces -float2int -inject-tli-mappings -float2int -sancov -adce -newgvn -coro-cleanup -ipconstprop -aggressive-instcombine -simplifycfg -gvn-hoist -lcssa -adce -slsr -strip-dead-prototypes -gvn-hoist -sccp -simplifycfg -gvn-hoist -simplifycfg -add-discriminators -consthoist -cross-dso-cfi -instcombine -pgo-memop-opt -instsimplify -constprop -simplifycfg -early-cse-memssa -mergereturn -coro-split -loop-sink -simplifycfg -simplifycfg -sroa -lower-expect -flattencfg -instcombine -sroa -functionattrs -cross-dso-cfi -newgvn -jump-threading -simplifycfg -early-cse-memssa -lower-matrix-intrinsics -callsite-splitting -coro-cleanup -instcombine -mergefunc -ipsccp -mem2reg -nary-reassociate -loop-vectorize -constmerge -insert-gcov-profiling -instcombine -dce -callsite-splitting -early-cse -simplifycfg -adce -flattencfg -loop-simplify -lower-matrix-intrinsics -gvn -early-cse -instcombine -loop-fusion -coro-cleanup -lower-matrix-intrinsics -forceattrs -globalsplit -sroa -strip-dead-prototypes -gvn -float2int -instcombine -loop-predication -jump-threading -early-cse-memssa -flattencfg -simplifycfg -pgo-memop-opt -barrier -always-inline -deadargelim -newgvn -instsimplify -simplifycfg -nary-reassociate -early-cse-memssa -float2int -consthoist -redundant-dbg-inst-elim -simplifycfg -tailcallelim -jump-threading -barrier -newgvn -prune-eh -early-cse-memssa -always-inline -instcombine -aggressive-instcombine -simplifycfg -float2int -pgo-memop-opt -lower-matrix-intrinsics -lower-expect -alignment-from-assumptions -rewrite-statepoints-for-gc -indvars -nary-reassociate -consthoist -adce -coro-elide -globaldce -newgvn -tailcallelim -loop-fusion -post-inline-ee-instrument -early-cse -dce -instcombine -loop-load-elim -simplifycfg -simplifycfg -lower-constant-intrinsics -loop-versioning -bdce -newgvn -instsimplify -dce -simplifycfg -rpo-functionattrs -tailcallelim -simplifycfg -instcombine -loop-data-prefetch -jump-threading -newgvn -gvn -early-cse-memssa -guard-widening -mem2reg -slsr -early-cse-memssa -indvars -reassociate -aggressive-instcombine -globalopt -dce -sccp -reassociate -newgvn -consthoist -rewrite-statepoints-for-gc -reassociate -callsite-splitting -instcombine -instsimplify -simplifycfg -gvn -lower-expect -rpo-functionattrs -jump-threading -strip-debug-declare -inferattrs -globalsplit -simplifycfg -deadargelim -deadargelim -rewrite-statepoints-for-gc -barrier -cross-dso-cfi -loweratomic -scalarizer -strip -gvn-hoist -strip -ipconstprop -bdce -insert-gcov-profiling -instcombine -partially-inline-libcalls -insert-gcov-profiling -loop-interchange -early-cse -scalarizer -newgvn -sroa -pgo-memop-opt -canonicalize-aliases -inject-tli-mappings -ipconstprop -ipconstprop -correlated-propagation -instcombine -simplifycfg -strip-nondebug -instcombine -slp-vectorizer -pgo-memop-opt -early-cse -slsr -loweratomic -early-cse-memssa -loweratomic -strip -instcombine input.bc -o output.bc +benchmark://cbench-v1/lame,1.0789493661276837,77.61762881278992,opt -float2int -called-value-propagation -forceattrs -sroa -sancov -partially-inline-libcalls -correlated-propagation -ipsccp -instcombine -sccp -instcombine -sink -newgvn -simplifycfg -gvn-hoist -lowerinvoke -instcombine -guard-widening -div-rem-pairs -slp-vectorizer -inferattrs -jump-threading -globaldce -indvars -early-cse-memssa -nary-reassociate -loop-distribute -gvn-hoist -speculative-execution -loop-distribute -lower-widenable-condition -globaldce -inject-tli-mappings -instcombine -instcombine -early-cse-memssa -inferattrs -float2int -adce -callsite-splitting -memcpyopt -prune-eh -loop-versioning -consthoist -newgvn -gvn -strip-nondebug -ipsccp -strip -sccp -loop-vectorize -simplifycfg -lower-guard-intrinsic -instnamer -coro-elide -loop-data-prefetch -alignment-from-assumptions -jump-threading -instcombine -aggressive-instcombine -simplifycfg -simplifycfg -forceattrs -rewrite-statepoints-for-gc -slsr -mergefunc -add-discriminators -loweratomic -lower-expect -coro-split -sccp -partially-inline-libcalls -infer-address-spaces -gvn -sroa -slsr -indvars -newgvn -bdce -ipconstprop -redundant-dbg-inst-elim -instcombine -newgvn -gvn -early-cse-memssa -licm -pgo-memop-opt -float2int -jump-threading -mergefunc -cross-dso-cfi -prune-eh -lowerinvoke -early-cse -gvn -globalsplit -nary-reassociate -bdce -instnamer -strip-dead-prototypes -deadargelim -adce -sroa -pgo-memop-opt -deadargelim -lower-matrix-intrinsics -instcombine -float2int -simplifycfg -early-cse-memssa -ipconstprop -reassociate -lower-constant-intrinsics -strip-dead-prototypes -speculative-execution -coro-cleanup -name-anon-globals -globaldce -simplifycfg -guard-widening -always-inline -coro-elide -mergeicmps -slp-vectorizer -sancov -strip -newgvn -dce -div-rem-pairs -lower-expect -jump-threading -sccp -cross-dso-cfi -newgvn -ipconstprop -strip-dead-prototypes -strip-nondebug -flattencfg -early-cse-memssa -deadargelim -name-anon-globals -coro-split -jump-threading -early-cse-memssa -coro-elide -libcalls-shrinkwrap -lower-constant-intrinsics -functionattrs -rewrite-statepoints-for-gc -partially-inline-libcalls -die -early-cse-memssa -correlated-propagation -instcombine -newgvn -mldst-motion -sroa -lower-constant-intrinsics -gvn-hoist -name-anon-globals -loop-load-elim -cross-dso-cfi -canonicalize-aliases -scalarizer -early-cse-memssa -jump-threading -simplifycfg -lower-expect -simplifycfg -jump-threading -lower-guard-intrinsic -early-cse-memssa -gvn -coro-cleanup -early-cse-memssa -scalarizer -indvars -loop-fusion -instcombine -aggressive-instcombine -inferattrs -rpo-functionattrs -strip -deadargelim -callsite-splitting -jump-threading -prune-eh -nary-reassociate -consthoist -newgvn -simplifycfg -post-inline-ee-instrument -adce -instcombine -newgvn -instcombine -lowerinvoke -dse -lower-expect -redundant-dbg-inst-elim -loweratomic -sancov -rpo-functionattrs -strip-debug-declare -scalarizer -ipconstprop -strip-nondebug -post-inline-ee-instrument -early-cse-memssa -gvn -separate-const-offset-from-gep -flattencfg -callsite-splitting -slp-vectorizer -indvars -ipconstprop -aggressive-instcombine -early-cse -newgvn -jump-threading -consthoist -callsite-splitting -loweratomic -globalsplit -callsite-splitting -coro-early -lower-constant-intrinsics -sancov -guard-widening -die -globalsplit -lower-widenable-condition -pgo-memop-opt -early-cse -strip-nondebug -loop-data-prefetch -simplifycfg -adce -callsite-splitting -globalopt -slsr -div-rem-pairs -memcpyopt -aggressive-instcombine -strip-nondebug -deadargelim -gvn -partially-inline-libcalls -reassociate -partially-inline-libcalls -die -flattencfg -partially-inline-libcalls -inferattrs -mergefunc -early-cse-memssa -coro-elide -deadargelim -mergefunc -scalarizer -aggressive-instcombine -strip -deadargelim -early-cse-memssa -strip-nondebug -barrier -inferattrs -sancov -mergeicmps -loop-fusion -mldst-motion -called-value-propagation -globalsplit -coro-split -ipsccp -jump-threading -canonicalize-aliases -slsr -newgvn -sancov -coro-early -gvn-hoist -gvn -cross-dso-cfi -mldst-motion -ipconstprop -post-inline-ee-instrument -flattencfg -scalarizer -slp-vectorizer -gvn -loop-versioning -lower-guard-intrinsic -simplifycfg -lower-widenable-condition -instcombine -coro-cleanup -constprop -instcombine -gvn -gvn -loop-versioning -globaldce -newgvn -instcombine -simplifycfg -loop-versioning -newgvn -globaldce -strip-nondebug -consthoist -prune-eh -tailcallelim -sancov -newgvn -mergereturn -deadargelim -instcombine -dse -ipconstprop -coro-cleanup -simplifycfg -sancov -globaldce -elim-avail-extern -globalsplit -mergefunc -gvn-hoist -gvn -loop-versioning -callsite-splitting -newgvn -prune-eh -lower-widenable-condition -jump-threading -loop-simplify -slsr -pgo-memop-opt -jump-threading -adce -pgo-memop-opt -lowerinvoke -speculative-execution -sink -newgvn -flattencfg -insert-gcov-profiling -consthoist -indvars -coro-elide -mergefunc -newgvn -scalarizer -memcpyopt -mem2reg -ipsccp -add-discriminators -insert-gcov-profiling -globaldce -instsimplify -lower-matrix-intrinsics -early-cse-memssa -lower-expect -sink -float2int -gvn-hoist -lower-matrix-intrinsics -globaldce -jump-threading -globaldce -coro-split -simplifycfg -dse -aggressive-instcombine -die -slp-vectorizer -instcombine -aggressive-instcombine -inferattrs -partially-inline-libcalls -mem2reg -scalarizer -slsr -newgvn -newgvn -coro-cleanup -instcombine -coro-elide -callsite-splitting -slsr -callsite-splitting -ipconstprop -constmerge -loop-interchange -lower-expect -instsimplify -strip-nondebug -slsr -memcpyopt -mergeicmps -reassociate -separate-const-offset-from-gep -loop-data-prefetch -adce -dse -sancov -globaldce -loop-fusion -post-inline-ee-instrument -nary-reassociate -early-cse-memssa -strip-nondebug -newgvn -newgvn -simplifycfg -gvn -early-cse -instcombine -jump-threading -simplifycfg -early-cse-memssa -pgo-memop-opt -instsimplify -elim-avail-extern -jump-threading -instcombine -float2int -called-value-propagation -called-value-propagation -early-cse-memssa -callsite-splitting -simplifycfg -scalarizer -instcombine -coro-elide -aggressive-instcombine -loop-unroll-and-jam -globaldce -mergeicmps -strip-nondebug -slsr -instcombine -separate-const-offset-from-gep -simplifycfg -redundant-dbg-inst-elim -dse -newgvn -attributor -dse -loop-simplify -post-inline-ee-instrument -guard-widening -loop-versioning -sroa -loop-guard-widening -speculative-execution -globaldce -reassociate -gvn-hoist -globaldce -inferattrs -argpromotion -sink -jump-threading -lower-constant-intrinsics -strip-nondebug -gvn-hoist -constmerge -strip-nondebug -bdce -cross-dso-cfi -globalopt -consthoist -div-rem-pairs -jump-threading -lower-matrix-intrinsics -lower-expect -pgo-memop-opt -deadargelim -loop-unroll-and-jam -elim-avail-extern -aggressive-instcombine -mem2reg -dse -functionattrs -prune-eh -loop-versioning -prune-eh -libcalls-shrinkwrap -mergefunc -gvn-hoist -gvn -forceattrs -consthoist -loop-vectorize -deadargelim -aggressive-instcombine -instcombine -instcombine -pgo-memop-opt -elim-avail-extern -jump-threading -lower-matrix-intrinsics -lowerinvoke -elim-avail-extern -loop-simplify -early-cse -loop-data-prefetch -early-cse-memssa -coro-split -insert-gcov-profiling -dce -pgo-memop-opt -instnamer -redundant-dbg-inst-elim -ipsccp -coro-elide -flattencfg -tailcallelim -adce -strip-nondebug -post-inline-ee-instrument -deadargelim -libcalls-shrinkwrap -simplifycfg -early-cse -functionattrs -lower-widenable-condition -callsite-splitting -partially-inline-libcalls -coro-split -mergeicmps -instcombine -instcombine -float2int -jump-threading -gvn-hoist -inferattrs -nary-reassociate -called-value-propagation -mldst-motion -partially-inline-libcalls -scalarizer -consthoist -simplifycfg -strip -prune-eh -die -lowerinvoke -instcombine -newgvn -simplifycfg -partially-inline-libcalls -slp-vectorizer -die -irce -redundant-dbg-inst-elim -instcombine -inject-tli-mappings -early-cse-memssa -ipsccp -loop-load-elim -mergefunc -loweratomic -inferattrs -globalopt -adce -jump-threading -dse -loweratomic -dse -coro-elide -float2int -strip-dead-prototypes -early-cse-memssa -callsite-splitting -loop-interchange -cross-dso-cfi -early-cse-memssa -instnamer -instcombine -ipconstprop -consthoist -dce -functionattrs -barrier -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/qsort,1.136222910216718,60.9553701877594,opt -alignment-from-assumptions -loop-versioning -mem2reg -strip-debug-declare -gvn-hoist -simplifycfg -sroa -coro-elide -sroa -sroa -sroa -lcssa -early-cse -sroa -lower-guard-intrinsic -mem2reg -jump-threading -coro-cleanup -memcpyopt -name-anon-globals -adce -inferattrs -newgvn -sroa -insert-gcov-profiling -sroa -always-inline -mem2reg -sroa -pgo-memop-opt -early-cse -tailcallelim -hotcoldsplit -insert-gcov-profiling -reassociate -coro-cleanup -lcssa -sroa -ipsccp -sroa -instsimplify -constprop -mergefunc -sroa -simplifycfg -sroa -mergereturn -add-discriminators -argpromotion -sroa -forceattrs -sroa -loweratomic -deadargelim -coro-early -instcombine -sroa -reassociate -ipsccp -sroa -scalarizer -globalsplit -insert-gcov-profiling -sroa -correlated-propagation -post-inline-ee-instrument -sroa -forceattrs -simplifycfg -gvn-hoist -coro-cleanup -newgvn input.bc -o output.bc +benchmark://cbench-v1/sha,1.5250836120401337,61.03710389137268,opt -correlated-propagation -sroa -simplifycfg -gvn-hoist -dse -reassociate -adce -loop-versioning -constprop -speculative-execution -early-cse-memssa -early-cse-memssa -argpromotion -loop-unroll-and-jam -sroa -constprop -newgvn -loop-vectorize -instcombine -coro-elide -scalarizer -strip -sccp -coro-cleanup -infer-address-spaces -simplifycfg -coro-cleanup -mem2reg -loop-distribute -strip-nondebug -instcombine -mergeicmps -reassociate -loop-vectorize -simplifycfg -tailcallelim -instcombine -sroa -dce -sroa -gvn-hoist -simple-loop-unswitch -loop-guard-widening -die -add-discriminators -adce -early-cse-memssa -ee-instrument -gvn-hoist -die -instsimplify -loop-guard-widening -float2int -instsimplify -prune-eh -gvn-hoist -gvn -strip-dead-prototypes -coro-cleanup -lower-guard-intrinsic -strip-dead-prototypes -instcombine -lower-matrix-intrinsics -dce -lower-guard-intrinsic -prune-eh -early-cse -mergefunc -dce -load-store-vectorizer -gvn-hoist -reassociate -simplifycfg -loop-guard-widening -loweratomic -instcombine -simplifycfg -globalopt -loop-simplify -loop-unroll-and-jam -ipconstprop -mergefunc -instcombine -simple-loop-unswitch -alignment-from-assumptions -gvn-hoist -instcombine -sink -sroa -scalarizer -infer-address-spaces -newgvn -jump-threading -dce -loop-data-prefetch -instcombine -dse -mem2reg -loweratomic -sroa -mldst-motion -elim-avail-extern -instcombine -pgo-memop-opt -newgvn -loop-deletion -lowerinvoke -sccp -nary-reassociate -dse -simplifycfg -simplifycfg -ipconstprop -early-cse-memssa -newgvn -rewrite-statepoints-for-gc -pgo-memop-opt -newgvn -lower-constant-intrinsics -simplifycfg -lowerinvoke -slsr -lower-matrix-intrinsics -instcombine -canonicalize-aliases -loop-versioning -simplifycfg -sccp -lower-matrix-intrinsics -loop-guard-widening -indvars -ipconstprop -coro-split -newgvn -sroa -mergereturn -instcombine -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/stringsearch,1.0163934426229506,61.0886914730072,opt -sroa -simplifycfg -div-rem-pairs -instcombine -jump-threading -simplifycfg -called-value-propagation -deadargelim -loop-simplifycfg -name-anon-globals -cross-dso-cfi -argpromotion -reassociate -loop-data-prefetch -globalopt -simplifycfg -redundant-dbg-inst-elim -simplifycfg -name-anon-globals -die -lowerinvoke -instcombine -newgvn -instcombine -elim-avail-extern -simplifycfg -speculative-execution -ipconstprop -gvn-hoist -rpo-functionattrs -reassociate -gvn -loop-load-elim -float2int -infer-address-spaces -coro-cleanup -strip-dead-prototypes -lower-expect -strip -instcombine -simplifycfg -dse -lcssa -loop-load-elim -instcombine -dce -slsr -coro-elide -early-cse -sroa -early-cse -memcpyopt -dce -simplifycfg -gvn-hoist -newgvn -forceattrs -consthoist -insert-gcov-profiling -newgvn -early-cse-memssa -sroa -tailcallelim -called-value-propagation -barrier -loweratomic -licm -dce -aggressive-instcombine -instcombine -strip-nondebug -dce -coro-elide -globalopt -simplifycfg -mldst-motion -prune-eh -lowerinvoke -reassociate -early-cse-memssa -nary-reassociate -lower-constant-intrinsics -dce -instcombine -sancov -loop-simplify -lower-constant-intrinsics -nary-reassociate -lowerinvoke -loop-deletion -insert-gcov-profiling -lower-expect -loop-data-prefetch -licm -globalsplit -globaldce -always-inline -adce -infer-address-spaces -sancov -die -sink -redundant-dbg-inst-elim -simplifycfg -functionattrs -callsite-splitting -globalsplit -die -sroa -simplifycfg -sink -reassociate -gvn-hoist -strip-debug-declare -simplifycfg -lower-expect -post-inline-ee-instrument -float2int -simplifycfg -always-inline -mergefunc -gvn -strip-nondebug -loop-simplify -aggressive-instcombine -inferattrs -scalarizer -mldst-motion -jump-threading -instcombine -dse -gvn-hoist -instcombine -elim-avail-extern -simplifycfg -gvn-hoist -simplifycfg -lower-matrix-intrinsics -barrier -separate-const-offset-from-gep -jump-threading -gvn-hoist -consthoist -early-cse -instcombine -loop-idiom -loop-unroll-and-jam -lower-constant-intrinsics -slsr -consthoist -loop-fusion -lower-constant-intrinsics -newgvn -prune-eh -sancov -gvn -loweratomic -coro-split -float2int -dse -instcombine -newgvn -simplifycfg -globaldce -globalsplit -name-anon-globals -post-inline-ee-instrument -simplifycfg -instcombine -separate-const-offset-from-gep -coro-split -gvn -dse -called-value-propagation -instcombine -correlated-propagation -mergereturn -redundant-dbg-inst-elim -gvn -newgvn -coro-cleanup -strip-dead-prototypes -callsite-splitting -gvn-hoist -instcombine -loop-versioning -mergefunc -sancov -tailcallelim -callsite-splitting -instcombine -loop-simplify -instcombine -early-cse -coro-early -coro-elide -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/tiff2bw,1.0445932877252035,81.18065047264099,opt -loop-vectorize -div-rem-pairs -separate-const-offset-from-gep -sroa -instcombine -newgvn -loop-guard-widening -reassociate -simplifycfg -lower-expect -lower-widenable-condition -lower-expect -bdce -newgvn -early-cse -gvn -mergeicmps -guard-widening -libcalls-shrinkwrap -loop-versioning -attributor -constmerge -rpo-functionattrs -speculative-execution -early-cse-memssa -gvn -rewrite-statepoints-for-gc -gvn -loop-versioning -scalarizer -lower-constant-intrinsics -lower-widenable-condition -simplifycfg -redundant-dbg-inst-elim -pgo-memop-opt -slp-vectorizer -float2int -adce -deadargelim -float2int -strip-debug-declare -redundant-dbg-inst-elim -slsr -rewrite-statepoints-for-gc -die -instcombine -slsr -dce -loweratomic -add-discriminators -lower-constant-intrinsics -sccp -constprop -aggressive-instcombine -lower-widenable-condition -cross-dso-cfi -coro-elide -newgvn -dce -reassociate -sccp -instsimplify -lower-expect -strip-dead-prototypes -strip-debug-declare -coro-elide -instsimplify -mldst-motion -early-cse-memssa -globalsplit -insert-gcov-profiling -sroa -always-inline -slp-vectorizer -callsite-splitting -newgvn -mldst-motion -simplifycfg -strip-dead-prototypes -aggressive-instcombine -called-value-propagation -newgvn -callsite-splitting -loop-versioning -early-cse -gvn -newgvn -flattencfg -rpo-functionattrs -globalopt -mergereturn -strip-dead-prototypes -die -instsimplify -redundant-dbg-inst-elim -reassociate -newgvn -cross-dso-cfi -instcombine -redundant-dbg-inst-elim -loop-data-prefetch -simplifycfg -slsr -strip-nondebug -simplifycfg -mergereturn -loop-guard-widening -insert-gcov-profiling -simplifycfg -scalarizer -instcombine -partially-inline-libcalls -pgo-memop-opt -early-cse-memssa -coro-cleanup -sink -newgvn -mergereturn -prune-eh -loweratomic -gvn-hoist -simplifycfg -guard-widening -sccp -add-discriminators -instcombine -inject-tli-mappings -constmerge -simplifycfg -loop-versioning -instcombine -gvn -newgvn -ipconstprop -lower-matrix-intrinsics -loop-versioning -adce -reassociate -slp-vectorizer -gvn -licm -simplifycfg -loop-versioning -redundant-dbg-inst-elim -gvn -loop-load-elim -instcombine -newgvn -strip-nondebug -inject-tli-mappings -newgvn -simplifycfg -pgo-memop-opt -barrier -reassociate -gvn-hoist -ipconstprop -globaldce -float2int -always-inline -infer-address-spaces -lower-matrix-intrinsics -loop-data-prefetch -jump-threading -lowerinvoke -simplifycfg -constprop -globalopt -gvn-hoist -lower-guard-intrinsic -mergereturn -lower-expect -float2int -instcombine -instcombine -gvn -early-cse-memssa -cross-dso-cfi -simplifycfg input.bc -o output.bc +benchmark://cbench-v1/tiffdither,1.0488754325259517,80.645259141922,opt -sroa -simplifycfg -forceattrs -rpo-functionattrs -dse -adce -jump-threading -mergefunc -simplifycfg -instnamer -early-cse-memssa -early-cse -simplifycfg -early-cse-memssa -loweratomic -gvn-hoist -dse -simplifycfg -loop-distribute -dse -sroa -gvn-hoist -consthoist -div-rem-pairs -early-cse-memssa -gvn-hoist -separate-const-offset-from-gep -loop-guard-widening -add-discriminators -globalopt -coro-split -coro-split -early-cse -strip-nondebug -correlated-propagation -prune-eh -adce -simplifycfg -aggressive-instcombine -instsimplify -lowerinvoke -callsite-splitting -constprop -simplifycfg -forceattrs -gvn-hoist -tailcallelim -sroa -early-cse -lower-matrix-intrinsics -early-cse-memssa -loop-unroll-and-jam -slsr -rpo-functionattrs -simple-loop-unswitch -early-cse-memssa -name-anon-globals -early-cse -instcombine -newgvn -strip-dead-prototypes -loop-load-elim -strip-nondebug -alignment-from-assumptions -strip -gvn-hoist -jump-threading -simplifycfg -simplifycfg -licm -newgvn -tailcallelim -instcombine -simplifycfg -deadargelim -elim-avail-extern -instcombine input.bc -o output.bc From 41affde3e0673103107c606993b8c2b7ba18d559 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 07:09:58 -0800 Subject: [PATCH 100/239] [llvm] Fix error handling of llvm::Expected. --- compiler_gym/envs/llvm/service/Benchmark.cc | 49 ++++++++++++--------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index f4d989c41..3a43638a2 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -121,33 +121,40 @@ std::unique_ptr makeModule(llvm::LLVMContext& context, const Bitco const std::string& name, Status* status) { llvm::MemoryBufferRef buffer(llvm::StringRef(bitcode.data(), bitcode.size()), name); VLOG(3) << "llvm::parseBitcodeFile(" << bitcode.size() << " bits)"; + llvm::Expected> moduleOrError = llvm::parseBitcodeFile(buffer, context); - if (moduleOrError) { - *status = Status::OK; - std::unique_ptr module = std::move(moduleOrError.get()); - - // Strip the module identifiers and source file names from the module to - // anonymize them. This is to deter learning algorithms from overfitting to - // benchmarks by their name. - module->setModuleIdentifier("-"); - module->setSourceFileName("-"); - - // Strip module debug info. - llvm::StripDebugInfo(*module); - - // Erase module-level named metadata. - while (!module->named_metadata_empty()) { - llvm::NamedMDNode* nmd = &*module->named_metadata_begin(); - module->eraseNamedMetadata(nmd); - } - - return module; - } else { + if (auto error = moduleOrError.takeError()) { *status = Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to parse LLVM bitcode: \"{}\"", name)); return nullptr; } + + *status = Status::OK; + std::unique_ptr module = std::move(moduleOrError.get()); + + if (!module) { + *status = Status(StatusCode::INTERNAL, + "llvm::parseBitcodeFile return null"); + return nullptr; + } + + // Strip the module identifiers and source file names from the module to + // anonymize them. This is to deter learning algorithms from overfitting to + // benchmarks by their name. + module->setModuleIdentifier("-"); + module->setSourceFileName("-"); + + // Strip module debug info. + llvm::StripDebugInfo(*module); + + // Erase module-level named metadata. + while (!module->named_metadata_empty()) { + llvm::NamedMDNode* nmd = &*module->named_metadata_begin(); + module->eraseNamedMetadata(nmd); + } + + return module; } // A benchmark is an LLVM module and the LLVM context that owns it. From b8887dbe71dbc06290ed5d10437240af29f4a45e Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 15 Feb 2022 17:41:05 +0000 Subject: [PATCH 101/239] [llvm] Split BenchmarkDynamicConfig into separate header. This is to enable other targets to depend on it without creating a circular dependency on the Benchmark target. --- compiler_gym/envs/llvm/service/BUILD | 13 +++++ compiler_gym/envs/llvm/service/Benchmark.cc | 47 ++--------------- compiler_gym/envs/llvm/service/Benchmark.h | 39 +++----------- .../llvm/service/BenchmarkDynamicConfig.cc | 52 +++++++++++++++++++ .../llvm/service/BenchmarkDynamicConfig.h | 45 ++++++++++++++++ .../envs/llvm/service/BenchmarkFactory.cc | 7 +-- .../envs/llvm/service/BenchmarkFactory.h | 4 +- compiler_gym/envs/llvm/service/CMakeLists.txt | 16 ++++++ 8 files changed, 144 insertions(+), 79 deletions(-) create mode 100644 compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc create mode 100644 compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h diff --git a/compiler_gym/envs/llvm/service/BUILD b/compiler_gym/envs/llvm/service/BUILD index 29c4b046d..6f4cec8a0 100644 --- a/compiler_gym/envs/llvm/service/BUILD +++ b/compiler_gym/envs/llvm/service/BUILD @@ -91,6 +91,7 @@ cc_library( srcs = ["Benchmark.cc"], hdrs = ["Benchmark.h"], deps = [ + ":BenchmarkDynamicConfig", ":Cost", "//compiler_gym/service/proto:compiler_gym_service_cc", "//compiler_gym/util:GrpcStatusMacros", @@ -104,6 +105,18 @@ cc_library( ], ) +cc_library( + name = "BenchmarkDynamicConfig", + srcs = ["BenchmarkDynamicConfig.cc"], + hdrs = ["BenchmarkDynamicConfig.h"], + deps = [ + "//compiler_gym/service/proto:compiler_gym_service_cc", + "//compiler_gym/util:RunfilesPath", + "//compiler_gym/util:Subprocess", + "@boost//:filesystem", + ], +) + cc_library( name = "BenchmarkFactory", srcs = ["BenchmarkFactory.cc"], diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index 3a43638a2..05ef77e4a 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -54,22 +54,6 @@ std::unique_ptr makeModuleOrDie(llvm::LLVMContext& context, const return module; } -RealizedBenchmarkDynamicConfig realizeDynamicConfig(const BenchmarkDynamicConfig& original, - const fs::path& scratchDirectory) { - BenchmarkDynamicConfig cfg; - cfg.CopyFrom(original); - - // Set up the environment variables. - (*cfg.mutable_build_cmd()->mutable_env())["CC"] = - util::getSiteDataPath("llvm-v0/bin/clang").string(); - (*cfg.mutable_build_cmd()->mutable_env())["IN"] = (scratchDirectory / "out.bc").string(); - - // Register the IR as a pre-requisite build file. - cfg.mutable_build_cmd()->add_infile((scratchDirectory / "out.bc").string()); - - return RealizedBenchmarkDynamicConfig(cfg); -} - /** * Create a temporary directory to use as a scratch pad for on-disk storage. * This directory is guaranteed to exist. @@ -159,8 +143,8 @@ std::unique_ptr makeModule(llvm::LLVMContext& context, const Bitco // A benchmark is an LLVM module and the LLVM context that owns it. Benchmark::Benchmark(const std::string& name, const Bitcode& bitcode, - const BenchmarkDynamicConfig& dynamicConfig, const fs::path& workingDirectory, - const BaselineCosts& baselineCosts) + const compiler_gym::BenchmarkDynamicConfig& dynamicConfig, + const fs::path& workingDirectory, const BaselineCosts& baselineCosts) : context_(std::make_unique()), module_(makeModuleOrDie(*context_, bitcode, name)), scratchDirectory_(createScratchDirectoryOrDie()), @@ -175,8 +159,8 @@ Benchmark::Benchmark(const std::string& name, const Bitcode& bitcode, Benchmark::Benchmark(const std::string& name, std::unique_ptr context, std::unique_ptr module, - const BenchmarkDynamicConfig& dynamicConfig, const fs::path& workingDirectory, - const BaselineCosts& baselineCosts) + const compiler_gym::BenchmarkDynamicConfig& dynamicConfig, + const fs::path& workingDirectory, const BaselineCosts& baselineCosts) : context_(std::move(context)), module_(std::move(module)), scratchDirectory_(createScratchDirectoryOrDie()), @@ -229,7 +213,7 @@ Status Benchmark::writeBitcodeToFile(const fs::path& path) { } Status Benchmark::computeRuntime(Event& observation) { - const RealizedBenchmarkDynamicConfig& cfg = dynamicConfig(); + const BenchmarkDynamicConfig& cfg = dynamicConfig(); if (!cfg.isRunnable()) { return Status::OK; @@ -340,25 +324,4 @@ bool Benchmark::applyBaselineOptimizations(unsigned optLevel, unsigned sizeLevel return applyBaselineOptimizationsToModule(&module(), optLevel, sizeLevel); } -namespace { - -std::vector commandsFromProto( - const google::protobuf::RepeatedPtrField& cmds) { - std::vector outs; - for (const auto& cmd : cmds) { - outs.push_back(util::LocalShellCommand(cmd)); - } - return outs; -} - -} // anonymous namespace - -RealizedBenchmarkDynamicConfig::RealizedBenchmarkDynamicConfig(const BenchmarkDynamicConfig& cfg) - : buildCommand_(cfg.build_cmd()), - runCommand_(cfg.run_cmd()), - preRunCommands_(commandsFromProto(cfg.pre_run_cmd())), - postRunCommands_(commandsFromProto(cfg.post_run_cmd())), - isBuildable_(!buildCommand_.empty()), - isRunnable_(!(buildCommand_.empty() || runCommand_.empty())) {} - } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/Benchmark.h b/compiler_gym/envs/llvm/service/Benchmark.h index d6e07c93d..b6bdf85b1 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.h +++ b/compiler_gym/envs/llvm/service/Benchmark.h @@ -11,6 +11,7 @@ #include #include "boost/filesystem.hpp" +#include "compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h" #include "compiler_gym/envs/llvm/service/Cost.h" #include "compiler_gym/service/proto/compiler_gym_service.pb.h" #include "compiler_gym/util/Subprocess.h" @@ -82,33 +83,6 @@ grpc::Status writeBitcodeFile(const llvm::Module& module, const boost::filesyste std::unique_ptr makeModule(llvm::LLVMContext& context, const Bitcode& bitcode, const std::string& name, grpc::Status* status); -/** - * Represents a BenchmarkDynamicConfig protocol buffer. - */ -class RealizedBenchmarkDynamicConfig { - public: - explicit RealizedBenchmarkDynamicConfig(const BenchmarkDynamicConfig& cfg); - - inline const util::LocalShellCommand& buildCommand() const { return buildCommand_; }; - inline const util::LocalShellCommand& runCommand() const { return runCommand_; }; - inline const std::vector& preRunCommands() const { - return preRunCommands_; - }; - inline const std::vector& postRunCommands() const { - return postRunCommands_; - }; - inline bool isBuildable() const { return isBuildable_; } - inline bool isRunnable() const { return isRunnable_; } - - private: - const util::LocalShellCommand buildCommand_; - const util::LocalShellCommand runCommand_; - const std::vector preRunCommands_; - const std::vector postRunCommands_; - const bool isBuildable_; - const bool isRunnable_; -}; - /** * An LLVM module and the LLVM context that owns it. * @@ -120,14 +94,15 @@ class Benchmark { * Construct a benchmark from a bitcode. */ Benchmark(const std::string& name, const Bitcode& bitcode, - const BenchmarkDynamicConfig& dynamicConfig, + const compiler_gym::BenchmarkDynamicConfig& dynamicConfig, const boost::filesystem::path& workingDirectory, const BaselineCosts& baselineCosts); /** * Construct a benchmark from an LLVM module. */ Benchmark(const std::string& name, std::unique_ptr context, - std::unique_ptr module, const BenchmarkDynamicConfig& dynamicConfig, + std::unique_ptr module, + const compiler_gym::BenchmarkDynamicConfig& dynamicConfig, const boost::filesystem::path& workingDirectory, const BaselineCosts& baselineCosts); void close(); @@ -232,7 +207,7 @@ class Benchmark { /** * A reference to the dynamic configuration object. */ - inline const RealizedBenchmarkDynamicConfig& dynamicConfig() const { return dynamicConfig_; } + inline const BenchmarkDynamicConfig& dynamicConfig() const { return dynamicConfig_; } inline bool isBuildable() const { return dynamicConfig().isBuildable(); } @@ -285,8 +260,8 @@ class Benchmark { std::unique_ptr context_; std::unique_ptr module_; const boost::filesystem::path scratchDirectory_; - const BenchmarkDynamicConfig dynamicConfigProto_; - const RealizedBenchmarkDynamicConfig dynamicConfig_; + const compiler_gym::BenchmarkDynamicConfig dynamicConfigProto_; + const BenchmarkDynamicConfig dynamicConfig_; const BaselineCosts baselineCosts_; /** The directory used for storing build / runtime artifacts. The difference * between the scratch directory and the working directory is that the working diff --git a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc new file mode 100644 index 000000000..8ac5cb3a6 --- /dev/null +++ b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc @@ -0,0 +1,52 @@ +// Copyright (c) Facebook, Inc. and its affiliates. +// +// This source code is licensed under the MIT license found in the +// LICENSE file in the root directory of this source tree. +#include "compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h" + +#include "compiler_gym/util/RunfilesPath.h" + +namespace fs = boost::filesystem; + +using BenchmarkDynamicConfigProto = compiler_gym::BenchmarkDynamicConfig; + +namespace compiler_gym::llvm_service { + +namespace { + +std::vector commandsFromProto( + const google::protobuf::RepeatedPtrField& cmds) { + std::vector outs; + for (const auto& cmd : cmds) { + outs.push_back(util::LocalShellCommand(cmd)); + } + return outs; +} + +} // anonymous namespace + +BenchmarkDynamicConfig realizeDynamicConfig(const BenchmarkDynamicConfigProto& proto, + const fs::path& scratchDirectory) { + compiler_gym::BenchmarkDynamicConfig cfg; + cfg.CopyFrom(proto); + + // Set up the environment variables. + (*cfg.mutable_build_cmd()->mutable_env())["CC"] = + util::getSiteDataPath("llvm-v0/bin/clang").string(); + (*cfg.mutable_build_cmd()->mutable_env())["IN"] = (scratchDirectory / "out.bc").string(); + + // Register the IR as a pre-requisite build file. + cfg.mutable_build_cmd()->add_infile((scratchDirectory / "out.bc").string()); + + return BenchmarkDynamicConfig(cfg); +} + +BenchmarkDynamicConfig::BenchmarkDynamicConfig(const BenchmarkDynamicConfigProto& cfg) + : buildCommand_(cfg.build_cmd()), + runCommand_(cfg.run_cmd()), + preRunCommands_(commandsFromProto(cfg.pre_run_cmd())), + postRunCommands_(commandsFromProto(cfg.post_run_cmd())), + isBuildable_(!buildCommand_.empty()), + isRunnable_(!(buildCommand_.empty() || runCommand_.empty())) {} + +} // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h new file mode 100644 index 000000000..2a5ea5158 --- /dev/null +++ b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h @@ -0,0 +1,45 @@ +// Copyright (c) Facebook, Inc. and its 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 + +#include "boost/filesystem.hpp" +#include "compiler_gym/service/proto/compiler_gym_service.pb.h" +#include "compiler_gym/util/Subprocess.h" + +namespace compiler_gym::llvm_service { + +/** + * Represents a BenchmarkDynamicConfig protocol buffer. + */ +class BenchmarkDynamicConfig { + public: + explicit BenchmarkDynamicConfig(const compiler_gym::BenchmarkDynamicConfig& cfg); + + inline const util::LocalShellCommand& buildCommand() const { return buildCommand_; }; + inline const util::LocalShellCommand& runCommand() const { return runCommand_; }; + inline const std::vector& preRunCommands() const { + return preRunCommands_; + }; + inline const std::vector& postRunCommands() const { + return postRunCommands_; + }; + inline bool isBuildable() const { return isBuildable_; } + inline bool isRunnable() const { return isRunnable_; } + + private: + const util::LocalShellCommand buildCommand_; + const util::LocalShellCommand runCommand_; + const std::vector preRunCommands_; + const std::vector postRunCommands_; + const bool isBuildable_; + const bool isRunnable_; +}; + +BenchmarkDynamicConfig realizeDynamicConfig(const compiler_gym::BenchmarkDynamicConfig& proto, + const boost::filesystem::path& scratchDirectory); + +} // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc index dbcf0fc66..5583098a5 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc +++ b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc @@ -24,6 +24,7 @@ using grpc::Status; using grpc::StatusCode; using BenchmarkProto = compiler_gym::Benchmark; +using BenchmarkDynamicConfigProto = compiler_gym::BenchmarkDynamicConfig; namespace compiler_gym::llvm_service { @@ -91,7 +92,7 @@ Status BenchmarkFactory::getBenchmark(const BenchmarkProto& benchmarkMessage, } Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitcode, - std::optional dynamicConfig) { + std::optional dynamicConfig) { Status status; std::unique_ptr context = std::make_unique(); std::unique_ptr module = makeModule(*context, bitcode, uri, &status); @@ -118,7 +119,7 @@ Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitco benchmarks_.insert( {uri, Benchmark(uri, std::move(context), std::move(module), - (dynamicConfig.has_value() ? *dynamicConfig : BenchmarkDynamicConfig()), + (dynamicConfig.has_value() ? *dynamicConfig : BenchmarkDynamicConfigProto()), workingDirectory_, baselineCosts)}); VLOG(2) << "Cached LLVM benchmark: " << uri << ". Cache size = " << benchmarks_.size() @@ -128,7 +129,7 @@ Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitco } Status BenchmarkFactory::addBitcode(const std::string& uri, const fs::path& path, - std::optional dynamicConfig) { + std::optional dynamicConfig) { VLOG(2) << "addBitcode(" << path.string() << ")"; Bitcode bitcode; diff --git a/compiler_gym/envs/llvm/service/BenchmarkFactory.h b/compiler_gym/envs/llvm/service/BenchmarkFactory.h index d057785ab..47b817b46 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkFactory.h +++ b/compiler_gym/envs/llvm/service/BenchmarkFactory.h @@ -80,11 +80,11 @@ class BenchmarkFactory { private: [[nodiscard]] grpc::Status addBitcode( const std::string& uri, const Bitcode& bitcode, - std::optional dynamicConfig = std::nullopt); + std::optional dynamicConfig = std::nullopt); [[nodiscard]] grpc::Status addBitcode( const std::string& uri, const boost::filesystem::path& path, - std::optional dynamicConfig = std::nullopt); + std::optional dynamicConfig = std::nullopt); /** * Construct a benchmark factory. diff --git a/compiler_gym/envs/llvm/service/CMakeLists.txt b/compiler_gym/envs/llvm/service/CMakeLists.txt index f74b7c2f4..69df67ca7 100644 --- a/compiler_gym/envs/llvm/service/CMakeLists.txt +++ b/compiler_gym/envs/llvm/service/CMakeLists.txt @@ -53,6 +53,7 @@ cg_cc_library( SRCS "Benchmark.cc" DEPS + ::BenchmarkDynamicConfig ::Cost compiler_gym::service::proto::compiler_gym_service_cc compiler_gym::util::GrpcStatusMacros @@ -71,6 +72,21 @@ cg_cc_library( PUBLIC ) +cg_cc_library( + NAME + BenchmarkDynamicConfig + HDRS + "BenchmarkDynamicConfig.h" + SRCS + "BenchmarkDynamicConfig.cc" + DEPS + compiler_gym::service::proto::compiler_gym_service_cc + compiler_gym::util::RunfilesPath + compiler_gym::util::Subprocess + ABS_DEPS + Boost::filesystem +) + llvm_map_components_to_libnames(_LLVM_LIBS core) cg_cc_library( NAME From 3b8c6ae78439c1e90f420ee6ec23a5ae7b3aa55d Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 15 Feb 2022 18:10:28 +0000 Subject: [PATCH 102/239] [llvm] Enable cost functions to access the dynamic benchmark config. --- compiler_gym/envs/llvm/service/BUILD | 2 ++ compiler_gym/envs/llvm/service/Benchmark.cc | 18 ++++--------- compiler_gym/envs/llvm/service/Benchmark.h | 10 +++++++ .../envs/llvm/service/BenchmarkFactory.cc | 26 +++++++++++++++---- compiler_gym/envs/llvm/service/CMakeLists.txt | 2 ++ compiler_gym/envs/llvm/service/Cost.cc | 10 ++++--- compiler_gym/envs/llvm/service/Cost.h | 9 ++++--- compiler_gym/envs/llvm/service/Observation.cc | 8 +++--- 8 files changed, 56 insertions(+), 29 deletions(-) diff --git a/compiler_gym/envs/llvm/service/BUILD b/compiler_gym/envs/llvm/service/BUILD index 6f4cec8a0..6b1d21c6b 100644 --- a/compiler_gym/envs/llvm/service/BUILD +++ b/compiler_gym/envs/llvm/service/BUILD @@ -123,6 +123,7 @@ cc_library( hdrs = ["BenchmarkFactory.h"], deps = [ ":Benchmark", + ":BenchmarkDynamicConfig", ":Cost", "//compiler_gym/service/proto:compiler_gym_service_cc", "//compiler_gym/util:GrpcStatusMacros", @@ -190,6 +191,7 @@ cc_library( srcs = ["Cost.cc"], hdrs = ["Cost.h"], deps = [ + ":BenchmarkDynamicConfig", "//compiler_gym/util:GrpcStatusMacros", "//compiler_gym/util:RunfilesPath", "//compiler_gym/util:Subprocess", diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index 05ef77e4a..d2850baba 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -54,15 +54,9 @@ std::unique_ptr makeModuleOrDie(llvm::LLVMContext& context, const return module; } -/** - * Create a temporary directory to use as a scratch pad for on-disk storage. - * This directory is guaranteed to exist. - * - * Errors in this function are fatal. - * - * @return fs::path A path. - */ -fs::path createScratchDirectoryOrDie() { +} // anonymous namespace + +fs::path createBenchmarkScratchDirectoryOrDie() { const fs::path cacheRoot = util::getCacheRootPath(); const fs::path dir = fs::unique_path(cacheRoot / "benchmark-scratch-%%%%-%%%%"); @@ -72,8 +66,6 @@ fs::path createScratchDirectoryOrDie() { return dir; } -} // anonymous namespace - Status readBitcodeFile(const fs::path& path, Bitcode* bitcode) { std::ifstream ifs(path.string()); if (ifs.fail()) { @@ -147,7 +139,7 @@ Benchmark::Benchmark(const std::string& name, const Bitcode& bitcode, const fs::path& workingDirectory, const BaselineCosts& baselineCosts) : context_(std::make_unique()), module_(makeModuleOrDie(*context_, bitcode, name)), - scratchDirectory_(createScratchDirectoryOrDie()), + scratchDirectory_(createBenchmarkScratchDirectoryOrDie()), dynamicConfigProto_(dynamicConfig), dynamicConfig_(realizeDynamicConfig(dynamicConfig, scratchDirectory_)), baselineCosts_(baselineCosts), @@ -163,7 +155,7 @@ Benchmark::Benchmark(const std::string& name, std::unique_ptr const fs::path& workingDirectory, const BaselineCosts& baselineCosts) : context_(std::move(context)), module_(std::move(module)), - scratchDirectory_(createScratchDirectoryOrDie()), + scratchDirectory_(createBenchmarkScratchDirectoryOrDie()), dynamicConfigProto_(dynamicConfig), dynamicConfig_(realizeDynamicConfig(dynamicConfig, scratchDirectory_)), baselineCosts_(baselineCosts), diff --git a/compiler_gym/envs/llvm/service/Benchmark.h b/compiler_gym/envs/llvm/service/Benchmark.h index b6bdf85b1..04108f0ce 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.h +++ b/compiler_gym/envs/llvm/service/Benchmark.h @@ -276,4 +276,14 @@ class Benchmark { int buildtimesPerObservationCount_; }; +/** + * Create a temporary directory to use as a scratch pad for on-disk storage. + * This directory is guaranteed to exist. + * + * Errors in this function are fatal. + * + * @return fs::path A path. + */ +boost::filesystem::path createBenchmarkScratchDirectoryOrDie(); + } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc index 5583098a5..84d13b41b 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc +++ b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc @@ -11,6 +11,7 @@ #include #include +#include "compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h" #include "compiler_gym/envs/llvm/service/Cost.h" #include "compiler_gym/util/GrpcStatusMacros.h" #include "compiler_gym/util/RunfilesPath.h" @@ -19,6 +20,7 @@ #include "llvm/IR/Module.h" namespace fs = boost::filesystem; +namespace sys = boost::system; using grpc::Status; using grpc::StatusCode; @@ -114,13 +116,27 @@ Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitco } } + // TODO(cummins): This is very clumsy. In order to compute the baseline costs + // we need a realized BenchmarkDynamicConfig. To create this, we need to + // generate a scratch directory. This is then duplicated in the constructor of + // the Benchmark class. Suggest a refactor. + BenchmarkDynamicConfigProto realDynamicConfigProto = + (dynamicConfig.has_value() ? *dynamicConfig : BenchmarkDynamicConfigProto()); + const fs::path scratchDirectory = createBenchmarkScratchDirectoryOrDie(); + BenchmarkDynamicConfig realDynamicConfig = + realizeDynamicConfig(realDynamicConfigProto, scratchDirectory); + sys::error_code ec; + fs::remove_all(scratchDirectory, ec); + if (ec) { + return Status(StatusCode::INTERNAL, + fmt::format("Failed to delete scratch directory: {}", scratchDirectory.string())); + } + BaselineCosts baselineCosts; - RETURN_IF_ERROR(setBaselineCosts(*module, &baselineCosts, workingDirectory_)); + RETURN_IF_ERROR(setBaselineCosts(*module, workingDirectory_, realDynamicConfig, &baselineCosts)); - benchmarks_.insert( - {uri, Benchmark(uri, std::move(context), std::move(module), - (dynamicConfig.has_value() ? *dynamicConfig : BenchmarkDynamicConfigProto()), - workingDirectory_, baselineCosts)}); + benchmarks_.insert({uri, Benchmark(uri, std::move(context), std::move(module), + realDynamicConfigProto, workingDirectory_, baselineCosts)}); VLOG(2) << "Cached LLVM benchmark: " << uri << ". Cache size = " << benchmarks_.size() << " items"; diff --git a/compiler_gym/envs/llvm/service/CMakeLists.txt b/compiler_gym/envs/llvm/service/CMakeLists.txt index 69df67ca7..c267b40d7 100644 --- a/compiler_gym/envs/llvm/service/CMakeLists.txt +++ b/compiler_gym/envs/llvm/service/CMakeLists.txt @@ -97,6 +97,7 @@ cg_cc_library( "BenchmarkFactory.cc" DEPS ::Benchmark + ::BenchmarkDynamicConfig ::Cost compiler_gym::service::proto::compiler_gym_service_cc compiler_gym::util::GrpcStatusMacros @@ -156,6 +157,7 @@ cg_cc_library( SRCS "Cost.cc" DEPS + ::BenchmarkDynamicConfig compiler_gym::util::GrpcStatusMacros compiler_gym::util::RunfilesPath compiler_gym::util::Subprocess diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 66f873fb9..7dcc912ea 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -201,7 +201,8 @@ bool applyBaselineOptimizationsToModule(llvm::Module* module, unsigned optLevel, } Status setCost(const LlvmCostFunction& costFunction, llvm::Module& module, - const fs::path& workingDirectory, double* cost) { + const fs::path& workingDirectory, const BenchmarkDynamicConfig& dynamicConfig, + double* cost) { switch (costFunction) { case LlvmCostFunction::IR_INSTRUCTION_COUNT: { *cost = static_cast(module.getInstructionCount()); @@ -244,8 +245,8 @@ double getBaselineCost(const BaselineCosts& baselineCosts, LlvmBaselinePolicy po return baselineCosts[getBaselineCostIndex(policy, cost)]; } -Status setBaselineCosts(llvm::Module& unoptimizedModule, BaselineCosts* baselineCosts, - const fs::path& workingDirectory) { +Status setBaselineCosts(llvm::Module& unoptimizedModule, const fs::path& workingDirectory, + const BenchmarkDynamicConfig& dynamicConfig, BaselineCosts* baselineCosts) { llvm::Module* moduleO0 = &unoptimizedModule; // Create a copy of the unoptimized module and apply the default set of LLVM @@ -277,7 +278,8 @@ Status setBaselineCosts(llvm::Module& unoptimizedModule, BaselineCosts* baseline // Compute and set the baseline costs. for (const auto cost : magic_enum::enum_values()) { const auto idx = getBaselineCostIndex(policy, cost); - RETURN_IF_ERROR(setCost(cost, *baselineModule, workingDirectory, &(*baselineCosts)[idx])); + RETURN_IF_ERROR( + setCost(cost, *baselineModule, workingDirectory, dynamicConfig, &(*baselineCosts)[idx])); } } diff --git a/compiler_gym/envs/llvm/service/Cost.h b/compiler_gym/envs/llvm/service/Cost.h index d402ca6ab..c827bafbc 100644 --- a/compiler_gym/envs/llvm/service/Cost.h +++ b/compiler_gym/envs/llvm/service/Cost.h @@ -10,6 +10,7 @@ #include #include "boost/filesystem.hpp" +#include "compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h" #include "llvm/IR/Module.h" namespace compiler_gym::llvm_service { @@ -73,7 +74,8 @@ bool applyBaselineOptimizationsToModule(llvm::Module* module, unsigned optLevel, * @return `OK` on success. */ [[nodiscard]] grpc::Status setCost(const LlvmCostFunction& costFunction, llvm::Module& module, - const boost::filesystem::path& workingDirectory, double* cost); + const boost::filesystem::path& workingDirectory, + const BenchmarkDynamicConfig& dynamicConfig, double* cost); /** * Return a baseline cost. @@ -98,7 +100,8 @@ double getBaselineCost(const BaselineCosts& baselineCosts, LlvmBaselinePolicy po * storage. */ [[nodiscard]] grpc::Status setBaselineCosts(llvm::Module& unoptimizedModule, - BaselineCosts* baselineCosts, - const boost::filesystem::path& workingDirectory); + const boost::filesystem::path& workingDirectory, + const BenchmarkDynamicConfig& dynamicConfig, + BaselineCosts* baselineCosts); } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/Observation.cc b/compiler_gym/envs/llvm/service/Observation.cc index f668aae65..736d78dd9 100644 --- a/compiler_gym/envs/llvm/service/Observation.cc +++ b/compiler_gym/envs/llvm/service/Observation.cc @@ -142,7 +142,7 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto case LlvmObservationSpace::IR_INSTRUCTION_COUNT: { double cost; RETURN_IF_ERROR(setCost(LlvmCostFunction::IR_INSTRUCTION_COUNT, benchmark.module(), - workingDirectory, &cost)); + workingDirectory, benchmark.dynamicConfig(), &cost)); reply.set_int64_value(static_cast(cost)); break; } @@ -167,7 +167,7 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto case LlvmObservationSpace::OBJECT_TEXT_SIZE_BYTES: { double cost; RETURN_IF_ERROR(setCost(LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES, benchmark.module(), - workingDirectory, &cost)); + workingDirectory, benchmark.dynamicConfig(), &cost)); reply.set_int64_value(static_cast(cost)); break; } @@ -192,8 +192,8 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto #ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST case LlvmObservationSpace::TEXT_SIZE_BYTES: { double cost; - RETURN_IF_ERROR( - setCost(LlvmCostFunction::TEXT_SIZE_BYTES, benchmark.module(), workingDirectory, &cost)); + RETURN_IF_ERROR(setCost(LlvmCostFunction::TEXT_SIZE_BYTES, benchmark.module(), + workingDirectory, benchmark.dynamicConfig(), &cost)); reply.set_int64_value(static_cast(cost)); break; } From 912a1269dc28bf70d4f8178b121bb92ea81970e7 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 15 Feb 2022 21:42:56 +0000 Subject: [PATCH 103/239] [llvm] Use dynamic config's build command to compute .TEXT sizes. --- .../llvm/service/BenchmarkDynamicConfig.cc | 8 +- .../llvm/service/BenchmarkDynamicConfig.h | 5 +- .../envs/llvm/service/BenchmarkFactory.cc | 7 +- compiler_gym/envs/llvm/service/Cost.cc | 172 +++++++++++------- 4 files changed, 115 insertions(+), 77 deletions(-) diff --git a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc index 8ac5cb3a6..42602f34d 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc +++ b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.cc @@ -38,15 +38,17 @@ BenchmarkDynamicConfig realizeDynamicConfig(const BenchmarkDynamicConfigProto& p // Register the IR as a pre-requisite build file. cfg.mutable_build_cmd()->add_infile((scratchDirectory / "out.bc").string()); - return BenchmarkDynamicConfig(cfg); + return BenchmarkDynamicConfig(cfg, scratchDirectory); } -BenchmarkDynamicConfig::BenchmarkDynamicConfig(const BenchmarkDynamicConfigProto& cfg) +BenchmarkDynamicConfig::BenchmarkDynamicConfig(const BenchmarkDynamicConfigProto& cfg, + const boost::filesystem::path& scratchDirectory) : buildCommand_(cfg.build_cmd()), runCommand_(cfg.run_cmd()), preRunCommands_(commandsFromProto(cfg.pre_run_cmd())), postRunCommands_(commandsFromProto(cfg.post_run_cmd())), isBuildable_(!buildCommand_.empty()), - isRunnable_(!(buildCommand_.empty() || runCommand_.empty())) {} + isRunnable_(!(buildCommand_.empty() || runCommand_.empty())), + scratchDirectory_(scratchDirectory) {} } // namespace compiler_gym::llvm_service diff --git a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h index 2a5ea5158..e7b44a322 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h +++ b/compiler_gym/envs/llvm/service/BenchmarkDynamicConfig.h @@ -17,7 +17,8 @@ namespace compiler_gym::llvm_service { */ class BenchmarkDynamicConfig { public: - explicit BenchmarkDynamicConfig(const compiler_gym::BenchmarkDynamicConfig& cfg); + BenchmarkDynamicConfig(const compiler_gym::BenchmarkDynamicConfig& cfg, + const boost::filesystem::path& scratchDirectory); inline const util::LocalShellCommand& buildCommand() const { return buildCommand_; }; inline const util::LocalShellCommand& runCommand() const { return runCommand_; }; @@ -29,6 +30,7 @@ class BenchmarkDynamicConfig { }; inline bool isBuildable() const { return isBuildable_; } inline bool isRunnable() const { return isRunnable_; } + inline const boost::filesystem::path& scratchDirectory() const { return scratchDirectory_; } private: const util::LocalShellCommand buildCommand_; @@ -37,6 +39,7 @@ class BenchmarkDynamicConfig { const std::vector postRunCommands_; const bool isBuildable_; const bool isRunnable_; + const boost::filesystem::path scratchDirectory_; }; BenchmarkDynamicConfig realizeDynamicConfig(const compiler_gym::BenchmarkDynamicConfig& proto, diff --git a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc index 84d13b41b..1108f2069 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc +++ b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc @@ -125,6 +125,10 @@ Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitco const fs::path scratchDirectory = createBenchmarkScratchDirectoryOrDie(); BenchmarkDynamicConfig realDynamicConfig = realizeDynamicConfig(realDynamicConfigProto, scratchDirectory); + + BaselineCosts baselineCosts; + RETURN_IF_ERROR(setBaselineCosts(*module, workingDirectory_, realDynamicConfig, &baselineCosts)); + sys::error_code ec; fs::remove_all(scratchDirectory, ec); if (ec) { @@ -132,9 +136,6 @@ Status BenchmarkFactory::addBitcode(const std::string& uri, const Bitcode& bitco fmt::format("Failed to delete scratch directory: {}", scratchDirectory.string())); } - BaselineCosts baselineCosts; - RETURN_IF_ERROR(setBaselineCosts(*module, workingDirectory_, realDynamicConfig, &baselineCosts)); - benchmarks_.insert({uri, Benchmark(uri, std::move(context), std::move(module), realDynamicConfigProto, workingDirectory_, baselineCosts)}); diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 7dcc912ea..7af0b8132 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -19,6 +19,7 @@ #include "compiler_gym/util/RunfilesPath.h" #include "compiler_gym/util/Subprocess.h" #include "compiler_gym/util/Unreachable.h" +#include "llvm/Bitcode/BitcodeWriter.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" @@ -41,15 +42,101 @@ std::string moduleToString(llvm::Module& module) { return str; } -// For the experimental binary .text size cost, getTextSizeInBytes() is extended -// to support a list of additional args to pass to clang. -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST -Status getTextSizeInBytes(llvm::Module& module, int64_t* value, - const std::vector& clangArgs, - const fs::path& workingDirectory) { -#else -Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& workingDirectory) { -#endif +Status writeBitcodeFile(const llvm::Module& module, const fs::path& path) { + std::error_code error; + llvm::raw_fd_ostream outfile(path.string(), error); + if (error.value()) { + return Status(StatusCode::INTERNAL, + fmt::format("Failed to write bitcode file: {}", path.string())); + } + llvm::WriteBitcodeToFile(module, outfile); + return Status::OK; +} + +Status getTextSizeInBytes(const fs::path& file, int64_t* value) { + // Run llvm-size on the compiled file. + const std::string llvmSizeCmd = fmt::format("{} {}", llvmSizePath.string(), file.string()); + + boost::asio::io_context llvmSizeStdoutStream; + std::future llvmSizeStdoutFuture; + + bp::child llvmSize(llvmSizeCmd, bp::std_in.close(), bp::std_out > llvmSizeStdoutFuture, + bp::std_err > bp::null, llvmSizeStdoutStream); + + llvmSizeStdoutStream.run_for(std::chrono::seconds(60)); + if (llvmSizeStdoutStream.poll()) { + return Status(StatusCode::DEADLINE_EXCEEDED, + fmt::format("Failed to compute .text size cost within 60 seconds")); + } + llvmSize.wait(); + llvmSizeOutput = llvmSizeStdoutFuture.get(); + + if (llvmSize.exit_code()) { + return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost. " + "Command returned exit code {}: {}", + llvmSize.exit_code(), llvmSizeCmd)); + } + + // The output of llvm-size is in berkley format, e.g.: + // + // $ llvm-size foo.o + // __TEXT __DATA __OBJC others dec hex + // 127 0 0 32 159 9f + // + // Skip the first line of output and read an integer from the start of the + // second line: + const size_t eol = llvmSizeOutput.find('\n'); + const size_t tab = llvmSizeOutput.find('\t', eol + 1); + if (eol == std::string::npos || tab == std::string::npos) { + return Status(StatusCode::INTERNAL, + fmt::format("Failed to parse .TEXT size: `{}`\n", llvmSizeOutput)); + } + const std::string extracted = llvmSizeOutput.substr(eol, tab - eol); + try { + *value = std::stoi(extracted); + } catch (std::exception const& e) { + return Status(StatusCode::INTERNAL, + fmt::format("Failed to parse .TEXT size: `{}`\n", llvmSizeOutput)); + } + + return Status::OK; +} + +Status getTextSizeInBytesUsingBuildCommand(llvm::Module& module, int64_t* value, + const fs::path& workingDirectory, + const BenchmarkDynamicConfig& dynamicConfig) { + const util::LocalShellCommand& buildCommand = dynamicConfig.buildCommand(); + + if (buildCommand.outfiles().size() != 1) { + return Status(StatusCode::INVALID_ARGUMENT, + fmt::format("Expected a single output from build job, actual: {}. Command: {}", + buildCommand.outfiles().size(), buildCommand.commandline())); + } + const auto& outfile = buildCommand.outfiles()[0]; + + if (chdir(dynamicConfig.scratchDirectory().string().c_str())) { + return Status(StatusCode::INTERNAL, fmt::format("Failed to set working directory: {}", + dynamicConfig.scratchDirectory().string())); + } + + // Write the bitcode to the expected place. + RETURN_IF_ERROR(writeBitcodeFile(module, dynamicConfig.scratchDirectory() / "out.bc")); + + RETURN_IF_ERROR(buildCommand.checkInfiles()); + RETURN_IF_ERROR(buildCommand.checkCall()); + RETURN_IF_ERROR(buildCommand.checkOutfiles()); + + return getTextSizeInBytes(outfile, value); +} + +Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& workingDirectory, + const BenchmarkDynamicConfig& dynamicConfig) { + // TODO(cummins): Replace getTextSizeInBytes() with getTextSizeInBytesUsingBuildCommand(), using a + // default build command if none is set. + if (dynamicConfig.isBuildable()) { + return getTextSizeInBytesUsingBuildCommand(module, value, workingDirectory, dynamicConfig); + } + const auto clangPath = util::getSiteDataPath("llvm-v0/bin/clang"); const auto llvmSizePath = util::getSiteDataPath("llvm-v0/bin/llvm-size"); DCHECK(fs::exists(clangPath)) << fmt::format("File not found: {}", clangPath.string()); @@ -60,19 +147,10 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& const std::string ir = moduleToString(module); const auto tmpFile = fs::unique_path(workingDirectory / "obj-%%%%.o"); - std::string llvmSizeOutput; try { -// Use clang to compile the object file. -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST - std::string clangCmd = fmt::format("{} -w -xir - -o {}", clangPath.string(), tmpFile.string()); - for (const auto& arg : clangArgs) { - clangCmd += " " + arg; - } -#else const std::string clangCmd = fmt::format("{} -w -xir - -o {} -c", clangPath.string(), tmpFile.string()); -#endif boost::asio::io_context clangContext; auto stdinBuffer{boost::asio::buffer(ir)}; @@ -91,7 +169,7 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& clangContext.run_for(std::chrono::seconds(60)); if (clangContext.poll()) { return Status(StatusCode::INVALID_ARGUMENT, - fmt::format("Failed to compute .text size cost within 60 seconds")); + "Failed to compute .text size cost within 60 seconds"); } clang.wait(); clangStderrStream.run(); @@ -103,60 +181,14 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& "Command returned exit code {}: {}. Error: {}", clang.exit_code(), clangCmd, stderr)); } - - // Run llvm-size on the compiled file. - const std::string llvmSizeCmd = fmt::format("{} {}", llvmSizePath.string(), tmpFile.string()); - - boost::asio::io_context llvmSizeStdoutStream; - std::future llvmSizeStdoutFuture; - - bp::child llvmSize(llvmSizeCmd, bp::std_in.close(), bp::std_out > llvmSizeStdoutFuture, - bp::std_err > bp::null, llvmSizeStdoutStream); - - llvmSizeStdoutStream.run_for(std::chrono::seconds(60)); - if (llvmSizeStdoutStream.poll()) { - return Status(StatusCode::DEADLINE_EXCEEDED, - fmt::format("Failed to compute .text size cost within 60 seconds")); - } - llvmSize.wait(); - llvmSizeOutput = llvmSizeStdoutFuture.get(); - - fs::remove(tmpFile); - if (llvmSize.exit_code()) { - return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost. " - "Command returned exit code {}: {}", - llvmSize.exit_code(), llvmSizeCmd)); - } - } catch (bp::process_error& e) { - fs::remove(tmpFile); return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost: {}", e.what())); } - // The output of llvm-size is in berkley format, e.g.: - // - // $ llvm-size foo.o - // __TEXT __DATA __OBJC others dec hex - // 127 0 0 32 159 9f - // - // Skip the first line of output and read an integer from the start of the - // second line: - const size_t eol = llvmSizeOutput.find('\n'); - const size_t tab = llvmSizeOutput.find('\t', eol + 1); - if (eol == std::string::npos || tab == std::string::npos) { - return Status(StatusCode::INTERNAL, - fmt::format("Failed to parse .TEXT size: `{}`\n", llvmSizeOutput)); - } - const std::string extracted = llvmSizeOutput.substr(eol, tab - eol); - try { - *value = std::stoi(extracted); - } catch (std::exception const& e) { - return Status(StatusCode::INTERNAL, - fmt::format("Failed to parse .TEXT size: `{}`\n", llvmSizeOutput)); - } - - return Status::OK; + Status status = getTextSizeInBytes(tmpFile, value); + fs::remove(tmpFile); + return status; } inline size_t getBaselineCostIndex(LlvmBaselinePolicy policy, LlvmCostFunction cost) { @@ -211,9 +243,9 @@ Status setCost(const LlvmCostFunction& costFunction, llvm::Module& module, case LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES: { int64_t size; #ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST - RETURN_IF_ERROR(getTextSizeInBytes(module, &size, {"-c"}, workingDirectory)); + RETURN_IF_ERROR(getTextSizeInBytes(module, &size, {"-c"}, workingDirectory, dynamicConfig)); #else - RETURN_IF_ERROR(getTextSizeInBytes(module, &size, workingDirectory)); + RETURN_IF_ERROR(getTextSizeInBytes(module, &size, workingDirectory, dynamicConfig)); #endif *cost = static_cast(size); break; From 91ea4fe6c26dce73c6fd00e1562ea178b41703c5 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 08:09:50 -0800 Subject: [PATCH 104/239] [llvm] Add the TextSizeBytes() observation space. --- compiler_gym/envs/llvm/service/Cost.cc | 63 ++++++++++--------- compiler_gym/envs/llvm/service/Cost.h | 2 - compiler_gym/envs/llvm/service/Observation.cc | 2 - .../envs/llvm/service/ObservationSpaces.cc | 4 +- .../envs/llvm/service/ObservationSpaces.h | 2 - 5 files changed, 33 insertions(+), 40 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 7af0b8132..daa69560a 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -102,11 +102,8 @@ Status getTextSizeInBytes(const fs::path& file, int64_t* value) { return Status::OK; } -Status getTextSizeInBytesUsingBuildCommand(llvm::Module& module, int64_t* value, - const fs::path& workingDirectory, - const BenchmarkDynamicConfig& dynamicConfig) { - const util::LocalShellCommand& buildCommand = dynamicConfig.buildCommand(); - +Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& workingDirectory, + const util::LocalShellCommand& buildCommand) { if (buildCommand.outfiles().size() != 1) { return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Expected a single output from build job, actual: {}. Command: {}", @@ -114,13 +111,8 @@ Status getTextSizeInBytesUsingBuildCommand(llvm::Module& module, int64_t* value, } const auto& outfile = buildCommand.outfiles()[0]; - if (chdir(dynamicConfig.scratchDirectory().string().c_str())) { - return Status(StatusCode::INTERNAL, fmt::format("Failed to set working directory: {}", - dynamicConfig.scratchDirectory().string())); - } - // Write the bitcode to the expected place. - RETURN_IF_ERROR(writeBitcodeFile(module, dynamicConfig.scratchDirectory() / "out.bc")); + RETURN_IF_ERROR(writeBitcodeFile(module, "out.bc")); RETURN_IF_ERROR(buildCommand.checkInfiles()); RETURN_IF_ERROR(buildCommand.checkCall()); @@ -129,14 +121,35 @@ Status getTextSizeInBytesUsingBuildCommand(llvm::Module& module, int64_t* value, return getTextSizeInBytes(outfile, value); } +util::LocalShellCommand getBuildCommand(const BenchmarkDynamicConfig& dynamicConfig, + bool compile_only) { + // Append the '-c' flag to compile-only jobs. + if (compile_only) { + Command newCommand; + newCommand.CopyFrom(dynamicConfig.buildCommand().proto()); + newCommand.add_argument("-c"); + return util::LocalShellCommand(newCommand); + } + return dynamicConfig.buildCommand(); +} + Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& workingDirectory, - const BenchmarkDynamicConfig& dynamicConfig) { - // TODO(cummins): Replace getTextSizeInBytes() with getTextSizeInBytesUsingBuildCommand(), using a - // default build command if none is set. + const BenchmarkDynamicConfig& dynamicConfig, bool compile_only = true) { if (dynamicConfig.isBuildable()) { - return getTextSizeInBytesUsingBuildCommand(module, value, workingDirectory, dynamicConfig); + if (chdir(dynamicConfig.scratchDirectory().string().c_str())) { + return Status(StatusCode::INTERNAL, fmt::format("Failed to set working directory: {}", + dynamicConfig.scratchDirectory().string())); + } + + const util::LocalShellCommand buildCommand = getBuildCommand(dynamicConfig, compile_only); + return getTextSizeInBytes(module, value, workingDirectory, buildCommand); } + // TODO(cummins): Remove this legacy implementation by providing a default + // buildCommand for the dynamicConfig. + DCHECK(compile_only) + << "Legacy getTextSizeInBytes() implementation only supports compile_only=true"; + const auto clangPath = util::getSiteDataPath("llvm-v0/bin/clang"); const auto llvmSizePath = util::getSiteDataPath("llvm-v0/bin/llvm-size"); DCHECK(fs::exists(clangPath)) << fmt::format("File not found: {}", clangPath.string()); @@ -242,30 +255,18 @@ Status setCost(const LlvmCostFunction& costFunction, llvm::Module& module, } case LlvmCostFunction::OBJECT_TEXT_SIZE_BYTES: { int64_t size; -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST - RETURN_IF_ERROR(getTextSizeInBytes(module, &size, {"-c"}, workingDirectory, dynamicConfig)); -#else - RETURN_IF_ERROR(getTextSizeInBytes(module, &size, workingDirectory, dynamicConfig)); -#endif + RETURN_IF_ERROR(getTextSizeInBytes(module, &size, workingDirectory, dynamicConfig, + /*compile_only=*/true)); *cost = static_cast(size); break; } -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST - -#ifdef __APPLE__ -#define SYSTEM_LIBRARIES \ - "-L" \ - "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" -#else -#define SYSTEM_LIBRARIES -#endif case LlvmCostFunction::TEXT_SIZE_BYTES: { int64_t size; - RETURN_IF_ERROR(getTextSizeInBytes(module, &size, {SYSTEM_LIBRARIES}, workingDirectory)); + RETURN_IF_ERROR(getTextSizeInBytes(module, &size, workingDirectory, dynamicConfig, + /*compile_only=*/false)); *cost = static_cast(size); break; } -#endif default: UNREACHABLE(fmt::format("Unhandled cost function: {}", costFunction)); } diff --git a/compiler_gym/envs/llvm/service/Cost.h b/compiler_gym/envs/llvm/service/Cost.h index c827bafbc..a4ed7930c 100644 --- a/compiler_gym/envs/llvm/service/Cost.h +++ b/compiler_gym/envs/llvm/service/Cost.h @@ -29,12 +29,10 @@ enum class LlvmCostFunction { * Returns the size (in bytes) of the .TEXT section of the compiled module. */ OBJECT_TEXT_SIZE_BYTES, -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST /** * Returns the size (in bytes) of the .TEXT section of the compiled binary. */ TEXT_SIZE_BYTES, -#endif }; /** diff --git a/compiler_gym/envs/llvm/service/Observation.cc b/compiler_gym/envs/llvm/service/Observation.cc index 736d78dd9..3b8b69347 100644 --- a/compiler_gym/envs/llvm/service/Observation.cc +++ b/compiler_gym/envs/llvm/service/Observation.cc @@ -189,7 +189,6 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto reply.set_int64_value(static_cast(cost)); break; } -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST case LlvmObservationSpace::TEXT_SIZE_BYTES: { double cost; RETURN_IF_ERROR(setCost(LlvmCostFunction::TEXT_SIZE_BYTES, benchmark.module(), @@ -215,7 +214,6 @@ Status setObservation(LlvmObservationSpace space, const fs::path& workingDirecto reply.set_int64_value(static_cast(cost)); break; } -#endif case LlvmObservationSpace::RUNTIME: { return benchmark.computeRuntime(reply); } diff --git a/compiler_gym/envs/llvm/service/ObservationSpaces.cc b/compiler_gym/envs/llvm/service/ObservationSpaces.cc index 950dc5d6f..bd107eead 100644 --- a/compiler_gym/envs/llvm/service/ObservationSpaces.cc +++ b/compiler_gym/envs/llvm/service/ObservationSpaces.cc @@ -177,18 +177,16 @@ std::vector getLlvmObservationSpaceList() { observationSpace.mutable_default_observation()->set_int64_value(0); break; } -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST case LlvmObservationSpace::TEXT_SIZE_BYTES: case LlvmObservationSpace::TEXT_SIZE_O0: case LlvmObservationSpace::TEXT_SIZE_O3: case LlvmObservationSpace::TEXT_SIZE_OZ: { space.mutable_int64_value()->set_min(0); observationSpace.set_deterministic(true); - observationSpace.set_platform_dependent(false); + observationSpace.set_platform_dependent(true); observationSpace.mutable_default_observation()->set_int64_value(0); break; } -#endif case LlvmObservationSpace::RUNTIME: case LlvmObservationSpace::BUILDTIME: { space.mutable_double_sequence()->mutable_length_range()->set_min(0); diff --git a/compiler_gym/envs/llvm/service/ObservationSpaces.h b/compiler_gym/envs/llvm/service/ObservationSpaces.h index fc4f659c5..4e44f6b2f 100644 --- a/compiler_gym/envs/llvm/service/ObservationSpaces.h +++ b/compiler_gym/envs/llvm/service/ObservationSpaces.h @@ -84,7 +84,6 @@ enum class LlvmObservationSpace { OBJECT_TEXT_SIZE_O3, /** The platform-dependent size of the .text section of the lowered module. */ OBJECT_TEXT_SIZE_OZ, -#ifdef COMPILER_GYM_EXPERIMENTAL_TEXT_SIZE_COST /** The platform-dependent size of the .text section of the compiled binary. */ TEXT_SIZE_BYTES, /** The platform-dependent size of the .text section of the compiled binary. */ @@ -93,7 +92,6 @@ enum class LlvmObservationSpace { TEXT_SIZE_O3, /** The platform-dependent size of the .text section of the compiled binary. */ TEXT_SIZE_OZ, -#endif /** Return 1 if the benchmark is buildable, else 0. */ IS_BUILDABLE, From 0c38cd2530374c4afae785e6ccae0f1f21c49653 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 16 Feb 2022 08:10:15 -0800 Subject: [PATCH 105/239] Whitespace fix in comment. --- compiler_gym/util/Subprocess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler_gym/util/Subprocess.h b/compiler_gym/util/Subprocess.h index 782e0fc79..9edf2b989 100644 --- a/compiler_gym/util/Subprocess.h +++ b/compiler_gym/util/Subprocess.h @@ -67,7 +67,7 @@ class LocalShellCommand { inline const std::vector& outfiles() const { return outfiles_; } /** - * Get the list of command line arguments as a concatenated string. + * Get the list of command line arguments as a concatenated string. * * This is for debugging purposes, it should not be used to execute commands * as it does no escaping of arguments. From 98ae7169cbd1f2da788be7a76fa7e2db202fe701 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 12:55:33 +0000 Subject: [PATCH 106/239] [llvm] Replace debugging check with comment. --- compiler_gym/envs/llvm/service/Cost.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index daa69560a..449b4b507 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -145,10 +145,8 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& return getTextSizeInBytes(module, value, workingDirectory, buildCommand); } - // TODO(cummins): Remove this legacy implementation by providing a default - // buildCommand for the dynamicConfig. - DCHECK(compile_only) - << "Legacy getTextSizeInBytes() implementation only supports compile_only=true"; + // TODO(cummins): We only provide an implementation for the compile_only path + // here. const auto clangPath = util::getSiteDataPath("llvm-v0/bin/clang"); const auto llvmSizePath = util::getSiteDataPath("llvm-v0/bin/llvm-size"); From 4abc83cacbe823c42355bbc5a8348a6f4a5e7904 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 13:22:07 +0000 Subject: [PATCH 107/239] Fix a code style formatting error. --- compiler_gym/envs/llvm/service/Benchmark.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index d2850baba..0ad8be841 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -110,8 +110,7 @@ std::unique_ptr makeModule(llvm::LLVMContext& context, const Bitco std::unique_ptr module = std::move(moduleOrError.get()); if (!module) { - *status = Status(StatusCode::INTERNAL, - "llvm::parseBitcodeFile return null"); + *status = Status(StatusCode::INTERNAL, "llvm::parseBitcodeFile return null"); return nullptr; } From 6f45c6092c08ba35b81b0e6079a8f8376fa47f91 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 13:44:57 +0000 Subject: [PATCH 108/239] [llvm] Improved error handling if build_cmd fails. --- compiler_gym/envs/llvm/service/Cost.cc | 41 ++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 449b4b507..04c0f8c25 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -102,6 +102,16 @@ Status getTextSizeInBytes(const fs::path& file, int64_t* value) { return Status::OK; } +#define TEXT_SIZE_RETURN_IF_ERROR(expr) \ + while (1) { \ + const auto status = expr; \ + if (!status.ok()) { \ + return Status(StatusCode::INVALID_ARGUMENT, \ + fmt::format("Failed to compute .text size cost: {}", status.error_message())); \ + } \ + break; \ + } + Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& workingDirectory, const util::LocalShellCommand& buildCommand) { if (buildCommand.outfiles().size() != 1) { @@ -114,20 +124,45 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path& // Write the bitcode to the expected place. RETURN_IF_ERROR(writeBitcodeFile(module, "out.bc")); - RETURN_IF_ERROR(buildCommand.checkInfiles()); - RETURN_IF_ERROR(buildCommand.checkCall()); - RETURN_IF_ERROR(buildCommand.checkOutfiles()); + TEXT_SIZE_RETURN_IF_ERROR(buildCommand.checkInfiles()); + TEXT_SIZE_RETURN_IF_ERROR(buildCommand.checkCall()); + TEXT_SIZE_RETURN_IF_ERROR(buildCommand.checkOutfiles()); return getTextSizeInBytes(outfile, value); } +#undef TEXT_SIZE_RETURN_IF_ERROR + util::LocalShellCommand getBuildCommand(const BenchmarkDynamicConfig& dynamicConfig, bool compile_only) { // Append the '-c' flag to compile-only jobs. if (compile_only) { Command newCommand; newCommand.CopyFrom(dynamicConfig.buildCommand().proto()); + + // Determine if the compilation specifies an output file using the `-o + // ` flag. If not, then add one so that when we append the `-c` flag + // we still know where the generated object file will go. + bool outfileSpecified = false; + for (int i = 0; i < newCommand.argument_size() - 1; ++i) { + if (newCommand.argument(i) == "-o") { + outfileSpecified = true; + break; + } + } + if (!outfileSpecified) { + newCommand.add_argument("-o"); + if (newCommand.outfile_size() < 1) { + newCommand.add_argument("a.out"); + newCommand.add_outfile("a.out"); + } else { + const auto& outfile = newCommand.outfile(0); + newCommand.add_argument(outfile); + } + } + newCommand.add_argument("-c"); + return util::LocalShellCommand(newCommand); } return dynamicConfig.buildCommand(); From 4ce9164666495cfaf92f3f0f1f1770f93f1eab31 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 14:40:41 +0000 Subject: [PATCH 109/239] [llvm] Update observation spaces test. --- tests/llvm/observation_spaces_test.py | 77 ++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 13 deletions(-) diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index 4a910c25f..fa333c322 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -40,34 +40,38 @@ def test_observation_spaces(env: LlvmEnv): env.reset("cbench-v1/crc32") assert set(env.observation.spaces.keys()) == { - "Ir", - "IrSha1", + "Autophase", + "AutophaseDict", "Bitcode", "BitcodeFile", + "Buildtime", + "CpuInfo", + "Inst2vec", + "Inst2vecEmbeddingIndices", + "Inst2vecPreprocessedText", "InstCount", "InstCountDict", "InstCountNorm", "InstCountNormDict", - "Autophase", - "AutophaseDict", - "Programl", - "ProgramlJson", - "CpuInfo", - "Inst2vecPreprocessedText", - "Inst2vecEmbeddingIndices", - "Inst2vec", + "Ir", "IrInstructionCount", "IrInstructionCountO0", "IrInstructionCountO3", "IrInstructionCountOz", + "IrSha1", + "IsBuildable", + "IsRunnable", "ObjectTextSizeBytes", "ObjectTextSizeO0", "ObjectTextSizeO3", "ObjectTextSizeOz", + "Programl", + "ProgramlJson", "Runtime", - "Buildtime", - "IsBuildable", - "IsRunnable", + "TextSizeBytes", + "TextSizeO0", + "TextSizeO3", + "TextSizeOz", } @@ -1204,6 +1208,53 @@ def test_object_text_size_observation_spaces(env: LlvmEnv): assert value == crc32_code_sizes[sys.platform][2] +def test_text_size_observation_spaces(env: LlvmEnv): + env.reset("cbench-v1/crc32") + + # Expected .text sizes for this benchmark: -O0, -O3, -Oz. + crc32_code_sizes = {"darwin": [1171, 3825, 3289], "linux": [2747, 5539, 4868]} + + key = "TextSizeBytes" + space = env.observation.spaces[key] + assert isinstance(space.space, Scalar) + assert space.deterministic + assert space.platform_dependent + value: int = env.observation[key] + print(value) # For debugging in case of error. + assert isinstance(value, int) + assert value == crc32_code_sizes[sys.platform][0] + + key = "TextSizeO0" + space = env.observation.spaces[key] + assert isinstance(space.space, Scalar) + assert space.deterministic + assert space.platform_dependent + value: int = env.observation[key] + print(value) # For debugging in case of error. + assert isinstance(value, int) + assert value == crc32_code_sizes[sys.platform][0] + + key = "TextSizeO3" + space = env.observation.spaces[key] + assert isinstance(space.space, Scalar) + assert space.deterministic + assert space.platform_dependent + value: int = env.observation[key] + print(value) # For debugging in case of error. + assert isinstance(value, int) + assert value == crc32_code_sizes[sys.platform][1] + + key = "TextSizeOz" + space = env.observation.spaces[key] + assert isinstance(space.space, Scalar) + assert space.deterministic + assert space.platform_dependent + value: int = env.observation[key] + print(value) # For debugging in case of error. + assert isinstance(value, int) + assert value == crc32_code_sizes[sys.platform][2] + + @flaky # Runtimes can timeout def test_runtime_observation_space(env: LlvmEnv): env.reset("cbench-v1/crc32") From db9d168d7cae92a4b25c9680c9ff9fdc0c9fa4ce Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 23:11:41 +0000 Subject: [PATCH 110/239] [llvm] Add TestSize reward functions. --- compiler_gym/envs/llvm/llvm_env.py | 37 ++++++++++++++++++++++ tests/llvm/reward_spaces_test.py | 50 +++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/compiler_gym/envs/llvm/llvm_env.py b/compiler_gym/envs/llvm/llvm_env.py index b137e2f06..c8b5b9c45 100644 --- a/compiler_gym/envs/llvm/llvm_env.py +++ b/compiler_gym/envs/llvm/llvm_env.py @@ -150,6 +150,43 @@ def __init__( deterministic=True, platform_dependent=True, ), + CostFunctionReward( + name="TextSizeBytes", + cost_function="TextSizeBytes", + init_cost_function="TextSizeO0", + default_negates_returns=True, + deterministic=True, + platform_dependent=True, + ), + NormalizedReward( + name="TextSizeNorm", + cost_function="TextSizeBytes", + init_cost_function="TextSizeO0", + max=1, + default_negates_returns=True, + deterministic=True, + platform_dependent=True, + ), + BaselineImprovementNormalizedReward( + name="TextSizeO3", + cost_function="TextSizeBytes", + init_cost_function="TextSizeO0", + baseline_cost_function="TextSizeO3", + success_threshold=1, + default_negates_returns=True, + deterministic=True, + platform_dependent=True, + ), + BaselineImprovementNormalizedReward( + name="TextSizeOz", + cost_function="TextSizeBytes", + init_cost_function="TextSizeO0", + baseline_cost_function="TextSizeOz", + success_threshold=1, + default_negates_returns=True, + deterministic=True, + platform_dependent=True, + ), ], derived_observation_spaces=[ { diff --git a/tests/llvm/reward_spaces_test.py b/tests/llvm/reward_spaces_test.py index cde889c43..e9214500b 100644 --- a/tests/llvm/reward_spaces_test.py +++ b/tests/llvm/reward_spaces_test.py @@ -71,6 +71,10 @@ def test_reward_spaces(env: LlvmEnv): "ObjectTextSizeNorm", "ObjectTextSizeO3", "ObjectTextSizeOz", + "TextSizeBytes", + "TextSizeNorm", + "TextSizeO3", + "TextSizeOz", } @@ -118,7 +122,7 @@ def test_instruction_count_reward_spaces(env: LlvmEnv): assert space.reward_on_error(episode_reward=5) == -5 -def test_native_test_size_reward_spaces(env: LlvmEnv): +def test_object_text_size_reward_spaces(env: LlvmEnv): env.reset(benchmark="cbench-v1/crc32") key = "ObjectTextSizeBytes" @@ -162,5 +166,49 @@ def test_native_test_size_reward_spaces(env: LlvmEnv): assert space.reward_on_error(episode_reward=5) == -5 +def test_text_size_reward_spaces(env: LlvmEnv): + env.reset(benchmark="cbench-v1/crc32") + + key = "TextSizeBytes" + space = env.reward.spaces[key] + assert str(space) == "TextSizeBytes" + assert env.reward[key] == 0 + assert space.range == (-np.inf, np.inf) + assert space.deterministic + assert space.platform_dependent + assert space.success_threshold is None + assert space.reward_on_error(episode_reward=5) == -5 + + key = "TextSizeNorm" + space = env.reward.spaces[key] + assert str(space) == "TextSizeNorm" + assert env.reward[key] == 0 + assert space.range == (-np.inf, 1.0) + assert space.deterministic + assert space.platform_dependent + assert space.success_threshold is None + assert space.reward_on_error(episode_reward=5) == -5 + + key = "TextSizeO3" + space = env.reward.spaces[key] + assert str(space) == "TextSizeO3" + assert env.reward[key] == 0 + assert space.range == (-np.inf, np.inf) + assert space.deterministic + assert space.platform_dependent + assert space.success_threshold == 1 + assert space.reward_on_error(episode_reward=5) == -5 + + key = "TextSizeOz" + space = env.reward.spaces[key] + assert str(space) == "TextSizeOz" + assert env.reward[key] == 0 + assert space.range == (-np.inf, np.inf) + assert space.deterministic + assert space.platform_dependent + assert space.success_threshold == 1 + assert space.reward_on_error(episode_reward=5) == -5 + + if __name__ == "__main__": main() From 7995e9666ccc768e8e1383b7cd2da939d97be7fd Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 23:11:53 +0000 Subject: [PATCH 111/239] Update manual_env tests. --- tests/bin/manual_env_bin_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bin/manual_env_bin_test.py b/tests/bin/manual_env_bin_test.py index 2126cbbf1..cca349e29 100644 --- a/tests/bin/manual_env_bin_test.py +++ b/tests/bin/manual_env_bin_test.py @@ -97,7 +97,7 @@ def test_list_rewards(): FLAGS.unparse_flags() io_check( """list_rewards""", - r"""compiler_gym:cbench-v1/qsort> .*IrInstructionCount.* ObjectTextSizeOz.*""", + r"""compiler_gym:cbench-v1/qsort> .*IrInstructionCount.* TextSizeOz.*""", ) @@ -105,7 +105,7 @@ def test_list_observations(): FLAGS.unparse_flags() io_check( """list_observations""", - r"""compiler_gym:cbench-v1/qsort> Autophase, .*, Runtime""", + r"""compiler_gym:cbench-v1/qsort> Autophase, .*, TextSizeOz""", ) From fd57459ff61a2662aca990f2e2f87bcbc1a63b52 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Mon, 21 Feb 2022 19:15:44 +0000 Subject: [PATCH 112/239] [tests] Update code size values. --- tests/llvm/observation_spaces_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index fa333c322..5136c61d9 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -1212,7 +1212,7 @@ def test_text_size_observation_spaces(env: LlvmEnv): env.reset("cbench-v1/crc32") # Expected .text sizes for this benchmark: -O0, -O3, -Oz. - crc32_code_sizes = {"darwin": [1171, 3825, 3289], "linux": [2747, 5539, 4868]} + crc32_code_sizes = {"darwin": [1171, 3825, 3289], "linux": [2850, 5652, 4980]} key = "TextSizeBytes" space = env.observation.spaces[key] From 7048bac454a4bc4705ba47175f6d69b5a5329fa8 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 18 Feb 2022 01:57:24 +0000 Subject: [PATCH 113/239] [llvm] Fix docstring comment. --- compiler_gym/envs/llvm/llvm_benchmark.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler_gym/envs/llvm/llvm_benchmark.py b/compiler_gym/envs/llvm/llvm_benchmark.py index c1f33609f..115b5db52 100644 --- a/compiler_gym/envs/llvm/llvm_benchmark.py +++ b/compiler_gym/envs/llvm/llvm_benchmark.py @@ -119,9 +119,6 @@ def get_system_library_flags(compiler: Optional[str] = None) -> List[str]: :code:`c++` is invoked. This can be overridden by setting :code:`os.environ["CXX"]` prior to calling this function. - The results of this function are cached, so changes to CXX will have no - effect on subsequent calls. - :return: A list of command line flags for a compiler. :raises HostCompilerFailure: If the host compiler cannot be determined, or From edcf57c2c207ff8556c60de42dea1e2fb639b08c Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 22 Feb 2022 19:51:11 +0000 Subject: [PATCH 114/239] Fix rebase errors. --- compiler_gym/envs/llvm/service/Cost.cc | 36 ++++++++++++++++---------- tests/llvm/runtime_test.py | 4 +-- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/compiler_gym/envs/llvm/service/Cost.cc b/compiler_gym/envs/llvm/service/Cost.cc index 04c0f8c25..8a0adcf37 100644 --- a/compiler_gym/envs/llvm/service/Cost.cc +++ b/compiler_gym/envs/llvm/service/Cost.cc @@ -54,27 +54,35 @@ Status writeBitcodeFile(const llvm::Module& module, const fs::path& path) { } Status getTextSizeInBytes(const fs::path& file, int64_t* value) { - // Run llvm-size on the compiled file. + const auto llvmSizePath = util::getSiteDataPath("llvm-v0/bin/llvm-size"); + DCHECK(fs::exists(llvmSizePath)) << fmt::format("File not found: {}", llvmSizePath.string()); + const std::string llvmSizeCmd = fmt::format("{} {}", llvmSizePath.string(), file.string()); boost::asio::io_context llvmSizeStdoutStream; std::future llvmSizeStdoutFuture; + std::string llvmSizeOutput; - bp::child llvmSize(llvmSizeCmd, bp::std_in.close(), bp::std_out > llvmSizeStdoutFuture, - bp::std_err > bp::null, llvmSizeStdoutStream); + try { + bp::child llvmSize(llvmSizeCmd, bp::std_in.close(), bp::std_out > llvmSizeStdoutFuture, + bp::std_err > bp::null, llvmSizeStdoutStream); - llvmSizeStdoutStream.run_for(std::chrono::seconds(60)); - if (llvmSizeStdoutStream.poll()) { - return Status(StatusCode::DEADLINE_EXCEEDED, - fmt::format("Failed to compute .text size cost within 60 seconds")); - } - llvmSize.wait(); - llvmSizeOutput = llvmSizeStdoutFuture.get(); + llvmSizeStdoutStream.run_for(std::chrono::seconds(60)); + if (llvmSizeStdoutStream.poll()) { + return Status(StatusCode::DEADLINE_EXCEEDED, + fmt::format("Failed to compute .text size cost within 60 seconds")); + } + llvmSize.wait(); + llvmSizeOutput = llvmSizeStdoutFuture.get(); - if (llvmSize.exit_code()) { - return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost. " - "Command returned exit code {}: {}", - llvmSize.exit_code(), llvmSizeCmd)); + if (llvmSize.exit_code()) { + return Status(StatusCode::INVALID_ARGUMENT, fmt::format("Failed to compute .text size cost. " + "Command returned exit code {}: {}", + llvmSize.exit_code(), llvmSizeCmd)); + } + } catch (bp::process_error& e) { + return Status(StatusCode::INVALID_ARGUMENT, + fmt::format("Failed to compute .text size cost: {}", e.what())); } // The output of llvm-size is in berkley format, e.g.: diff --git a/tests/llvm/runtime_test.py b/tests/llvm/runtime_test.py index ad0ebbd7c..29234cf1f 100644 --- a/tests/llvm/runtime_test.py +++ b/tests/llvm/runtime_test.py @@ -122,8 +122,8 @@ def test_failing_build_cmd(env: LlvmEnv, tmpdir): with pytest.raises( ServiceError, match=( - r"Command '\$CC \$IN -invalid-cc-argument' failed with exit code 1: " - r"clang: error: unknown argument: '-invalid-cc-argument'" + r"Command '\$CC \$IN -invalid-cc-argument -o a.out -c' failed with " + r"exit code 1: clang: error: unknown argument: '-invalid-cc-argument'" ), ): env.observation.Runtime() From a74b552243f3255ed16843169ddcb66082bc48ed Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Thu, 17 Feb 2022 17:19:54 +0000 Subject: [PATCH 115/239] Test fixes. --- tests/llvm/observation_spaces_test.py | 7 ++++++- tests/llvm/runtime_test.py | 9 +++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index 5136c61d9..2dfdb6adf 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -1212,7 +1212,12 @@ def test_text_size_observation_spaces(env: LlvmEnv): env.reset("cbench-v1/crc32") # Expected .text sizes for this benchmark: -O0, -O3, -Oz. - crc32_code_sizes = {"darwin": [1171, 3825, 3289], "linux": [2850, 5652, 4980]} + crc32_code_sizes = {"darwin": [16384, 16384, 16384], "linux": [2850, 5652, 4980]} + + # Debugging printout in case of test failure. + print(env.observation["TextSizeO0"]) + print(env.observation["TextSizeO3"]) + print(env.observation["TextSizeOz"]) key = "TextSizeBytes" space = env.observation.spaces[key] diff --git a/tests/llvm/runtime_test.py b/tests/llvm/runtime_test.py index 29234cf1f..937630b98 100644 --- a/tests/llvm/runtime_test.py +++ b/tests/llvm/runtime_test.py @@ -9,8 +9,8 @@ import pytest from flaky import flaky +from compiler_gym.datasets import BenchmarkInitError from compiler_gym.envs.llvm import LlvmEnv, llvm_benchmark -from compiler_gym.service.connection import ServiceError from tests.test_main import main pytest_plugins = ["tests.pytest_plugins.llvm"] @@ -120,11 +120,8 @@ def test_failing_build_cmd(env: LlvmEnv, tmpdir): env.reset(benchmark=benchmark) with pytest.raises( - ServiceError, - match=( - r"Command '\$CC \$IN -invalid-cc-argument -o a.out -c' failed with " - r"exit code 1: clang: error: unknown argument: '-invalid-cc-argument'" - ), + BenchmarkInitError, + match="clang: error: unknown argument: '-invalid-cc-argument'", ): env.observation.Runtime() From 09e8b50a7089e638699acda365d92bfd3f22756a Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 23 Feb 2022 13:41:51 +0000 Subject: [PATCH 116/239] [tests] Update invalid build command test. --- tests/llvm/custom_benchmarks_test.py | 20 ++++++++++++++- tests/llvm/runtime_test.py | 37 ---------------------------- 2 files changed, 19 insertions(+), 38 deletions(-) diff --git a/tests/llvm/custom_benchmarks_test.py b/tests/llvm/custom_benchmarks_test.py index 233191c2b..6fd31616d 100644 --- a/tests/llvm/custom_benchmarks_test.py +++ b/tests/llvm/custom_benchmarks_test.py @@ -10,7 +10,7 @@ import gym import pytest -from compiler_gym.datasets import Benchmark +from compiler_gym.datasets import Benchmark, BenchmarkInitError from compiler_gym.envs import LlvmEnv, llvm from compiler_gym.service.proto import Benchmark as BenchmarkProto from compiler_gym.service.proto import File @@ -285,5 +285,23 @@ def test_two_custom_benchmarks_reset(env: LlvmEnv): assert env.benchmark == benchmark2.uri +def test_failing_build_cmd(env: LlvmEnv, tmpdir): + """Test that reset() raises an error if build command fails.""" + (Path(tmpdir) / "program.c").touch() + + benchmark = env.make_benchmark(Path(tmpdir) / "program.c") + + benchmark.proto.dynamic_config.build_cmd.argument.extend( + ["$CC", "$IN", "-invalid-cc-argument"] + ) + benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10 + + with pytest.raises( + BenchmarkInitError, + match=r"clang: error: unknown argument: '-invalid-cc-argument'", + ): + env.reset(benchmark=benchmark) + + if __name__ == "__main__": main() diff --git a/tests/llvm/runtime_test.py b/tests/llvm/runtime_test.py index 937630b98..2c1384fba 100644 --- a/tests/llvm/runtime_test.py +++ b/tests/llvm/runtime_test.py @@ -9,7 +9,6 @@ import pytest from flaky import flaky -from compiler_gym.datasets import BenchmarkInitError from compiler_gym.envs.llvm import LlvmEnv, llvm_benchmark from tests.test_main import main @@ -90,42 +89,6 @@ def test_custom_benchmark_runtimes_differ(env: LlvmEnv, tmpdir): assert not np.all(runtimes_a == runtimes_b) -def test_failing_build_cmd(env: LlvmEnv, tmpdir): - """Test that Runtime observation raises an error if build command fails.""" - with open(tmpdir / "program.c", "w") as f: - f.write( - """ - #include - - int main(int argc, char** argv) { - printf("Hello\\n"); - for (int i = 0; i < 10; ++i) { - argc += 2; - } - return argc - argc; - } - """ - ) - - benchmark = env.make_benchmark(Path(tmpdir) / "program.c") - - benchmark.proto.dynamic_config.build_cmd.argument.extend( - ["$CC", "$IN", "-invalid-cc-argument"] - ) - benchmark.proto.dynamic_config.build_cmd.outfile.extend(["a.out"]) - benchmark.proto.dynamic_config.build_cmd.timeout_seconds = 10 - - benchmark.proto.dynamic_config.run_cmd.argument.extend(["./a.out"]) - benchmark.proto.dynamic_config.run_cmd.timeout_seconds = 10 - - env.reset(benchmark=benchmark) - with pytest.raises( - BenchmarkInitError, - match="clang: error: unknown argument: '-invalid-cc-argument'", - ): - env.observation.Runtime() - - def test_invalid_runtime_count(env: LlvmEnv): env.reset() with pytest.raises( From 96c953061ab453b1c056319212f218bf643351e8 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 23 Feb 2022 14:02:58 +0000 Subject: [PATCH 117/239] [service] Ignore service errors during retry loop. --- compiler_gym/envs/compiler_env.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/compiler_gym/envs/compiler_env.py b/compiler_gym/envs/compiler_env.py index 2669f55c7..fce35565e 100644 --- a/compiler_gym/envs/compiler_env.py +++ b/compiler_gym/envs/compiler_env.py @@ -737,12 +737,23 @@ def _retry(error) -> Optional[ObservationType]: """Abort and retry on error.""" logger.warning("%s during reset(): %s", type(error).__name__, error) if self.service: - self.service.close() + try: + self.service.close() + except ServiceError as e: + # close() can raise ServiceError if the service exists with + # a non-zero return code. We swallow the error here as we + # are about to retry. + logger.debug( + "Ignoring service error during reset() attempt: %s (%s)", + e, + type(e).__name__, + ) self.service = None if retry_count >= self._connection_settings.init_max_attempts: raise OSError( - f"Failed to reset environment using benchmark {self.benchmark} after {retry_count - 1} attempts.\n" + "Failed to reset environment using benchmark " + f"{self.benchmark} after {retry_count - 1} attempts.\n" f"Last error ({type(error).__name__}): {error}" ) from error else: From 27cf83f7d3c00105fe4bf81c944655a89ebaffae Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 23 Feb 2022 14:14:26 +0000 Subject: [PATCH 118/239] [tests] Only test text size values on CI. --- tests/llvm/observation_spaces_test.py | 38 ++++++++++++++++++--------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/tests/llvm/observation_spaces_test.py b/tests/llvm/observation_spaces_test.py index 2dfdb6adf..865623787 100644 --- a/tests/llvm/observation_spaces_test.py +++ b/tests/llvm/observation_spaces_test.py @@ -17,6 +17,7 @@ from compiler_gym.spaces import Box from compiler_gym.spaces import Dict as DictSpace from compiler_gym.spaces import Scalar, Sequence +from tests.pytest_plugins.common import ci_only from tests.test_main import main pytest_plugins = ["tests.pytest_plugins.llvm"] @@ -1211,14 +1212,6 @@ def test_object_text_size_observation_spaces(env: LlvmEnv): def test_text_size_observation_spaces(env: LlvmEnv): env.reset("cbench-v1/crc32") - # Expected .text sizes for this benchmark: -O0, -O3, -Oz. - crc32_code_sizes = {"darwin": [16384, 16384, 16384], "linux": [2850, 5652, 4980]} - - # Debugging printout in case of test failure. - print(env.observation["TextSizeO0"]) - print(env.observation["TextSizeO3"]) - print(env.observation["TextSizeOz"]) - key = "TextSizeBytes" space = env.observation.spaces[key] assert isinstance(space.space, Scalar) @@ -1227,7 +1220,6 @@ def test_text_size_observation_spaces(env: LlvmEnv): value: int = env.observation[key] print(value) # For debugging in case of error. assert isinstance(value, int) - assert value == crc32_code_sizes[sys.platform][0] key = "TextSizeO0" space = env.observation.spaces[key] @@ -1237,7 +1229,7 @@ def test_text_size_observation_spaces(env: LlvmEnv): value: int = env.observation[key] print(value) # For debugging in case of error. assert isinstance(value, int) - assert value == crc32_code_sizes[sys.platform][0] + assert value > 0 # Exact value is system dependent, see below. key = "TextSizeO3" space = env.observation.spaces[key] @@ -1247,7 +1239,7 @@ def test_text_size_observation_spaces(env: LlvmEnv): value: int = env.observation[key] print(value) # For debugging in case of error. assert isinstance(value, int) - assert value == crc32_code_sizes[sys.platform][1] + assert value > 0 # Exact value is system dependent, see below. key = "TextSizeOz" space = env.observation.spaces[key] @@ -1257,7 +1249,29 @@ def test_text_size_observation_spaces(env: LlvmEnv): value: int = env.observation[key] print(value) # For debugging in case of error. assert isinstance(value, int) - assert value == crc32_code_sizes[sys.platform][2] + assert value > 0 # Exact value is system dependent, see below. + + +# NOTE(cummins): The exact values here depend on the system toolchain and +# libraries, so only run this test on the GitHub CI runner environment where we +# can hardcode the values. If this test starts to fail, it may be because the CI +# runner environment has changed. +@ci_only +def test_text_size_observation_space_values(env: LlvmEnv): + env.reset("cbench-v1/crc32") + + # Expected .text sizes for this benchmark: -O0, -O3, -Oz. + crc32_code_sizes = {"darwin": [16384, 16384, 16384], "linux": [2850, 5652, 4980]} + + # For debugging in case of error. + print(env.observation["TextSizeO0"]) + print(env.observation["TextSizeO3"]) + print(env.observation["TextSizeOz"]) + + assert env.observation.TextSizeO0() == crc32_code_sizes[sys.platform][0] + assert env.observation.TextSizeO0() == crc32_code_sizes[sys.platform][0] + assert env.observation.TextSizeO3() == crc32_code_sizes[sys.platform][1] + assert env.observation.TextSizeOz() == crc32_code_sizes[sys.platform][2] @flaky # Runtimes can timeout From c3e6ea0dbb35fefdd5a8df6c610ac6a8fe11af89 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 1 Mar 2022 16:53:30 +0000 Subject: [PATCH 119/239] [docs] Add doxygen to the list of conda dependencies. This is needed to build the documentation from source (`make docs`). --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 2f947b6bb..36cf36af0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -54,7 +54,7 @@ with the required dependencies: conda create -y -n compiler_gym python=3.8 conda activate compiler_gym - conda install -y -c conda-forge cmake pandoc patchelf + conda install -y -c conda-forge cmake doxygen pandoc patchelf Then clone the CompilerGym source code using: From deeaad6c595df6341d52b3571f6f9470f998d9ef Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 1 Mar 2022 16:54:36 +0000 Subject: [PATCH 120/239] [docs] Move "report a bug" to bottom of FAQ. --- docs/source/faq.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 6aec64e0f..af3865e70 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -40,14 +40,6 @@ Development ----------- -I found a bug. How do I report it? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Great! Please file an issue using the `GitHub issue tracker -`_. See -:doc:`contributing` for more details. - - I updated with "git pull" and now it doesn't work ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -87,3 +79,11 @@ in. The service codebase is located at :code:`compiler_gym/envs/$COMPILER/service`, where :code:`$COMPILER` is the name of the compiler service you would wish to modify, e.g. llvm. Once done, send us a pull request! + + +I found a bug. How do I report it? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Great! Please file an issue using the `GitHub issue tracker +`_. See +:doc:`contributing` for more details. From 93cdec5a90bee9b06d39ef744d41cf58acde1cdf Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Tue, 1 Mar 2022 19:56:13 +0000 Subject: [PATCH 121/239] [docs] Improved debugging and development tips in FAQ. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds suggestions for common debugging tips: - Why does my environment’s step() function return “done”? - How do I debug crashes or errors? and for common development use-cases: - I want to modify a CompilerGym environment, where do I start? - I want to add a new CompilerGym environment, where do I start? This replaces the previous question about adding a new observation / reward signal that was specific to the LLVM environment. --- docs/source/faq.rst | 176 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 141 insertions(+), 35 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index af3865e70..880bacc33 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -8,8 +8,12 @@ question not answered here? File an issue on the `GitHub issue tracker .. contents:: Topics: :local: + +Usage +----- + What can I do with this? ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ CompilerGym lets you control the decisions that a compiler makes when optimizing a program. Currently, it lets you control the selection and ordering of @@ -20,7 +24,7 @@ measures some property of the program such as its code size or execution time. Do I have to use reinforcement learning? ----------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ No. We think that the the gym provides a useful abstraction for sequential decision making. You may use any technique you wish to explore the optimization @@ -30,16 +34,148 @@ Take a look at `this paper `_ for a brief introduction to the field. -What features are going to be added in the future? --------------------------------------------------- -See :ref:`roadmap `. +Why does my environment's step() function return "done"? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The third element of the tuple returned by :meth:`env.step() +` is a boolean that indicates whether the +current episode is "done". There are two reasons why an episode may be "done": + +1. A terminal state has been reached, as defined by the dynamics of the + environment. This could be because there are no further decisions to be made, + or because of an artificial limit to the episode length such as provided by + the :class:`TimeLimit ` and + :class:`CommandlineWithTerminalAction + ` wrappers. + +2. The environment has encountered an unrecoverable error and can no longer + proceed with the episode. This could be because of an error such as a + compiler crashing, a timeout from an action that takes too long, or an + overloaded system causing an out-of-memory error. + +In case of an unrecoverable error, CompilerGym will provide a description of the +error through a string :code:`error_details` in the returned :code:`info` dict: + +.. code-block:: python + + >>> import compiler_gym + >>> env = compiler_gym.make("llvm-v0") + >>> env.reset() + >>> for _ in range(1000): + ... observation, reward, done, info = env.step(env.action_space.sample()) + ... if done: + ... print(info.get("error_details")) + ... env.reset() + +In either case, calling :meth:`env.reset() +` will reset the environment and start a +new episode. + + +How do I debug crashes or errors? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The first step is to produce a minimal, reproducible example. The easiest way to +do this is usually to copy your code into a new file and to iteratively remove +as many dependencies and chunks of code as possible while still preserving the +error behavior of interest. Second, you can inspect CompilerGym's logging +output. + +CompilerGym uses Python's built in logging mechanism, but emits warning and +error messages sparingly. In normal use, the logging messages from CompilerGym +will not be seen by users. To enable these messages to be logged to standard out +insert the following snippet at the start of your script, before instantiating +any CompilerGym environments: + +.. code-block:: python + + import logging + logging.basicConfig(level=logging.DEBUG) + + # ... rest of script + +.. note:: + + CompilerGym uses per-module loggers. For fine-grained control over logging, + access the :code:`compiler_gym` logger or its children. + +Additionally, even-more-verbose logging can be enabled by setting the environment +variable :code:`COMPILER_GYM_DEBUG` to 4: + +.. code-block:: python + + import logging + import os + os.environ["COMPILER_GYM_DEBUG"] = "4" + logging.basicConfig(level=logging.DEBUG) + + # ... rest of script + +Inspecting the verbose logs may help understand what is going on, and is +incredibly helpful when reporting bugs. See :ref:`report-bug`. + + +.. _report-bug: + +I found a bug. How do I report it? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Great! Please file an issue using the `GitHub issue tracker +`_. See +:doc:`contributing` for more details. Development ----------- +What features are going to be added in the future? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +See :ref:`roadmap `. + + +I want to modify a CompilerGym environment, where do I start? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Many modifications to CompilerGym environments can be achieved through +:mod:`wrappers `. For example, you can use the existing +wrappers to artificially limit the length of episodes using :class:`TimeLimit +`, constrain the actions available to the agent +through :class:`ConstrainedCommandline +`, or randomize the benchmark that +is selected on :code:`reset()` using :class:`RandomOrderBenchmarks +`. + +Many new types of modular transformations can be implemented by extending the +base wrapper classes. For example, custom reward shaping can be implemented by +implementing the :code:`reward()` method in :class:`RewardWrapper +`. + +For more invasive changes, you may need to modify the underlying environment +implementation. To do that, fork this project and build it from source (see +`installation +`_). +Then modify the compiler service implementation for the compiler that you are +interested in. The service codebase is located at +:code:`compiler_gym/envs/$COMPILER/service`, where :code:`$COMPILER` is the name +of the compiler service you would wish to modify, e.g. +:code:`compiler_gym/envs/llvm/service` for the :doc:`LLVM environment +`. Once done, send us a pull request! + + +I want to add a new CompilerGym environment, where do I start? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To add a new environment, you must implement the :class:`CompilationSession +` interface to provide a new +compilation service, and then register this service with the CompilerGym +frontend. The whole process takes less than 200 lines of code. Full end-to-end +examples are provided for both Python and C++ in the `examples directory +`_. Once done, send us a pull request! + + I updated with "git pull" and now it doesn't work ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -57,33 +193,3 @@ stability. If you would like to build from source but do not require the latest feature set, use the `stable `_ branch which lags to the latest release with hotfixes. - - -I want to add a new program representation / reward signal. How do I do that? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If your reward or observation is a transformation of an existing space, consider -using the :mod:`compiler_gym.wrappers` module to define a wrapper that performs -the translation from the base space. - -If your reward or observation requires combining multiple existing spaces, -consider using :meth:`add_derived_space() -` or :meth:`add_space() -`. - -If you require modifying the underlying compiler service implementation, fork -this project and build it from source (see `installation -`_). -Then modify the service implementation for the compiler that you are interested -in. The service codebase is located at -:code:`compiler_gym/envs/$COMPILER/service`, where :code:`$COMPILER` is the name -of the compiler service you would wish to modify, e.g. llvm. Once done, send us -a pull request! - - -I found a bug. How do I report it? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Great! Please file an issue using the `GitHub issue tracker -`_. See -:doc:`contributing` for more details. From 9c4c0cb8da3f56a447c4c2fe0d2b01bd57207d84 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:28:01 +0000 Subject: [PATCH 122/239] [tests] Add missing test dependency. --- tests/llvm/BUILD | 1 + tests/llvm/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/llvm/BUILD b/tests/llvm/BUILD index 32280ec76..173434908 100644 --- a/tests/llvm/BUILD +++ b/tests/llvm/BUILD @@ -177,6 +177,7 @@ py_test( "//compiler_gym/envs", "//compiler_gym/service/proto", "//tests:test_main", + "//tests/pytest_plugins:common", "//tests/pytest_plugins:llvm", ], ) diff --git a/tests/llvm/CMakeLists.txt b/tests/llvm/CMakeLists.txt index bfe26234d..ec28d6d57 100644 --- a/tests/llvm/CMakeLists.txt +++ b/tests/llvm/CMakeLists.txt @@ -173,6 +173,7 @@ cg_py_test( DEPS compiler_gym::envs::envs compiler_gym::service::proto::proto + tests::pytest_plugins::common tests::pytest_plugins::llvm tests::test_main ) From 7144057513bbec46522f6fdb10828a207c22eac7 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:28:45 +0000 Subject: [PATCH 123/239] [examples] Fix benchmark URI. --- examples/example_compiler_gym_service/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_compiler_gym_service/__init__.py b/examples/example_compiler_gym_service/__init__.py index 4d8965334..8cb7ab614 100644 --- a/examples/example_compiler_gym_service/__init__.py +++ b/examples/example_compiler_gym_service/__init__.py @@ -74,7 +74,7 @@ def benchmark_uris(self) -> Iterable[str]: def benchmark_from_parsed_uri(self, uri: BenchmarkUri) -> Benchmark: if uri.path in self._benchmarks: - return self._benchmarks[uri] + return self._benchmarks[uri.path] else: raise LookupError("Unknown program name") From bce2a9df134157f96fab8699a51a0bd34abf3cb7 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:29:41 +0000 Subject: [PATCH 124/239] Update checksum of csmith tarball. --- WORKSPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 941d88963..6e299b51f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -277,7 +277,7 @@ http_archive( http_archive( name = "csmith", build_file_content = all_content, - sha256 = "ba871c1e5a05a71ecd1af514fedba30561b16ee80b8dd5ba8f884eaded47009f", + sha256 = "86d08c19a1f123054ed9350b7962edaad7d46612de0e07c10b73e578911156fd", strip_prefix = "csmith-csmith-2.3.0", urls = ["https://github.com/csmith-project/csmith/archive/refs/tags/csmith-2.3.0.tar.gz"], ) From 1af5eaa464ca40511a7df91aa0c4d7002e315108 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:29:51 +0000 Subject: [PATCH 125/239] Add alternate URL for csmith tarball. --- WORKSPACE | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 6e299b51f..5993dc07d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -279,7 +279,10 @@ http_archive( build_file_content = all_content, sha256 = "86d08c19a1f123054ed9350b7962edaad7d46612de0e07c10b73e578911156fd", strip_prefix = "csmith-csmith-2.3.0", - urls = ["https://github.com/csmith-project/csmith/archive/refs/tags/csmith-2.3.0.tar.gz"], + urls = [ + "https://github.com/ChrisCummins/csmith/archive/refs/tags/csmith-2.3.0.tar.gz", + "https://github.com/csmith-project/csmith/archive/refs/tags/csmith-2.3.0.tar.gz", + ], ) # === DeepDataFlow === From 2fe4a848a03355e8b581c714afd1f06715d74e31 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:30:51 +0000 Subject: [PATCH 126/239] [tests] Add missing test dependency. --- tests/llvm/BUILD | 1 + tests/llvm/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/llvm/BUILD b/tests/llvm/BUILD index 173434908..c94d4fa98 100644 --- a/tests/llvm/BUILD +++ b/tests/llvm/BUILD @@ -233,6 +233,7 @@ py_test( deps = [ "//compiler_gym/envs", "//tests:test_main", + "//tests/pytest_plugins:common", "//tests/pytest_plugins:llvm", ], ) diff --git a/tests/llvm/CMakeLists.txt b/tests/llvm/CMakeLists.txt index ec28d6d57..c541bd091 100644 --- a/tests/llvm/CMakeLists.txt +++ b/tests/llvm/CMakeLists.txt @@ -231,6 +231,7 @@ cg_py_test( "observation_spaces_test.py" DEPS compiler_gym::envs::envs + tests::pytest_plugins::common tests::pytest_plugins::llvm tests::test_main ) From 13fa5a3b5be926943af43ced456a359a609ef897 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 20:31:43 +0000 Subject: [PATCH 127/239] [tests] Set observation and reward space for type test. --- tests/llvm/gym_interface_compatability.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/llvm/gym_interface_compatability.py b/tests/llvm/gym_interface_compatability.py index 7b385a01b..ac22b164c 100644 --- a/tests/llvm/gym_interface_compatability.py +++ b/tests/llvm/gym_interface_compatability.py @@ -12,6 +12,10 @@ def test_type_classes(env: LlvmEnv): + env.observation_space = "Autophase" + env.reward_space = "IrInstructionCount" + env.reset() + assert isinstance(env, gym.Env) assert isinstance(env, LlvmEnv) assert isinstance(env.unwrapped, LlvmEnv) From 207dbb9b63fabbb4c179300e78ff1f4e27e55d7f Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 22:05:19 +0000 Subject: [PATCH 128/239] [examples] Update loop optimizations service dataset API. --- examples/loop_optimizations_service/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/loop_optimizations_service/__init__.py b/examples/loop_optimizations_service/__init__.py index 45ab1055a..b6866f07b 100644 --- a/examples/loop_optimizations_service/__init__.py +++ b/examples/loop_optimizations_service/__init__.py @@ -8,6 +8,7 @@ from typing import Iterable from compiler_gym.datasets import Benchmark, Dataset +from compiler_gym.datasets.uri import BenchmarkUri from compiler_gym.envs.llvm.llvm_benchmark import get_system_library_flags from compiler_gym.spaces import Reward from compiler_gym.third_party import llvm @@ -86,15 +87,15 @@ def __init__(self, *args, **kwargs): ) self._benchmarks = { - "benchmark://loops-opt-v0/add": Benchmark.from_file_contents( + "/add": Benchmark.from_file_contents( "benchmark://loops-opt-v0/add", self.preprocess(BENCHMARKS_PATH / "add.c"), ), - "benchmark://loops-opt-v0/offsets1": Benchmark.from_file_contents( + "/offsets1": Benchmark.from_file_contents( "benchmark://loops-opt-v0/offsets1", self.preprocess(BENCHMARKS_PATH / "offsets1.c"), ), - "benchmark://loops-opt-v0/conv2d": Benchmark.from_file_contents( + "/conv2d": Benchmark.from_file_contents( "benchmark://loops-opt-v0/conv2d", self.preprocess(BENCHMARKS_PATH / "conv2d.c"), ), @@ -122,11 +123,11 @@ def preprocess(src: Path) -> bytes: ) def benchmark_uris(self) -> Iterable[str]: - yield from self._benchmarks.keys() + yield from (f"benchmark://loops-opt-v0{k}" for k in self._benchmarks.keys()) - def benchmark(self, uri: str) -> Benchmark: - if uri in self._benchmarks: - return self._benchmarks[uri] + def benchmark_from_parsed_uri(self, uri: BenchmarkUri) -> Benchmark: + if uri.path in self._benchmarks: + return self._benchmarks[uri.path] else: raise LookupError("Unknown program name") From aa357ec7a704a8b65f530b4afb3668c33c283992 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 16:13:25 +0000 Subject: [PATCH 129/239] [service] createAndRunCompilerGymService() returns exit code. This changes the signature of createAndRunCompilerGymService() from [[noreturn]] void to [[nodiscard]] int. This removes the calls to exit() from inside the body of the function, allowing runtime services to insert cleanup code after the service has shut down.s Issue #582. --- compiler_gym/envs/llvm/service/RunService.cc | 4 +++- .../runtime/CreateAndRunCompilerGymServiceImpl.h | 8 ++++---- compiler_gym/service/runtime/Runtime.h | 10 +++++----- .../service_cc/ExampleService.cc | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/compiler_gym/envs/llvm/service/RunService.cc b/compiler_gym/envs/llvm/service/RunService.cc index f271fd89a..0025ed77e 100644 --- a/compiler_gym/envs/llvm/service/RunService.cc +++ b/compiler_gym/envs/llvm/service/RunService.cc @@ -59,5 +59,7 @@ void initLlvm() { int main(int argc, char** argv) { initLlvm(); - createAndRunCompilerGymService(argc, argv, usage); + const auto ret = createAndRunCompilerGymService(argc, argv, usage); + + return ret; } diff --git a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h index 6a4f1b2c1..cb0f4f026 100644 --- a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h +++ b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h @@ -51,7 +51,7 @@ void setGrpcChannelOptions(grpc::ServerBuilder& builder); // createAndRunCompilerGymServiceImpl(argc, argv, "usage string"); // } template -[[noreturn]] void createAndRunCompilerGymServiceImpl(int argc, char** argv, const char* usage) { +[[nodiscard]] int createAndRunCompilerGymServiceImpl(int argc, char** argv, const char* usage) { // Register a signal handler for SIGTERM that will set the shutdown_signal // future value. std::signal(SIGTERM, shutdown_handler); @@ -62,7 +62,7 @@ template gflags::ParseCommandLineFlags(&argc, &argv, /*remove_flags=*/true); if (argc > 1) { std::cerr << "ERROR: unknown command line argument '" << argv[1] << '\''; - exit(1); + return 1; } // Set up the working and logging directories. @@ -134,10 +134,10 @@ template LOG(ERROR) << "ERROR: Killing a service with " << service.sessionCount() << (service.sessionCount() > 1 ? " active sessions!" : " active session!") << std::endl; - exit(6); + return 6; } - exit(0); + return 0; } } // namespace compiler_gym::runtime diff --git a/compiler_gym/service/runtime/Runtime.h b/compiler_gym/service/runtime/Runtime.h index ef154bb1c..42d162eb2 100644 --- a/compiler_gym/service/runtime/Runtime.h +++ b/compiler_gym/service/runtime/Runtime.h @@ -20,20 +20,20 @@ namespace compiler_gym::runtime { * #include "my_compiler_service/MyCompilationSession.h" * * int main(int argc, char** argv) { - * createAndRunCompilerGymService( + * return createAndRunCompilerGymService( * argc, argc, "My compiler service" * ); * } * \endcode * - * This function never returns. - * * @tparam CompilationSessionType A sublass of CompilationSession that provides * implementations of the abstract methods. + * + * @return An integer return code. */ template -[[noreturn]] void createAndRunCompilerGymService(int argc, char** argv, const char* usage) { - createAndRunCompilerGymServiceImpl(argc, argv, usage); +[[nodiscard]] int createAndRunCompilerGymService(int argc, char** argv, const char* usage) { + return createAndRunCompilerGymServiceImpl(argc, argv, usage); } } // namespace compiler_gym::runtime diff --git a/examples/example_compiler_gym_service/service_cc/ExampleService.cc b/examples/example_compiler_gym_service/service_cc/ExampleService.cc index 99cacb769..76de9635d 100644 --- a/examples/example_compiler_gym_service/service_cc/ExampleService.cc +++ b/examples/example_compiler_gym_service/service_cc/ExampleService.cc @@ -133,5 +133,5 @@ class ExampleCompilationSession final : public CompilationSession { } // namespace int main(int argc, char** argv) { - runtime::createAndRunCompilerGymService(argc, argv, usage); + return runtime::createAndRunCompilerGymService(argc, argv, usage); } From 380f7ad5126cb22e79ed866d285d6f805c9a31db Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 16:25:06 +0000 Subject: [PATCH 130/239] [service] Add a logging message when the service is closed. --- .../service/runtime/CreateAndRunCompilerGymServiceImpl.h | 1 + .../service/runtime/create_and_run_compiler_gym_service.py | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h index cb0f4f026..e22d6b85e 100644 --- a/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h +++ b/compiler_gym/service/runtime/CreateAndRunCompilerGymServiceImpl.h @@ -129,6 +129,7 @@ template VLOG(2) << "Shutting down the RPC service"; server->Shutdown(); serverThread.join(); + VLOG(2) << "Service closed"; if (service.sessionCount()) { LOG(ERROR) << "ERROR: Killing a service with " << service.sessionCount() diff --git a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py index 94e410465..3b53acde1 100644 --- a/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py +++ b/compiler_gym/service/runtime/create_and_run_compiler_gym_service.py @@ -130,6 +130,7 @@ def main(argv): logging.info("Shutting down the RPC service") server.stop(60).wait() server_thread.join() + logging.info("Service closed") if len(service.sessions): print( From 9d6a29b2280c406173f0e5712d8c303730ce06d8 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 16:25:22 +0000 Subject: [PATCH 131/239] [llvm] Add debug logging for benchmark closing. --- compiler_gym/envs/llvm/service/Benchmark.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler_gym/envs/llvm/service/Benchmark.cc b/compiler_gym/envs/llvm/service/Benchmark.cc index 0ad8be841..7d18e73a3 100644 --- a/compiler_gym/envs/llvm/service/Benchmark.cc +++ b/compiler_gym/envs/llvm/service/Benchmark.cc @@ -162,9 +162,12 @@ Benchmark::Benchmark(const std::string& name, std::unique_ptr needsRecompile_(true) {} void Benchmark::close() { + VLOG(3) << "Closing benchmark " << name() << " with scratch directory " + << scratchDirectory().string(); sys::error_code ec; fs::remove_all(scratchDirectory(), ec); CHECK(!ec) << "Failed to delete scratch directory: " << scratchDirectory().string(); + VLOG(3) << "Closed benchmark " << name(); } std::unique_ptr Benchmark::clone(const fs::path& workingDirectory) const { From c5a40756a938e7e8adbd26ccc382740e64331494 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 16:25:34 +0000 Subject: [PATCH 132/239] [llvm] Clear the BenchmarkFactory contents on close(). --- compiler_gym/envs/llvm/service/BenchmarkFactory.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc index 1108f2069..638aa651e 100644 --- a/compiler_gym/envs/llvm/service/BenchmarkFactory.cc +++ b/compiler_gym/envs/llvm/service/BenchmarkFactory.cc @@ -48,6 +48,7 @@ void BenchmarkFactory::close() { for (auto& entry : benchmarks_) { entry.second.close(); } + benchmarks_.clear(); } Status BenchmarkFactory::getBenchmark(const BenchmarkProto& benchmarkMessage, From d274b288b2a9b22836dcbbf3cd20619fc7d416e0 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Wed, 2 Mar 2022 16:45:43 +0000 Subject: [PATCH 133/239] [llvm] Make sure that BenchmarkFactory::close() is called. This adds an explicit call to BenchmarkFactory::close() on the global singleton, since otherwise it may not be called. Fixes #582. Issue #591. --- compiler_gym/envs/llvm/service/BUILD | 1 + compiler_gym/envs/llvm/service/CMakeLists.txt | 1 + compiler_gym/envs/llvm/service/RunService.cc | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/compiler_gym/envs/llvm/service/BUILD b/compiler_gym/envs/llvm/service/BUILD index 6b1d21c6b..294f037e9 100644 --- a/compiler_gym/envs/llvm/service/BUILD +++ b/compiler_gym/envs/llvm/service/BUILD @@ -63,6 +63,7 @@ cc_binary( name = "compiler_gym-llvm-service-prelinked", srcs = ["RunService.cc"], deps = [ + ":BenchmarkFactory", ":LlvmSession", "//compiler_gym/service/runtime:cc_runtime", ], diff --git a/compiler_gym/envs/llvm/service/CMakeLists.txt b/compiler_gym/envs/llvm/service/CMakeLists.txt index c267b40d7..62f23f9f7 100644 --- a/compiler_gym/envs/llvm/service/CMakeLists.txt +++ b/compiler_gym/envs/llvm/service/CMakeLists.txt @@ -21,6 +21,7 @@ cg_cc_binary( "RunService.cc" DEPS ::LlvmSession + ::BenchmarkFactory compiler_gym::service::runtime::cc_runtime ) diff --git a/compiler_gym/envs/llvm/service/RunService.cc b/compiler_gym/envs/llvm/service/RunService.cc index 0025ed77e..508ae456e 100644 --- a/compiler_gym/envs/llvm/service/RunService.cc +++ b/compiler_gym/envs/llvm/service/RunService.cc @@ -2,6 +2,7 @@ // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. +#include "compiler_gym/envs/llvm/service/BenchmarkFactory.h" #include "compiler_gym/envs/llvm/service/LlvmSession.h" #include "compiler_gym/service/runtime/Runtime.h" #include "llvm/InitializePasses.h" @@ -61,5 +62,15 @@ int main(int argc, char** argv) { initLlvm(); const auto ret = createAndRunCompilerGymService(argc, argv, usage); + // NOTE(github.com/facebookresearch/CompilerGym/issues/582): We need to make + // sure that BenchmarkFactory::close() is called on the global singleton + // instance, so that the temporary scratch directories are tidied up. + // + // TODO(github.com/facebookresearch/CompilerGym/issues/591): Once the runtime + // has been refactored to support intra-session mutable state, this singleton + // can be replaced by a member variable that is closed on + // CompilerGymServiceContext::shutdown(). + BenchmarkFactory::getSingleton(FLAGS_working_dir).close(); + return ret; } From 656efaaab32a19145353b0eba8f7c603979d46bf Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Sat, 19 Feb 2022 16:53:50 +0000 Subject: [PATCH 134/239] [third-party] Mark inst2vec regexes as regex literals. It is now deprecated to use regex escape characters in string literals.. --- .../inst2vec/inst2vec_preprocess.py | 12 +- .../third_party/inst2vec/rgx_utils.py | 7426 +++++++++-------- 2 files changed, 3726 insertions(+), 3712 deletions(-) diff --git a/compiler_gym/third_party/inst2vec/inst2vec_preprocess.py b/compiler_gym/third_party/inst2vec/inst2vec_preprocess.py index 3c75706ac..3a07f0fca 100644 --- a/compiler_gym/third_party/inst2vec/inst2vec_preprocess.py +++ b/compiler_gym/third_party/inst2vec/inst2vec_preprocess.py @@ -339,16 +339,16 @@ def preprocess(data): # XFG-transforming (inline and abstract statements) ######################################################################################################################## # Helper regexs for structure type inlining -vector_type = "<\d+ x " + rgx.first_class_type + ">" -array_type = "\[\d+ x " + rgx.first_class_type + "\]" -array_of_array_type = "\[\d+ x " + "\[\d+ x " + rgx.first_class_type + "\]" + "\]" +vector_type = r"<\d+ x " + rgx.first_class_type + r">" +array_type = r"\[\d+ x " + rgx.first_class_type + r"\]" +array_of_array_type = r"\[\d+ x " + r"\[\d+ x " + rgx.first_class_type + r"\]" + r"\]" function_type = ( rgx.first_class_type - + " \(" + + r" \(" + rgx.any_of([rgx.first_class_type, vector_type, array_type, "..."], ",") + "*" + rgx.any_of([rgx.first_class_type, vector_type, array_type, "..."]) - + "\)\**" + + r"\)\**" ) structure_entry = rgx.any_of( [ @@ -460,7 +460,7 @@ def construct_struct_types_dictionary_for_file(data): struct_prev.append(comp_structure) struct_prev_with_comma.append(comp_structure + ", ") else: - comp_structure = "{}\dx\[\]\(\)\.,\*%IDvfloatdubeipqcy]+}>?$" + comp_structure = r"{}\dx\[\]\(\)\.,\*%IDvfloatdubeipqcy]+}>?$" # Loop over contents of to_process for i in list(to_process.items()): diff --git a/compiler_gym/third_party/inst2vec/rgx_utils.py b/compiler_gym/third_party/inst2vec/rgx_utils.py index c6f11a32a..9454ece10 100644 --- a/compiler_gym/third_party/inst2vec/rgx_utils.py +++ b/compiler_gym/third_party/inst2vec/rgx_utils.py @@ -29,58 +29,58 @@ # Regex manipulation: helper functions ######################################################################################################################## def any_of(possibilities, to_add=""): - """ + r""" Helper function for regex manipulation: Construct a regex representing "any of" the given possibilities :param possibilities: list of strings representing different word possibilities :param to_add: string to add at the beginning of each possibility (optional) :return: string corresponding to regex which represents any of the given possibilities - """ + r""" assert len(possibilities) > 0 - s = "(?:" + s = r"(?:" if len(to_add) > 0: - s += possibilities[0] + to_add + " " + s += possibilities[0] + to_add + r" " else: s += possibilities[0] for i in range(len(possibilities) - 1): if len(to_add) > 0: - s += "|" + possibilities[i + 1] + to_add + " " + s += r"|" + possibilities[i + 1] + to_add + r" " else: - s += "|" + possibilities[i + 1] - return s + ")" + s += r"|" + possibilities[i + 1] + return s + r")" ######################################################################################################################## # Regex manipulation: helper variables ######################################################################################################################## # Identifiers -global_id = r'(?" + + r"|undef))*>" ) immediate_value_vector_int = ( - r"" + + r"|undef))*>" ) immediate_value_vector_float = ( r"" + + r"|undef))*>" ) immediate_value_vector_double = ( r"" + + r"|undef))*>" ) immediate_value_string = r'(?\(\) \*]+>|\(["\@\d\w\.\-\_:,<> \*]+\)|\w+)?::[" \@\d\w\.\-\_:\)\(]*)*' + r'%[r"\@\d\w\.\-\_:]+(?:(?:<[r"\@\d\w\.\-\_:,<>\(\) \*]+>|\([r"\@\d\w\.\-\_:,<> \*]+\)|\w+)?::[r" \@\d\w\.\-\_:\)\(]*)*' + struct_name_add_on ) struct_name = struct_name_without_lookahead + struct_lookahead @@ -207,32 +207,32 @@ def any_of(possibilities, to_add=""): # Types base_type = r"(?:i\d+|double|float|opaque)\**" first_class_types = [ - "i\d+", - "half", - "float", - "double", - "fp_128", - "x86_fp80", - "ppc_fp128", - "<%ID>", + r"i\d+", + r"half", + r"float", + r"double", + r"fp_128", + r"x86_fp80", + r"ppc_fp128", + r"<%ID>", ] -first_class_type = any_of(first_class_types) + "\**" +first_class_type = any_of(first_class_types) + r"\**" base_type_or_struct_name = any_of([base_type, struct_name_without_lookahead]) ptr_to_base_type = base_type + r"\*+" vector_type = r"<\d+ x " + base_type + r">" ptr_to_vector_type = vector_type + r"\*+" array_type = r"\[\d+ x " + base_type + r"\]" ptr_to_array_type = array_type + r"\*+" -array_of_array_type = "\[\d+ x " + "\[\d+ x " + base_type + "\]" + "\]" +array_of_array_type = r"\[\d+ x " + r"\[\d+ x " + base_type + r"\]" + r"\]" struct = struct_name_without_lookahead ptr_to_struct = struct + r"\*+" function_type = ( base_type - + " \(" + + r" \(" + any_of([base_type, vector_type, array_type, "..."], ",") - + "*" + + r"*" + any_of([base_type, vector_type, array_type, "..."]) - + "\)\**" + + r"\)\**" ) any_type = any_of( [ @@ -269,586 +269,586 @@ def any_of(possibilities, to_add=""): [base_type, vector_type, array_type, array_of_array_type, function_type], "," ) literal_structure = ( - "(?|{})" + r"(?|{})" ) # Tokens -unknown_token = "!UNK" # starts with '!' to guarantee it will appear first in the alphabetically sorted vocabulary +unknown_token = r"!UNK" # starts with '!' to guarantee it will appear first in the alphabetically sorted vocabulary ######################################################################################################################## # Tags for clustering statements (by statement semantics) and helper functions ######################################################################################################################## # List of families of operations llvm_IR_stmt_families = [ - # ["tag level 1", "tag level 2", "tag level 3", "regex" ] - ["unknown token", "unknown token", "unknown token", "!UNK"], - ["integer arithmetic", "addition", "add integers", "<%ID> = add .*"], - ["integer arithmetic", "subtraction", "subtract integers", "<%ID> = sub .*"], + # [r"tag level 1", r"tag level 2", r"tag level 3", r"regex" ] + [r"unknown token", "unknown token", "unknown token", "!UNK"], + [r"integer arithmetic", "addition", "add integers", "<%ID> = add .*"], + [r"integer arithmetic", "subtraction", "subtract integers", "<%ID> = sub .*"], [ - "integer arithmetic", - "multiplication", - "multiply integers", - "<%ID> = mul .*", + r"integer arithmetic", + r"multiplication", + r"multiply integers", + r"<%ID> = mul .*", ], [ - "integer arithmetic", - "division", - "unsigned integer division", - "<%ID> = udiv .*", + r"integer arithmetic", + r"division", + r"unsigned integer division", + r"<%ID> = udiv .*", ], [ - "integer arithmetic", - "division", - "signed integer division", - "<%ID> = sdiv .*", + r"integer arithmetic", + r"division", + r"signed integer division", + r"<%ID> = sdiv .*", ], [ - "integer arithmetic", - "remainder", - "remainder of signed div", - "<%ID> = srem .*", + r"integer arithmetic", + r"remainder", + r"remainder of signed div", + r"<%ID> = srem .*", ], [ - "integer arithmetic", - "remainder", - "remainder of unsigned div.", - "<%ID> = urem .*", + r"integer arithmetic", + r"remainder", + r"remainder of unsigned div.", + r"<%ID> = urem .*", ], - ["floating-point arithmetic", "addition", "add floats", "<%ID> = fadd .*"], + [r"floating-point arithmetic", "addition", "add floats", "<%ID> = fadd .*"], [ - "floating-point arithmetic", - "subtraction", - "subtract floats", - "<%ID> = fsub .*", + r"floating-point arithmetic", + r"subtraction", + r"subtract floats", + r"<%ID> = fsub .*", ], [ - "floating-point arithmetic", - "multiplication", - "multiply floats", - "<%ID> = fmul .*", + r"floating-point arithmetic", + r"multiplication", + r"multiply floats", + r"<%ID> = fmul .*", ], - ["floating-point arithmetic", "division", "divide floats", "<%ID> = fdiv .*"], - ["bitwise arithmetic", "and", "and", "<%ID> = and .*"], - ["bitwise arithmetic", "or", "or", "<%ID> = or .*"], - ["bitwise arithmetic", "xor", "xor", "<%ID> = xor .*"], - ["bitwise arithmetic", "shift left", "shift left", "<%ID> = shl .*"], - ["bitwise arithmetic", "arithmetic shift right", "ashr", "<%ID> = ashr .*"], + [r"floating-point arithmetic", "division", "divide floats", "<%ID> = fdiv .*"], + [r"bitwise arithmetic", "and", "and", "<%ID> = and .*"], + [r"bitwise arithmetic", "or", "or", "<%ID> = or .*"], + [r"bitwise arithmetic", "xor", "xor", "<%ID> = xor .*"], + [r"bitwise arithmetic", "shift left", "shift left", "<%ID> = shl .*"], + [r"bitwise arithmetic", "arithmetic shift right", "ashr", "<%ID> = ashr .*"], [ - "bitwise arithmetic", - "logical shift right", - "logical shift right", - "<%ID> = lshr .*", + r"bitwise arithmetic", + r"logical shift right", + r"logical shift right", + r"<%ID> = lshr .*", ], [ - "comparison operation", - "compare integers", - "compare integers", - "<%ID> = icmp .*", + r"comparison operation", + r"compare integers", + r"compare integers", + r"<%ID> = icmp .*", ], [ - "comparison operation", - "compare floats", - "compare floats", - "<%ID> = fcmp .*", + r"comparison operation", + r"compare floats", + r"compare floats", + r"<%ID> = fcmp .*", ], [ - "conversion operation", - "bitcast", - "bitcast single val", - "<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque) .* to .*", + r"conversion operation", + r"bitcast", + r"bitcast single val", + r"<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque) .* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast single val*", - "<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\* .* to .*", + r"conversion operation", + r"bitcast", + r"bitcast single val*", + r"<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\* .* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast single val**", - "<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\* .* to .*", + r"conversion operation", + r"bitcast", + r"bitcast single val**", + r"<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\* .* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast single val***", - "<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\*\* .* to .*", + r"conversion operation", + r"bitcast", + r"bitcast single val***", + r"<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\*\* .* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast single val****", - "<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\*\*\* .* to .*", + r"conversion operation", + r"bitcast", + r"bitcast single val****", + r"<%ID> = bitcast (i\d+|float|double|x86_fp80|opaque)\*\*\*\* .* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast array", - "<%ID> = bitcast \[\d.* to .*", + r"conversion operation", + r"bitcast", + r"bitcast array", + r"<%ID> = bitcast \[\d.* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast vector", - "<%ID> = bitcast <\d.* to .*", + r"conversion operation", + r"bitcast", + r"bitcast vector", + r"<%ID> = bitcast <\d.* to .*", ], [ - "conversion operation", - "bitcast", - "bitcast structure", - '<%ID> = bitcast (%"|<{|<%|{).* to .*', + r"conversion operation", + r"bitcast", + r"bitcast structure", + r'<%ID> = bitcast (%"|<{|<%|{).* to .*', ], - ["conversion operation", "bitcast", "bitcast void", "<%ID> = bitcast void "], + [r"conversion operation", "bitcast", "bitcast void", "<%ID> = bitcast void "], [ - "conversion operation", - "extension/truncation", - "extend float", - "<%ID> = fpext .*", + r"conversion operation", + r"extension/truncation", + r"extend float", + r"<%ID> = fpext .*", ], [ - "conversion operation", - "extension/truncation", - "truncate floats", - "<%ID> = fptrunc .*", + r"conversion operation", + r"extension/truncation", + r"truncate floats", + r"<%ID> = fptrunc .*", ], [ - "conversion operation", - "extension/truncation", - "sign extend ints", - "<%ID> = sext .*", + r"conversion operation", + r"extension/truncation", + r"sign extend ints", + r"<%ID> = sext .*", ], [ - "conversion operation", - "extension/truncation", - "truncate int to ... ", - "<%ID> = trunc .* to .*", + r"conversion operation", + r"extension/truncation", + r"truncate int to ... ", + r"<%ID> = trunc .* to .*", ], [ - "conversion operation", - "extension/truncation", - "zero extend integers", - "<%ID> = zext .*", + r"conversion operation", + r"extension/truncation", + r"zero extend integers", + r"<%ID> = zext .*", ], [ - "conversion operation", - "convert", - "convert signed integers to... ", - "<%ID> = sitofp .*", + r"conversion operation", + r"convert", + r"convert signed integers to... ", + r"<%ID> = sitofp .*", ], [ - "conversion operation", - "convert", - "convert unsigned integer to... ", - "<%ID> = uitofp .*", + r"conversion operation", + r"convert", + r"convert unsigned integer to... ", + r"<%ID> = uitofp .*", ], [ - "conversion operation", - "convert int to ptr", - "convert int to ptr", - "<%ID> = inttoptr .*", + r"conversion operation", + r"convert int to ptr", + r"convert int to ptr", + r"<%ID> = inttoptr .*", ], [ - "conversion operation", - "convert ptr to int", - "convert ptr to int", - "<%ID> = ptrtoint .*", + r"conversion operation", + r"convert ptr to int", + r"convert ptr to int", + r"<%ID> = ptrtoint .*", ], [ - "conversion operation", - "convert floats", - "convert float to sint", - "<%ID> = fptosi .*", + r"conversion operation", + r"convert floats", + r"convert float to sint", + r"<%ID> = fptosi .*", ], [ - "conversion operation", - "convert floats", - "convert float to uint", - "<%ID> = fptoui .*", + r"conversion operation", + r"convert floats", + r"convert float to uint", + r"<%ID> = fptoui .*", ], - ["control flow", "phi", "phi", "<%ID> = phi .*"], + [r"control flow", "phi", "phi", "<%ID> = phi .*"], [ - "control flow", - "switch", - "jump table line", - "i\d{1,2} <(INT|FLOAT)>, label <%ID>", + r"control flow", + r"switch", + r"jump table line", + r"i\d{1,2} <(INT|FLOAT)>, label <%ID>", ], - ["control flow", "select", "select", "<%ID> = select .*"], - ["control flow", "invoke", "invoke and ret type", "<%ID> = invoke .*"], - ["control flow", "invoke", "invoke void", "invoke (fastcc )?void .*"], - ["control flow", "branch", "branch conditional", "br i1 .*"], - ["control flow", "branch", "branch unconditional", "br label .*"], - ["control flow", "branch", "branch indirect", "indirectbr .*"], - ["control flow", "control flow", "switch", "switch .*"], - ["control flow", "return", "return", "ret .*"], - ["control flow", "resume", "resume", "resume .*"], - ["control flow", "unreachable", "unreachable", "unreachable.*"], - ["control flow", "exception handling", "catch block", "catch .*"], - ["control flow", "exception handling", "cleanup clause", "cleanup"], + [r"control flow", "select", "select", "<%ID> = select .*"], + [r"control flow", "invoke", "invoke and ret type", "<%ID> = invoke .*"], + [r"control flow", "invoke", "invoke void", "invoke (fastcc )?void .*"], + [r"control flow", "branch", "branch conditional", "br i1 .*"], + [r"control flow", "branch", "branch unconditional", "br label .*"], + [r"control flow", "branch", "branch indirect", "indirectbr .*"], + [r"control flow", "control flow", "switch", "switch .*"], + [r"control flow", "return", "return", "ret .*"], + [r"control flow", "resume", "resume", "resume .*"], + [r"control flow", "unreachable", "unreachable", "unreachable.*"], + [r"control flow", "exception handling", "catch block", "catch .*"], + [r"control flow", "exception handling", "cleanup clause", "cleanup"], [ - "control flow", - "exception handling", - "landingpad for exceptions", - "<%ID> = landingpad .", + r"control flow", + r"exception handling", + r"landingpad for exceptions", + r"<%ID> = landingpad .", ], [ - "function", - "function call", - "sqrt (llvm-intrinsic)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>) @(llvm|llvm\..*)\.sqrt.*", + r"function", + r"function call", + r"sqrt (llvm-intrinsic)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>) @(llvm|llvm\..*)\.sqrt.*", ], [ - "function", - "function call", - "fabs (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.fabs.*", + r"function", + r"function call", + r"fabs (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.fabs.*", ], [ - "function", - "function call", - "max (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.max.*", + r"function", + r"function call", + r"max (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.max.*", ], [ - "function", - "function call", - "min (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.min.*", + r"function", + r"function call", + r"min (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.min.*", ], [ - "function", - "function call", - "fma (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.fma.*", + r"function", + r"function call", + r"fma (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.fma.*", ], [ - "function", - "function call", - "phadd (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.phadd.*", + r"function", + r"function call", + r"phadd (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.phadd.*", ], [ - "function", - "function call", - "pabs (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.pabs.*", + r"function", + r"function call", + r"pabs (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.pabs.*", ], [ - "function", - "function call", - "pmulu (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.pmulu.*", + r"function", + r"function call", + r"pmulu (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call (fast |)?(i\d+|float|double|x86_fp80|<%ID>|<\d x float>|<\d x double>|<\d x i\d+>) @(llvm|llvm\..*)\.pmulu.*", ], [ - "function", - "function call", - "umul (llvm-intr.)", - "<%ID> = (tail |musttail |notail )?call {.*} @llvm\.umul.*", + r"function", + r"function call", + r"umul (llvm-intr.)", + r"<%ID> = (tail |musttail |notail )?call {.*} @llvm\.umul.*", ], [ - "function", - "function call", - "prefetch (llvm-intr.)", - "(tail |musttail |notail )?call void @llvm\.prefetch.*", + r"function", + r"function call", + r"prefetch (llvm-intr.)", + r"(tail |musttail |notail )?call void @llvm\.prefetch.*", ], [ - "function", - "function call", - "trap (llvm-intr.)", - "(tail |musttail |notail )?call void @llvm\.trap.*", + r"function", + r"function call", + r"trap (llvm-intr.)", + r"(tail |musttail |notail )?call void @llvm\.trap.*", ], - ["function", "func decl / def", "function declaration", "declare .*"], - ["function", "func decl / def", "function definition", "define .*"], + [r"function", "func decl / def", "function declaration", "declare .*"], + [r"function", "func decl / def", "function definition", "define .*"], [ - "function", - "function call", - "function call void", - "(tail |musttail |notail )?call( \w+)? void [\w\)\(\}\{\.\,\*\d\[\]\s<>%]*(<[@%]ID>\(|.*bitcast )", + r"function", + r"function call", + r"function call void", + r"(tail |musttail |notail )?call( \w+)? void [\w\)\(\}\{\.\,\*\d\[\]\s<>%]*(<[@%]ID>\(|.*bitcast )", ], [ - "function", - "function call", - "function call mem lifetime", - "(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.lifetime.*", + r"function", + r"function call", + r"function call mem lifetime", + r"(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.lifetime.*", ], [ - "function", - "function call", - "function call mem copy", - "(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.memcpy\..*", + r"function", + r"function call", + r"function call mem copy", + r"(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.memcpy\..*", ], [ - "function", - "function call", - "function call mem set", - "(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.memset\..*", + r"function", + r"function call", + r"function call mem set", + r"(tail |musttail |notail )?call( \w+)? void ([\w)(\.\,\*\d ])*@llvm\.memset\..*", ], [ - "function", - "function call", - "function call single val", - "<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80|<\d+ x (i\d+|float|double)>) (.*<[@%]ID>\(|(\(.*\) )?bitcast ).*", + r"function", + r"function call", + r"function call single val", + r"<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80|<\d+ x (i\d+|float|double)>) (.*<[@%]ID>\(|(\(.*\) )?bitcast ).*", ], [ - "function", - "function call", - "function call single val*", - "<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80)\* (.*<[@%]ID>\(|\(.*\) bitcast ).*", + r"function", + r"function call", + r"function call single val*", + r"<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80)\* (.*<[@%]ID>\(|\(.*\) bitcast ).*", ], [ - "function", - "function call", - "function call single val**", - "<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80)\*\* (.*<[@%]ID>\(|\(.*\) bitcast ).*", + r"function", + r"function call", + r"function call single val**", + r"<%ID> = (tail |musttail |notail )?call[^{]* (i\d+|float|double|x86_fp80)\*\* (.*<[@%]ID>\(|\(.*\) bitcast ).*", ], [ - "function", - "function call", - "function call array", - "<%ID> = (tail |musttail |notail )?call[^{]* \[.*\] (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call array", + r"<%ID> = (tail |musttail |notail )?call[^{]* \[.*\] (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call array*", - "<%ID> = (tail |musttail |notail )?call[^{]* \[.*\]\* (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call array*", + r"<%ID> = (tail |musttail |notail )?call[^{]* \[.*\]\* (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call array**", - "<%ID> = (tail |musttail |notail )?call[^{]* \[.*\]\*\* (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call array**", + r"<%ID> = (tail |musttail |notail )?call[^{]* \[.*\]\*\* (\(.*\) )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call structure", - "<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>) (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call structure", + r"<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>) (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call structure*", - "<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call structure*", + r"<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call structure**", - "<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\*\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call structure**", + r"<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\*\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call structure***", - "<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\*\*\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", + r"function", + r"function call", + r"function call structure***", + r"<%ID> = (tail |musttail |notail )?call[^{]* (\{ .* \}[\w\_]*|?|opaque|\{\}|<%ID>)\*\*\* (\(.*\)\*? )?(<[@%]ID>\(|\(.*\) bitcast )", ], [ - "function", - "function call", - "function call asm value", - "<%ID> = (tail |musttail |notail )?call.* asm .*", + r"function", + r"function call", + r"function call asm value", + r"<%ID> = (tail |musttail |notail )?call.* asm .*", ], [ - "function", - "function call", - "function call asm void", - "(tail |musttail |notail )?call void asm .*", + r"function", + r"function call", + r"function call asm void", + r"(tail |musttail |notail )?call void asm .*", ], [ - "function", - "function call", - "function call function", - "<%ID> = (tail |musttail |notail )?call[^{]* void \([^\(\)]*\)\** <[@%]ID>\(", + r"function", + r"function call", + r"function call function", + r"<%ID> = (tail |musttail |notail )?call[^{]* void \([^\(\)]*\)\** <[@%]ID>\(", ], [ - "global variables", - "glob. var. definition", - "???", - "<@ID> = (?!.*constant)(?!.*alias).*", + r"global variables", + r"glob. var. definition", + r"???", + r"<@ID> = (?!.*constant)(?!.*alias).*", ], - ["global variables", "constant definition", "???", "<@ID> = .*constant .*"], + [r"global variables", "constant definition", "???", "<@ID> = .*constant .*"], [ - "memory access", - "load from memory", - "load structure", - '<%ID> = load (\w* )?(%"|<\{|\{ <|\{ \[|\{ |<%|opaque).*', + r"memory access", + r"load from memory", + r"load structure", + r'<%ID> = load (\w* )?(%"|<\{|\{ <|\{ \[|\{ |<%|opaque).*', ], [ - "memory access", - "load from memory", - "load single val", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)[, ].*", + r"memory access", + r"load from memory", + r"load single val", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)[, ].*", ], [ - "memory access", - "load from memory", - "load single val*", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*[, ].*", + r"memory access", + r"load from memory", + r"load single val*", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val**", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val**", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val***", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val***", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val****", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val****", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val*****", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val*****", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val******", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val******", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load single val*******", - "<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*\*\*[, ].*", + r"memory access", + r"load from memory", + r"load single val*******", + r"<%ID> = load (\w* )?(i\d+|float|double|x86_fp80)\*\*\*\*\*\*\*[, ].*", ], [ - "memory access", - "load from memory", - "load vector", - "<%ID> = load <\d+ x .*", + r"memory access", + r"load from memory", + r"load vector", + r"<%ID> = load <\d+ x .*", ], - ["memory access", "load from memory", "load array", "<%ID> = load \[\d.*"], + ["memory access", "load from memory", "load array", r"<%ID> = load \[\d.*"], [ - "memory access", - "load from memory", - "load fction ptr", - "<%ID> = load void \(", + r"memory access", + r"load from memory", + r"load fction ptr", + r"<%ID> = load void \(", ], - ["memory access", "store", "store", "store.*"], - ["memory addressing", "GEP", "GEP", "<%ID> = getelementptr .*"], + [r"memory access", "store", "store", "store.*"], + [r"memory addressing", "GEP", "GEP", r"<%ID> = getelementptr .*"], [ - "memory allocation", - "allocate on stack", - "allocate structure", - '<%ID> = alloca (%"|<{|<%|{ |opaque).*', + r"memory allocation", + r"allocate on stack", + r"allocate structure", + r'<%ID> = alloca (%"|<{|<%|{ |opaque).*', ], [ - "memory allocation", - "allocate on stack", - "allocate vector", - "<%ID> = alloca <\d.*", + r"memory allocation", + r"allocate on stack", + r"allocate vector", + r"<%ID> = alloca <\d.*", ], [ - "memory allocation", - "allocate on stack", - "allocate array", - "<%ID> = alloca \[\d.*", + r"memory allocation", + r"allocate on stack", + r"allocate array", + r"<%ID> = alloca \[\d.*", ], [ - "memory allocation", - "allocate on stack", - "allocate single value", - "<%ID> = alloca (double|float|i\d{1,3})\*?.*", + r"memory allocation", + r"allocate on stack", + r"allocate single value", + r"<%ID> = alloca (double|float|i\d{1,3})\*?.*", ], [ - "memory allocation", - "allocate on stack", - "allocate void", - "<%ID> = alloca void \(.*", + r"memory allocation", + r"allocate on stack", + r"allocate void", + r"<%ID> = alloca void \(.*", ], [ - "memory atomics", - "atomic memory modify", - "atomicrw xchg", - "<%ID> = atomicrmw.* xchg .*", + r"memory atomics", + r"atomic memory modify", + r"atomicrw xchg", + r"<%ID> = atomicrmw.* xchg .*", ], [ - "memory atomics", - "atomic memory modify", - "atomicrw add", - "<%ID> = atomicrmw.* add .*", + r"memory atomics", + r"atomic memory modify", + r"atomicrw add", + r"<%ID> = atomicrmw.* add .*", ], [ - "memory atomics", - "atomic memory modify", - "atomicrw sub", - "<%ID> = atomicrmw.* sub .*", + r"memory atomics", + r"atomic memory modify", + r"atomicrw sub", + r"<%ID> = atomicrmw.* sub .*", ], [ - "memory atomics", - "atomic memory modify", - "atomicrw or", - "<%ID> = atomicrmw.* or .*", + r"memory atomics", + r"atomic memory modify", + r"atomicrw or", + r"<%ID> = atomicrmw.* or .*", ], [ - "memory atomics", - "atomic compare exchange", - "cmpxchg single val", - "<%ID> = cmpxchg (weak )?(i\d+|float|double|x86_fp80)\*", + r"memory atomics", + r"atomic compare exchange", + r"cmpxchg single val", + r"<%ID> = cmpxchg (weak )?(i\d+|float|double|x86_fp80)\*", ], [ - "non-instruction", - "label", - "label declaration", - ";