[PATCH] D116753: [Driver] Default to -fno-math-errno for musl too

2022-02-04 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. In D116753#3298299 , @pirama wrote: > @alxu Just realized you don't have commit access. Do you want one of us to > merge this? Yes, I forgot about this patch. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D116753: Default to -fno-math-errno for musl too

2022-01-26 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added subscribers: MaskRay, pirama, srhines. alxu added a comment. Hi, can someone take a look at this? @MaskRay, @pirama, @srhines? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116753/new/ https://reviews.llvm.org/D116753

[PATCH] D116755: Revert "[CodeGen] Mark fma as const for Android"

2022-01-07 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. I don't have commit access; can someone commit this for me? Please use author "Alex Xu (Hello71) ". Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116755/new/ https://reviews.llvm.org/D116755

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-07 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. I don't have commit access; can someone commit this for me? Please use author "Alex Xu (Hello71) ". Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 ___ cfe-commits

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397938. alxu added a comment. Re-add context lines. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/init-aarch64.c

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397937. alxu added a comment. Herald added subscribers: aheejin, dschuff. Update init.c, init-aarch64.c tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397922. alxu added a comment. Correct logic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/predefined-macros.c Index:

[PATCH] D116755: Revert "[CodeGen] Mark fma as const for Android"

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. alxu added a project: clang. Herald added a subscriber: danielkiss. alxu requested review of this revision. Herald added a subscriber: cfe-commits. This code is intended to give a special exception for platforms which set errno in some math functions but not fma. This

[PATCH] D116753: Default to -fno-math-errno for musl too

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. alxu added a project: clang. alxu requested review of this revision. Herald added a subscriber: cfe-commits. musl does not set errno in math functions: https://wiki.musl-libc.org/mathematical-library.html,

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 39. alxu added a comment. Sort test defines orthographically, not chronologically. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397712. alxu added a comment. Try -p1 compatible diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/predefined-macros.c Index:

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1022 +Builder.defineMacro("__NO_MATH_ERRNO__"); + if (LangOpts.FastMath || LangOpts.FiniteMathOnly) aaron.ballman wrote: > Does GCC gate on `-ffast-math`? My testing

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-05 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397708. alxu added a comment. In D116337#3217955 , @aaron.ballman wrote: > Thanks for this! I'm adding some more reviewers to the list to help get this > reviewed. > > The patch doesn't seem to apply cleanly, so

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2021-12-28 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. alxu added a project: clang. alxu requested review of this revision. Herald added a subscriber: cfe-commits. This causes modern glibc to unset math_errhandling MATH_ERRNO. gcc 12 also sets some other macros, but most of them are associated with flags ignored by clang,

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-10 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. FYI, according to my comment on D49652 , assuming I checked it correctly, gcc applies the maps in reverse order of command line specification, not sorted order. It seems unlikely that anyone is actually depending on the order though.

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-23 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. my general theory is that it's better to have tests that test everything at once if possible, but I guess it's unlikely enough that the debug info path will be correct in the IR and then not correct in the generated file and that that won't be caught by LLVM tests.

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2018-07-23 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. FYI, gcc uses the stupid and bad string prefix matching approach. if clang supports the same option, it should have the same behavior. you could decide that it's a bad idea, but then the option should be called something else, otherwise people will have to go back to

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-23 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. I was just going to run llvm-dwarfdump. Repository: rC Clang https://reviews.llvm.org/D49652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-23 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. Also, is it right to use SmallVector in one place and vector in the other? I just assumed based on the surrounding declarations, but I really have no idea. Repository: rC Clang https://reviews.llvm.org/D49652 ___

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-23 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu planned changes to this revision. alxu added a comment. The test syntax looked complicated, and I assumed that the documentation was terrible, like wine's, but it's actually pretty good, so I'll give it a go. I think the order is not really surprising though. It is run from right to left,

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-22 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu added a comment. Oh, I forgot to mention, this is the way that gcc does it. Therefore, I expect that almost everybody either doesn't care about the order, or assumes the gcc behavior. Repository: rC Clang https://reviews.llvm.org/D49652

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-22 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. Herald added a subscriber: cfe-commits. Before this patch, it is applied in order of increasing OLD path length. This is not a useful behavior. After this patch, it is applied based on the command line order from right to left, stopping on the first match.