[PATCH] D58516: [AMDGPU] remove unused AssemblerPredicates
Mark Searles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 21 09:48:37 PST 2019
msearles created this revision.
msearles added reviewers: kzhuravl, rampitec, arsenm.
msearles added a project: AMDGPU.
Herald added subscribers: jdoerfert, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely.
An internal build is hitting asserts complaining about too many subtarget features:
llvm/utils/TableGen/Types.cpp:42: const char* llvm::getMinimalTypeForEnumBitfield(uint64_t): Assertion `MaxIndex <= 64 && "Too many bits"' failed.
llvm/utils/TableGen/AsmMatcherEmitter.cpp:1476: void {anonymous}::AsmMatcherInfo::buildInfo(): Assertion `SubtargetFeatures.size() <= 64 && "Too many subtarget features!"' failed.
The short-term solution is to remove a few unused AssemblerPredicates to get under the limit.
The long-term solution seems to be to revisit these asserts. E.g., rather than hardcoded '64', use the standard sized std::bitset like the other places that track subtarget features.
https://reviews.llvm.org/D58516
Files:
lib/Target/AMDGPU/AMDGPU.td
Index: lib/Target/AMDGPU/AMDGPU.td
===================================================================
--- lib/Target/AMDGPU/AMDGPU.td
+++ lib/Target/AMDGPU/AMDGPU.td
@@ -721,16 +721,14 @@
def HasAddNoCarryInsts : Predicate<"Subtarget->hasAddNoCarry()">,
AssemblerPredicate<"FeatureAddNoCarryInsts">;
-def NotHasAddNoCarryInsts : Predicate<"!Subtarget->hasAddNoCarry()">,
- AssemblerPredicate<"!FeatureAddNoCarryInsts">;
+def NotHasAddNoCarryInsts : Predicate<"!Subtarget->hasAddNoCarry()">;
def Has16BitInsts : Predicate<"Subtarget->has16BitInsts()">,
AssemblerPredicate<"Feature16BitInsts">;
def HasVOP3PInsts : Predicate<"Subtarget->hasVOP3PInsts()">,
AssemblerPredicate<"FeatureVOP3P">;
-def NotHasVOP3PInsts : Predicate<"!Subtarget->hasVOP3PInsts()">,
- AssemblerPredicate<"!FeatureVOP3P">;
+def NotHasVOP3PInsts : Predicate<"!Subtarget->hasVOP3PInsts()">;
def HasSDWA : Predicate<"Subtarget->hasSDWA()">,
AssemblerPredicate<"FeatureSDWA,FeatureVolcanicIslands">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58516.187811.patch
Type: text/x-patch
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190221/b47f4180/attachment-0001.bin>
More information about the llvm-commits
mailing list