Operand Bundles generalization RE: Full restrict support - status update

In an attempt to restart the discussion:
(Added Sanjoy, as he has done a lot of work on the operand bundles)

In order to move things forward, I would like to find out:
- how hard an implementation of generalized operand bundles would be, and
  - how we can minimize the impact on parts of the compiler that don't
    need operand bundles

So that we can compare it to my current solution for the provenance (former
'noalias side_channel') of a pointer operand of a load/store instruction.

Either by support operand bundles on any instruction (1), or, if that would
have too big of an impact, by extending its support to load/store instructions (2).

Sanjay, as you have done a decent amount of work on Operand Bundles, maybe you
can give some insight on the feasibility, possible performance/memory impact,
amount of work ?

Thanks,

Jeroen Dobbelaere

From: Jeroen Dobbelaere
Sent: Tuesday, November 12, 2019 22:15
To: Doerfert, Johannes <jdoerfert@anl.gov>
Cc: Alexey Zhikhartsev <alexey.zhikhar@gmail.com>; Finkel, Hal J.
<hfinkel@anl.gov>; llvm-dev@lists.llvm.org
Subject: RE: [llvm-dev] Full restrict support - status update

Hi Johannes et al,

> From: Doerfert, Johannes <jdoerfert@anl.gov>
[..]

[..]

Hi Jeroen,

In an attempt to restart the discussion:
(Added Sanjoy, as he has done a lot of work on the operand bundles)

In order to move things forward, I would like to find out:
- how hard an implementation of generalized operand bundles would be, and
  - how we can minimize the impact on parts of the compiler that don't
    need operand bundles

It has been a while since I worked on this, but

1. I expect the data-structure bits of general operand bundles to be
fairly straightforward. That is, it is probably only a few days work
to start attaching operand bundles to instructions like load,
getelementptr etc. and making sure that LLVM passes do not crash.

2. I expect the high level semantic modelling to be significantly more
challenging. For instance, what does it mean for a getelementptr to
have an operand bundle? Does it invalidate some existing
optimizations? How will we ensure that we've discovered all of the
transforms and analyses that needed to be changed?

-- Sanjoy