[PATCH] D115798: Provide SmallAttrBuilder as a lightweight alternative to AttrBuilder

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 15 05:25:04 PST 2021


serge-sans-paille created this revision.
serge-sans-paille added reviewers: nikic, dblaikie, rnk.
Herald added subscribers: dexonsmith, jdoerfert, mgrang, hiraditya.
serge-sans-paille requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This class can only add / remove Attributes, but it does it relatively
efficiently compared to existing AttrBuilder, providing a consistent compile-time
speedup according to https://llvm-compile-time-tracker.com/

Internally it maintains two SmallVector of sorted Attributes, which turns out to
be more efficient than temporary hashmap and bitfields as used by AttrBuilder.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115798

Files:
  clang/include/clang/CodeGen/CodeGenABITypes.h
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenABITypes.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  llvm/include/llvm/IR/Attributes.h
  llvm/include/llvm/IR/Function.h
  llvm/lib/IR/AttributeImpl.h
  llvm/lib/IR/Attributes.cpp
  llvm/lib/IR/Function.cpp
  llvm/lib/Transforms/Utils/InlineFunction.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115798.394535.patch
Type: text/x-patch
Size: 35821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211215/6ae41aa7/attachment-0001.bin>


More information about the cfe-commits mailing list