Issue Details (XML | Word | Printable)

Key: RVM-448
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Add non-nullness information to register operands

Created: 21/Apr/08 09:26 AM   Updated: 21/Apr/08 10:49 AM
Component/s: Compiler: Optimizing
Affects Version/s: None
Fix Version/s: 1000

Time Tracking:
Not Specified


 Description  « Hide
Following inlining we often get code of the form:

t0(extant, precise A) = new A
t1 = instanceof t0(extant, precise A), A

it would be nice to simplify this to:

t0(precise A) = new A
t1 = 1

however, we can't do this as t0 could be holding null - although from the code it clearly can't.

This issue is opened following r14138 and r14133. An alternate approach is to use expression folding - currently disabled both locally and globally.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Grove added a comment - 21/Apr/08 10:29 AM
BC2IR tries to catch this when it generates IR for the instanceof bytecode. Is the problem that the non-null guard on the scratch field isn't being propagated correctly across inlined method boundaries?

Of course we could get this kind of IR after BC2IR is complete and we do subsequent optimization passes, but if it is really as simple as the only definiton that flows into an instanceof being from a new statement, then BC2IR should be able to handle it without the non-null bit.


Ian Rogers added a comment - 21/Apr/08 10:49 AM
The code where I'm hitting this maybe being conservative because of RVM-444. Thanks for the suggestion, I'll see if I can work around the problem in BC2IR.