Adrian Prantl
b613a7a943
Add LLVM IR debug info support for Fortran COMMON blocks
...
COMMON blocks are a feature of Fortran that has no direct analog in C languages, but they are similar to data sections in assembly language programming. A COMMON block is a named area of memory that holds a collection of variables. Fortran subprograms may map the COMMON block memory area to their own, possibly distinct, non-empty list of variables. A Fortran COMMON block might look like the following example.
COMMON /ALPHA/ I, J
For this construct, the compiler generates a new scope-like DI construct (!DICommonBlock) into which variables (see I, J above) can be placed. As the common block implies a range of storage with global lifetime, the !DICommonBlock refers to a !DIGlobalVariable. The Fortran variable that comprise the COMMON block are also linked via metadata to offsets within the global variable that stands for the entire common block.
@alpha_ = common global %alphabytes_ zeroinitializer, align 64, !dbg !27 , !dbg !30 , !dbg !33
!14 = distinct !DISubprogram(…)
!20 = distinct !DICommonBlock(scope: !14 , declaration: !25 , name: "alpha")
!25 = distinct !DIGlobalVariable(scope: !20 , name: "common alpha", type: !24 )
!27 = !DIGlobalVariableExpression(var: !25 , expr: !DIExpression())
!29 = distinct !DIGlobalVariable(scope: !20 , name: "i", file: !3 , type: !28 )
!30 = !DIGlobalVariableExpression(var: !29 , expr: !DIExpression())
!31 = distinct !DIGlobalVariable(scope: !20 , name: "j", file: !3 , type: !28 )
!32 = !DIExpression(DW_OP_plus_uconst, 4)
!33 = !DIGlobalVariableExpression(var: !31 , expr: !32 )
The DWARF generated for this is as follows.
DW_TAG_common_block:
DW_AT_name: alpha
DW_AT_location: @alpha_+0
DW_TAG_variable:
DW_AT_name: common alpha
DW_AT_type: array of 8 bytes
DW_AT_location: @alpha_+0
DW_TAG_variable:
DW_AT_name: i
DW_AT_type: integer*4
DW_AT_location: @Alpha+0
DW_TAG_variable:
DW_AT_name: j
DW_AT_type: integer*4
DW_AT_location: @Alpha+4
Patch by Eric Schweitz!
Differential Revision: https://reviews.llvm.org/D54327
llvm-svn: 357934
2019-04-08 19:13:55 +00:00
..
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2018-02-27 11:15:05 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2016-05-10 18:22:45 +00:00
2015-03-13 18:20:45 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2017-07-12 13:24:46 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2016-05-10 18:22:45 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2019-01-04 16:39:10 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2015-03-13 18:20:45 +00:00
2014-11-06 15:05:51 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-09-11 03:22:04 +00:00
2014-11-06 15:05:51 +00:00
2017-07-12 13:24:46 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2016-04-15 15:57:41 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-11-25 02:54:07 +00:00
2015-09-11 03:22:04 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2017-04-10 22:27:50 +00:00
2017-10-14 03:23:18 +00:00
2017-04-10 22:27:50 +00:00
2017-04-10 22:27:50 +00:00
2015-02-16 08:38:03 +00:00
2015-02-16 08:38:03 +00:00
2015-03-13 19:30:44 +00:00
2015-09-11 03:22:04 +00:00
2018-07-12 14:40:21 +00:00
2019-01-22 18:18:02 +00:00
2019-03-13 19:46:34 +00:00
2017-01-21 01:00:32 +00:00
2019-03-12 21:02:54 +00:00
2016-04-19 20:51:05 +00:00
2014-08-19 21:08:27 +00:00
2019-03-22 18:27:13 +00:00
2015-02-23 00:01:32 +00:00
2018-08-23 09:25:17 +00:00
2018-08-23 09:25:17 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2016-05-21 00:14:04 +00:00
2014-08-19 21:08:27 +00:00
2018-06-26 18:55:43 +00:00
2018-01-30 22:32:39 +00:00
2018-01-30 22:32:39 +00:00
2018-01-30 22:32:39 +00:00
2017-04-10 22:27:50 +00:00
2018-02-19 09:56:22 +00:00
2018-11-30 19:13:38 +00:00
2018-11-30 19:13:38 +00:00
2018-09-21 12:28:44 +00:00
2018-05-09 02:40:45 +00:00
2018-09-21 12:03:14 +00:00
2019-04-08 19:13:55 +00:00
2016-08-24 18:29:49 +00:00
2016-04-23 21:08:00 +00:00
2019-01-08 17:52:29 +00:00
2019-03-19 13:16:28 +00:00
2015-06-02 17:13:25 +00:00
2018-10-03 18:44:53 +00:00
2017-08-23 20:31:27 +00:00
2017-07-19 00:09:54 +00:00
2016-04-15 15:57:41 +00:00
2016-04-15 15:57:41 +00:00
2016-10-20 00:13:12 +00:00
2018-09-20 08:53:06 +00:00
2016-12-22 00:29:00 +00:00
2015-06-29 23:03:47 +00:00
2017-04-28 22:25:46 +00:00
2015-06-02 17:13:25 +00:00
2015-01-08 22:38:29 +00:00
2019-03-14 16:29:54 +00:00
2015-06-02 17:13:25 +00:00
2016-06-08 20:34:29 +00:00
2015-06-02 17:13:25 +00:00
2016-10-18 14:31:22 +00:00
2017-10-26 15:00:26 +00:00
2018-01-30 22:32:39 +00:00
2018-05-09 02:40:45 +00:00
2014-08-19 21:08:27 +00:00
2015-02-16 09:18:13 +00:00
2018-11-13 18:15:47 +00:00
2015-03-13 18:20:45 +00:00
2015-04-29 16:38:44 +00:00
2015-03-09 23:08:44 +00:00
2015-02-27 19:29:02 +00:00
2016-12-21 18:29:47 +00:00
2017-12-04 19:56:33 +00:00
2015-07-09 07:42:48 +00:00
2015-07-09 07:42:48 +00:00
2015-07-09 07:42:48 +00:00
2016-05-10 18:22:45 +00:00
2015-02-27 19:29:02 +00:00
2016-11-10 22:34:55 +00:00
2014-01-13 22:37:35 +00:00
2015-09-03 18:06:44 +00:00
2017-05-11 12:28:08 +00:00
2015-02-16 08:41:08 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2016-04-08 06:45:19 +00:00
2018-01-12 17:03:43 +00:00
2016-04-07 12:32:19 +00:00
2019-03-12 21:02:54 +00:00
2014-12-15 19:07:53 +00:00
2015-09-03 22:27:42 +00:00
2014-09-05 22:30:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-23 07:13:52 +00:00
2015-02-11 07:43:58 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2014-01-22 19:21:33 +00:00
2016-05-10 18:22:45 +00:00
2015-09-11 03:22:04 +00:00
2018-10-03 02:37:15 +00:00
2019-01-22 18:18:02 +00:00
2019-01-22 18:18:02 +00:00
2019-01-17 10:49:01 +00:00
2014-12-09 18:33:57 +00:00
2019-03-22 18:27:13 +00:00
2014-06-27 18:19:56 +00:00
2015-01-06 22:55:16 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2015-02-11 09:13:09 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:55 +00:00
2015-03-02 06:00:02 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 09:34:59 +00:00
2015-03-02 09:35:03 +00:00
2015-03-02 09:35:03 +00:00
2018-02-19 09:56:22 +00:00
2018-02-19 09:56:22 +00:00
2015-02-16 06:04:53 +00:00
2016-03-31 23:56:58 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2017-08-23 20:31:27 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-07-31 18:58:39 +00:00
2015-07-31 18:58:39 +00:00
2015-07-31 18:58:39 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2018-11-28 21:14:32 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2018-01-24 09:56:07 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-08-31 21:36:14 +00:00
2015-09-11 03:22:04 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2016-05-10 18:22:45 +00:00
2019-03-12 21:02:54 +00:00
2019-03-12 21:02:54 +00:00
2019-03-12 21:02:54 +00:00
2015-09-03 15:41:38 +00:00
2016-10-04 12:43:46 +00:00
2015-03-02 05:25:09 +00:00
2015-06-17 20:52:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2016-04-06 02:06:40 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-11 01:34:46 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-10 02:10:35 +00:00
2014-12-10 00:43:17 +00:00
2015-06-15 22:16:51 +00:00
2015-06-15 22:16:51 +00:00
2015-01-13 21:10:44 +00:00
2015-09-03 16:18:32 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:30:15 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:30:15 +00:00
2018-08-23 09:25:17 +00:00
2015-01-14 18:25:45 +00:00
2016-06-14 21:01:22 +00:00
2016-10-04 12:43:46 +00:00
2016-06-21 23:42:48 +00:00
2015-03-15 00:45:51 +00:00
2015-04-29 16:38:44 +00:00
2016-06-21 23:42:48 +00:00
2016-04-06 02:06:40 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2014-12-15 19:07:53 +00:00
2016-03-25 00:56:13 +00:00
2015-02-27 21:17:42 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2014-08-19 21:08:27 +00:00
2014-12-09 19:10:03 +00:00
2016-03-30 22:17:28 +00:00
2016-03-30 18:15:08 +00:00
2018-06-26 13:56:49 +00:00
2018-06-26 13:56:49 +00:00
2018-06-26 13:56:49 +00:00
2018-11-23 10:54:51 +00:00
2014-08-19 21:08:27 +00:00
2015-11-11 21:57:16 +00:00
2014-08-19 21:08:27 +00:00
2015-11-25 02:54:07 +00:00
2015-01-06 22:55:16 +00:00
2015-02-27 21:17:42 +00:00
2015-03-10 06:34:57 +00:00
2015-03-13 18:20:45 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:08:27 +00:00
2016-05-10 18:22:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00