llvm-project/llvm/lib/Transforms/ObjCARC
Reid Kleckner a0b45f4bfc [IR] Abstract away ArgNo+1 attribute indexing as much as possible
Summary:
Do three things to help with that:
- Add AttributeList::FirstArgIndex, which is an enumerator currently set
  to 1. It allows us to change the indexing scheme with fewer changes.
- Add addParamAttr/removeParamAttr. This just shortens addAttribute call
  sites that would otherwise need to spell out FirstArgIndex.
- Remove some attribute-specific getters and setters from Function that
  take attribute list indices.  Most of these were only used from
  BuildLibCalls, and doesNotAlias was only used to test or set if the
  return value is malloc-like.

I'm happy to split the patch, but I think they are probably easier to
review when taken together.

This patch should be NFC, but it sets the stage to change the indexing
scheme to this, which is more convenient when indexing into an array:
  0: func attrs
  1: retattrs
  2...: arg attrs

Reviewers: chandlerc, pete, javed.absar

Subscribers: david2050, llvm-commits

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

llvm-svn: 302060
2017-05-03 18:17:31 +00:00
..
ARCRuntimeEntryPoints.h [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
BlotMapVector.h Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them. 2016-04-29 15:22:48 +00:00
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
DependencyAnalysis.cpp
DependencyAnalysis.h Make more headers self-contained. 2016-01-27 18:03:37 +00:00
LLVMBuild.txt
ObjCARC.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ObjCARC.h [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
ObjCARCAPElim.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
ObjCARCContract.cpp [ObjCArc] Do not dereference an invalidated iterator. 2017-04-05 03:44:09 +00:00
ObjCARCExpand.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ObjCARCOpts.cpp Remove redundant code. NFC. 2017-02-25 00:59:49 +00:00
ProvenanceAnalysis.cpp
ProvenanceAnalysis.h
ProvenanceAnalysisEvaluator.cpp
PtrState.cpp [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
PtrState.h