[GlobalISel][RISCV][TableGen] Teach GlobalISelEmitter about HwMode.
Similar to SelectionDAG, this patch treats HwMode as an additional predicate that needs to be satisfied for GIM_CheckFeatures. The existing predicate passes around Record * that point to predicate records. While HwMode expansion creates a string that needs to be checked. Each HwMode predicate string is uniqued by a new map that assigns it an index. Each Rule stores the index, or -1 if HwMode doesn't apply. The HwMode indices each create a new Predicate feature bit and the check string from the HwMode is used to set the feature bit. GIM_CheckFeatures is emitted when the rule has Predicates or the HwModeIdx is not -1. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D158660
Loading
Please sign in to comment