[all-commits] [llvm/llvm-project] 61bd33: [BPF] explicit warning of not supporting dynamic s...

yonghong-song via All-commits all-commits at lists.llvm.org
Wed Feb 12 20:44:03 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 61bd33e37b1d4f3feda50162ec196e5e14759686
      https://github.com/llvm/llvm-project/commit/61bd33e37b1d4f3feda50162ec196e5e14759686
  Author: Yonghong Song <yhs at fb.com>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/lib/Target/BPF/BPFISelLowering.cpp

  Log Message:
  -----------
  [BPF] explicit warning of not supporting dynamic stack allocation

Currently, BPF does not support dynamic static allocation.
For a program like below:
  extern void bar(int *);
  void foo(int n) {
    int a[n];
    bar(a);
  }

The current error message looks like:
  unimplemented operand
  UNREACHABLE executed at /.../llvm/lib/Target/BPF/BPFISelLowering.cpp:199!

Let us make error message explicit so it will be clear to the user
what is the problem. With this patch, the error message looks like:
  fatal error: error in backend: Unsupported dynamic stack allocation
  ...

Differential Revision: https://reviews.llvm.org/D74521




More information about the All-commits mailing list