[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 13:59:45 PDT 2022


xbolva00 added a comment.

But where I think this feature could be very useful in following case from gcc test suite where there is some FP computation..
Imagine you compile you program with -ffast-math and then you have function:

  __attribute__ ((optimize ("no-associative-math"))) double
  fn3 (double h, double l) /* { dg-message "previous definition" } */
  {
    return h + l;
  }

So in this case, codegen would just drop llvm attribute "reassoc".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126984/new/

https://reviews.llvm.org/D126984



More information about the cfe-commits mailing list