https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/122099
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
philnik777 wrote:
> > Yes, that's the interesting question. Currently we assume that if
> > __builtin_constant_p(__begin <= __ptr && __ptr < __end) is false, __ptr
> > can't be within the the range [__begin, __ptr).
>
> Thinking about this some more, I'm not sure if this is even true.
> `__bu
tbaederr wrote:
> Yes, that's the interesting question. Currently we assume that if
> __builtin_constant_p(__begin <= __ptr && __ptr < __end) is false, __ptr can't
> be within the the range [__begin, __ptr).
Thinking about this some more, I'm not sure if this is even true.
`__builtin_constant
philnik777 wrote:
> > * We check whether two pointers are in the same range
> >
> > Is that possible to implement in the interpreter without going back to AST
> > visitors?
>
> I take "in the same range" meaning as "can be compared at compile time at
> all" here, so yes, that would be rather
tbaederr wrote:
>- We check whether two pointers are in the same range
>
> Is that possible to implement in the interpreter without going back to AST
> visitors?
I take "in the same range" meaning as "can be compared at compile time at all"
here, so yes, that would be rather trivial (we ha
philnik777 wrote:
> > We check which one is the currently active member of a union, and
>
> This is `__builtin_is_within_lifetime`, isn't it?
I didn't realize that exists. I guess that is the correct builtin, yes.
https://github.com/llvm/llvm-project/pull/122099
___
tbaederr wrote:
> We check which one is the currently active member of a union, and
This is `__builtin_is_within_lifetime`, isn't it?
https://github.com/llvm/llvm-project/pull/122099
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
philnik777 wrote:
Does this mean we should avoid `__builtin_constant_p` during constant
evaluation when possible and instead add custom builtins in the few places we
actually need the correct answer during constant evaluation?
We currently use `__builtin_constant_p` in two different cases:
- W
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
See the comment at the beginning of `InterpBuiltinConstantP.h` for an
explanation.
---
Full diff: https://github.com/llvm/llvm-project/pull/122099.diff
10 Files Affected:
- (modified) clang/lib/AST/ByteCo
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/122099
See the comment at the beginning of `InterpBuiltinConstantP.h` for an
explanation.
>From 7fe5944ed5f072c0e74202fd01aa65d87aea3787 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Tue, 7 Jan
10 matches
Mail list logo