I think this is more of a standard issue, or WG21 issue.
Yeah. Completely agreed. If the register
can be deprecated and removed in the standard level, why can’t we perform the same thing for [[assume]]
?
My impression for standardized feature like [[assume]]
and [[likely]]
/[[unlikely]]
is:
- There are already the extensions in the 3 compilers.
- It looks like it works pretty well.
- Let’s see if we can lift them into the standardization level.
I feel the gap between the second step and the third step explains the argument from @nikic. It is true that the @llvm.assume
works well in practices. But it doesn’t fit to the quality of standardization to me.
The problem may be that we take an oversight in the third step. For the WG21 side, we should require the WG21 to review the issue. For the vendor’s side, we should ignore [[assume()]]
until the LLVM part provides a better version. For __builtin_assume
, we should leave it as is since it is on the second step.
Yes, this is wanted. But we can’t provide everything our users want. We have limited capabilities. As you said, it is more of a design issue. For the design issue, we’d better to discuss this in WG21.
For users who still want it (called as expert users in the thread), they can still use __builtin_assume
.
Yes, agreed. It is indeed confusing and not easy for end users to understand easily. But I think this may be the price we need to pay due to we don’t notice such issue in the earlier days.