llvm/utils/TableGen
Reid Kleckner a82b376f69 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 18:17:31 +00:00
..
AsmMatcherEmitter.cpp [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule. 2017-04-21 15:59:56 +00:00
AsmWriterEmitter.cpp Add a wrapper around copy_if in STLExtras; NFC 2017-02-21 00:38:44 +00:00
AsmWriterInst.cpp
AsmWriterInst.h
Attributes.cpp Use StringRef in TableGen emitted API for attribute (NFC) 2016-10-04 23:31:39 +00:00
CallingConvEmitter.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
CMakeLists.txt [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX compressing tables. 2017-03-07 08:11:19 +00:00
CodeEmitterGen.cpp [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule. 2017-04-21 15:59:56 +00:00
CodeGenDAGPatterns.cpp TableGen: Add IntrHasSideEffects property for intrinsics 2017-04-28 21:01:46 +00:00
CodeGenDAGPatterns.h [SelectionDAG] Enhance SDTCisSameNumEltsAs to work with scalar types and use it on extend/trunc/round operations. 2017-03-13 17:37:14 +00:00
CodeGenInstruction.cpp TableGen: Use StringInit instead of std::string for DagInit arg names 2016-12-05 06:00:46 +00:00
CodeGenInstruction.h This reapplies r281304. The issue was that I had missed 2016-09-14 08:20:03 +00:00
CodeGenIntrinsics.h TableGen: Add IntrHasSideEffects property for intrinsics 2017-04-28 21:01:46 +00:00
CodeGenMapTable.cpp [TableGen] Make CodeGenMapTable understand the namespace field of an instruction 2017-03-27 07:13:44 +00:00
CodeGenRegisters.cpp [TableGen] Print #nnn as a name of an non-native reg unit with id nnn 2017-03-27 19:08:24 +00:00
CodeGenRegisters.h [TableGen] Print #nnn as a name of an non-native reg unit with id nnn 2017-03-27 19:08:24 +00:00
CodeGenSchedule.cpp Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC). 2016-11-30 17:48:10 +00:00
CodeGenSchedule.h
CodeGenTarget.cpp TableGen: Add IntrHasSideEffects property for intrinsics 2017-04-28 21:01:46 +00:00
CodeGenTarget.h TableGen: Use StringRef instead of const std::string& in return vals. 2016-12-04 05:48:16 +00:00
CTagsEmitter.cpp Use StringRef for MemoryBuffer identifier API (NFC) 2016-10-01 16:38:28 +00:00
DAGISelEmitter.cpp TableGen: Use StringRef instead of const std::string& in return vals. 2016-12-04 05:48:16 +00:00
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp [tablegen] Use categories on options that only matter to one emitter. 2017-03-27 13:15:13 +00:00
DAGISelMatcherGen.cpp TableGen: Use StringRef instead of const std::string& in return vals. 2016-12-04 05:48:16 +00:00
DAGISelMatcherOpt.cpp [TableGen] Use less stack in DAGISelMatcherOpt 2017-02-06 19:41:44 +00:00
DFAPacketizerEmitter.cpp Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC). 2016-11-30 17:48:10 +00:00
DisassemblerEmitter.cpp TableGen: Use StringRef instead of const std::string& in return vals. 2016-12-04 05:48:16 +00:00
FastISelEmitter.cpp Turn a TableGen FastISelEmitter warning into an error. 2017-01-30 19:03:26 +00:00
FixedLenDecoderEmitter.cpp TableGen: Use StringInit instead of std::string for DagInit arg names 2016-12-05 06:00:46 +00:00
GlobalISelEmitter.cpp [ARM] GlobalISel: Use TableGen instruction selector 2017-05-02 09:40:49 +00:00
InstrInfoEmitter.cpp [AMDGPU, PowerPC, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2016-12-12 22:23:53 +00:00
IntrinsicEmitter.cpp [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
LLVMBuild.txt
OptParserEmitter.cpp
PseudoLoweringEmitter.cpp TableGen: Use StringInit instead of std::string for DagInit arg names 2016-12-05 06:00:46 +00:00
RegisterBankEmitter.cpp TableGen: Fix infinite recursion in RegisterBankEmitter 2017-01-30 15:07:01 +00:00
RegisterInfoEmitter.cpp Move spill size and alignment info from MC to TargetRegisterInfo 2017-03-24 21:01:16 +00:00
SearchableTableEmitter.cpp
SequenceToOffsetTable.h
SubtargetEmitter.cpp Improve machine schedulers for in-order processors 2017-03-27 20:46:37 +00:00
SubtargetFeatureInfo.cpp [globalisel][tablegen] Compute available feature bits correctly. 2017-04-29 17:30:09 +00:00
SubtargetFeatureInfo.h [globalisel][tablegen] Compute available feature bits correctly. 2017-04-29 17:30:09 +00:00
TableGen.cpp [tablegen] Use categories on options that only matter to one emitter. 2017-03-27 13:15:13 +00:00
TableGenBackends.h [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX compressing tables. 2017-03-07 08:11:19 +00:00
tdtags
Types.cpp [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule. 2017-04-21 15:59:56 +00:00
Types.h Check that emitted instructions meet their predicates on all targets except ARM, Mips, and X86. 2016-11-19 13:05:44 +00:00
X86DisassemblerShared.h
X86DisassemblerTables.cpp [X86] Fix for bugzilla 31576 - add support for "data32" instruction prefix 2017-01-18 08:07:51 +00:00
X86DisassemblerTables.h
X86EVEX2VEXTablesEmitter.cpp Another instance where GCC doesn't understand implicit construction of StringLiteral. 2017-03-24 14:17:56 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp Fixed assert message to correctly refer to MRMSrcReg4VOp3Frm/MRMSrcMeg4VOp3Frm. 2017-04-27 14:25:04 +00:00
X86RecognizableInstr.h [X86][AVX] Extend hasVEX_WPrefix bit to accept WIG value (W Ignore) + update all AVX instructions with the new value. 2017-02-20 08:27:54 +00:00