[PATCH] D47514: [Target][NFC] Simplify `AssemblerPredicate`.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 01:29:38 PDT 2018


courbet added inline comments.


================
Comment at: lib/Target/Mips/MipsInstrInfo.td:238-239
 def IsNotNaCl    :    Predicate<"!Subtarget->isTargetNaCl()">;
-def UseTCCInDIV    :  AssemblerPredicate<"FeatureUseTCCInDIV">;
+def UseTCCInDIV    :  Predicate<"Subtarget->useTCCInDIV()">,
+                      AssemblerPredicate<"FeatureUseTCCInDIV">;
 def HasEVA       :    Predicate<"Subtarget->hasEVA()">,
----------------
dsanders wrote:
> UseTCCInDiv is purely an assembler feature. It controls the expansion of the div macro and has no bearing on CodeGen. It doesn't make sense to implement it for CodeGen.
> 
> The reason it has a variable in MipsSubtarget is because tablegen incorrectly generates an assignment to it in MipsSubtarget::ParseSubtargetFeatures() and it didn't seem worth it to stop it from doing that.
OK, I've moved the type checking from SubtargetFeatureInfo::SubtargetFeatureInfo to the emitter function, and reverted the Mips change.


Repository:
  rL LLVM

https://reviews.llvm.org/D47514





More information about the llvm-commits mailing list