[llvm] r297504 - [AArch64, X86] Additional debug information for MacroFusion
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 13:32:31 PST 2017
Hi Evandro,
You broke the Werror build (TII was unused except in debug builds), I've
gone ahead and fixed it in r297507.
-eric
On Fri, Mar 10, 2017 at 12:32 PM Evandro Menezes via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: evandro
> Date: Fri Mar 10 14:20:04 2017
> New Revision: 297504
>
> URL: http://llvm.org/viewvc/llvm-project?rev=297504&view=rev
> Log:
> [AArch64, X86] Additional debug information for MacroFusion
>
> In order to make it easier to parse information about the performance of
> MacroFusion, this patch adds the function and the instruction names to the
> debug output of this pass.
>
> Modified:
> llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp
> llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
>
> Modified: llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp?rev=297504&r1=297503&r2=297504&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp (original)
> +++ llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp Fri Mar 10
> 14:20:04 2017
> @@ -209,11 +209,19 @@ static bool scheduleAdjacentImpl(Schedul
> Dep.setLatency(0);
>
> ++NumFused;
> - DEBUG(dbgs() << "Macro fuse ";
> - Preds ? BSU->print(dbgs(), DAG) : ASU->print(dbgs(), DAG);
> - dbgs() << " - ";
> - Preds ? ASU->print(dbgs(), DAG) : BSU->print(dbgs(), DAG);
> - dbgs() << '\n');
> + DEBUG({ SUnit *LSU = Preds ? BSU : ASU;
> + SUnit *RSU = Preds ? ASU : BSU;
> + const MachineInstr *LMI = Preds ? BMI : AMI;
> + const MachineInstr *RMI = Preds ? AMI : BMI;
> +
> + dbgs() << DAG->MF.getName() << "(): Macro fuse ";
> + LSU->print(dbgs(), DAG);
> + dbgs() << " - ";
> + RSU->print(dbgs(), DAG);
> + dbgs() << " / " <<
> + TII->getName(LMI->getOpcode()) << " - " <<
> + TII->getName(RMI->getOpcode()) << '\n';
> + });
>
> return true;
> }
>
> Modified: llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MacroFusion.cpp?rev=297504&r1=297503&r2=297504&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86MacroFusion.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86MacroFusion.cpp Fri Mar 10 14:20:04 2017
> @@ -214,6 +214,7 @@ public:
>
> void X86MacroFusion::apply(ScheduleDAGInstrs *DAGInstrs) {
> ScheduleDAGMI *DAG = static_cast<ScheduleDAGMI*>(DAGInstrs);
> + const TargetInstrInfo &TII = *DAG->TII;
> const X86Subtarget &ST = DAG->MF.getSubtarget<X86Subtarget>();
>
> // For now, assume targets can only fuse with the branch.
> @@ -249,9 +250,12 @@ void X86MacroFusion::apply(ScheduleDAGIn
> SuccDep.setLatency(0);
>
> ++NumFused;
> - DEBUG(dbgs() << "Macro fuse ";
> + DEBUG(dbgs() << DAG->MF.getName() << "(): Macro fuse ";
> SU.print(dbgs(), DAG);
> - dbgs() << " - ExitSU" << '\n');
> + dbgs() << " - ExitSU" << " / " <<
> + TII.getName(Pred.getOpcode()) << " - " <<
> + TII.getName(Branch->getOpcode()) << '\n';
> +);
>
> break;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170310/32d46ef8/attachment-0001.html>
More information about the llvm-commits
mailing list