[PATCH] D110161: [TypePromotion][InterleaveAccess] Mark CFG as preserved in TypePromotion and InterleaveAccess passes
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 05:46:36 PDT 2021
dmgreen created this revision.
dmgreen added reviewers: avieira, SjoerdMeijer, samparker, NickGuy.
Herald added a subscriber: hiraditya.
dmgreen requested review of this revision.
Herald added a project: LLVM.
Neither of these passes modify the CFG, allowing us to preserve DomTree and LoopInfo across them by using setPreservesCFG.
https://reviews.llvm.org/D110161
Files:
llvm/lib/CodeGen/InterleavedAccessPass.cpp
llvm/lib/CodeGen/TypePromotion.cpp
llvm/test/CodeGen/ARM/O3-pipeline.ll
Index: llvm/test/CodeGen/ARM/O3-pipeline.ll
===================================================================
--- llvm/test/CodeGen/ARM/O3-pipeline.ll
+++ llvm/test/CodeGen/ARM/O3-pipeline.ll
@@ -47,8 +47,6 @@
; CHECK-NEXT: Transform functions to use DSP intrinsics
; CHECK-NEXT: Interleaved Access Pass
; CHECK-NEXT: Type Promotion
-; CHECK-NEXT: Dominator Tree Construction
-; CHECK-NEXT: Natural Loop Information
; CHECK-NEXT: CodeGen Prepare
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Exception handling preparation
Index: llvm/lib/CodeGen/TypePromotion.cpp
===================================================================
--- llvm/lib/CodeGen/TypePromotion.cpp
+++ llvm/lib/CodeGen/TypePromotion.cpp
@@ -183,6 +183,7 @@
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<TargetTransformInfoWrapperPass>();
AU.addRequired<TargetPassConfig>();
+ AU.setPreservesCFG();
}
StringRef getPassName() const override { return PASS_NAME; }
Index: llvm/lib/CodeGen/InterleavedAccessPass.cpp
===================================================================
--- llvm/lib/CodeGen/InterleavedAccessPass.cpp
+++ llvm/lib/CodeGen/InterleavedAccessPass.cpp
@@ -95,7 +95,7 @@
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<DominatorTreeWrapperPass>();
- AU.addPreserved<DominatorTreeWrapperPass>();
+ AU.setPreservesCFG();
}
private:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110161.373879.patch
Type: text/x-patch
Size: 1480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210921/1aa389dd/attachment.bin>
More information about the llvm-commits
mailing list