xref: /llvm-project/flang/include/flang/Lower/LoweringOptions.def (revision ce32625966a922fe96aababe0ed975ada004901f)
1//===--- LoweringOptions.def - Lowering options database ---------- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file defines the lowering options. Users of this file must define
11/// LOWERINGOPT macro to make use of this information.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LOWERINGOPT
16#  error Define the LOWERINGOPT macro to handle lowering options
17#endif
18
19#ifndef ENUM_LOWERINGOPT
20#  define ENUM_LOWERINGOPT(Name, Type, Bits, Default) \
21LOWERINGOPT(Name, Bits, Default)
22#endif
23
24/// If true, lower transpose without a runtime call.
25ENUM_LOWERINGOPT(OptimizeTranspose, unsigned, 1, 1)
26
27/// If true, lower to High level FIR before lowering to FIR. On by default.
28ENUM_LOWERINGOPT(LowerToHighLevelFIR, unsigned, 1, 1)
29
30/// If true, reverse PowerPC native vector element order.
31ENUM_LOWERINGOPT(NoPPCNativeVecElemOrder, unsigned, 1, 0)
32
33/// If true, assume external names will be suffixed with an underscore.
34/// On by default.
35ENUM_LOWERINGOPT(Underscoring, unsigned, 1, 1)
36
37/// If true, assume the behavior of integer overflow is defined
38/// (i.e. wraps around as two's complement). Off by default.
39ENUM_LOWERINGOPT(IntegerWrapAround, unsigned, 1, 0)
40
41/// If true (default), follow Fortran 2003 rules for (re)allocating
42/// the allocatable on the left side of the intrinsic assignment,
43/// if LHS and RHS have mismatching shapes/types.
44/// If false, assume that the shapes/types/allocation-status match.
45ENUM_LOWERINGOPT(ReallocateLHS, unsigned, 1, 1)
46
47/// If true, initialize globals without initialization to zero.
48/// On by default.
49ENUM_LOWERINGOPT(InitGlobalZero, unsigned, 1, 1)
50#undef LOWERINGOPT
51#undef ENUM_LOWERINGOPT
52