FW: Proposal: New IR instruction for casting between address spaces

Here is the patch that i've developed that implements the below points. The test itself won't work until the target data changes are added.

bitcast_between_pointer_patch.txt (7.41 KB)

Resending since I got an error.

bitcast_between_pointer_patch.txt (10.8 KB)

Ping!

bitcast_between_pointer_patch.txt (10.8 KB)

We can't add a circular dependency between Target and VMCore.

-Eli

If I don't bring in TargetData, then there is no way for me to verify the address space size in the verifier or in the auto-upgrade mechanisms.

If I don't bring in TargetData, then there is no way for me to verify the address space size in the verifier or in the auto-upgrade mechanisms.

And that's why I didn't like this approach in the first place.

-Eli

> If I don't bring in TargetData, then there is no way for me to
> verify the address space size in the verifier or in the
> auto-upgrade mechanisms.

And that's why I didn't like this approach in the first place.

I don't think that TargetData belongs in Target. TargetData represents
target information that can be known without linking to the target
descriptions, and thus needs to be available outside of Target.
Furthermore, TargetData has no dependencies to the rest of Target (as
far as I can tell). Let's move it into VMCore.

-Hal

From: Hal Finkel [mailto:hfinkel@anl.gov]
Sent: Thursday, September 20, 2012 4:02 PM
To: Eli Friedman
Cc: Villmow, Micah; Mon Ping Wang; llvm-commits@cs.uiuc.edu;
llvmdev@cs.uiuc.edu
Subject: Re: [LLVMdev] Proposal: New IR instruction for casting between
address spaces

> > If I don't bring in TargetData, then there is no way for me to
> > verify the address space size in the verifier or in the
> > auto-upgrade mechanisms.
>
> And that's why I didn't like this approach in the first place.

I don't think that TargetData belongs in Target. TargetData represents
target information that can be known without linking to the target
descriptions, and thus needs to be available outside of Target.
Furthermore, TargetData has no dependencies to the rest of Target (as
far as I can tell). Let's move it into VMCore.

[Villmow, Micah] I have no problem with this approach as I can already get access to the target string via the module.

Here is an updated patch which moves TargetData out of Target and
into Support/VMCore so that there is no circular dependencies.

Please split out the TargetData move into a separate patch.

Thanks again,
Hal