llvm.org GIT mirror llvm / b4e7a42
[Hexagon] Add a target feature for generating new-value stores git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332290 91177308-0d34-0410-b5e6-96231b3b80d8 Krzysztof Parzyszek 1 year, 5 months ago
3 changed file(s) with 18 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
5151 "Use memop instructions">;
5252 def FeatureNVJ: SubtargetFeature<"nvj", "UseNewValueJumps", "true",
5353 "Support for new-value jumps", [FeaturePackets]>;
54 def FeatureNVS: SubtargetFeature<"nvs", "UseNewValueStores", "true",
55 "Support for new-value stores", [FeaturePackets]>;
5456 def FeatureDuplex: SubtargetFeature<"duplex", "EnableDuplex", "true",
5557 "Enable generation of duplex instruction">;
5658 def FeatureReservedR19: SubtargetFeature<"reserved-r19", "ReservedR19",
320322
321323 def : Proc<"hexagonv4", HexagonModelV4,
322324 [ArchV4,
323 FeatureDuplex, FeatureMemops, FeatureNVJ, FeaturePackets]>;
325 FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
326 FeaturePackets]>;
324327 def : Proc<"hexagonv5", HexagonModelV4,
325328 [ArchV4, ArchV5,
326 FeatureDuplex, FeatureMemops, FeatureNVJ, FeaturePackets]>;
329 FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
330 FeaturePackets]>;
327331 def : Proc<"hexagonv55", HexagonModelV55,
328332 [ArchV4, ArchV5, ArchV55,
329 FeatureDuplex, FeatureMemops, FeatureNVJ, FeaturePackets]>;
333 FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
334 FeaturePackets]>;
330335 def : Proc<"hexagonv60", HexagonModelV60,
331336 [ArchV4, ArchV5, ArchV55, ArchV60,
332 FeatureDuplex, FeatureMemops, FeatureNVJ, FeaturePackets]>;
337 FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
338 FeaturePackets]>;
333339 def : Proc<"hexagonv62", HexagonModelV62,
334340 [ArchV4, ArchV5, ArchV55, ArchV60, ArchV62,
335 FeatureDuplex, FeatureMemops, FeatureNVJ, FeaturePackets]>;
341 FeatureDuplex, FeatureMemops, FeatureNVJ, FeatureNVS,
342 FeaturePackets]>;
336343 def : Proc<"hexagonv65", HexagonModelV65,
337344 [ArchV4, ArchV5, ArchV55, ArchV60, ArchV62, ArchV65,
338345 FeatureDuplex, FeatureMemNoShuf, FeatureMemops, FeatureNVJ,
339 FeaturePackets]>;
346 FeatureNVS, FeaturePackets]>;
340347
341348 //===----------------------------------------------------------------------===//
342349 // Declare the target which we are implementing
29822982
29832983 // Returns true, if a ST insn can be promoted to a new-value store.
29842984 bool HexagonInstrInfo::mayBeNewStore(const MachineInstr &MI) const {
2985 if (MI.mayStore() && !Subtarget.useNewValueStores())
2986 return false;
2987
29852988 const uint64_t F = MI.getDesc().TSFlags;
29862989 return (F >> HexagonII::mayNVStorePos) & HexagonII::mayNVStoreMask;
29872990 }
5353 bool UseMemops = false;
5454 bool UsePackets = false;
5555 bool UseNewValueJumps = false;
56 bool UseNewValueStores = false;
5657
5758 bool HasMemNoShuf = false;
5859 bool EnableDuplex = false;
154155 bool useMemops() const { return UseMemops; }
155156 bool usePackets() const { return UsePackets; }
156157 bool useNewValueJumps() const { return UseNewValueJumps; }
158 bool useNewValueStores() const { return UseNewValueStores; }
157159
158160 bool modeIEEERndNear() const { return ModeIEEERndNear; }
159161 bool useHVXOps() const { return HexagonHVXVersion > Hexagon::ArchEnum::V4; }