C2: Potential issue with GraphKit::set_output_for_allocation

XMLWordPrintable

      GraphKit::set_output_for_allocation will create 1 NarrowMemProjNode for each of the fields of the allocation. The intention is to materialize the fact that the allocation touches the memory of the allocated class and nothing else.

      Obviously, we can only know this set if the allocated class is a constant. However, in GraphKit::set_output_for_allocation, I see no test checking the oop_type is of an exact class. When getting the ciInstanceKlass from which the fields are extracted, we use oop_type->instance_klass() which only returns the type such that all values of oop_type will subtype this ciInstanceKlass.

            Assignee:
            Unassigned
            Reporter:
            Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: