[PATCH] D39100: [ARM] Use PostRA machine scheduler when FeatureUseMISched is set
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 02:29:08 PDT 2017
evgeny777 updated this revision to Diff 119639.
evgeny777 added a comment.
Thanks for looking at it! Diff updated
https://reviews.llvm.org/D39100
Files:
lib/Target/ARM/ARMTargetMachine.cpp
test/CodeGen/ARM/cortex-a57-misched-alu.ll
Index: test/CodeGen/ARM/cortex-a57-misched-alu.ll
===================================================================
--- test/CodeGen/ARM/cortex-a57-misched-alu.ll
+++ test/CodeGen/ARM/cortex-a57-misched-alu.ll
@@ -1,5 +1,6 @@
; REQUIRES: asserts
; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=cortex-a57 -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s
+; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=cortex-a57 -mattr=+use-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s --check-prefix=POST-MISCHED
; Check the latency for ALU shifted operand variants.
;
@@ -60,6 +61,8 @@
; CHECK: Ready
; CHECK-NEXT: A57UnitI
+; Check that post RA MI scheduler is invoked with +use-misched
+; POST-MISCHED: Before post-MI-sched
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv8r-arm-none-eabi"
Index: lib/Target/ARM/ARMTargetMachine.cpp
===================================================================
--- lib/Target/ARM/ARMTargetMachine.cpp
+++ lib/Target/ARM/ARMTargetMachine.cpp
@@ -310,7 +310,14 @@
class ARMPassConfig : public TargetPassConfig {
public:
ARMPassConfig(ARMBaseTargetMachine &TM, PassManagerBase &PM)
- : TargetPassConfig(TM, PM) {}
+ : TargetPassConfig(TM, PM) {
+ if (TM.getOptLevel() != CodeGenOpt::None) {
+ ARMGenSubtargetInfo STI(TM.getTargetTriple(), TM.getTargetCPU(),
+ TM.getTargetFeatureString());
+ if (STI.hasFeature(ARM::FeatureUseMISched))
+ substitutePass(&PostRASchedulerID, &PostMachineSchedulerID);
+ }
+ }
ARMBaseTargetMachine &getARMTargetMachine() const {
return getTM<ARMBaseTargetMachine>();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39100.119639.patch
Type: text/x-patch
Size: 1733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171020/fd95c2c4/attachment.bin>
More information about the llvm-commits
mailing list