- User Since
- Apr 5 2018, 5:18 PM (220 w, 6 d)
Maybe reland with better patch title as this patch affects more libcalls than just two ones?
Does anybody see any major regressions?
Tue, Jun 28
We also see some use scenarios of TTI in InstCombine
Sat, Jun 25
x264_r regression is big one..
-fsanitize=array-bounds workaround for size-1 array as the last member of a structure
Thu, Jun 23
Wed, Jun 22
We don't want to limit the total number of characters being checked, but rather the number of of non-contiguous ranges.
Patch description needs to be added, especially answer the question why we should rename it, why we want it..
Sun, Jun 19
@dtemirbulatov thanks, looks neutral.
Sat, Jun 18
Fri, Jun 17
strchr is transformed to memchr, if possible. See test strchr_to_memchr_n_equals_len.
Added PhaseOrdering test to ensure instcombine + simplifycfg produces optimal switch code.
Thu, Jun 16
Wed, Jun 15
What do you think about just using the clang AST and checking if there is a valid definition for __memcmpeq + isGNUEnvironment?
Seems fine as well.
Maybe new flag like -fglibc-version=ver ?
Ideally LLVM should just "enable" memcmpeq if glibc version is > XYZ. Not sure if there is a realiable way to do it. @efriedma ?
I guess we can go with the flag being used by gcc: -fextra-libc-function=__memcmpeq.
Clang side should match gcc’s https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596335.html
Tue, Jun 14
Also note that there is a '#pragma GCC optimize' pragma. After this patch, it should be hard to implement it.
See what you mean and why it might be necessary.
@courbet Any followup as we have got "'__memcmpeq" ?
I would like to hear quite strong motivating words.
That's not stopped us from exposing attributes like minsize (and you proposed optsize as well) which get described in the same terms as -Os/-Oz in our documentation, so this ship has somewhat sailed.
Mon, Jun 13
If you compile file with -Ofast and use optimise(-Os) for F - I would expect no fast math flags for function F but I am worried a bit that only “optsize” is added. Plesse verify and/or add such test.
Would that work for you (and you as well @aeubanks)?
Sun, Jun 12
The patch should not be blocked by other patches, or? or any blocker?
Sat, Jun 11
Fri, Jun 10
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:
Are you opposed to exposing #pragma optimize? (https://docs.microsoft.com/en-us/cpp/preprocessor/optimize?view=msvc-170) If yes, I think Stephen should run an RFC on Discourse to see if there's general agreement.
No, I like it, seems more useful and general than "pragma clang optimize on/off"
Are you opposed to the direction of condensing the optimization semantic attributes (the things in the AST) down into one? If yes, I'd like to understand why better.
Are you still opposed to exposing a neutered form of the GCC optimize attribute as a parsed attribute (the thing users write in their source)? If yes, that's fine by me, but then I'd still like to see most of this patch land, just without a way for the user to spell the attribute themselves. We can adjust the semantic attribute's enumeration to cover only the cases we want to support.
"The optimize attribute should be used for debugging purposes only. It is not suitable in production code."
[[gnu::optimize("O0")]] is okay but [[gnu::optimize("O3")]] is not gonna work without major changes. Not sure why we should deliver half-broken new attribute.
I agree with @aeubanks , this feature requires major changes to pass manager and I see no value to land this currently.
Thu, Jun 9
Tue, Jun 7
Is it possible to create simple testcase?
in AddAliasScopeMetadata: the default value of MaxLookup is not enough to identify the underlying object, and the alias info added by AddAliasScopeMetadata() is wrong, resulting in wrong schedule decisions in machine-scheduler.
Fri, Jun 3
Thu, Jun 2
Some unfortunate regressions
May 29 2022
May 27 2022
Cases like strlen (x ? s1 : s2) should be handled in more general fashion and rewrite fn (x ? s1 : s2) as x ? fn(s1) : fn(s2) if fn(s1) and (or?) fn(s2) can be optimized to just some (constant) value.
May 23 2022
Maybe also worth to check gcc's issues with this transformation:
Is this “safe” even with fast math for all predicates?
May 21 2022
Botan AES-128 benchmark, maybe others..
May 20 2022
May 18 2022
also Polly.DeLICM::pr41656.ll fails in precommit CI.
May 17 2022
May 13 2022
May 10 2022
This could be done by either exposing a simplifyLoopCFG helper function ...