@@ -365,6 +365,34 @@ class TriggerVerifierErrorPass
365
365
static StringRef name () { return " TriggerVerifierErrorPass" ; }
366
366
};
367
367
368
+ // A pass requires all MachineFunctionProperties.
369
+ // DO NOT USE THIS EXCEPT FOR TESTING!
370
+ class RequireAllMachineFunctionPropertiesPass
371
+ : public MachinePassInfoMixin<RequireAllMachineFunctionPropertiesPass> {
372
+ public:
373
+ PreservedAnalyses run (MachineFunction &MF, MachineFunctionAnalysisManager &) {
374
+ PropertyChanger PC (MF);
375
+ return PreservedAnalyses::none ();
376
+ }
377
+
378
+ static MachineFunctionProperties getRequiredProperties () {
379
+ MachineFunctionProperties MFProps;
380
+ MFProps.set (MachineFunctionProperties::Property::FailedISel);
381
+ MFProps.set (MachineFunctionProperties::Property::FailsVerification);
382
+ MFProps.set (MachineFunctionProperties::Property::IsSSA);
383
+ MFProps.set (MachineFunctionProperties::Property::Legalized);
384
+ MFProps.set (MachineFunctionProperties::Property::NoPHIs);
385
+ MFProps.set (MachineFunctionProperties::Property::NoVRegs);
386
+ MFProps.set (MachineFunctionProperties::Property::RegBankSelected);
387
+ MFProps.set (MachineFunctionProperties::Property::Selected);
388
+ MFProps.set (MachineFunctionProperties::Property::TiedOpsRewritten);
389
+ MFProps.set (MachineFunctionProperties::Property::TracksDebugUserValues);
390
+ MFProps.set (MachineFunctionProperties::Property::TracksLiveness);
391
+ return MFProps;
392
+ }
393
+ static StringRef name () { return " RequireAllMachineFunctionPropertiesPass" ; }
394
+ };
395
+
368
396
} // namespace
369
397
370
398
PassBuilder::PassBuilder (TargetMachine *TM, PipelineTuningOptions PTO,
0 commit comments