Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317856 - Loop refactorings require def-use information
Summary: Loop refactorings require def-use information
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: 6.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Photran Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 318384
Blocks:
  Show dependency tree
 
Reported: 2010-06-24 12:22 EDT by Jeffrey Overbey CLA
Modified: 2012-03-01 00:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Overbey CLA 2010-06-24 12:22:50 EDT
In Unroll Loop and Align/Fuse Loops, Ashley needs to replace uses of a loop's index variable with expressions.  E.g.,

DO I = 1,4
    PRINT *, I
END DO

unrolls to

DO I = 1,4,2
    PRINT *, I
    PRINT *, I+1    ! Use of I replaced with I+1
END DO

Replacing the variable with an expression is not legal (and thus the refactoring should fail) when
(1) the variable is passed by reference to a subprogram
(2) the variable is assigned via a READ or WRITE statement
(any others?)

Also it should not be replaced when it is used as the index variable in an implied DO loop, although the implied-DO index variable has its own scope, so the refactoring should still succeed.

This information will be available after we have du-chains available.