[PATCH] D31198: [IR] Make AttributeSetNode public, avoid temporary AttributeList copies
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 11:21:45 PDT 2017
rnk created this revision.
Herald added a subscriber: jfb.
AttributeList::get(Fn|Ret|Param)Attributes no longer creates a temporary
AttributeList just to hide the AttributeSetNode type.
I've also added a factory method to create AttributeLists from a
parallel array of AttributeSetNodes. This greatly simplified the
construction of AttributeLists during IPO transforms, in my opinion.
Previously we would test if a particular index had attributes, and
conditionally add a temporary attribute list to a vector. Now the
attribute set vector is parallel to the argument vector already that
these passes already construct.
My long term vision is to wrap AttributeSetNode* inside an AttributeSet
type that holds the enum attributes, but that will come in a follow up
change.
I haven't done any performance measurements for this change because
profiling hasn't shown that any of the affected code is hot.
https://reviews.llvm.org/D31198
Files:
include/llvm/IR/AttributeSetNode.h
include/llvm/IR/Attributes.h
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/IR/AsmWriter.cpp
lib/IR/AttributeImpl.h
lib/IR/AttributeSetNode.h
lib/IR/Attributes.cpp
lib/IR/Core.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/MergeFunctions.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
lib/Transforms/Utils/CloneFunction.cpp
lib/Transforms/Utils/CodeExtractor.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31198.92517.patch
Type: text/x-patch
Size: 58327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170321/7f36d009/attachment.bin>
More information about the llvm-commits
mailing list