[all-commits] [llvm/llvm-project] c2590d: [docs][NewPM] Add docs for writing NPM passes

aeubanks via All-commits all-commits at lists.llvm.org
Mon Sep 14 13:26:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c2590de30df23ef0db39b496cdec62a83a61fbfa
      https://github.com/llvm/llvm-project/commit/c2590de30df23ef0db39b496cdec62a83a61fbfa
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M llvm/docs/UserGuides.rst
    A llvm/docs/WritingAnLLVMNewPMPass.rst
    M llvm/docs/WritingAnLLVMPass.rst
    A llvm/include/llvm/Transforms/HelloNew/HelloWorld.h
    M llvm/lib/Passes/LLVMBuild.txt
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/CMakeLists.txt
    A llvm/lib/Transforms/HelloNew/CMakeLists.txt
    A llvm/lib/Transforms/HelloNew/HelloWorld.cpp
    A llvm/lib/Transforms/HelloNew/LLVMBuild.txt
    M llvm/lib/Transforms/LLVMBuild.txt
    A llvm/test/Transforms/HelloNew/helloworld.ll
    M llvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn
    A llvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn

  Log Message:
  -----------
  [docs][NewPM] Add docs for writing NPM passes

As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Reviewed By: ychen, asbirlea

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




More information about the All-commits mailing list