[PATCH] D59688: [X86] Make post-ra scheduling macrofusion-aware.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 06:47:19 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL357384: [X86] Make post-ra scheduling macrofusion-aware. (authored by courbet, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59688?vs=193074&id=193081#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59688/new/
https://reviews.llvm.org/D59688
Files:
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.h
llvm/trunk/test/CodeGen/X86/testb-je-fusion.ll
Index: llvm/trunk/test/CodeGen/X86/testb-je-fusion.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/testb-je-fusion.ll
+++ llvm/trunk/test/CodeGen/X86/testb-je-fusion.ll
@@ -45,8 +45,8 @@
; BRANCHFUSION_POSTRA-LABEL: macrofuse_test_je:
; BRANCHFUSION_POSTRA: # %bb.0: # %entry
; BRANCHFUSION_POSTRA-NEXT: xorl %eax, %eax
-; BRANCHFUSION_POSTRA-NEXT: testl $512, %edi # imm = 0x200
; BRANCHFUSION_POSTRA-NEXT: movb $1, (%rsi)
+; BRANCHFUSION_POSTRA-NEXT: testl $512, %edi # imm = 0x200
; BRANCHFUSION_POSTRA-NEXT: je .LBB0_2
; BRANCHFUSION_POSTRA-NEXT: # %bb.1: # %if.then
; BRANCHFUSION_POSTRA-NEXT: movl $1, %eax
@@ -105,8 +105,8 @@
;
; BRANCHFUSION_POSTRA-LABEL: macrofuse_cmp_je:
; BRANCHFUSION_POSTRA: # %bb.0: # %entry
-; BRANCHFUSION_POSTRA-NEXT: cmpl $512, %edi # imm = 0x200
; BRANCHFUSION_POSTRA-NEXT: movb $1, (%rsi)
+; BRANCHFUSION_POSTRA-NEXT: cmpl $512, %edi # imm = 0x200
; BRANCHFUSION_POSTRA-NEXT: je .LBB1_1
; BRANCHFUSION_POSTRA-NEXT: # %bb.2: # %if.then
; BRANCHFUSION_POSTRA-NEXT: movl $1, %eax
Index: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp
@@ -14,6 +14,7 @@
#include "X86CallLowering.h"
#include "X86LegalizerInfo.h"
+#include "X86MacroFusion.h"
#include "X86RegisterBankInfo.h"
#include "X86Subtarget.h"
#include "MCTargetDesc/X86BaseInfo.h"
@@ -366,3 +367,8 @@
bool X86Subtarget::enableEarlyIfConversion() const {
return hasCMov() && X86EarlyIfConv;
}
+
+void X86Subtarget::getPostRAMutations(
+ std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const {
+ Mutations.push_back(createX86MacroFusionDAGMutation());
+}
Index: llvm/trunk/lib/Target/X86/X86Subtarget.h
===================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h
@@ -843,6 +843,9 @@
bool enableEarlyIfConversion() const override;
+ void getPostRAMutations(
+ std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const;
+
AntiDepBreakMode getAntiDepBreakMode() const override {
return TargetSubtargetInfo::ANTIDEP_CRITICAL;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59688.193081.patch
Type: text/x-patch
Size: 2348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190401/bf10922b/attachment.bin>
More information about the llvm-commits
mailing list