Commit graph

381 commits

Author SHA1 Message Date
Jean Perier
958e4e691e [flang] checkpoint character intrinsic folding
Original-commit: flang-compiler/f18@f495ed92bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:43:38 -07:00
Jean Perier
057b6875f7 [flang] Fix 482: do not check floating point environment flags with clang
Original-commit: flang-compiler/f18@fc423c1516
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
Tree-same-pre-rewrite: false
2019-06-06 03:24:35 -07:00
peter klausler
0f1fd64ae5 [flang] Other changes moved to their own branch.
Original-commit: flang-compiler/f18@6a922d085a
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
2019-06-06 13:56:22 -07:00
peter klausler
d8f72a3105 [flang] Placeholder for standard module iso_fortran_env
Original-commit: flang-compiler/f18@386ebb0490
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
Tree-same-pre-rewrite: false
2019-06-06 13:42:33 -07:00
peter klausler
5774f0ab30 [flang] Fix arg specs for CMPLX intrinsic
Original-commit: flang-compiler/f18@3586b8a646
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:25 -07:00
peter klausler
fb1fcbb9cd [flang] Fix LEN(char array), it is not elemental.
Original-commit: flang-compiler/f18@b44eb2e7b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:23 -07:00
peter klausler
d72fd348f7 [flang] Allow some BOZ usage when unambiguous (extension)
Original-commit: flang-compiler/f18@bf3bd54c88
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:12 -07:00
peter klausler
9d5490a561 [flang] Fix spelling of ISHFT
Original-commit: flang-compiler/f18@3c93c40ed5
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:08 -07:00
peter klausler
c3ce68c1ee [flang] Two more fixes made while waiting for code review
Original-commit: flang-compiler/f18@6dc58004ab
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-30 16:14:24 -07:00
peter klausler
535484e2cc [flang] Address review comment
Original-commit: flang-compiler/f18@17be1f6a7d
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-30 15:26:54 -07:00
peter klausler
d49aa3c57c [flang] Final fixes before review
Original-commit: flang-compiler/f18@efe5c1b8ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 16:00:31 -07:00
peter klausler
f4b1209f4b [flang] PRECISION, RANGE, RADIX
Original-commit: flang-compiler/f18@de0bf5a18f
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 15:38:33 -07:00
peter klausler
eff41b8fa7 [flang] Complete folding of intermixed array and component references
Original-commit: flang-compiler/f18@70db03e4ac
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 13:22:35 -07:00
peter klausler
4cd29d1002 [flang] Fix intrinsic folding after merging changes
Original-commit: flang-compiler/f18@a982c34b6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-28 15:42:28 -07:00
peter klausler
d29530e1c4 [flang] Defer conversions to objects; fix some intrinsic table entries
more fixes

Access components of constant structures

Apply implicit typing to dummy args used in automatic array dimensions

SELECTED_INT_KIND and SELECTED_REAL_KIND

Finish SELECTED_{INT,REAL}_KIND and common cases of ALL()/ANY()

Original-commit: flang-compiler/f18@e9f8e53e55
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-28 13:29:29 -07:00
Jean Perier
33d6fb2332 [flang] Make integer divide by zero in constants a fatal error
Original-commit: flang-compiler/f18@e5acff6b63
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false
2019-05-24 07:55:57 -07:00
Jean Perier
49c8d329b7 [flang] Fix support of parenthesized arguments in function folding
Original-commit: flang-compiler/f18@1ecb07cddf
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false
2019-05-24 07:55:44 -07:00
Jean Perier
e5f396511d [flang] fix error message typo
Original-commit: flang-compiler/f18@049163e0d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false
2019-05-23 02:09:58 -07:00
Jean Perier
15630a4ddd [flang] Prevent possible infinte loop in parameter folding
Original-commit: flang-compiler/f18@38360930ce
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false
2019-05-22 08:26:50 -07:00
peter klausler
7026445c07 [flang] Address review comments from Jean (thanks!)
Original-commit: flang-compiler/f18@5183c6196e
Reviewed-on: https://github.com/flang-compiler/f18/pull/466
2019-05-21 10:24:30 -07:00
peter klausler
59342b0641 [flang] work in progress
checkpoint: changes build, tests all pass

many fixes, ready to test more

Further CLASS(*) support

More fixes for CLASS(*)

Hide data members of DynamicType

implement PRESENT() intrinsic

Original-commit: flang-compiler/f18@044ba12c20
Reviewed-on: https://github.com/flang-compiler/f18/pull/466
Tree-same-pre-rewrite: false
2019-05-20 13:37:28 -07:00
peter klausler
d0fcb7681a [flang] Fix crash reported by Tim
Original-commit: flang-compiler/f18@7fe2d197ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/465
2019-05-15 13:23:31 -07:00
peter klausler
40282fabd2 [flang] Add & use mutators for Substring, Triplet, CoarrayRef
Original-commit: flang-compiler/f18@cc2de361fa
Reviewed-on: https://github.com/flang-compiler/f18/pull/449
2019-05-08 10:29:04 -07:00
peter klausler
91de1f62fb [flang] dodge clang build problem with constexpr
Original-commit: flang-compiler/f18@83995a5a98
Reviewed-on: https://github.com/flang-compiler/f18/pull/449
Tree-same-pre-rewrite: false
2019-05-08 10:29:01 -07:00
peter klausler
bb83471e96 [flang] Fix folding of substring
Original-commit: flang-compiler/f18@62dc5e0c93
Reviewed-on: https://github.com/flang-compiler/f18/pull/449
Tree-same-pre-rewrite: false
2019-05-08 10:28:57 -07:00
peter klausler
52d46695fc [flang] Handle remaining cases in expression traversal
Original-commit: flang-compiler/f18@5cb0de58d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/449
Tree-same-pre-rewrite: false
2019-05-08 10:28:56 -07:00
peter klausler
4ffb37e593 [flang] Remove support for Names in messages for now.
Original-commit: flang-compiler/f18@15d38c7059
Reviewed-on: https://github.com/flang-compiler/f18/pull/444
2019-05-07 10:04:21 -07:00
peter klausler
ec6cf76536 [flang] Replace formatting of CharBlock & string
Preserve generated strings until consumed by formatting.

bugfix from premature push

Address review comments

Last fix(?)

Use %s formatting for CharBlocks and strings

Use new formatting and fix usage of std::forward<>()

Use forward_list rather than vector to save strings

Original-commit: flang-compiler/f18@8ea478420f
Reviewed-on: https://github.com/flang-compiler/f18/pull/444
Tree-same-pre-rewrite: false
2019-05-07 09:24:32 -07:00
peter klausler
5a18e79d5a [flang] Remove OwningPointer and ForwardReference
Use std::unique_ptr<> with custom deleter for forward-referenced owned pointer.

Move CopyableIndirection into common, add documentation, clean up.

Remove OwningPointer and ForwardReference

Use std::unique_ptr<> with custom deleter for forward-referenced owned pointer.

Use CopyableIndirection

clean up from merge after split

Complete characterization

fold conversions of arrays

Clean up subscripts to constant arrays

Elemental unary operations complete

Support assumed type TYPE(*) in actual arguments

clean up some TODOs

recognize TYPE(*) arguments to intrinsics

Complete folding of array operations

Finish elementwise array folding, add test, debug

characterize intrinsics, fix some bugs

Clean up build

Type compatibility and shape conformance checks on pointer assignments

Original-commit: flang-compiler/f18@99d734c621
Reviewed-on: https://github.com/flang-compiler/f18/pull/442
Tree-same-pre-rewrite: false
2019-05-06 07:51:07 -07:00
peter klausler
80602cdb74 [flang] Changes from review
Original-commit: flang-compiler/f18@feafc0c216
Reviewed-on: https://github.com/flang-compiler/f18/pull/440
2019-05-03 14:42:33 -07:00
peter klausler
25e6f03443 [flang] lib/evaluate work for structure constructors
Original-commit: flang-compiler/f18@76a192f9c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/439
2019-05-03 11:29:15 -07:00
Tim Keith
510671c8c1 [flang] Distinguish between unanalyzed and error expressions
When an Expr or Variable is analyzed, always fill in a GenericExprWrapper
for it. That now holds the result of expression analysis which is
std::nullopt when there is an error.

After the ExprChecker pass has finished, the typedExpr data member of
Variables and top-level Exprs should be filled in. Assert that is the
case when we access them.

Original-commit: flang-compiler/f18@192a4e0855
Reviewed-on: https://github.com/flang-compiler/f18/pull/424
Tree-same-pre-rewrite: false
2019-04-19 17:14:50 -07:00
peter klausler
6d93fd2e54 [flang] Fix flang-compiler/f18#425, build fail with libc++
Original-commit: flang-compiler/f18@96a553b189
Reviewed-on: https://github.com/flang-compiler/f18/pull/426
2019-04-22 10:10:27 -07:00
peter klausler
146e13ce22 [flang] Fold array operations
Original-commit: flang-compiler/f18@e6c86ecfd1
Reviewed-on: https://github.com/flang-compiler/f18/pull/420
2019-04-18 14:48:05 -07:00
peter klausler
f832a4d3ee [flang] Return a missing result
Original-commit: flang-compiler/f18@04f9fd39b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/419
2019-04-18 14:27:59 -07:00
peter klausler
e58aa3837f [flang] Use Attr_enumSize rather than an arbitrary 32.
Original-commit: flang-compiler/f18@b6de9c6e47
Reviewed-on: https://github.com/flang-compiler/f18/pull/419
Tree-same-pre-rewrite: false
2019-04-18 14:25:22 -07:00
peter klausler
1cc33da57e [flang] More work on classes to represent characteristics of procedures.
Original-commit: flang-compiler/f18@abd3922a88
Reviewed-on: https://github.com/flang-compiler/f18/pull/419
Tree-same-pre-rewrite: false
2019-04-18 13:25:20 -07:00
peter klausler
bfb65b5476 [flang] Address review comments
Original-commit: flang-compiler/f18@7bc3c97f1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/416
Tree-same-pre-rewrite: false
2019-04-16 12:29:00 -07:00
Jean Perier
d8182b9089 [flang] Remove user warning messages for lack of subnormal HW flushing
Original-commit: flang-compiler/f18@4aecc1bcee
2019-04-15 01:54:35 -07:00
Jean Perier
db57831869 [flang] also fix accessor name
Original-commit: flang-compiler/f18@6ff8d22a57
Tree-same-pre-rewrite: false
2019-04-15 01:18:41 -07:00
Jean Perier
2aad0564cb [flang] address comment. Follow style guideline
Original-commit: flang-compiler/f18@60da44dc7d
Tree-same-pre-rewrite: false
2019-04-15 01:18:40 -07:00
Jean Perier
44e0c5084d [flang] Add software subnormal flusing around host library call for host arch that do not support it
Original-commit: flang-compiler/f18@04555f5359
Tree-same-pre-rewrite: false
2019-04-15 01:18:40 -07:00
peter klausler
ba2ef03a02 [flang] pass all tests
Original-commit: flang-compiler/f18@3cee1993a1
Reviewed-on: https://github.com/flang-compiler/f18/pull/406
Tree-same-pre-rewrite: false
2019-04-15 09:41:50 -07:00
Paul Osmialowski
ebd3759f64 [flang] AArch64: Set flushing mode for subnormals on glibc and bionic based systems
Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>

Original-commit: flang-compiler/f18@4881e3a91c
Reviewed-on: https://github.com/flang-compiler/f18/pull/397
2019-04-10 17:11:03 +01:00
Tim Keith
4ee3386c8f [flang] Clean up includes
indirection.h: Doesn't need ../common because it is in common.

expression.h: ../lib is the wrong path but the includes are needed.
They were probably coming in indirectly through other includes.

token-parsers.h: Include was not needed and parser shouldn't have
dependency on evaluate.

Original-commit: flang-compiler/f18@86f6b0023d
Reviewed-on: https://github.com/flang-compiler/f18/pull/405
2019-04-11 16:12:10 -07:00
peter klausler
4950dfa04e [flang] Redo without macros
Original-commit: flang-compiler/f18@8d955cfb3b
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
2019-04-09 13:29:40 -07:00
peter klausler
8057a2ce32 [flang] Lots of debugging and refinement
Original-commit: flang-compiler/f18@1c3c30b540
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 16:16:55 -07:00
peter klausler
dc9c3d1c46 [flang] Fix bug#389, prevent std::move() on forwarded lvalue references
Original-commit: flang-compiler/f18@9d61c091ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 14:29:45 -07:00
peter klausler
94d0b8fb0a [flang] Address review comments
Original-commit: flang-compiler/f18@20cef2db45
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
2019-04-05 15:19:13 -07:00
peter klausler
5c3197fa0b [flang] Fix implied DO folding with negative strides, add test
Original-commit: flang-compiler/f18@2e14b76041
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:58:19 -07:00