Skip to content

Commit

Permalink
disable optimisation for Clang and GCC on tricky translation units
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRawson authored and quickbeam123 committed Jun 14, 2024
1 parent 268dfff commit 0332895
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CASC/Schedules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -7249,4 +7258,4 @@ void Schedules::getCascSat2024Schedule(const Property& property, Schedule& quick

//total_instr 1326802
// len(covered) 1067
}
}
10 changes: 10 additions & 0 deletions Shell/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cmath>
#include <filesystem>
Expand Down

0 comments on commit 0332895

Please sign in to comment.