[llvm-dev] [RFC] Polly Status and Integration

Renato Golin via llvm-dev
Mon, 16 Oct 2017 11:58:49 -0000

On 15 October 2017 at 00:57, Hal Finkel via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I think the way that we generally look at this is: Our IR data types
(Value,
> User, Instruction, Constant, and so on) are the most efficient
> representation we have of the IR. There are a lot of capabilities that come
> along with that hierarchy (use lists, value handles, metadata, names).
Value
> has a non-inline destructor to deal with all of these capabilities, as does
> Instruction. Each individual instance of these types allocate memory. The
> question is then: For any particular use case, do you need those
> capabilities/properties? If not, is there a more succinct representation
> that can be used efficiently?

There's also the case where we want *more* information than what the
IR constructs can provide us (like temporary state for the
vectoriser), in which case we can easily wrap the IR values in a small
class with a pointer to the Instruction/Value and the extra bits.

However, the current proposal for the VPlan goes well beyond that:

https://reviews.llvm.org/D38676

and makes VPValue and VPInstruction full-fledged implementations that
have some parts in common of what we already have (like Users).

I think we need to get that story right for both cases up front.

cheers,
--renato