Changes

Summary

  1. [llvm-readobj][XCOFF] dump the string table only if the size is bigger than 4. (details)
  2. [mlir][Bazel] Adjust BUILD.bazel file. (details)
  3. [Support] Initialize common options in `getRegisteredOptions` (details)
  4. [FuncSpec] Support specialising recursive functions (details)
Commit 737e27f6236f18dcac53130242756ba0cc1dfe7d by esme.yi
[llvm-readobj][XCOFF] dump the string table only if the size is bigger than 4.
The file was modifiedllvm/test/tools/llvm-readobj/XCOFF/string-table.yaml
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp
Commit 8385de118443144518c9fba8b3d831d9076e746b by akuegel
[mlir][Bazel] Adjust BUILD.bazel file.

The dependency is needed after 1b00b94ffc2d60

Differential Revision: https://reviews.llvm.org/D107426
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 486b6013f967ff80f8fa4d20bf5b93e94ce72aa0 by i
[Support] Initialize common options in `getRegisteredOptions`

This allows users accessing options in libSupport before invoking
`cl::ParseCommandLineOptions`, and also matches the behavior before
D105959.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D106334
The file was modifiedllvm/lib/Support/CommandLine.cpp
The file was addedllvm/unittests/Support/CommandLineInit/CMakeLists.txt
The file was modifiedllvm/unittests/Support/CMakeLists.txt
The file was addedllvm/unittests/Support/CommandLineInit/CommandLineInitTest.cpp
Commit 30fbb06979077740961ebc46853e28ab1f999f9d by sjoerd.meijer
[FuncSpec] Support specialising recursive functions

This adds support for specialising recursive functions. For example:

    int Global = 1;
    void recursiveFunc(int *arg) {
      if (*arg < 4) {
        print(*arg);
        recursiveFunc(*arg + 1);
      }
    }
    void main() {
      recursiveFunc(&Global);
    }

After 3 iterations of function specialisation, followed by inlining of the
specialised versions of recursiveFunc, the main function looks like this:

    void main() {
      print(1);
      print(2);
      print(3);
    }

To support this, the following has been added:
- Update the solver and state of the new specialised functions,
- An optimisation to propagate constant stack values after each iteration of
  function specialisation, which is necessary for the next iteration to
  recognise the constant values and trigger.

Specialising recursive functions is (at the moment) controlled by option
-func-specialization-max-iters and is opt-in for compile-time reasons. I.e.,
the default is -func-specialization-max-iters=1, but for the example above we
would need to use -func-specialization-max-iters=3. Future work is to see if we
can increase the default, or improve the cost-model/heuristics to control
compile-times.

Differential Revision: https://reviews.llvm.org/D106426
The file was modifiedllvm/test/Transforms/FunctionSpecialization/function-specialization-recursive.ll
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization-recursive4.ll
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization-recursive2.ll
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization-recursive3.ll
The file was modifiedllvm/lib/Transforms/IPO/FunctionSpecialization.cpp