[all-commits] [llvm/llvm-project] f70e39: [BasicBlockSections] Apply path cloning with -basi...
Rahman Lavaee via All-commits
all-commits at lists.llvm.org
Fri Oct 27 21:49:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f70e39ec173192058976805a2c51ac438bb2ff2f
https://github.com/llvm/llvm-project/commit/f70e39ec173192058976805a2c51ac438bb2ff2f
Author: Rahman Lavaee <rahmanl at google.com>
Date: 2023-10-27 (Fri, 27 Oct 2023)
Changed paths:
M llvm/include/llvm/CodeGen/BasicBlockSectionUtils.h
M llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
M llvm/include/llvm/CodeGen/MachineBasicBlock.h
M llvm/include/llvm/CodeGen/MachineFunction.h
M llvm/include/llvm/CodeGen/Passes.h
M llvm/include/llvm/InitializePasses.h
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
A llvm/lib/CodeGen/BasicBlockPathCloning.cpp
M llvm/lib/CodeGen/BasicBlockSections.cpp
M llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
M llvm/lib/CodeGen/CMakeLists.txt
M llvm/lib/CodeGen/CodeGen.cpp
M llvm/lib/CodeGen/MIRParser/MIParser.cpp
M llvm/lib/CodeGen/MachineBasicBlock.cpp
M llvm/lib/CodeGen/MachineFunction.cpp
M llvm/lib/CodeGen/TargetInstrInfo.cpp
M llvm/lib/CodeGen/TargetPassConfig.cpp
M llvm/test/CodeGen/X86/basic-block-labels-mir-parse.mir
A llvm/test/CodeGen/X86/basic-block-sections-cloning-1.ll
A llvm/test/CodeGen/X86/basic-block-sections-cloning-2.ll
A llvm/test/CodeGen/X86/basic-block-sections-cloning-indirect-invalid.ll
A llvm/test/CodeGen/X86/basic-block-sections-cloning-indirect.ll
A llvm/test/CodeGen/X86/basic-block-sections-cloning-invalid.ll
Log Message:
-----------
[BasicBlockSections] Apply path cloning with -basic-block-sections. (#68860)
https://github.com/llvm/llvm-project/commit/28b912687900bc0a67cd61c374fce296b09963c4
introduced the path cloning format in the basic-block-sections profile.
This PR validates and applies path clonings.
A path cloning is valid if all of these conditions hold:
1. All bb ids in the path are mapped to existing blocks.
2. Each two consecutive bb ids in the path have a successor relationship
in the CFG.
3. The path does not include a block with indirect branches, except
possibly as the last block.
Applying a path cloning involves cloning all blocks in the path (except
the first one) and setting up their branches.
Once all clonings are applied, the cluster information is used to guide
block layout in the modified function.
More information about the All-commits
mailing list