1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/IR
Reid Kleckner 822117c56d [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
..
AsmWriter.cpp AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00
AttributeImpl.h Make getSlotAttributes return an AttributeSet instead of a wrapper list 2017-04-24 22:25:02 +00:00
Attributes.cpp [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
BasicBlock.cpp [IR] Share implementation for pairs of const and non-const methods using const_cast. NFCI 2017-03-27 05:46:58 +00:00
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
Comdat.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
ConstantFold.cpp [APInt] Use lshrInPlace to replace lshr where possible 2017-04-18 17:14:21 +00:00
ConstantFold.h IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
ConstantRange.cpp [ConstantRange] Fix a couple cases where we were possibly throwing away an APInt allocation we could reuse. NFC 2017-04-30 00:44:05 +00:00
Constants.cpp [Constants] simplify get true/false code; NFCI 2017-04-16 17:00:21 +00:00
ConstantsContext.h [ADT, IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warnings; other minor fixes (NFC). 2016-12-07 22:06:02 +00:00
Core.cpp Prefer addAttr(Attribute::AttrKind) over the AttributeList overload 2017-04-19 17:28:52 +00:00
DataLayout.cpp [DataLayout] Removed default value from a variable that isn't used without being overwritten. Make variable an enum instead of an int to avoid a cast later. NFC 2017-04-19 00:31:38 +00:00
DebugInfo.cpp [StripDeadDebug/DIFinder] Track inlined SPs 2017-04-11 13:32:11 +00:00
DebugInfoMetadata.cpp Remove line and file from DINamespace. 2017-04-28 22:25:46 +00:00
DebugLoc.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
DiagnosticInfo.cpp [Stack Protection] Add diagnostic information for why stack protection was applied to a function 2017-02-28 16:02:37 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp Remove line and file from DINamespace. 2017-04-28 22:25:46 +00:00
Dominators.cpp Revert "Do not verify dominator tree if it has no roots" 2017-01-25 17:15:48 +00:00
Function.cpp [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
GCOV.cpp [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
Globals.cpp [IR] Implement pairs of non-const and const methods using the const version instead of the non-const version. NFCI 2017-03-27 05:47:03 +00:00
GVMaterializer.cpp
InlineAsm.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
Instruction.cpp [IR] Add AllowContract to FastMathFlags 2017-03-28 20:11:52 +00:00
Instructions.cpp [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
IntrinsicInst.cpp Add intrinsics for constrained floating point operations 2017-01-26 23:27:59 +00:00
IRBuilder.cpp Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
IRPrintingPasses.cpp Implement getPassName() for IR printing passes. 2017-03-10 07:09:20 +00:00
LegacyPassManager.cpp Reverted: Track validity of pass results 2017-01-15 10:23:18 +00:00
LLVMBuild.txt
LLVMContext.cpp Add !associated metadata. 2017-03-17 22:17:24 +00:00
LLVMContextImpl.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
LLVMContextImpl.h [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member 2017-05-03 15:46:24 +00:00
Mangler.cpp Move llvm::emitLinkerFlagsForGlobalCOFF() to Mangler. 2017-03-31 04:46:50 +00:00
MDBuilder.cpp Add function importing info from samplepgo profile to the module summary. 2017-02-28 18:09:44 +00:00
Metadata.cpp [Metadata] Fix typos in comments. NFC 2017-04-27 05:48:29 +00:00
MetadataImpl.h
Module.cpp Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
ModuleSummaryIndex.cpp Bitcode: Make the summary reader responsible for merging. NFCI. 2017-05-01 22:04:36 +00:00
Operator.cpp [IR] Remove some unneeded includes from Operator.h and fix cpp files that were transitively depending on it. NFC 2017-03-20 05:08:41 +00:00
OptBisect.cpp Remove opt-bisect support for "cases" in favor of debug counters 2017-03-11 01:41:03 +00:00
Pass.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
PassManager.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
PassRegistry.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
ProfileSummary.cpp Reapply r271728 after adding move cobstructor for ProfileSummaryInfo 2016-06-03 22:54:26 +00:00
Statepoint.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
SymbolTableListTraitsImpl.h ADT: Remove external uses of ilist_iterator, NFC 2016-09-03 01:22:56 +00:00
Type.cpp [IR] Inline Type::getScalarType() by using isVectorTy() and getVectorElementType() that were already available inline. 2017-04-08 05:47:09 +00:00
TypeFinder.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
Use.cpp
User.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 15:02:18 +00:00
Value.cpp Add a new WeakVH value handle; NFC 2017-05-01 17:07:54 +00:00
ValueSymbolTable.cpp [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-17 00:00:09 +00:00
ValueTypes.cpp getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI 2016-09-14 16:37:15 +00:00
Verifier.cpp AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00