[PATCH] D58406: Fix IR/Analysis layering issue in OptBisect
Richard Trieu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 14:09:03 PST 2019
rtrieu created this revision.
rtrieu added a reviewer: dblaikie.
Herald added a subscriber: mehdi_amini.
OptBisect, a class in IR, depends on classes in Analysis. Analysis depends on IR, which creates a dependency loop. This patch attempts a minimal change to fix the issue. Instead of passing in objects to OptBisect, an opaque pointer is passed in instead. The type of the Pass passed in will determine what kind of pointer it is. For each Pass sub-class, getDescription is used to turn the pointer into an informational string. The sub-classes in Analysis will do the work that shouldn't have been in IR.
https://reviews.llvm.org/D58406
Files:
include/llvm/Analysis/CallGraphSCCPass.h
include/llvm/Analysis/LoopPass.h
include/llvm/Analysis/RegionPass.h
include/llvm/IR/OptBisect.h
include/llvm/Pass.h
lib/Analysis/CallGraphSCCPass.cpp
lib/Analysis/LoopPass.cpp
lib/Analysis/RegionPass.cpp
lib/IR/OptBisect.cpp
lib/IR/Pass.cpp
unittests/IR/LegacyPassManagerTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58406.187437.patch
Type: text/x-patch
Size: 13866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190219/a1dc60c0/attachment.bin>
More information about the llvm-commits
mailing list