From 03328959996549f72f08342a63371cc5165b3943 Mon Sep 17 00:00:00 2001 From: Michael Rawson Date: Fri, 14 Jun 2024 13:36:08 +0100 Subject: [PATCH] disable optimisation for Clang and GCC on tricky translation units --- CASC/Schedules.cpp | 11 ++++++++++- Shell/Options.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index 2a830d26f..68d9396ab 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -14,6 +14,15 @@ * @author Martin Suda */ +/* this translation unit causes the optimiser to take a very long time, + * but it's not really performance-critical code: + * disable optimisation for this file with various compilers */ +#if defined(__clang__) +#pragma clang optimize off +#elif defined(__GNUC__) +#pragma GCC optimize 0 +#endif + #include "Schedules.hpp" #include "Shell/Options.hpp" @@ -7249,4 +7258,4 @@ void Schedules::getCascSat2024Schedule(const Property& property, Schedule& quick //total_instr 1326802 // len(covered) 1067 -} \ No newline at end of file +} diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 16ce67f74..cc8bd8385 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -19,6 +19,16 @@ * IMPORTANT --> see .hpp file for instructions on how to add an option */ +/* this translation unit causes the optimiser to take a very long time, + * but it's not really performance-critical code: + * disable optimisation for this file with various compilers */ +#if defined(__clang__) +#pragma clang optimize off +#elif defined(__GNUC__) +#pragma GCC optimize 0 +#endif + + // Visual does not know the round function #include #include