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

C2: Remove useless step_over_gc_barrier() in int->bool conversion

XMLWordPrintable

    • b05
    • generic
    • generic

        In cfgnode.cpp, in is_x2logic() that converts a diamond-shape if/else to simple bool patterns, we have a step_over_gc_barrier() at the end. This has been introduced by Shenandoah. I believe the intention was to convert obj vs null check to a simple boolean expression and eliminate the barrier on the unneeded path. However, it is not needed because Shenandoah we already eliminate barriers when the only user is a null-check, and it might actually be counter-productive if the barrier is needed on other paths, because it keeps the input of the barrier alive. This is probably a left-over from pre-LRB.

              rkennke Roman Kennke
              rkennke Roman Kennke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: