flatten 20260225
This commit is contained in:
26
tjp/core/system/Optimization.h
Normal file
26
tjp/core/system/Optimization.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2025 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "System.h"
|
||||
|
||||
#ifdef COMPILER_LLVM
|
||||
#define LLVM_NO_OPTIMIZATION_FUNCTION __attribute__ ((optnone))
|
||||
#else
|
||||
#define LLVM_NO_OPTIMIZATION_FUNCTION
|
||||
#endif
|
||||
|
||||
#ifdef COMPILER_GCC
|
||||
#define GCC_NO_OPTIMIZATION_BLOCK_BEGIN \
|
||||
#pragma GCC push_options \
|
||||
#pragma GCC optimize ("O0") \
|
||||
|
||||
#define GCC_NO_OPTIMIZATION_BLOCK_END \
|
||||
#pragma GCC pop_options
|
||||
#else
|
||||
#define GCC_NO_OPTIMIZATION_BLOCK_BEGIN
|
||||
#define GCC_NO_OPTIMIZATION_BLOCK_END
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user