how to submit inter-dependent llvm and clang patches

Hi,

I have two BPF related patches,
    clang: https://reviews.llvm.org/D65615
    llvm: https://reviews.llvm.org/D65617

The llvm patch changes one IR Builder function signature:
from:
  Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
                                        unsigned LastIndex)
to
  Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
                                        unsigned LastIndex, MDNode *DbgInfo)
and the clang patch uses this newly changed function.

Any recommendation on what is the best practice to merge such llvm/clang
inter-dependent patches?

Thanks!

Yonghong

From: llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org] On Behalf Of Y
Song via llvm-dev
Sent: Friday, August 02, 2019 1:57 AM
To: LLVM Developers Mailing List
Subject: [llvm-dev] how to submit inter-dependent llvm and clang patches

Hi,

I have two BPF related patches,
    clang: https://reviews.llvm.org/D65615
    llvm: https://reviews.llvm.org/D65617

The llvm patch changes one IR Builder function signature:
from:
  Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
                                        unsigned LastIndex)
to
  Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
                                        unsigned LastIndex, MDNode
*DbgInfo)
and the clang patch uses this newly changed function.

Any recommendation on what is the best practice to merge such llvm/clang
inter-dependent patches?

If you are using a git clone of llvm-project, then I would commit both to
master and then do a single 'git llvm push' to send both patches at once.
Because it's a single update, there should be no build breakage.

If you are using SVN, our usual advice is to switch to git. :slight_smile:
Actually the historical advice would be to commit the llvm part first
and then the clang part immediately afterward, in order to commit the
dependent changes "bottom up."

--paulr

> From: llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org] On Behalf Of Y
> Song via llvm-dev
> Sent: Friday, August 02, 2019 1:57 AM
> To: LLVM Developers Mailing List
> Subject: [llvm-dev] how to submit inter-dependent llvm and clang patches
>
> Hi,
>
> I have two BPF related patches,
> clang: https://reviews.llvm.org/D65615
> llvm: https://reviews.llvm.org/D65617
>
> The llvm patch changes one IR Builder function signature:
> from:
> Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
> unsigned LastIndex)
> to
> Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
> unsigned LastIndex, MDNode
> *DbgInfo)
> and the clang patch uses this newly changed function.
>
> Any recommendation on what is the best practice to merge such llvm/clang
> inter-dependent patches?

If you are using a git clone of llvm-project, then I would commit both to
master and then do a single 'git llvm push' to send both patches at once.
Because it's a single update, there should be no build breakage.

Thanks, Paul! I will try to use "git clone of llvm-project" approach.
This seems lest trouble for upstream build breakage.