platform/upstream/llvm.git
5 years ago[flang] checkpoint
peter klausler [Fri, 30 Nov 2018 23:23:33 +0000 (15:23 -0800)]
[flang] checkpoint

Original-commit: flang-compiler/f18@1c65ed9a6f73b3b70a7cb6e023e55e196bf1dd4f
Reviewed-on: https://github.com/flang-compiler/f18/pull/234
Tree-same-pre-rewrite: false

5 years ago[flang] checkpoint during refactor
peter klausler [Fri, 30 Nov 2018 22:03:05 +0000 (14:03 -0800)]
[flang] checkpoint during refactor

Original-commit: flang-compiler/f18@01fe82b95bebb5977fb5fa9c90ea1b8a6894a18c
Reviewed-on: https://github.com/flang-compiler/f18/pull/234
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#233 from flang-compiler/pmk1
Peter Klausler [Thu, 29 Nov 2018 21:39:51 +0000 (13:39 -0800)]
[flang] Merge pull request flang-compiler/f18#233 from flang-compiler/pmk1

small TODO: eliminate per-specialization flag in expression type representation

Original-commit: flang-compiler/f18@03a2a10a48149432d69e5ad0af24d033e094ced7
Reviewed-on: https://github.com/flang-compiler/f18/pull/233

5 years ago[flang] address TODO: replace Type flag member with IsSpecificIntrinsicType<T> predicate
peter klausler [Thu, 29 Nov 2018 18:25:46 +0000 (10:25 -0800)]
[flang] address TODO: replace Type flag member with IsSpecificIntrinsicType<T> predicate

Original-commit: flang-compiler/f18@68b89c008ffb8df9e706633c09a2257d0e970bb9
Reviewed-on: https://github.com/flang-compiler/f18/pull/233

5 years ago[flang] Merge pull request flang-compiler/f18#230 from flang-compiler/tsk2
Tim Keith [Thu, 29 Nov 2018 20:27:34 +0000 (12:27 -0800)]
[flang] Merge pull request flang-compiler/f18#230 from flang-compiler/tsk2

Add mapping of source location to Scope

Original-commit: flang-compiler/f18@bec1cfdc05bacefa000dccfec78670affce3f1be
Reviewed-on: https://github.com/flang-compiler/f18/pull/230

5 years ago[flang] Add ExtendToCover() to CharBlock and Interval
Tim Keith [Thu, 29 Nov 2018 17:10:19 +0000 (09:10 -0800)]
[flang] Add ExtendToCover() to CharBlock and Interval

Use them in Scope::AddSourceRange().

Original-commit: flang-compiler/f18@ec2f6db46a42998ee1b1bed955538387fadf5c09
Reviewed-on: https://github.com/flang-compiler/f18/pull/230

5 years ago[flang] Add mapping of source location to Scope
Tim Keith [Wed, 28 Nov 2018 23:55:55 +0000 (15:55 -0800)]
[flang] Add mapping of source location to Scope

Each Scope now tracks the source locations that it and its nested scopes
span. This is achieved by extending the source range of a scope for each
statement encountered while it is the current scope.

Semantics::FindScope maps a source location (from the cooked character
stream) to the narrowest scope that contains it.

Original-commit: flang-compiler/f18@7b4d2bb113e4a1018c5f6aa740b02e423ff61799
Reviewed-on: https://github.com/flang-compiler/f18/pull/230
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#232 from flang-compiler/tsk9
Tim Keith [Thu, 29 Nov 2018 20:26:57 +0000 (12:26 -0800)]
[flang] Merge pull request flang-compiler/f18#232 from flang-compiler/tsk9

Change formatting of common::visitors{}

Original-commit: flang-compiler/f18@a442658ec57157ea40d06d24e8a814648d19cf5e
Reviewed-on: https://github.com/flang-compiler/f18/pull/232

5 years ago[flang] Change formatting of common::visitors{}
Tim Keith [Thu, 29 Nov 2018 17:27:34 +0000 (09:27 -0800)]
[flang] Change formatting of common::visitors{}

Including a comma after the last lambda in a `common::visitors{}` list
causes clang-format to do a better job of formatting them.

Add that recommendation to C++style.md, insert the missing commas,
and reformat the changed files.

Original-commit: flang-compiler/f18@a2486ca3b6daf6cfc3a5cf95ad89719297d04b72
Reviewed-on: https://github.com/flang-compiler/f18/pull/232

5 years ago[flang] Merge pull request flang-compiler/f18#231 from flang-compiler/pmk0
Peter Klausler [Thu, 29 Nov 2018 17:36:34 +0000 (09:36 -0800)]
[flang] Merge pull request flang-compiler/f18#231 from flang-compiler/pmk0

Lossless binary floating-point -> decimal, and correct decimal -> binary FP

Original-commit: flang-compiler/f18@57cf544a089eaac266c3b8e5d153722f0d142e15
Reviewed-on: https://github.com/flang-compiler/f18/pull/231

5 years ago[flang] dodge gcc warning on test
peter klausler [Thu, 29 Nov 2018 00:44:38 +0000 (16:44 -0800)]
[flang] dodge gcc warning on test

Original-commit: flang-compiler/f18@10e9a820885a3fa91e4f60dd95f810527a5c6bc3
Reviewed-on: https://github.com/flang-compiler/f18/pull/231

5 years ago[flang] tested
peter klausler [Thu, 29 Nov 2018 00:20:16 +0000 (16:20 -0800)]
[flang] tested

Original-commit: flang-compiler/f18@e77681a2ff914284f5cd969f403c966fd5f770b7
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false

5 years ago[flang] debugged full precision FP formatting
peter klausler [Wed, 28 Nov 2018 17:13:01 +0000 (09:13 -0800)]
[flang] debugged full precision FP formatting

Original-commit: flang-compiler/f18@ac9a684b910e6bf3f32496883b16d6b3e547169e
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false

5 years ago[flang] debugging
peter klausler [Wed, 28 Nov 2018 00:23:07 +0000 (16:23 -0800)]
[flang] debugging

Original-commit: flang-compiler/f18@9f30eac130514fa04212d402734d41c63078bb9e
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false

5 years ago[flang] initial exact decimal conversion code
peter klausler [Mon, 26 Nov 2018 19:18:53 +0000 (11:18 -0800)]
[flang] initial exact decimal conversion code

Original-commit: flang-compiler/f18@a34afdc73b8ca43cb20234849a2e9d3f77bbc8e6
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#229 from flang-compiler/pmk1
Peter Klausler [Wed, 28 Nov 2018 18:31:41 +0000 (10:31 -0800)]
[flang] Merge pull request flang-compiler/f18#229 from flang-compiler/pmk1

document C++17 feature usage

Original-commit: flang-compiler/f18@d1d18fad363f6e59c8c18e2db5a41a8474751a83
Reviewed-on: https://github.com/flang-compiler/f18/pull/229

5 years ago[flang] proofreading
peter klausler [Mon, 26 Nov 2018 20:46:11 +0000 (12:46 -0800)]
[flang] proofreading

Original-commit: flang-compiler/f18@2af5c40bc144cdf180dd3eef19ffa697a68f4fc1
Reviewed-on: https://github.com/flang-compiler/f18/pull/229

5 years ago[flang] document C++17 feature usage
peter klausler [Mon, 26 Nov 2018 20:42:11 +0000 (12:42 -0800)]
[flang] document C++17 feature usage

Original-commit: flang-compiler/f18@40d84ca20f1b7f53661fa1101646f7071a4cb962
Reviewed-on: https://github.com/flang-compiler/f18/pull/229
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#228 from flang-compiler/pmk0
Peter Klausler [Mon, 19 Nov 2018 22:49:57 +0000 (14:49 -0800)]
[flang] Merge pull request flang-compiler/f18#228 from flang-compiler/pmk0

Extend `AnalyzeExpr` to handle wrapped expression parse trees

Original-commit: flang-compiler/f18@7ddf0c159f70d189dbfa38fa4369b3101fa453ae
Reviewed-on: https://github.com/flang-compiler/f18/pull/228

5 years ago[flang] Analyze wrapped expressions
peter klausler [Mon, 19 Nov 2018 19:14:41 +0000 (11:14 -0800)]
[flang] Analyze wrapped expressions

Original-commit: flang-compiler/f18@b34db5d38f03b11b85890696569a22d506a98736
Reviewed-on: https://github.com/flang-compiler/f18/pull/228

5 years ago[flang] fix comments
peter klausler [Mon, 19 Nov 2018 18:29:04 +0000 (10:29 -0800)]
[flang] fix comments

Original-commit: flang-compiler/f18@a01eaaacc2af1caffeb0a788eecf3cb25f230c64
Reviewed-on: https://github.com/flang-compiler/f18/pull/228
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#226 from flang-compiler/pmk2
Peter Klausler [Thu, 15 Nov 2018 00:12:23 +0000 (16:12 -0800)]
[flang] Merge pull request flang-compiler/f18#226 from flang-compiler/pmk2

fix issue#224

Original-commit: flang-compiler/f18@cd6e4f0adaecde8d58e03c67542f9a9b6c3b68d2
Reviewed-on: https://github.com/flang-compiler/f18/pull/226

5 years ago[flang] fix issue#224
peter klausler [Wed, 14 Nov 2018 23:44:17 +0000 (15:44 -0800)]
[flang] fix issue#224

Original-commit: flang-compiler/f18@c40e197c61c8192fe7932932390417c8b47f79c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/226

5 years ago[flang] Merge pull request flang-compiler/f18#225 from flang-compiler/pmk1
Peter Klausler [Wed, 14 Nov 2018 23:23:40 +0000 (15:23 -0800)]
[flang] Merge pull request flang-compiler/f18#225 from flang-compiler/pmk1

Roll up a bunch of changes

Original-commit: flang-compiler/f18@9ad19cd89298a3d4a4d468145b8a5dffec8b936d
Reviewed-on: https://github.com/flang-compiler/f18/pull/225

5 years ago[flang] review comments
peter klausler [Wed, 14 Nov 2018 22:35:10 +0000 (14:35 -0800)]
[flang] review comments

Original-commit: flang-compiler/f18@32c02cb668f17e31061c3f52c834e4029e410381
Reviewed-on: https://github.com/flang-compiler/f18/pull/225

5 years ago[flang] bugfixing and review comments
peter klausler [Wed, 14 Nov 2018 19:57:47 +0000 (11:57 -0800)]
[flang] bugfixing and review comments

Original-commit: flang-compiler/f18@6df4a52d6bb2575c3eb4726b633a0cf98da0d298
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] bugfixing from regression testing
peter klausler [Wed, 14 Nov 2018 19:12:09 +0000 (11:12 -0800)]
[flang] bugfixing from regression testing

Original-commit: flang-compiler/f18@f1bcaa0292cb0eec2fdc10df347b78c2329a379e
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] remove unused variable
peter klausler [Wed, 14 Nov 2018 00:26:26 +0000 (16:26 -0800)]
[flang] remove unused variable

Original-commit: flang-compiler/f18@64773cef2c1b31a72fb61c2cdc8dce7eeddefffe
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] revamp Real::Read(), use it for mutual testing of ScaledDecimals
peter klausler [Wed, 14 Nov 2018 00:02:52 +0000 (16:02 -0800)]
[flang] revamp Real::Read(), use it for mutual testing of ScaledDecimals

Original-commit: flang-compiler/f18@a2054bb9dfa3753f49ab7d35c842ed47b41fc374
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] binary->decimal conversion for module files
peter klausler [Tue, 13 Nov 2018 19:29:54 +0000 (11:29 -0800)]
[flang] binary->decimal conversion for module files

Original-commit: flang-compiler/f18@6364799e7adda3b6b5280b0305d55a2bfa7eabe0
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] save work in progress
peter klausler [Thu, 8 Nov 2018 17:32:28 +0000 (09:32 -0800)]
[flang] save work in progress

Original-commit: flang-compiler/f18@98bac3d297af460ae80467f257f724cd7b041dbd
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] Rename Dump() as AsFortran(), tweak output for use in .mod files
peter klausler [Mon, 5 Nov 2018 23:02:37 +0000 (15:02 -0800)]
[flang] Rename Dump() as AsFortran(), tweak output for use in .mod files

Original-commit: flang-compiler/f18@4e9dd16d6a84c728a86e187fe59500638ebbfe35
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] fix warning
peter klausler [Mon, 5 Nov 2018 22:08:17 +0000 (14:08 -0800)]
[flang] fix warning

Original-commit: flang-compiler/f18@92003070de18bc7f4b78a8b00d72c324a554d523
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] multi-byte character TODOs
peter klausler [Mon, 5 Nov 2018 21:48:00 +0000 (13:48 -0800)]
[flang] multi-byte character TODOs

Original-commit: flang-compiler/f18@3bd2d227dc4c6c3f6d721e95c8cd07075021f462
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] more substring clean-up
peter klausler [Fri, 2 Nov 2018 23:42:45 +0000 (16:42 -0700)]
[flang] more substring clean-up

Original-commit: flang-compiler/f18@e1c19ccd168f2dc3f9df9ab9328bdc6bbb61a5b4
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] documentation
peter klausler [Fri, 2 Nov 2018 21:48:28 +0000 (14:48 -0700)]
[flang] documentation

Original-commit: flang-compiler/f18@92f0c397f658a865ecab347b31773999f6503693
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] documentation
peter klausler [Fri, 2 Nov 2018 21:38:27 +0000 (14:38 -0700)]
[flang] documentation

Original-commit: flang-compiler/f18@9aba35a2582bbb8100a275d701e3013dfa478c45
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] BaseObjects and static data placeholder
peter klausler [Fri, 2 Nov 2018 21:13:12 +0000 (14:13 -0700)]
[flang] BaseObjects and static data placeholder

Original-commit: flang-compiler/f18@3ddfd5cadfafffe9c58cedd7a625cd071820c79c
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] update pointer documentation
peter klausler [Fri, 2 Nov 2018 17:48:20 +0000 (10:48 -0700)]
[flang] update pointer documentation

Original-commit: flang-compiler/f18@0f04468c000f23f606d8cf14348af7ee318fd298
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] small tweaks
peter klausler [Thu, 1 Nov 2018 19:39:09 +0000 (12:39 -0700)]
[flang] small tweaks

Original-commit: flang-compiler/f18@5bbd6c3c1995edf5ee909648e517ca3dde2560e0
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] take literal substrings out of variable.h
peter klausler [Thu, 1 Nov 2018 18:18:12 +0000 (11:18 -0700)]
[flang] take literal substrings out of variable.h

Original-commit: flang-compiler/f18@a762b70bebc5428adec75b85801aef8ee88bcf42
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] allow array constructors in all expressions
peter klausler [Tue, 30 Oct 2018 23:25:10 +0000 (16:25 -0700)]
[flang] allow array constructors in all expressions

Original-commit: flang-compiler/f18@6dd5431cd9a0da203f098487a7d5db379c64b3ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] represent array constructors
peter klausler [Tue, 30 Oct 2018 22:24:35 +0000 (15:24 -0700)]
[flang] represent array constructors

Original-commit: flang-compiler/f18@74ccff6b39972ada3d344ae8ee72d4c18842d35c
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] Clean up Designator and GetSymbol()
peter klausler [Tue, 30 Oct 2018 20:30:56 +0000 (13:30 -0700)]
[flang] Clean up Designator and GetSymbol()

Original-commit: flang-compiler/f18@61c0af323c13f7ad97521332603497d21638e2f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] Make all Expr<> instances derived from ExpressionBase
peter klausler [Tue, 30 Oct 2018 19:44:09 +0000 (12:44 -0700)]
[flang] Make all Expr<> instances derived from ExpressionBase

Original-commit: flang-compiler/f18@f7d1a21532a51dc10aa7a8fd775e3404320986a6
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] Address TODO: define IsAssumedRank predicate, use it
peter klausler [Mon, 29 Oct 2018 22:25:35 +0000 (15:25 -0700)]
[flang] Address TODO: define IsAssumedRank predicate, use it

Original-commit: flang-compiler/f18@f75c3e0ccfc763644afc3b0fe37861e3a5adcdd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#222 from flang-compiler/jpr0
jeanPerier [Thu, 8 Nov 2018 10:37:53 +0000 (11:37 +0100)]
[flang] Merge pull request flang-compiler/f18#222 from flang-compiler/jpr0

C interoperability: Fixes CFI_CDESC_T macro and CFI_establish function

Original-commit: flang-compiler/f18@e104912ef1f146817b411162e8a657e504a8fc82
Reviewed-on: https://github.com/flang-compiler/f18/pull/222

5 years ago[flang] Simplified C++ CFI_CDESC_T implem. Added local namespace around
Jean Perier [Wed, 7 Nov 2018 10:27:04 +0000 (02:27 -0800)]
[flang] Simplified C++ CFI_CDESC_T implem. Added local namespace around

Original-commit: flang-compiler/f18@456f5a09949701b74b02834668f161bbb5d68009
Reviewed-on: https://github.com/flang-compiler/f18/pull/222

5 years ago[flang] Changed CFI_CDESC_T macro in C++. Cleaned related tests.
Jean Perier [Tue, 6 Nov 2018 17:06:10 +0000 (09:06 -0800)]
[flang] Changed CFI_CDESC_T macro in C++. Cleaned related tests.

Original-commit: flang-compiler/f18@752f8eefa0cdf310afcdab50241885a644ea2fb4
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false

5 years ago[flang] Fixed CFI_establish. Improved and renamed related test suit
Jean Perier [Mon, 5 Nov 2018 15:07:18 +0000 (07:07 -0800)]
[flang] Fixed CFI_establish. Improved and renamed related test suit

Original-commit: flang-compiler/f18@b75d858e4f96c21da67a8c7ecc4d4bdbcc9c8498
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false

5 years ago[flang] Fixed CFI_DESC_T macro. Started unit test for C interop
Jean Perier [Fri, 2 Nov 2018 16:42:35 +0000 (09:42 -0700)]
[flang] Fixed CFI_DESC_T macro. Started unit test for C interop

Original-commit: flang-compiler/f18@f29b80c7582f6b5f18ca26f6fd9466da56479664
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#223 from flang-compiler/tsk5
Tim Keith [Wed, 7 Nov 2018 20:43:56 +0000 (12:43 -0800)]
[flang] Merge pull request flang-compiler/f18#223 from flang-compiler/tsk5

Resolve expressions in symbols

Original-commit: flang-compiler/f18@6f253b5514740198bf732aa2e269e97de34d2888
Reviewed-on: https://github.com/flang-compiler/f18/pull/223

5 years ago[flang] Address review comments
Tim Keith [Wed, 7 Nov 2018 20:41:52 +0000 (12:41 -0800)]
[flang] Address review comments

Change `const Symbol *` to `const Symbol &`.
Simplify expression for `Assumed()` and `Deferred()` in `ParamValue`.

Original-commit: flang-compiler/f18@b3e76706ca72b5d324c96bee4db8efae34e3135e
Reviewed-on: https://github.com/flang-compiler/f18/pull/223

5 years ago[flang] Resolve expressions in symbols
Tim Keith [Wed, 7 Nov 2018 01:18:06 +0000 (17:18 -0800)]
[flang] Resolve expressions in symbols

Add `LazyExpr` class to represent expressions in the symbol table.
Initially they contain a pointer to an expression in the parse tree.
After name resolution is complete and symbols are filled in in the parse
tree, `LazyExpr`s are resolved to `evaluate::Expr<evaluate::SomeType>`.
This is done by `ResolveSymbolExprs()`.

Change `Bound` and `ParamValue` to save their value as a `LazyExpr`.
Change `ObjectEntityDetails` and `TypeParamDetails` to save the initial
value as a `LazyExpr`.

Eliminate `IntExpr` and `IntConst` classes, which were just place-holders.

Add `Clone()` to `ShapeSpec`, `Bound`, `LazyExpr`. Normally they should
be moved but in `ObjectEntityDetails::set_shape()` we need to make copies.

Save type parameter values in `derivedTypeSpec_`. `typeParamValue_` is
not needed.

Write out initial values, type parameter values, and bounds to .mod files.

Evaluate parameter values in expressions.

Make some errors non-fatal so that tests can continue to pass.

Original-commit: flang-compiler/f18@b90cadfc53c6e31c5f289eadc382bc3908811b86
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false

5 years ago[flang] Remove include of symbol.h from variable.h
Tim Keith [Wed, 7 Nov 2018 01:12:02 +0000 (17:12 -0800)]
[flang] Remove include of symbol.h from variable.h

This include will lead to circularities when semantics/type.h needs
include evaluate/expression.h. There will probably be a different
long-term solution.

Original-commit: flang-compiler/f18@c7fa8150368f7d3a9bb200fc5502ece0a99a8631
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false

5 years ago[flang] Use forward declarations to reduce includes
Tim Keith [Mon, 5 Nov 2018 23:03:46 +0000 (15:03 -0800)]
[flang] Use forward declarations to reduce includes

Original-commit: flang-compiler/f18@384af49342fbf767d63fe2a6eb8fa8a9a790f91d
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false

5 years ago[flang] Move Details rather than copying
Tim Keith [Mon, 5 Nov 2018 22:36:11 +0000 (14:36 -0800)]
[flang] Move Details rather than copying

We don't need to copy the various Details classes. We will be adding
expressions to some of them (e.g. for bounds or initial values) and they
should generally be moved as well.

In check-do-concurrent.cc, put pointers to Symbols in the symbol
collections rather than copies.

Original-commit: flang-compiler/f18@cdedfc9b3ee554bf6b1f94adbbb92f8a515e1cbd
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#221 from flang-compiler/pmk0
Peter Klausler [Thu, 1 Nov 2018 22:06:22 +0000 (15:06 -0700)]
[flang] Merge pull request flang-compiler/f18#221 from flang-compiler/pmk0

Document various pointer-like abstractions

Original-commit: flang-compiler/f18@11b472741de3465a3ecd915276b3f6517baa0bbf
Reviewed-on: https://github.com/flang-compiler/f18/pull/221

5 years ago[flang] address review comment
peter klausler [Thu, 1 Nov 2018 22:06:01 +0000 (15:06 -0700)]
[flang] address review comment

Original-commit: flang-compiler/f18@b5da6b44928d08befaf8a1a1bd6b88cda59e7b21
Reviewed-on: https://github.com/flang-compiler/f18/pull/221

5 years ago[flang] document pointer variations
peter klausler [Thu, 1 Nov 2018 20:43:24 +0000 (13:43 -0700)]
[flang] document pointer variations

Original-commit: flang-compiler/f18@4c718f56646b8522584dd2d3c23defcaf0c82c25
Reviewed-on: https://github.com/flang-compiler/f18/pull/221
Tree-same-pre-rewrite: false

5 years ago[flang] document pointer variations
peter klausler [Thu, 1 Nov 2018 20:18:28 +0000 (13:18 -0700)]
[flang] document pointer variations

Original-commit: flang-compiler/f18@70c55eb1eb75e73165a62821f2666c31270235de
Reviewed-on: https://github.com/flang-compiler/f18/pull/221
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#219 from flang-compiler/pmk0
Peter Klausler [Mon, 29 Oct 2018 16:56:25 +0000 (09:56 -0700)]
[flang] Merge pull request flang-compiler/f18#219 from flang-compiler/pmk0

A refactoring of folding

Original-commit: flang-compiler/f18@a056aaabbbb78e64432393467404d84e253a9ece
Reviewed-on: https://github.com/flang-compiler/f18/pull/219

5 years ago[flang] readability improvement from Tim
peter klausler [Mon, 29 Oct 2018 16:26:33 +0000 (09:26 -0700)]
[flang] readability improvement from Tim

Original-commit: flang-compiler/f18@14179ead7c3aa5a3b26c14b636d78f9f12523529
Reviewed-on: https://github.com/flang-compiler/f18/pull/219

5 years ago[flang] Back out needless macro change that led to clang-format grief
peter klausler [Fri, 26 Oct 2018 23:31:20 +0000 (16:31 -0700)]
[flang] Back out needless macro change that led to clang-format grief

Original-commit: flang-compiler/f18@5a6e55df1163348b3800e088b4dd0dacd01c1973
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] clean up comments, put out for review
peter klausler [Fri, 26 Oct 2018 22:55:28 +0000 (15:55 -0700)]
[flang] clean up comments, put out for review

Original-commit: flang-compiler/f18@26a3221fc40ca0c3047c11b731426d270e072880
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] prepare for merge
peter klausler [Fri, 26 Oct 2018 22:13:30 +0000 (15:13 -0700)]
[flang] prepare for merge

Original-commit: flang-compiler/f18@5d2490b1c8af0870ad1d399fce7c500f5d07e6be
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] Complete refactor of Fold() - checkpoint
peter klausler [Fri, 26 Oct 2018 22:10:24 +0000 (15:10 -0700)]
[flang] Complete refactor of Fold() - checkpoint

Original-commit: flang-compiler/f18@5061171268ef6a4552aa365642d3f5ad120f871f
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] merge
peter klausler [Wed, 24 Oct 2018 21:54:53 +0000 (14:54 -0700)]
[flang] merge

Original-commit: flang-compiler/f18@d0cd9544f54e8fc841bb16d00841b6ace2f548ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] complete new Fold
peter klausler [Wed, 24 Oct 2018 21:06:46 +0000 (14:06 -0700)]
[flang] complete new Fold

Original-commit: flang-compiler/f18@4d1726778f193c8813a8cc63fad0b46faf8d2fec
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] dodge gcc 7.2.0 build hiccup
peter klausler [Wed, 24 Oct 2018 17:43:30 +0000 (10:43 -0700)]
[flang] dodge gcc 7.2.0 build hiccup

Original-commit: flang-compiler/f18@4a9e862d74f134241a0e1a9cd3fc3562041b3f74
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] merge with master
peter klausler [Wed, 24 Oct 2018 00:05:24 +0000 (17:05 -0700)]
[flang] merge with master

Original-commit: flang-compiler/f18@53f15da06aab657e94ecea342ef77a07e5e38a27
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] new refactored Fold
peter klausler [Tue, 23 Oct 2018 23:48:06 +0000 (16:48 -0700)]
[flang] new refactored Fold

Original-commit: flang-compiler/f18@061868fd857b255f8c1b49f3cb300666f5e1edda
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] start refactoring of Constant and Fold
peter klausler [Mon, 22 Oct 2018 22:20:42 +0000 (15:20 -0700)]
[flang] start refactoring of Constant and Fold

Original-commit: flang-compiler/f18@53f7174c3dddd743146e1cff9ffcde0db4c89b6b
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] Refactor some lib/evaluate headers for sanity
peter klausler [Thu, 18 Oct 2018 20:03:51 +0000 (13:03 -0700)]
[flang] Refactor some lib/evaluate headers for sanity

Original-commit: flang-compiler/f18@9530378c39d0206a93eafd7d19b7f52c82e8f904
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] rearrange arguments into dummy argument order
peter klausler [Thu, 18 Oct 2018 17:50:55 +0000 (10:50 -0700)]
[flang] rearrange arguments into dummy argument order

Original-commit: flang-compiler/f18@3bab0f55de1b66d38bd15a841459c3a36cf29d30
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] refactor a bit, and rearrange actual arguments into dummy order on intrinsic...
peter klausler [Wed, 17 Oct 2018 22:09:48 +0000 (15:09 -0700)]
[flang] refactor a bit, and rearrange actual arguments into dummy order on intrinsic calls

Original-commit: flang-compiler/f18@1f50ace68b00a7db4b75ebce5616032501e48457
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] Use Attrs for intrinsic results rather than flags.
peter klausler [Tue, 16 Oct 2018 23:36:43 +0000 (16:36 -0700)]
[flang] Use Attrs for intrinsic results rather than flags.

Original-commit: flang-compiler/f18@14c9199718138dee4b8cf1e673935f794c366ac1
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#218 from flang-compiler/tsk2
Tim Keith [Fri, 26 Oct 2018 18:58:13 +0000 (11:58 -0700)]
[flang] Merge pull request flang-compiler/f18#218 from flang-compiler/tsk2

More name resolution for submodules

Original-commit: flang-compiler/f18@f574667aaad4fe1135d3427df6a21b8b0adcbb12
Reviewed-on: https://github.com/flang-compiler/f18/pull/218

5 years ago[flang] Address review comments
Tim Keith [Fri, 26 Oct 2018 18:57:08 +0000 (11:57 -0700)]
[flang] Address review comments

Original-commit: flang-compiler/f18@c3597a1984811900ef8da55f15374417373f5492
Reviewed-on: https://github.com/flang-compiler/f18/pull/218

5 years ago[flang] Process SeparateModuleSubprogram during name resolution
Tim Keith [Fri, 26 Oct 2018 14:34:50 +0000 (07:34 -0700)]
[flang] Process SeparateModuleSubprogram during name resolution

When a SeparateModuleSubprogram is encountered, check that there is a
corresponding declaration in the current module/submodule or an ancestor.
When it's the current program unit, special handling is required to
avoid trying to declare it again.

Module subprograms with the `MODULE` prefix are handled similarly.
The `hasModulePrefix` flag is passed in to `BeginSubprogram` to
distinguish this case.

Extract common part of `Post(SubroutineStmt)` and `Post(FunctionStmt)` into
`PostSubprogramStmt`. Add code there to ensure that separate module
procedures do not have `EXTERNAL` set. This requires a fix to `ModFileWriter`
to correctly decide when a subprogram is declared in an interface block.

Extract `WalkSubprogramPart` into a separate function. It walks the
internal or module subprograms collecting their names. It is needed to
handle separate module subprograms.

Original-commit: flang-compiler/f18@339b65f2517cebc115eba4ce91c1d8b304802939
Reviewed-on: https://github.com/flang-compiler/f18/pull/218
Tree-same-pre-rewrite: false

5 years ago[flang] Reformat and add comment
Tim Keith [Wed, 24 Oct 2018 00:13:59 +0000 (17:13 -0700)]
[flang] Reformat and add comment

Original-commit: flang-compiler/f18@524f224adc98472ce33afa38dc9513b4b26f1f93
Reviewed-on: https://github.com/flang-compiler/f18/pull/218
Tree-same-pre-rewrite: false

5 years ago[flang] Fix failure to resolve submodule name.
Tim Keith [Wed, 24 Oct 2018 00:09:26 +0000 (17:09 -0700)]
[flang] Fix failure to resolve submodule name.

If we have `SUBMODULE(m:s1) s2` and `s1` is already in memory (i.e. does
not need to be read from the `m-s1.mod` file), we still need to record
the fact that the name is a reference to that module symbol.

Original-commit: flang-compiler/f18@4bb42ed6a4f7da9772903bd411146b989aff8367
Reviewed-on: https://github.com/flang-compiler/f18/pull/218
Tree-same-pre-rewrite: false

5 years ago[flang] Fix bug with popping scopes.
Tim Keith [Wed, 24 Oct 2018 00:05:12 +0000 (17:05 -0700)]
[flang] Fix bug with popping scopes.

Processing a SUBMODULE can cause any number of scopes to be pushed on
the scope stack. We don't know how many to pop at the end, so add
`ClearScopes()` to reset the scope stack to its original state.

Original-commit: flang-compiler/f18@0be4cebd66b81281bfa07016eb2b1393cf271e69
Reviewed-on: https://github.com/flang-compiler/f18/pull/218
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#217 from flang-compiler/namespace-comme...
jeanPerier [Fri, 26 Oct 2018 09:18:57 +0000 (11:18 +0200)]
[flang] Merge pull request flang-compiler/f18#217 from flang-compiler/namespace-comment-removal

Format Style Change: Removed namespace comments after closing brace

Original-commit: flang-compiler/f18@dcca71aae29def7d7db6a1a787a273a6fb393b23
Reviewed-on: https://github.com/flang-compiler/f18/pull/217

5 years ago[flang] Changed .clang-format so that it will not add a comment after the closing...
Jean Perier [Thu, 25 Oct 2018 12:55:23 +0000 (05:55 -0700)]
[flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files

Original-commit: flang-compiler/f18@aa7f55e15f78909ba8401f85e023ee4c3eaa923f
Reviewed-on: https://github.com/flang-compiler/f18/pull/217

5 years ago[flang] Merge pull request flang-compiler/f18#216 from flang-compiler/tsk4
Tim Keith [Thu, 25 Oct 2018 18:44:37 +0000 (11:44 -0700)]
[flang] Merge pull request flang-compiler/f18#216 from flang-compiler/tsk4

Fix bug in rewriting function reference

Original-commit: flang-compiler/f18@22f25eadc7e0849bba3601a53ac331903ef5c203
Reviewed-on: https://github.com/flang-compiler/f18/pull/216

5 years ago[flang] Fix bug in rewriting function reference
Tim Keith [Wed, 24 Oct 2018 20:38:45 +0000 (13:38 -0700)]
[flang] Fix bug in rewriting function reference

`a(i)` is parsed as a function reference and needs to be converted to an
array element reference when `a` is an object entity. That determination
was wrong if the symbol for `a` was a symbol representing host-association
or use-association. In that case we need to get to the original symbol
by calling `GetUltimate()` on the symbol.

This was causing symbol09.f90 to get a compilation error because an
array element reference looked like a call to a non-pure function, which
is prohibited inside a DO CONCURRENT.

Original-commit: flang-compiler/f18@221e6c52c5460edfbec28904ebe1774ff787fc45
Reviewed-on: https://github.com/flang-compiler/f18/pull/216

5 years ago[flang] Merge pull request flang-compiler/f18#196 from flang-compiler/eas6
Eric Schweitz [Wed, 24 Oct 2018 19:22:42 +0000 (12:22 -0700)]
[flang] Merge pull request flang-compiler/f18#196 from flang-compiler/eas6

DO CONCURRENT semantic constraints checking

Original-commit: flang-compiler/f18@304c6f65482fc04d460abed7b8341dbc9df4fb53
Reviewed-on: https://github.com/flang-compiler/f18/pull/196

5 years ago[flang] Fix conflicts
Eric Schweitz [Wed, 24 Oct 2018 18:10:20 +0000 (11:10 -0700)]
[flang] Fix conflicts
Fix more rotten bits
Fix the tests to reflect merges

Original-commit: flang-compiler/f18@b9a1a8b809e579819e8a7f67699b1897f3e600d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/196

5 years ago[flang] add openmp simd test
Eric Schweitz [Thu, 11 Oct 2018 23:01:04 +0000 (16:01 -0700)]
[flang] add openmp simd test

Original-commit: flang-compiler/f18@c31bb0d1440198491c80b29b4ba3645ef9c2425e
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] minor changes
Eric Schweitz [Thu, 11 Oct 2018 22:19:38 +0000 (15:19 -0700)]
[flang] minor changes
Move functions out of FindDoConcurrentLoops
tweak comments

Original-commit: flang-compiler/f18@713c7e8f9ea292b4660ab989eb87ded4f1389cc1
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] add C1120, C1122 and placehokders for C1006, C1121, and C1123
Eric Schweitz [Wed, 10 Oct 2018 23:52:06 +0000 (16:52 -0700)]
[flang] add C1120, C1122 and placehokders for C1006, C1121, and C1123
add a new test for C1120
Fix new test's CHECKs
More contraints hacking

Original-commit: flang-compiler/f18@197e5fd75083d0ca9773b2f75df54fba0ada9dc8
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] Add OpenMP annotated loops example as a test
Eric Schweitz [Wed, 10 Oct 2018 18:44:15 +0000 (11:44 -0700)]
[flang] Add OpenMP annotated loops example as a test

Original-commit: flang-compiler/f18@d0177b8cc6126e567a646bee3ee663702f50e0f0
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] enable the IEEE_GET_FLAG test
Eric Schweitz [Wed, 10 Oct 2018 15:36:58 +0000 (08:36 -0700)]
[flang] enable the IEEE_GET_FLAG test

Original-commit: flang-compiler/f18@3f95b388a1c6b8bd8e25da6c7f4c0c11a407e550
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] More review changes
Eric Schweitz [Tue, 9 Oct 2018 23:20:01 +0000 (16:20 -0700)]
[flang] More review changes

Original-commit: flang-compiler/f18@48f34e66c8e3d47eec59bc677bc4885d19599dcf
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] Global replace identifier names.
Eric Schweitz [Tue, 9 Oct 2018 22:50:44 +0000 (15:50 -0700)]
[flang] Global replace identifier names.

Original-commit: flang-compiler/f18@93303cd50de3a150802ac61f249e19b9965512c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] Incorperate review comments
Eric Schweitz [Tue, 9 Oct 2018 22:33:15 +0000 (15:33 -0700)]
[flang] Incorperate review comments

Original-commit: flang-compiler/f18@33ff57e3208a5637a28917af7413dce8c00e6442
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] Add more constraint checking for DO CONCURRENT.
Eric Schweitz [Tue, 9 Oct 2018 21:18:16 +0000 (14:18 -0700)]
[flang] Add more constraint checking for DO CONCURRENT.
Add some more tests.

Original-commit: flang-compiler/f18@e65f755fe1ee4efea8e95713d03bad6842236ff4
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] add another resolve-label test for misplaced end do statement.
Eric Schweitz [Tue, 9 Oct 2018 17:41:49 +0000 (10:41 -0700)]
[flang] add another resolve-label test for misplaced end do statement.

Original-commit: flang-compiler/f18@17fa8c1ebf399219febfec659de39a5b558e4b6b
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

5 years ago[flang] Cleanup some cruft and tweaks per review comments.
Eric Schweitz [Wed, 3 Oct 2018 17:24:07 +0000 (10:24 -0700)]
[flang] Cleanup some cruft and tweaks per review comments.
Added a negative test, to check that semantics are not applied bogusly
to loops that are not DO CONCURRENT.

Original-commit: flang-compiler/f18@d8de45e994de0ff1c4977ded82b1f9918ff83e52
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false