This is an archive of the discontinued LLVM Phabricator instance.

Intrinsics: introduce llvm_any_ty aka ValueType Any
ClosedPublic

Authored by artagnon on Jan 16 2015, 1:01 PM.

Details

Summary

Specifically, gc.result benefits from this greatly. Instead of:

gc.result.int.*
gc.result.float.*
gc.result.ptr.*
...

We now have a gc.result.* that can specialize to literally any type.

Diff Detail

Repository
rL LLVM

Event Timeline

artagnon updated this revision to Diff 18314.Jan 16 2015, 1:01 PM
artagnon retitled this revision from to Intrinsics: introduce llvm_any_ty aka ValueType Any.
artagnon updated this object.
artagnon edited the test plan for this revision. (Show Details)
artagnon added reviewers: reames, spatel, delena.
artagnon added a subscriber: Unknown Object (MLST).
reames edited edge metadata.Jan 16 2015, 1:54 PM

I have no comment on the patch as a whole - I'm not qualified to comment on most of it - but I *specifically object* to the removal of the old gc intrinsics in the initial patch. I am fine adding the new form, but I want a migration period where both are supported and consumers can update. (This can be as a short as week or two, but it does need to exist.)

artagnon updated this revision to Diff 18322.Jan 16 2015, 2:16 PM
artagnon removed a reviewer: craig.topper.

Don't remove old intrinsics right away; just deprecate them.

reames: My script dug through 3 years of history blaming the lines
touched by my patch, and you're the top review candidate. Maybe Craig
can pitch in?

delena edited edge metadata.Jan 17 2015, 11:00 PM

When you put "any", you probably mean any scalar of int, float, ptr. What happens if somebody specifies vector, i16, double or something else. May be you should put some code in the verifier?

Elena Demikhovsky wrote:

When you put "any", you probably mean any scalar of int, float, ptr. What happens if somebody specifies vector, i16, double or something else. May be you should put some code in the verifier?

iAny is integer-any (scalar or vector)
fAny is float-any (scalar or vector)
iPTRAny is pointer-any

By Any, I really mean absolutely anything: gc.result should be able to
return the type of the function contained in the statepoint, which
could be anything.

Ping.

I have too many changes awaiting review to continue working :\

In my opinion, you can commit this patch. If you are ok with all possible types, I don't see any other problem.

This revision was automatically updated to reflect the committed changes.