Announcement

Collapse
No announcement yet.

Meta Developing A New IR For LLVM's Clang C/C++ Compiler With Better Speed, Security

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Meta Developing A New IR For LLVM's Clang C/C++ Compiler With Better Speed, Security

    Phoronix: Meta Developing A New IR For LLVM's Clang C/C++ Compiler With Better Speed, Security

    Meta (Facebook) engineers on Monday announced CIR, a proposed new intermediate representation (IR) for LLVM's Clang C/C++ compiler front-end that is based on the MLIR representation...

    https://www.phoronix.com/scan.php?pa...g-Clang-IR-CIR

  • #2
    The Google Chrome team notes that around 70% of their high-severity security bugs are memory unsafety problems.
    Sounds like Google maybe ought to look into Rust.

    Comment


    • #3
      I actually wish that the LLVM project as a whole will gain some speed and loose some weight.

      The total time that my hobby compiler uses, is dominated by LLVM

      Setup: 1.60 ms
      Read: 0.53 ms
      Filter: 0.27 ms
      Tokenizer: 1.52 ms
      AST: 0.20 ms
      Pass1: 33.02 ms
      Pass2: 8.75 ms
      Frontend total: 46.02 ms
      LLVM optimize: 707.46 ms
      LLVM emit (.o) : 173.74 ms
      Linker: 16.98 ms (mold)
      Total Measured: 944.46 ms

      So my compiler (Frontend) takes about 5% of the total time.
      Therefore no matter how much I optimize my code, it would not make much of a difference to the total time taken.
      I am very happy with the quality of the code that gets generated, it is just so damn slow...

      Comment


      • #4
        Originally posted by uid313 View Post
        Sounds like Google maybe ought to look into Rust.
        They are and a quick search would have shown you that.

        Comment


        • #5
          Wasn't Chris Lattner actually proposing something like this some time ago? That's why I am not surprised of him being a huge fan of that effort.

          Comment


          • #6
            Originally posted by Raka555 View Post
            I actually wish that the LLVM project as a whole will gain some speed and loose some weight.

            The total time that my hobby compiler uses, is dominated by LLVM

            Setup: 1.60 ms
            Read: 0.53 ms
            Filter: 0.27 ms
            Tokenizer: 1.52 ms
            AST: 0.20 ms
            Pass1: 33.02 ms
            Pass2: 8.75 ms
            Frontend total: 46.02 ms
            LLVM optimize: 707.46 ms
            LLVM emit (.o) : 173.74 ms
            Linker: 16.98 ms (mold)
            Total Measured: 944.46 ms

            So my compiler (Frontend) takes about 5% of the total time.
            Therefore no matter how much I optimize my code, it would not make much of a difference to the total time taken.
            I am very happy with the quality of the code that gets generated, it is just so damn slow...
            1. Paid some attention to the step that took longest? Optimization is always the most time consuming part.
            2. Take a look at QBE if you want your compiler to be faster.

            Comment


            • #7
              Speaking of Meta-developed enhancements to LLVM, can we please have some benchmarks of BOLT optimizer?

              Comment

              Working...
              X