[cfe-dev] Fwd: "generic" address space
Eli Friedman
eli.friedman at gmail.com
Tue Jul 15 16:16:33 PDT 2008
On Tue, Jul 15, 2008 at 8:50 AM, Mon P Wang <wangmp at apple.com> wrote:
> Hi,
> I took a look at what __buildin_shufflevector does. In that case, it
> enforces more rules than the type system allow after checking the call. In
> that vein, what I could do instead of using this weird type is
> in ActOnCallExpr,when checking the arguments of an intrinsic call, instead
> of calling
> CheckSingleAssignmentConstraints
> I could call my own version, e.g., CheckBuiltinAssignmentConstraints that
> will allow mismatches between address spaces to go through. How does that
> sound?
What we do for __builtin_shufflevector does is claim the argument list
is completely variable, then check the actual arguments from
CheckFunctionCall. What I was thinking is that we could do the same
thing for the builtins which can take alternate address spaces, i.e.
__sync_*. (Are there any other builtins for which you're planning
address space overloading?)
That said, your approach could also work, although it doesn't seem as
clean to me.
-Eli
More information about the cfe-dev
mailing list