]> granicus.if.org Git - llvm/commitdiff
Revert "Enable MachineOutliner by default under -Oz for AArch64"
authorJessica Paquette <jpaquette@apple.com>
Fri, 27 Jul 2018 17:25:38 +0000 (17:25 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 27 Jul 2018 17:25:38 +0000 (17:25 +0000)
It failed an Asan test on a bot:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/21543/steps/check-llvm%20asan/logs/stdio

Fixing that before recommitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338136 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64InstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.h
lib/Target/AArch64/AArch64TargetMachine.cpp
test/CodeGen/AArch64/O3-pipeline.ll
test/CodeGen/AArch64/arm64-memset-to-bzero.ll
test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll
test/CodeGen/AArch64/cond-sel.ll
test/CodeGen/AArch64/machine-outliner-default.mir [deleted file]
test/CodeGen/AArch64/machine-outliner-flags.ll
test/CodeGen/AArch64/max-jump-table.ll

index 9e5c0b83a4ac64690113f7d1c4ced1da6eb66176..dc3fa4f8c1d80b9b739e67c2eae944f3e7eea261 100644 (file)
@@ -5478,8 +5478,3 @@ MachineBasicBlock::iterator AArch64InstrInfo::insertOutlinedCall(
 
   return CallPt;
 }
-
-bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault(
-  MachineFunction &MF) const {
-  return MF.getFunction().optForMinSize();
-}
index 585cbd4b9c7800e8b991f4ab432a58d8162ab28a..0e5953f6216d504069b71871b72c816810de45b1 100644 (file)
@@ -249,7 +249,6 @@ public:
   insertOutlinedCall(Module &M, MachineBasicBlock &MBB,
                      MachineBasicBlock::iterator &It, MachineFunction &MF,
                      const outliner::Candidate &C) const override;
-  bool shouldOutlineFromFunctionByDefault(MachineFunction &MF) const override;
   /// Returns true if the instruction sets to an immediate value that can be
   /// executed more efficiently.
   bool isExynosResetFast(const MachineInstr &MI) const;
index 120d71381c675ef5141b6f6c934eb072c6a123ff..01a997e5aed783e77f545eb4538c84d1cc712e54 100644 (file)
@@ -255,9 +255,6 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, const Triple &TT,
 
   // AArch64 supports the MachineOutliner.
   setMachineOutliner(true);
-
-  // AArch64 supports default outlining behaviour.
-  setSupportsDefaultOutlining(true);
 }
 
 AArch64TargetMachine::~AArch64TargetMachine() = default;
index f0c7e4e67c128acb2a909b03838f6f9e2cfc5fbc..e482682fc9d9502df8968fa7560b71a92a9fffe2 100644 (file)
 ; CHECK-NEXT:       Insert fentry calls
 ; CHECK-NEXT:       Insert XRay ops
 ; CHECK-NEXT:       Implement the 'patchable-function' attribute
-; CHECK-NEXT:     Machine Outliner
-; CHECK-NEXT:     FunctionPass Manager
 ; CHECK-NEXT:       Lazy Machine Block Frequency Analysis
 ; CHECK-NEXT:       Machine Optimization Remark Emitter
 ; CHECK-NEXT:       AArch64 Assembly Printer
index ab819a42729acc9261d8ab81a24b31c9d0ae4bae..0afe1c006b0fc833a2166603cc7e3a86a86fc51c 100644 (file)
@@ -1,6 +1,6 @@
-; RUN: llc %s -enable-machine-outliner=never -mtriple=arm64-apple-darwin -o - \
-; RUN: | FileCheck --check-prefixes=CHECK,CHECK-DARWIN %s
-; RUN: llc %s -enable-machine-outliner=never -mtriple=arm64-linux-gnu -o - | \
+; RUN: llc %s -mtriple=arm64-apple-darwin -o - | \
+; RUN:   FileCheck --check-prefixes=CHECK,CHECK-DARWIN %s
+; RUN: llc %s -mtriple=arm64-linux-gnu -o - | \
 ; RUN:   FileCheck --check-prefixes=CHECK,CHECK-LINUX %s
 ; <rdar://problem/14199482> ARM64: Calls to bzero() replaced with calls to memset()
 
index 452c822e43bcfe2f8757c73874def32faa5b684c..7efb4bf6d5963831c842b77f153a98bfa447bbc8 100644 (file)
@@ -26,8 +26,8 @@
 ; requested.  (This hard-codes the previous pass to the Assembly Printer,
 ; please adjust accordingly.)
 
-; HOTNESS:      Freeing Pass 'Machine Outliner'
-; HOTNESS-NEXT:  Executing Pass 'Function Pass Manager'
+; HOTNESS:      Executing Pass 'Implement the 'patchable-function' attribute'
+; HOTNESS-NEXT:  Freeing Pass 'Implement the 'patchable-function' attribute'
 ; HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
 ; HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
 ; HOTNESS-NEXT: Building MachineBlockFrequencyInfo on the fly
@@ -41,8 +41,8 @@
 ; HOTNESS: arm64-summary-remarks.ll:5:0: 1 instructions in function (hotness: 33)
 
 
-; NO_HOTNESS:      Freeing Pass 'Machine Outliner'
-; NO_HOTNESS-NEXT:  Executing Pass 'Function Pass Manager'
+; NO_HOTNESS:      Executing Pass 'Implement the 'patchable-function' attribute'
+; NO_HOTNESS-NEXT:  Freeing Pass 'Implement the 'patchable-function' attribute'
 ; NO_HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
 ; NO_HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
 ; NO_HOTNESS-NEXT: Executing Pass 'AArch64 Assembly Printer'
index 691cbcf1a5df30a132868b5fb44f38c66243825a..b39cea1f6192c86d7fe4903baeeaa7b9e020bb6b 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc -enable-machine-outliner=never -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mcpu=cyclone | FileCheck %s
-; RUN: llc -enable-machine-outliner=never -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s
+; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mcpu=cyclone | FileCheck %s
+; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s
 
 @var32 = global i32 0
 @var64 = global i64 0
diff --git a/test/CodeGen/AArch64/machine-outliner-default.mir b/test/CodeGen/AArch64/machine-outliner-default.mir
deleted file mode 100644 (file)
index 698a2fc..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# RUN: llc -mtriple=aarch64--- -run-pass=machine-outliner \
-# RUN: -verify-machineinstrs %s -o - | FileCheck %s
-
---- |
-  define void @outline_1() #0 { ret void }
-  define void @outline_2() #0 { ret void }
-  define void @outline_3() #0 { ret void }
-  define void @dont_outline() #1 { ret void }
-
-  attributes #0 = { noredzone minsize optsize }
-  attributes #1 = { noredzone }
-...
----
-
-name:           outline_1
-tracksRegLiveness: true
-body:             |
-  bb.0:
-    ; CHECK-LABEL: bb.0:
-    ; CHECK: OUTLINED
-    liveins: $w8, $wzr
-    $w8 = ORRWri $wzr, 1
-    $w8 = ORRWri $wzr, 2
-    $w8 = ORRWri $wzr, 3
-    $w8 = ORRWri $wzr, 4
-    RET undef $lr
-...
----
-
-name:           outline_2
-tracksRegLiveness: true
-body:             |
-  bb.0:
-    ; CHECK-LABEL: bb.0:
-    ; CHECK: OUTLINED
-    liveins: $w8, $wzr
-    $w8 = ORRWri $wzr, 1
-    $w8 = ORRWri $wzr, 2
-    $w8 = ORRWri $wzr, 3
-    $w8 = ORRWri $wzr, 4
-    RET undef $lr
-...
----
-
-name:           outline_3
-tracksRegLiveness: true
-body:             |
-  bb.0:
-    ; CHECK-LABEL: bb.0:
-    ; CHECK: OUTLINED
-    liveins: $w8, $wzr
-    $w8 = ORRWri $wzr, 1
-    $w8 = ORRWri $wzr, 2
-    $w8 = ORRWri $wzr, 3
-    $w8 = ORRWri $wzr, 4
-    RET undef $lr
-...
----
-
-name:           dont_outline
-tracksRegLiveness: true
-body:             |
-  bb.0:
-    ; CHECK-LABEL: bb.0:
-    ; CHECK-NOT: BL
-    liveins: $w8, $wzr
-    $w8 = ORRWri $wzr, 1
-    $w8 = ORRWri $wzr, 2
-    $w8 = ORRWri $wzr, 3
-    $w8 = ORRWri $wzr, 4
-    RET undef $lr
index c435093b794e370f7b262457987a72113f784f6c..e00a19099cf2f6011db74c46e1842e73c0236db3 100644 (file)
@@ -14,7 +14,7 @@
 ; RUN: | FileCheck %s -check-prefix=NEVER
 
 ; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
-; RUN: --debug-only=machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \
+; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
 ; RUN: | FileCheck %s -check-prefix=NOT-ADDED
 
 ; RUN: llc %s -O=0 -debug-pass=Structure -verify-machineinstrs \
 ; Cases where it should be added:
 ;  * -enable-machine-outliner
 ;  * -enable-machine-outliner=always
-;  * -enable-machine-outliner is not passed (AArch64 supports
-;     target-default outlining)
 ;
 ; Cases where it should not be added:
 ;  * -O0 or equivalent
+;  * -enable-machine-outliner is not passed
 ;  * -enable-machine-outliner=never is passed
 
 ; ALWAYS: Machine Outliner
@@ -39,8 +38,7 @@
 ; ENABLE: Machine Outliner
 ; ENABLE: Machine Outliner: Running on all functions
 ; NEVER-NOT: Machine Outliner
-; NOT-ADDED: Machine Outliner
-; NOT-ADDED: Machine Outliner: Running on target-default functions
+; NOT-ADDED-NOT: Machine Outliner
 ; OPTNONE-NOT: Machine Outliner
 
 define void @foo() {
index 44dde7b1cd0661e9c47aeadfab4f698484012787..612eba8f2ceba758136bd2f3d34b638d3542cb16 100644 (file)
@@ -89,7 +89,6 @@ entry:
 ; CHECKM1-NOT: %jump-table.1
 ; CHECKM3-NEXT: %jump-table.0:  %bb.1 %bb.2 %bb.3 %bb.4 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.7 %bb.5 %bb.6{{$}}
 ; CHECKM3-NOT: %jump-table.1
-; CHECK-DAG: End machine code for function jt2.
 
 bb1: tail call void @ext(i32 1) br label %return
 bb2: tail call void @ext(i32 2) br label %return