Skip to content

Commit 9af78b5

Browse files
committed
Merge branch 'users/meinersbur/flang_runtime_FortranSupport' into users/meinersbur/flang_runtime_move-files
2 parents f9a732e + baa7cb1 commit 9af78b5

31 files changed

+40
-52
lines changed

flang-rt/lib/flang_rt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS)
113113
add_subdirectory(../FortranFloat128Math Float128Math)
114114

115115
set(sources
116-
${FLANG_SOURCE_DIR}/lib/Common/binary-to-decimal.cpp
117-
${FLANG_SOURCE_DIR}/lib/Common/decimal-to-binary.cpp
116+
${FLANG_SOURCE_DIR}/lib/Decimal/binary-to-decimal.cpp
117+
${FLANG_SOURCE_DIR}/lib/Decimal/decimal-to-binary.cpp
118118
ISO_Fortran_binding.cpp
119119
allocator-registry.cpp
120120
allocatable.cpp

flang-rt/lib/flang_rt/edit-input.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "format.h"
1313
#include "io-stmt.h"
14-
#include "flang/Common/decimal.h"
14+
#include "flang/Decimal/decimal.h"
1515

1616
namespace Fortran::runtime::io {
1717

flang-rt/lib/flang_rt/edit-output.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
#include "format.h"
2222
#include "io-stmt.h"
23-
#include "flang/Common/decimal.h"
2423
#include "flang/Common/uint128.h"
24+
#include "flang/Decimal/decimal.h"
2525

2626
namespace Fortran::runtime::io {
2727

flang-rt/lib/flang_rt/environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef FLANG_RT_ENVIRONMENT_H_
1010
#define FLANG_RT_ENVIRONMENT_H_
1111

12-
#include "flang/Common/decimal.h"
1312
#include "flang/Common/optional.h"
13+
#include "flang/Decimal/decimal.h"
1414

1515
struct EnvironmentDefaultList;
1616

flang-rt/lib/flang_rt/format-implementation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "format.h"
1616
#include "io-stmt.h"
1717
#include "memory.h"
18-
#include "flang/Common/decimal.h"
1918
#include "flang/Common/format.h"
19+
#include "flang/Decimal/decimal.h"
2020
#include "flang/Runtime/main.h"
2121
#include <algorithm>
2222
#include <cstring>

flang-rt/lib/flang_rt/format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include "environment.h"
1515
#include "io-error.h"
1616
#include "flang/Common/Fortran-consts.h"
17-
#include "flang/Common/decimal.h"
1817
#include "flang/Common/optional.h"
18+
#include "flang/Decimal/decimal.h"
1919
#include "flang/Runtime/freestanding-tools.h"
2020
#include <cinttypes>
2121

flang/include/flang/Common/binary-floating-point.h renamed to flang/include/flang/Decimal/binary-floating-point.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang/Common/binary-floating-point.h ------------*- C++ -*-===//
1+
//===-- include/flang/Decimal/binary-floating-point.h -----------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
10-
#define FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
9+
#ifndef FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
10+
#define FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
1111

1212
// Access and manipulate the fields of an IEEE-754 binary
1313
// floating-point value via a generalized template.
@@ -208,4 +208,4 @@ template <int BINARY_PRECISION> class BinaryFloatingPointNumber {
208208
RawType raw_{0};
209209
};
210210
} // namespace Fortran::decimal
211-
#endif /* FORTRAN_COMMON_BINARY_FLOATING_POINT_H_ */
211+
#endif

flang/include/flang/Common/decimal.h renamed to flang/include/flang/Decimal/decimal.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
/*===-- include/flang/Common/decimal.h ------------------------------*- C -*-===
1+
/*===-- include/flang/Decimal/decimal.h ---------------------------*- C++ -*-===
22
*
33
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
* See https://llvm.org/LICENSE.txt for license information.
55
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
*
7-
*===----------------------------------------------------------------------===*/
7+
* ===-----------------------------------------------------------------------===
8+
*/
89

910
/* C and C++ API for binary-to/from-decimal conversion package. */
1011

11-
#ifndef FORTRAN_COMMON_DECIMAL_H_
12-
#define FORTRAN_COMMON_DECIMAL_H_
12+
#ifndef FORTRAN_DECIMAL_DECIMAL_H_
13+
#define FORTRAN_DECIMAL_DECIMAL_H_
1314

1415
#include "flang/Common/api-attrs.h"
1516
#include <stddef.h>
@@ -136,4 +137,4 @@ RT_API_ATTRS enum NS(ConversionResultFlags) ConvertDecimalToLongDouble(
136137
#ifdef __cplusplus
137138
} // extern "C"
138139
#endif
139-
#endif /* FORTRAN_COMMON_DECIMAL_H_ */
140+
#endif

flang/lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
add_subdirectory(Common)
21
add_subdirectory(Support)
32
add_subdirectory(Evaluate)
3+
add_subdirectory(Decimal)
44
add_subdirectory(Lower)
55
add_subdirectory(Parser)
66
add_subdirectory(Semantics)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#===-- lib/Common/CMakeLists.txt ------------------------------------===#
1+
#===-- lib/Decimal/CMakeLists.txt ------------------------------------------===#
22
#
33
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
# See https://llvm.org/LICENSE.txt for license information.
55
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
#
77
#===------------------------------------------------------------------------===#
88

9-
add_flang_library(FortranCommon
9+
add_flang_library(FortranDecimal
1010
binary-to-decimal.cpp
1111
decimal-to-binary.cpp
1212
)

flang/lib/Common/big-radix-floating-point.h renamed to flang/lib/Decimal/big-radix-floating-point.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- lib/Common/big-radix-floating-point.h -------------------*- C++ -*-===//
1+
//===-- lib/Decimal/big-radix-floating-point.h ------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_COMMON_BIG_RADIX_FLOATING_POINT_H_
10-
#define FORTRAN_COMMON_BIG_RADIX_FLOATING_POINT_H_
9+
#ifndef FORTRAN_DECIMAL_BIG_RADIX_FLOATING_POINT_H_
10+
#define FORTRAN_DECIMAL_BIG_RADIX_FLOATING_POINT_H_
1111

1212
// This is a helper class for use in floating-point conversions between
1313
// binary and decimal representations. It holds a multiple-precision
@@ -21,11 +21,11 @@
2121
// for conversions between binary and decimal representations; it is not
2222
// a general-purpose facility.
2323

24-
#include "flang/Common/binary-floating-point.h"
2524
#include "flang/Common/bit-population-count.h"
26-
#include "flang/Common/decimal.h"
2725
#include "flang/Common/leading-zero-bit-count.h"
2826
#include "flang/Common/uint128.h"
27+
#include "flang/Decimal/binary-floating-point.h"
28+
#include "flang/Decimal/decimal.h"
2929
#include <cinttypes>
3030
#include <limits>
3131
#include <type_traits>
@@ -393,4 +393,4 @@ template <int PREC, int LOG10RADIX = 16> class BigRadixFloatingPointNumber {
393393
enum FortranRounding rounding_ { RoundNearest };
394394
};
395395
} // namespace Fortran::decimal
396-
#endif /* FORTRAN_COMMON_BIG_RADIX_FLOATING_POINT_H_ */
396+
#endif

flang/lib/Common/binary-to-decimal.cpp renamed to flang/lib/Decimal/binary-to-decimal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/Common/binary-to-decimal.cpp ------------------------*- C++ -*-===//
1+
//===-- lib/Decimal/binary-to-decimal.cpp ---------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "big-radix-floating-point.h"
10-
#include "flang/Common/decimal.h"
10+
#include "flang/Decimal/decimal.h"
1111
#include <cassert>
1212
#include <cfloat>
1313
#include <string>

flang/lib/Common/decimal-to-binary.cpp renamed to flang/lib/Decimal/decimal-to-binary.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/Common/decimal-to-binary.cpp ------------------------*- C++ -*-===//
1+
//===-- lib/Decimal/decimal-to-binary.cpp ---------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,10 +7,10 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "big-radix-floating-point.h"
10-
#include "flang/Common/binary-floating-point.h"
1110
#include "flang/Common/bit-population-count.h"
12-
#include "flang/Common/decimal.h"
1311
#include "flang/Common/leading-zero-bit-count.h"
12+
#include "flang/Decimal/binary-floating-point.h"
13+
#include "flang/Decimal/decimal.h"
1414
#include "flang/Runtime/freestanding-tools.h"
1515
#include <cinttypes>
1616
#include <cstring>

flang/lib/Evaluate/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ add_flang_library(FortranEvaluate
6060
variable.cpp
6161

6262
LINK_LIBS
63-
FortranCommon
6463
FortranSupport
64+
FortranDecimal
6565
FortranParser
6666
${LIBPGMATH}
6767
${QUADMATHLIB}

flang/lib/Evaluate/real.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include "flang/Evaluate/real.h"
1010
#include "int-power.h"
11-
#include "flang/Common/decimal.h"
1211
#include "flang/Common/idioms.h"
12+
#include "flang/Decimal/decimal.h"
1313
#include "flang/Parser/characters.h"
1414
#include "llvm/Support/raw_ostream.h"
1515
#include <limits>

flang/lib/Frontend/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ add_flang_library(flangFrontend
2727
FortranParser
2828
FortranSemantics
2929
FortranEvaluate
30-
FortranCommon
3130
FortranSupport
3231
FortranLower
3332
FIRDialect

flang/lib/Lower/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ add_flang_library(FortranLower
5656
HLFIRDialect
5757
${dialect_libs}
5858
${extension_libs}
59-
FortranCommon
6059
FortranSupport
6160
FortranParser
6261
FortranEvaluate

flang/lib/Optimizer/OpenMP/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ add_flang_library(FlangOpenMPTransforms
2121
FIRDialect
2222
FIRDialectSupport
2323
FIRSupport
24-
FortranCommon
2524
FortranSupport
2625
FortranEvaluate
2726
MLIRFuncDialect

flang/lib/Optimizer/Passes/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ add_flang_library(flangPasses
1111
FlangOpenMPTransforms
1212
${dialect_libs}
1313
${extension_libs}
14-
FortranCommon
1514
FortranSupport
1615
HLFIRTransforms
1716
MLIRPass

flang/lib/Optimizer/Transforms/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ add_flang_library(FIRTransforms
4646
FIRDialect
4747
FIRDialectSupport
4848
FIRSupport
49-
FortranCommon
5049
FortranSupport
5150
HLFIRDialect
5251
MLIRAffineUtils

flang/lib/Parser/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ add_flang_library(FortranParser
2525
user-state.cpp
2626

2727
LINK_LIBS
28-
FortranCommon
2928
FortranSupport
3029

3130
LINK_COMPONENTS

flang/lib/Semantics/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ add_flang_library(FortranSemantics
5353
omp_gen
5454

5555
LINK_LIBS
56-
FortranCommon
5756
FortranSupport
5857
FortranParser
5958
FortranEvaluate

flang/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ set(FLANG_TEST_DEPENDS
7272
llvm-readobj
7373
split-file
7474
FortranRuntime
75+
FortranDecimal
7576
)
7677
if (LLVM_ENABLE_PLUGINS AND NOT WIN32)
7778
list(APPEND FLANG_TEST_DEPENDS Bye)

flang/tools/bbc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ target_link_libraries(bbc PRIVATE
3232
${extension_libs}
3333
MLIRAffineToStandard
3434
MLIRSCFToControlFlow
35-
FortranCommon
3635
FortranSupport
3736
FortranParser
3837
FortranEvaluate

flang/tools/f18-parse-demo/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ add_flang_tool(f18-parse-demo
1111

1212
target_link_libraries(f18-parse-demo
1313
PRIVATE
14-
FortranCommon
1514
FortranSupport
1615
FortranParser
1716
)

flang/tools/tco/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ target_link_libraries(tco PRIVATE
1919
HLFIRTransforms
2020
flangPasses
2121
FlangOpenMPTransforms
22-
FortranCommon
2322
FortranSupport
2423
${dialect_libs}
2524
${extension_libs}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
22
add_flang_nongtest_unittest(quick-sanity-test
3-
FortranCommon
3+
FortranDecimal
44
)
55

66
# This test is not run by default as it takes a long time to execute.
77
add_flang_nongtest_unittest(thorough-test
88
SLOW_TEST
9-
FortranCommon
9+
FortranDecimal
1010
)

flang/unittests/Decimal/quick-sanity-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "flang/Common/decimal.h"
1+
#include "flang/Decimal/decimal.h"
22
#include "llvm/Support/raw_ostream.h"
33
#include <cinttypes>
44
#include <cstdio>

flang/unittests/Decimal/thorough-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "flang/Common/decimal.h"
1+
#include "flang/Decimal/decimal.h"
22
#include "llvm/Support/raw_ostream.h"
33
#include <cinttypes>
44
#include <cstdio>

flang/unittests/Evaluate/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ add_flang_nongtest_unittest(uint128
2626
)
2727

2828
add_flang_nongtest_unittest(expression
29-
FortranCommon
3029
FortranSupport
3130
FortranEvaluateTesting
3231
FortranEvaluate
@@ -41,10 +40,10 @@ add_flang_nongtest_unittest(integer
4140
)
4241

4342
add_flang_nongtest_unittest(intrinsics
44-
FortranCommon
4543
FortranSupport
4644
FortranEvaluateTesting
4745
FortranEvaluate
46+
FortranDecimal
4847
FortranSemantics
4948
FortranParser
5049
FortranRuntime
@@ -65,14 +64,12 @@ set(LLVM_REQUIRES_RTTI ON)
6564
add_flang_nongtest_unittest(real
6665
FortranEvaluateTesting
6766
FortranEvaluate
68-
FortranCommon
69-
FortranSupport
67+
FortranDecimal
7068
FortranSemantics
7169
)
7270
llvm_update_compile_flags(real.test)
7371

7472
add_flang_nongtest_unittest(folding
75-
FortranCommon
7673
FortranSupport
7774
FortranEvaluateTesting
7875
FortranEvaluate

flang/unittests/Frontend/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ target_link_libraries(FlangFrontendTests
1818
FortranLower
1919
FortranParser
2020
FortranSemantics
21-
FortranCommon
2221
FortranSupport
2322
FortranEvaluate
2423
MLIRIR

0 commit comments

Comments
 (0)