summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-04 21:11:52 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-04 21:11:52 +0000
commit1d15f7b02b8ac469d5d70b94aef924791297cb03 (patch)
tree6e7446306b62eb7cf5c53139a4dbb3073471ddd1 /lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
parent00ef67dc3ff07732cc793b60a41c1031c7263269 (diff)
downloadbcm5719-llvm-1d15f7b02b8ac469d5d70b94aef924791297cb03.tar.gz
bcm5719-llvm-1d15f7b02b8ac469d5d70b94aef924791297cb03.zip
[SimplifyCFG] Change recursive calls to llvm::SimplifyCFG to instead use an outer while loop to revisit.
Summary: The llvm::SimplifyCFG function creates a SimplifyCFGOpt object and calls run on it. There were numerous places reached from this run function that called back out llvm::SimplifyCFG which would create another SimplifyCFGOpt object. This is an inefficient use of stack space at minimum. We are also not passing along the LoopHeaders pointer passed into the outer llvm::SimplifyCFG call. So if its not null we lose it on the first recursion and get nullptr from there on. This patch adds an outer loop around the main BasicBlock simplifying code and adds a flag to the SimplifyCFGOpt class that can be set by to request another iteration. I don't think we can iterate based just on the change flag alone since some of the simplifications delete a basic block entirely leaving nothing to iterate on. Reviewers: bogner, eli.friedman, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52760 llvm-svn: 343816
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud