Commit Graph

1524 Commits

Author SHA1 Message Date
Peter Klausler ed88a239cc [flang] Merge pull request flang-compiler/f18#352 from flang-compiler/pmk-parsing
Fix some parsing issues found by Steve

Original-commit: flang-compiler/f18@683766f7f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
2019-04-01 10:49:45 -07:00
peter klausler 4d21120d89 [flang] Add extension edit descriptors to the unparser.
Original-commit: flang-compiler/f18@74e09e249a
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
2019-04-01 10:14:20 -07:00
peter klausler e0f76d2306 [flang] Support CONVERT= and DISPOSE= on INQUIRE
Original-commit: flang-compiler/f18@fbedd32376
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:19 -07:00
peter klausler 822810f017 [flang] Check int literals for overflow when kind is known.
improve test

Original-commit: flang-compiler/f18@09ce783cd3
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:16 -07:00
peter klausler 1d2a212c38 [flang] Allow dollar and backslash formats
Original-commit: flang-compiler/f18@4d8d6e599e
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:15 -07:00
peter klausler 5b0e18b0e4 [flang] Allow multiple associations on legacy POINTER declaration
fix that fix

Original-commit: flang-compiler/f18@f096b73842
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:12 -07:00
jeanPerier e278ed5a0a [flang] Update documentation to reflect current intrinsic procedure support in f18
Merge pull request flang-compiler/f18#366 from flang-compiler/jpr0

Original-commit: flang-compiler/f18@0f310c8a8c
2019-04-01 01:44:51 -07:00
Jean Perier f9ab321ed4 [flang] Address review comment
Original-commit: flang-compiler/f18@1e3b3b457d
2019-04-01 01:39:19 -07:00
Jean Perier 3774e9d173 [flang] Update documentation with status of intrinsic procedure support in f18
Original-commit: flang-compiler/f18@aa12037a5b
Tree-same-pre-rewrite: false
2019-03-29 08:48:39 -07:00
Jean Perier 382aafad68 [flang] Remove useless dummy return statements
I first added these because I had issues with return type deduction
in lambdas, but they are actually useless when the return type is
specified in the lambda signature.

Original-commit: flang-compiler/f18@5bcbbd8bdc
Tree-same-pre-rewrite: false
2019-03-29 04:30:35 -07:00
psteinfeld 54a3e9af38 [flang] Merge pull request flang-compiler/f18#365 from flang-compiler/do2
Fix semantics test for "DO".

Original-commit: flang-compiler/f18@62794b980e
Reviewed-on: https://github.com/flang-compiler/f18/pull/365
2019-03-29 08:48:24 -07:00
Peter Steinfeld 8586f299e3 [flang] This test fails when the directory in which test tests are run contains a path that matches the pattern "do *[1-9]". In my case, I had a directory called "do1". The "*" is not necessary in the pattern. Now the test passes unless the directory contains a " ".
Original-commit: flang-compiler/f18@462f15e4e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/365
2019-03-28 17:17:30 -07:00
jeanPerier 3e472f55f8 [flang] Fix F18 scalar integer power algorithm
Merge pull request flang-compiler/f18#362 from flang-compiler/jpr1

Original-commit: flang-compiler/f18@9f3f42fbad
2019-03-29 02:24:55 -07:00
Jean Perier 9f98662b5f [flang] Fix F18 scalar integer power algorithm
Original-commit: flang-compiler/f18@f0609e7ace
2019-03-28 08:18:42 -07:00
jeanPerier 68cfc92b1a [flang] Fix compilation issues of PR flang-compiler/f18#292
Merge pull request flang-compiler/f18#361 from flang-compiler/jpr0

Original-commit: flang-compiler/f18@37252adf0e
2019-03-29 02:24:19 -07:00
Jean Perier eb52525b91 [flang] Add todo for bessel function default support
Original-commit: flang-compiler/f18@3842e7f5ac
2019-03-29 01:41:26 -07:00
Jean Perier 47251f2db0 [flang] Fix compilation failure on PowerPC
Original-commit: flang-compiler/f18@f79f4973b6
Tree-same-pre-rewrite: false
2019-03-28 06:53:52 -07:00
Jean Perier 07f6963dbb [flang] Remove non standard use of bessel C functions
Original-commit: flang-compiler/f18@a40559372a
Tree-same-pre-rewrite: false
2019-03-28 04:25:13 -07:00
Jean Perier 1d4323ddd5 [flang] Silence GCC 8.1 spurious warning
Original-commit: flang-compiler/f18@69e05d0632
Tree-same-pre-rewrite: false
2019-03-28 02:34:32 -07:00
Steve Scalpone 85569fcbf8 [flang] Merge pull request flang-compiler/f18#364 from flang-compiler/sjs-make-install
Add CMake rules to install static and shared libraries.

Original-commit: flang-compiler/f18@88c3b1fa12
Reviewed-on: https://github.com/flang-compiler/f18/pull/364
2019-03-28 13:15:43 -07:00
Steve Scalpone 1de9ecd251 [flang] Add CMake rules to install static and shared libraries in
the default install directory or in the directory specified
with CMAKE_INSTALL_PREFIX.  Fixes flang-compiler/f18#359.

Original-commit: flang-compiler/f18@35ce1628e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/364
2019-03-28 09:55:56 -07:00
Tim Keith 7f87c2f754 [flang] Merge pull request flang-compiler/f18#357 from flang-compiler/tsk6
Track current statement location in SemanticsVisitor

Original-commit: flang-compiler/f18@69575f87f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/357
2019-03-28 11:30:05 -07:00
Tim Keith 3e8c62b48b [flang] Track current statement location in SemanticsVisitor
Change `SemanticsVisitor` to track the location of the current
statement, if any, so that it's available through
`SemanticsContext::location()`

Add overloading of `SemanticsContext::Say()` that reports the
message at the location of the current statement if a `CharBlock`
is not provided.

Original-commit: flang-compiler/f18@5185c721ee
Reviewed-on: https://github.com/flang-compiler/f18/pull/357
2019-03-26 12:40:13 -07:00
Steve Scalpone 0574d4f986 [flang] Merge pull request flang-compiler/f18#360 from flang-compiler/computed-goto
Implement semantics for computed GOTO

Original-commit: flang-compiler/f18@624623a063
Reviewed-on: https://github.com/flang-compiler/f18/pull/360
2019-03-27 20:49:55 -07:00
Steve Scalpone b8ce6f11ad [flang] Removed unused #include files from check-computed-goto.cc.
Did the same for a few other similar files.

Original-commit: flang-compiler/f18@6f7569b938
Reviewed-on: https://github.com/flang-compiler/f18/pull/360
2019-03-27 20:46:51 -07:00
Steve Scalpone fa2e6374ce [flang] Fix typo: "check" becomes "checked"
Original-commit: flang-compiler/f18@2b2b0bf324
Reviewed-on: https://github.com/flang-compiler/f18/pull/360
Tree-same-pre-rewrite: false
2019-03-27 15:48:46 -07:00
Steve Scalpone 7024515c7d [flang] Implement semantics for computed GOTO. Note that a PGI extension
will implicitly convert a float to integer (and issue a warning).
This commit does not implement that extension.

Original-commit: flang-compiler/f18@b85755f26f
Reviewed-on: https://github.com/flang-compiler/f18/pull/360
Tree-same-pre-rewrite: false
2019-03-27 15:44:17 -07:00
Eric Schweitz d5c41f1061 [flang] Merge pull request flang-compiler/f18#354 from schweitzpgi/master
FIR: continued development work

Original-commit: flang-compiler/f18@60f4ef672e
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
2019-03-27 16:08:33 -07:00
Eric Schweitz de2f753810 [flang] add comment per Steve's request in review
Original-commit: flang-compiler/f18@c3a5d6a15e
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
2019-03-27 16:03:52 -07:00
Eric Schweitz 1b7aea8ebc [flang] Change per Jean's review comment
Original-commit: flang-compiler/f18@9a3a79927b
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-27 08:58:59 -07:00
Eric Schweitz dbccd231ba [flang] remove use of undefined behavior
Original-commit: flang-compiler/f18@d7c5879f2c
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-25 19:16:41 -07:00
Eric Schweitz 1410957864 [flang] temporary symbol creation and improve dump routine
check for labels on construct delimiting statements
ifdef out code to avoid warning

Original-commit: flang-compiler/f18@667674aaa0
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-25 09:29:01 -07:00
Eric Schweitz 15d3eb92e5 [flang] remove the DO stub instructions
Original-commit: flang-compiler/f18@f1ddcd8d76
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz f76ba41bb3 [flang] build up expressions implied by DO loop construct
Original-commit: flang-compiler/f18@1e7b9adb62
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz 19ec665cbf [flang] simplify switch builders
Original-commit: flang-compiler/f18@787ee1fecd
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz 84264dc79b [flang] improved output on flat fir
Original-commit: flang-compiler/f18@9be07963a5
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz 9e98210438 [flang] refactor linear representation -> flattened
Original-commit: flang-compiler/f18@4253e2484f
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz 73ee96f7ce [flang] replace GenericExprWrapper with Expr<SomeType>
Original-commit: flang-compiler/f18@0821d00cb8
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
Eric Schweitz 00a3ccd91d [flang] FIR: more code cleanup
Original-commit: flang-compiler/f18@eaac944aca
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
Tree-same-pre-rewrite: false
2019-03-23 11:14:20 -07:00
jeanPerier a556a67930 [flang] Add abstraction layer to fold intrinsic functions with host runtime
Merge pull request flang-compiler/f18#292 from flang-compiler/jpr0

Original-commit: flang-compiler/f18@d24de5513e
2019-03-27 10:16:07 -07:00
Jean Perier 236eeef974 [flang] Only have cmake look for libpgmath if LIBPGMATH_DIR is given
Original-commit: flang-compiler/f18@1d778f5c1a
2019-03-27 10:16:07 -07:00
Jean Perier be5cfaa5c7 [flang] fix clang errors and warnings
Original-commit: flang-compiler/f18@410f96384f
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier cabcd851e6 [flang] Prepare to be merged with master branch
ActualArgument was modified in the master branch from
a struct to class. In order to compile once merged, this PR
required the related access paterns to be adapted to match
the new ActualArgument.
As a consequence, this PR does not compile anymore on its own,
it needs to be merged with the master branch to work.

Original-commit: flang-compiler/f18@48cdd2ed0e
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier 8f0eb89cb6 [flang] Test cases for folding intrinsic function with runtime
Original-commit: flang-compiler/f18@92caee1def
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier 167730fd91 [flang] Enable folding of some more intrinsic functions
Enable folding of the following 80 intrinsic functions:

+ Without runtime:

++ Integer:
abs, dim, dshiftl, dshiftr, exponent, iand, ibclr, ibset, ieor, int,
ior, ishft, kind, len, leadz, maskl, maskr, merge_bits, popcnt, poppar,
shifta, shiftl, shiftr, trailz

++ Real:
abs, aimag, aint, dprod, real

+ Complex:
cmplx, conjg

++ Logical:
bge, bgt, ble, blt

+ With Runtime :

+ Real:
acos, acosh, asinh, atan, atan2, atanh, bessel_j0, bessel_j1,
bessel_jn (elemental), bessel_y0, bessel_y1, bessel_yn (elemental),
cos, cosh, erf, erfc, erfc_scaled, exp, gamma, hypot, log, log10,
log_gamma, mod, sin, sqrt, sinh, sqrt, tan, tanh

++ Complex:
acos, acosh, asin, asinh, atan, atanh, cos, cosh, exp, log, sin,
sinh, sqrt, tan, tanh

Original-commit: flang-compiler/f18@7e7d1920f8
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier dc3cca3427 [flang] make HostIntrinsicProceduresLibrary a class
Original-commit: flang-compiler/f18@b9f5015d4d
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier aeb7cef41a [flang] add the possibility to use libpgmath for constant folding
Original-commit: flang-compiler/f18@948a665627
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier 9147534f13 [flang] Map more intrinsic functions to <cmath> functions
Original-commit: flang-compiler/f18@f0f2062211
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier e3b74caa0d [flang] Move host floating point environment handling in host.h/host.cc
Original-commit: flang-compiler/f18@0cba8b1308
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier ca0261b253 [flang] Removed dynamic loading feature for intrinsic folding
After more reflexion, dynamic loading brings to much uncertainty
regarding which library is actually being use for folding.
It is removed to avoid pushing people to use it.
A static linking to libpgmath will be provided in a later commit.

Original-commit: flang-compiler/f18@2161627d28
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00