GlobalISel: Remove check for empty functions as these are invalid IR
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 27 Aug 2021 13:18:26 +0000 (09:18 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 27 Aug 2021 13:27:06 +0000 (09:27 -0400)
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

index ecfbe80..1939371 100644 (file)
@@ -3110,8 +3110,6 @@ static bool checkForMustTailInVarArgFn(bool IsVarArg, const BasicBlock &BB) {
 bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
   MF = &CurMF;
   const Function &F = MF->getFunction();
-  if (F.empty())
-    return false;
   GISelCSEAnalysisWrapper &Wrapper =
       getAnalysis<GISelCSEAnalysisWrapperPass>().getCSEWrapper();
   // Set the CSEConfig and run the analysis.