Is MachineLoop Simplify Form?

Is there any reason that we don’t have isLoopSimplifyForm method in LoopBase? Can I move it there?


I’ll take a wild guess that it’s because LoopSimplify doesn’t run on MachineLoops and lowering passes can invalidate it. You can always test for individual loop properties that you need instead of calling isLoopSimplify. For example, do you really need hasDedicatedExits()? If your MachineLoops don’t need it, then you should leave it’s implementation LoopInfo.cpp.