[PATCH] D19513: Add optimization bisect opt-in calls for Mips passes

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 16:53:38 PDT 2016


andrew.w.kaylor created this revision.
andrew.w.kaylor added a reviewer: dsanders.
andrew.w.kaylor added a subscriber: llvm-commits.
andrew.w.kaylor set the repository for this revision to rL LLVM.
Herald added a reviewer: vkalintiris.
Herald added subscribers: sdardis, dsanders.

This patch adds a call to opt-in to the optimization bisect mechanism into the only Mips-specific pass that I was confident could be safely skipped.

I selected the pass to be skipped based on the fact that it was not added at CodeGenOpt::None in MipsTargetMachine.cpp.  Based on that criteria, I did not add opt-in calls to the following passes:

Mips16HardFloat
MipsConstantIslands
MipsHazardSchedule
MipsModuleDAGToDAGISel
MipsLongBranch
MipsOs16
Filler (delay slot filler)

During the original opt bisect code review there was speculation that MipsOs16 might be skippable, but since it isn't omitted for CodeGenOpt::None I decided to leave it alone for now.

Note that the call to skipFunction() will also check for the "optnone" function attribute, so this can theoretically result in passes being skipped even when optimization bisect is not being done. However, I believe that any pass that can be safely skipped should be skipped for functions with the optnone attribute.

Repository:
  rL LLVM

http://reviews.llvm.org/D19513

Files:
  lib/Target/Mips/MipsOptimizePICCall.cpp

Index: lib/Target/Mips/MipsOptimizePICCall.cpp
===================================================================
--- lib/Target/Mips/MipsOptimizePICCall.cpp
+++ lib/Target/Mips/MipsOptimizePICCall.cpp
@@ -174,6 +174,9 @@
 
 // OptimizePICCall methods.
 bool OptimizePICCall::runOnMachineFunction(MachineFunction &F) {
+  if (skipFunction(*F.getFunction()))
+    return false;
+
   if (static_cast<const MipsSubtarget &>(F.getSubtarget()).inMips16Mode())
     return false;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19513.54946.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/f54e11a2/attachment.bin>


More information about the llvm-commits mailing list