[all-commits] [llvm/llvm-project] 1bcb6a: [MBP] Enable duplicating return block to remove ju...
weiguozhi via All-commits
all-commits at lists.llvm.org
Wed Jun 21 11:57:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1bcb6a3da231ee3bcf8513880599b5d054f590a4
https://github.com/llvm/llvm-project/commit/1bcb6a3da231ee3bcf8513880599b5d054f590a4
Author: Guozhi Wei <carrot at google.com>
Date: 2023-06-21 (Wed, 21 Jun 2023)
Changed paths:
M llvm/lib/CodeGen/MachineBlockPlacement.cpp
M llvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll
A llvm/test/CodeGen/Thumb/branch-to-return.ll
M llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
M llvm/test/CodeGen/Thumb2/mve-vecreduce-loops.ll
Log Message:
-----------
[MBP] Enable duplicating return block to remove jump to return
Sometimes LLVM generates branch to return instruction, like PR63227.
It is because in function MachineBlockPlacement::canTailDuplicateUnplacedPreds
we avoid duplicating a BB into another already placed BB to prevent destroying
computed layout. But if the successor BB is a return block, duplicating it will
only reduce taken branches without hurt to any other branches.
Differential Revision: https://reviews.llvm.org/D153093
More information about the All-commits
mailing list