Started 10 days ago
Took 5 hr 3 min on green-dragon-02

Failed Build #14361 (Jul 9, 2019 1:51:07 AM)

Revisions
  • http://llvm.org/svn/llvm-project/llvm/trunk : 365444
  • http://llvm.org/svn/llvm-project/cfe/trunk : 365446
  • http://llvm.org/svn/llvm-project/compiler-rt/trunk : 365424
  • http://llvm.org/svn/llvm-project/zorg/trunk : 365440
  • http://llvm.org/svn/llvm-project/libcxx/trunk : 365359
  • http://llvm.org/svn/llvm-project/clang-tools-extra/trunk : 365380
Changes
  1. Remove trailing whitespaces in the Language Extensions doc (detail)
    by sylvestre
  2. Add AlignConsecutiveMacros to the clang release notes (detail)
    by sylvestre
  3. Reland "[LiveDebugValues] Emit the debug entry values"

    Emit replacements for clobbered parameters location if the parameter
    has unmodified value throughout the funciton. This is basic scenario
    where we can use the debug entry values.

    ([12/13] Introduce the debug entry values.)

    Co-authored-by: Ananth Sowda <asowda@cisco.com>
    Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
    Co-authored-by: Ivan Baev <ibaev@cisco.com>

    Differential Revision: https://reviews.llvm.org/D58042 (detail)
    by djtodoro
  4. [Loop Peeling] Add support for peeling of loops with multiple exits

    This patch modifies the loop peeling transformation so that
    it does not expect that there is only one loop exit from latch.

    It modifies only transformation. Update of branch weights remains
    only for exit from latch.

    The motivation is that in follow-up patch I plan to enable loop peeling for
    loops with multiple exits but only if other exits then from latch one goes to
    block with call to deopt.

    For now this patch is NFC.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames, fhahn
    Subscribers: zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D63921 (detail)
    by skatkov
  5. [zorg] Add a new build script for use with monorepo

    Summary:
    monorepo-build.py is similar in functionality to the currently build.py, but
    with changes to make it work with the monorepo.

    Reviewers: cmatthews

    Reviewed By: cmatthews

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64028 (detail)
    by azharudd
  6. Prepare for making SwitchInstProfUpdateWrapper strict

    This patch removes the test part that relates to the non-strict
    behavior of SwitchInstProfUpdateWrapper and changes
    the assertion to llvm_unreachable() to allow the check in
    release builds.
    This patch prepares SwitchInstProfUpdateWrapper to become
    strict with one line change. That is need to revert it easily
    if any failure will arise. (detail)
    by yrouban
  7. [BPF] Preserve debuginfo array/union/struct type/access index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    If using these intrinsics blindly, i.e., transforming all GEPs
    to these intrinsics and later on reducing them to GEPs, we have
    seen up to 7% more instructions generated. To avoid such an overhead,
    a clang builtin is proposed:
      base = __builtin_preserve_access_index(base)
    such that user wraps to-be-relocated GEPs in this builtin
    and preserve_*_access_index intrinsics only apply to
    those GEPs. Such a buyin will prevent performance degradation
    if people do not use CO-RE, even for programs which use
    bpf_probe_read().

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:
      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    Signed-off-by: Yonghong Song <yhs@fb.com>

    Differential Revision: https://reviews.llvm.org/D61809 (detail)
    by yhs
  8. [LoopInfo] Update getExitEdges to accept vector of pairs for non const BasicBlock

    D63921 requires getExitEdges fills a vector of Edge pairs where
    BasicBlocks are not constant.

    The rest Loop API mostly returns non-const BasicBlocks, so to be more consistent with
    other Loop API getExitEdges is modified to return non-const BasicBlocks as well.

    This is an alternative solution to D64060.

    Reviewers: reames, fhahn
    Reviewed By: reames, fhahn
    Subscribers: hiraditya, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64309 (detail)
    by skatkov
  9. Revert "[BPF] Preserve debuginfo array/union/struct type/access index"

    This reverts commit r365435.

    Forgot adding the Differential Revision link. Will add to the
    commit message and resubmit. (detail)
    by yhs
  10. [BPF] Preserve debuginfo array/union/struct type/access index

    For background of BPF CO-RE project, please refer to
      http://vger.kernel.org/bpfconf2019.html
    In summary, BPF CO-RE intends to compile bpf programs
    adjustable on struct/union layout change so the same
    program can run on multiple kernels with adjustment
    before loading based on native kernel structures.

    In order to do this, we need keep track of GEP(getelementptr)
    instruction base and result debuginfo types, so we
    can adjust on the host based on kernel BTF info.
    Capturing such information as an IR optimization is hard
    as various optimization may have tweaked GEP and also
    union is replaced by structure it is impossible to track
    fieldindex for union member accesses.

    Three intrinsic functions, preserve_{array,union,struct}_access_index,
    are introducted.
      addr = preserve_array_access_index(base, index, dimension)
      addr = preserve_union_access_index(base, di_index)
      addr = preserve_struct_access_index(base, gep_index, di_index)
    here,
      base: the base pointer for the array/union/struct access.
      index: the last access index for array, the same for IR/DebugInfo layout.
      dimension: the array dimension.
      gep_index: the access index based on IR layout.
      di_index: the access index based on user/debuginfo types.

    If using these intrinsics blindly, i.e., transforming all GEPs
    to these intrinsics and later on reducing them to GEPs, we have
    seen up to 7% more instructions generated. To avoid such an overhead,
    a clang builtin is proposed:
      base = __builtin_preserve_access_index(base)
    such that user wraps to-be-relocated GEPs in this builtin
    and preserve_*_access_index intrinsics only apply to
    those GEPs. Such a buyin will prevent performance degradation
    if people do not use CO-RE, even for programs which use
    bpf_probe_read().

    For example, for the following example,
      $ cat test.c
      struct sk_buff {
         int i;
         int b1:1;
         int b2:2;
         union {
           struct {
             int o1;
             int o2;
           } o;
           struct {
             char flags;
             char dev_id;
           } dev;
           int netid;
         } u[10];
      };

      static int (*bpf_probe_read)(void *dst, int size, const void *unsafe_ptr)
          = (void *) 4;

      #define _(x) (__builtin_preserve_access_index(x))

      int bpf_prog(struct sk_buff *ctx) {
        char dev_id;
        bpf_probe_read(&dev_id, sizeof(char), _(&ctx->u[5].dev.dev_id));
        return dev_id;
      }
      $ clang -target bpf -O2 -g -emit-llvm -S -mllvm -print-before-all \
        test.c >& log

    The generated IR looks like below:
      ...
      define dso_local i32 @bpf_prog(%struct.sk_buff*) #0 !dbg !15 {
        %2 = alloca %struct.sk_buff*, align 8
        %3 = alloca i8, align 1
        store %struct.sk_buff* %0, %struct.sk_buff** %2, align 8, !tbaa !45
        call void @llvm.dbg.declare(metadata %struct.sk_buff** %2, metadata !43, metadata !DIExpression()), !dbg !49
        call void @llvm.lifetime.start.p0i8(i64 1, i8* %3) #4, !dbg !50
        call void @llvm.dbg.declare(metadata i8* %3, metadata !44, metadata !DIExpression()), !dbg !51
        %4 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** @bpf_probe_read, align 8, !dbg !52, !tbaa !45
        %5 = load %struct.sk_buff*, %struct.sk_buff** %2, align 8, !dbg !53, !tbaa !45
        %6 = call [10 x %union.anon]* @llvm.preserve.struct.access.index.p0a10s_union.anons.p0s_struct.sk_buffs(
             %struct.sk_buff* %5, i32 2, i32 3), !dbg !53, !llvm.preserve.access.index !19
        %7 = call %union.anon* @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(
             [10 x %union.anon]* %6, i32 1, i32 5), !dbg !53
        %8 = call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(
             %union.anon* %7, i32 1), !dbg !53, !llvm.preserve.access.index !26
        %9 = bitcast %union.anon* %8 to %struct.anon.0*, !dbg !53
        %10 = call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.anon.0s(
             %struct.anon.0* %9, i32 1, i32 1), !dbg !53, !llvm.preserve.access.index !34
        %11 = call i32 %4(i8* %3, i32 1, i8* %10), !dbg !52
        %12 = load i8, i8* %3, align 1, !dbg !54, !tbaa !55
        %13 = sext i8 %12 to i32, !dbg !54
        call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #4, !dbg !56
        ret i32 %13, !dbg !57
      }

      !19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "sk_buff", file: !3, line: 1, size: 704, elements: !20)
      !26 = distinct !DICompositeType(tag: DW_TAG_union_type, scope: !19, file: !3, line: 5, size: 64, elements: !27)
      !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !26, file: !3, line: 10, size: 16, elements: !35)

    Note that @llvm.preserve.{struct,union}.access.index calls have metadata llvm.preserve.access.index
    attached to instructions to provide struct/union debuginfo type information.

    For &ctx->u[5].dev.dev_id,
      . The "%6 = ..." represents struct member "u" with index 2 for IR layout and index 3 for DI layout.
      . The "%7 = ..." represents array subscript "5".
      . The "%8 = ..." represents union member "dev" with index 1 for DI layout.
      . The "%10 = ..." represents struct member "dev_id" with index 1 for both IR and DI layout.

    Basically, traversing the use-def chain recursively for the 3rd argument of bpf_probe_read() and
    examining all preserve_*_access_index calls, the debuginfo struct/union/array access index
    can be achieved.

    The intrinsics also contain enough information to regenerate codes for IR layout.
    For array and structure intrinsics, the proper GEP can be constructed.
    For union intrinsics, replacing all uses of "addr" with "base" should be enough.

    Signed-off-by: Yonghong Song <yhs@fb.com> (detail)
    by yhs

Started by timer (5 times)

This run spent:

  • 4 hr 40 min waiting;
  • 5 hr 3 min build duration;
  • 9 hr 43 min total from scheduled to completion.
Test Result (5 failures / ±0)Show all failed tests >>>

Identified problems

Regression test failed

This build failed because a regression test in the test suite FAILed. See the test report for details.
Indication 1

Unexpected pass

This buildbot failed because a test marked as XFAIL unexpectedly passes. This could mean that the cause for the XFAIL is fixed, but it warrants investigation in any case.
Indication 2