[PATCH] D84346: Adding Pass Dependencies for CodeGenPrepare

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 10:25:02 PDT 2020


AndrewLitteken created this revision.
AndrewLitteken added reviewers: efriedma, kmclaughlin.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

When adding a pass to the pipeline, there would be differences between in the generated code when the pass performed no operations, and when the pass was not present.

This pass adds dependencies for

- TargetTransformInfoWrapperPass
- TargetPassConfig
- LoopInfoWrapperPass
- TargetLibraryInfoWrapperPass

which are used but did not were not recorded using the `INITIALIZE_PASS_DEPENDENCY` macro to fix this inconsistency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84346

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp


Index: llvm/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -440,6 +440,10 @@
 INITIALIZE_PASS_BEGIN(CodeGenPrepare, DEBUG_TYPE,
                       "Optimize for code generation", false, false)
 INITIALIZE_PASS_DEPENDENCY(ProfileSummaryInfoWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
+INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
 INITIALIZE_PASS_END(CodeGenPrepare, DEBUG_TYPE,
                     "Optimize for code generation", false, false)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84346.279874.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200722/e03b9098/attachment.bin>


More information about the llvm-commits mailing list