Announcement

Collapse
No announcement yet.

LLVM Clang Compiler Optimization Benchmarks From -O0 To -O3 -march=native

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

  • #11
    Originally posted by Krejzi View Post

    I know what the flag does. The "package manager"'s debug mode removes -fomit-frame-pointer and adds -g, resulting in enough debug info when I need it. Easy enough to trigger a rebuild in such occasions.
    What distro are you using? This package manager sounds interesting just based on what little you've said.

    Comment


    • #12
      Originally posted by Krejzi View Post
      t would've been nice if you threw in the -Ofast flag which you've been known to be using.
      Using -Ofast will turn on optimizations which violate the C/C++ standard and may produce incorrect code. So when including in a benchmark the generated code needs to be checked for that, or it needs to be pointed out explicitly.

      Comment


      • #13
        Comparing the optimization levels between gcc and clang is also greatly complicated by the fact that clang also vectorizes at -O1, -O2 and -Os whereas gcc only does that for -O3.


        Comment


        • #14
          Originally posted by duby229 View Post

          What distro are you using? This package manager sounds interesting just based on what little you've said.
          It's my own, based on Linux From Scratch. The "package manager" is just a bash script, which installs files to a destdir and generates a tarball and a small, install scriptlet to install the package to the system.

          Comment


          • #15
            Originally posted by chithanh View Post
            Using -Ofast will turn on optimizations which violate the C/C++ standard and may produce incorrect code. So when including in a benchmark the generated code needs to be checked for that, or it needs to be pointed out explicitly.
            Yes, I am aware of that. Some packages even complained about using -Ofast (it pulls -ffast-math), such as PostgreSQL, SQLite, Glibc, and so on. But so far, I haven't noticed any visible issues. One of Michael's GCC benchmarks showed -Ofast was a bit ahead of others.

            Comment


            • #16
              How about optimization with -fprofile-use ? http://clang.llvm.org/docs/UsersManu...d-optimization
              The compiler must choose the best way to optimize each function!
              Last edited by unquaid; 07 February 2016, 07:08 AM.

              Comment

              Working...
              X