[all-commits] [llvm/llvm-project] 5db6ea: [X86] Avoid useless DomTree in flags copy lowering...
Alexis Engelke via All-commits
all-commits at lists.llvm.org
Thu Jul 4 07:41:29 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5db6eac244bd42aaefd0caac3f824b2e60060f52
https://github.com/llvm/llvm-project/commit/5db6eac244bd42aaefd0caac3f824b2e60060f52
Author: Alexis Engelke <engelke at in.tum.de>
Date: 2024-07-04 (Thu, 04 Jul 2024)
Changed paths:
M llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
M llvm/test/CodeGen/X86/O0-pipeline.ll
M llvm/test/CodeGen/X86/opt-pipeline.ll
Log Message:
-----------
[X86] Avoid useless DomTree in flags copy lowering (#97628)
Currently, flags copy lowering does two expensive things:
- It traverses the CFG in RPO, and
- It requires a dominator tree that is not preserved.
Most notably, it is the only machine dominator tree user at -O0.
Many functions have no flag copies to begin with, therefore, add an
early exit if EFLAGS has no COPY def.
The legacy pass manager has no way to dynamically decide whether an
analysis is required. Therefore, if there's a copy, get the dominator
tree from the pass manager, if it has one, otherwise, compute it.
These changes should make the pass very cheap for the common case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list