hanchenye-llvm-project/llvm/utils
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
..
FileCheck Test commit. 2017-03-14 10:51:14 +00:00
KillTheDoctor
LLVMVisualizers
Misc
PerfectShuffle
TableGen [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
Target/ARM
abtest
bugpoint
count
crosstool
emacs
fpcmp
gdb-scripts Add GDB pretty-printer for llvm::Twine type 2017-03-15 20:51:44 +00:00
git
git-svn [git-llvm] Remove CR from middle of svn propget output 2017-04-24 22:26:46 +00:00
jedit
kate
lint
lit [lit] Try to exit more cleanly 2017-05-02 17:45:16 +00:00
llvm-build
llvm-lit
not
opt-viewer
release build_llvm_package.bat: Move to VS2017 2017-04-13 23:13:23 +00:00
sanitizers
testgen
textmate
unittest
valgrind
vim
yaml-bench
DSAclean.py
DSAextract.py
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
LLVMBuild.txt
UpdateCMakeLists.pl
bisect
bisect-skip-count
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-native-gxx
llvm.grm
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py
schedcover.py
shuffle_fuzz.py
sort_includes.py
test_debuginfo.pl
update_llc_test_checks.py [PPC] Add generated tests for all atomic operations 2017-03-23 16:02:47 +00:00
update_test_checks.py
wciia.py