Missing ideal transforms for trigonometric identities

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 25
    • Component/s: hotspot
    • x86_64
    • generic

      The following micro incurs redundant call overhead for a trigonometric identity involving sin and inverse sin (arcsin) APIs for angles known at compile time.

      public static double micro() {
          return Math.sin(Math.asin(1.0)); // angle can be a constant b/w -1.0 and 1.0
      }

      arcsin(sin(x)) => x
      arccos(cos(x)) => x
      sin(arcsin(x) => x
      cos(arccos(x) => x

      Problem:
      - Transcendental stubs calls are agnostic to idealizations.
      Solution:
      - Creation of idealizable macro nodes, which can be lowered to calls during macro expansion will save redundant call overheads.

        1. identities.png
          5 kB
          Jatin Bhateja
        2. asm.png
          105 kB
          Jatin Bhateja

            Assignee:
            Jatin Bhateja
            Reporter:
            Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: