[PATCH] D79840: [PowerPC] Enable machine verification for 3 passes

Zhang Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 23:57:48 PDT 2020


ZhangKang created this revision.
ZhangKang added reviewers: jsji, nemanjai, steven.zhang, hfinkel, echristo, PowerPC.
ZhangKang added a project: LLVM.
Herald added subscribers: shchenz, wuzish, hiraditya.
ZhangKang edited the summary of this revision.

For PowerPC, there are 3 passes has disabled the machine verification.

  PPCTargetMachine.cpp:    addPass(&LiveVariablesID, false);
  PPCTargetMachine.cpp:    addPass(createPPCEarlyReturnPass(), false);
  PPCTargetMachine.cpp:  addPass(createPPCBranchSelectionPass(), false);

Three are 3 patches to fix the machine verification for PowerPC.
https://github.com/llvm/llvm-project/commit/782a4dd1a478e41857744b483b104b5e66857fbf is to fix the operand flag for ppc-early-ret pass.
https://github.com/llvm/llvm-project/commit/4bb0a1cb70732f16749df6d47fd85eb86d60f587 is to fix the liveness for ppc-expand-isel pass.
https://github.com/llvm/llvm-project/commit/302e11cd974255eafd80ee4fdf52054a00b3e4be is to fix 3 cases issues.

After upstream above 3 patches, all PowerPC pass can enable machine verification and all cases can be passes(enable EXPENSIVE_CHECKS).

This patch is to enable machine verification for above three passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79840

Files:
  llvm/lib/Target/PowerPC/PPCTargetMachine.cpp


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -504,7 +504,7 @@
     // PPCTLSDynamicCallPass uses LiveIntervals which previously dependent on
     // LiveVariables. This (unnecessary) dependency has been removed now,
     // however a stage-2 clang build fails without LiveVariables computed here.
-    addPass(&LiveVariablesID, false);
+    addPass(&LiveVariablesID);
     addPass(createPPCTLSDynamicCallPass());
   }
   if (EnableExtraTOCRegDeps)
@@ -531,9 +531,9 @@
   addPass(createPPCExpandISELPass());
 
   if (getOptLevel() != CodeGenOpt::None)
-    addPass(createPPCEarlyReturnPass(), false);
+    addPass(createPPCEarlyReturnPass());
   // Must run branch selection immediately preceding the asm printer.
-  addPass(createPPCBranchSelectionPass(), false);
+  addPass(createPPCBranchSelectionPass());
 }
 
 TargetTransformInfo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79840.263624.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/85eb8f80/attachment.bin>


More information about the llvm-commits mailing list