Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255443

C2: Remove redundant can_reshape parameter from Node::Ideal()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 16
    • hotspot

      The 'can_reshape' parameter in Node::Ideal(PhaseGVN *phase, bool can_reshape) is redundant, as it is equivalent to phase->is_IterGVN() != NULL. It could be removed for clarity and to reflect that 'can_reshape' is, as of now, a property of 'phase' (true if and only if 'phase' is a PhaseIterGVN). Checks of 'can_reshape' could be replaced by checks of phase->is_IterGVN() != NULL, or by checks of a virtual method phase->can_reshape(). A draft of the latter idea is available here: https://github.com/openjdk/jdk/compare/master...robcasloz:igvn-cleanup. Introducing a virtual method phase->can_reshape(), as opposed to checking phase->is_IterGVN() != NULL, has the advantage that it preserves the intention to communicate what level of transformation is allowed on the graph.

            Unassigned Unassigned
            rcastanedalo Roberto Castaneda Lozano
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: