• bejean@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 days ago

    Do any compilers NOT unroll loops in high optimization modes? I was under three impression this was usually unnecessary.

    • pixeltree@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 days ago

      No clue, I was just frustrated with how much useless extended metaphor was in the article and thought I’d save people some time

    • InverseParallax@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      Really depends on the target, llvm goes between unrollimg and vectorizing cleanly, to unrollimg to a ludicrous degree, to refusing to unroll period.

      Some of it is subtarget specific, but sometimes it’s just weird.

      Gcc is evil incarnate, all it’s passes are at war with each other, loop Canon form often broke vectorization and even unrolling period.