[all-commits] [llvm/llvm-project] 0bd297: [mlir-lsp-server] Only use one MLIRContext per MLI...

River Riddle via All-commits all-commits at lists.llvm.org
Wed Aug 4 13:10:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0bd297fce2798ce12490a5c67cefbc54061f6bdf
      https://github.com/llvm/llvm-project/commit/0bd297fce2798ce12490a5c67cefbc54061f6bdf
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp

  Log Message:
  -----------
  [mlir-lsp-server] Only use one MLIRContext per MLIRTextFile

A text file may be comprised of many different "chunks", when
the input file contains the `// -----` split markers. We don't
need to use a unique MLIRContext per chunk, as having
separate contexts is intended to allow for easy unloading of
unused data and all chunks have the same lifetime (tied to the
input file). This commit uses one context for the entire file,
greatly reducing memory consumption in certain situations (up
to 70%).

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




More information about the All-commits mailing list