[PATCH] D58406: Fix IR/Analysis layering issue in OptBisect

Richard Trieu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 19:52:39 PST 2019


rtrieu added a comment.

Sounds like this is good with a comment on the IRDescription.  I'll commit this for now and leave the suggestions for follow-ups.  There's two follow-ups if any is interested in perusing:

1. Change shouldRunPass to take a StringRef instead of Pass pointer.

@fedor.sergeev says this will work better with the new PM, however this will also take away the ability of OptPassGate to use information in the Pass to decide to run the pass.  Notably, LegacyPassManagerTest.cpp uses it to only run on Module IR units.

2. Change IRDescription from StringRef to Twine.

This looks possible for all the getDescription functions and may reduce a bit of time from skipping string construction.  All the strings returned from getDescription are created from a mix of string literals and StringRef's, which should handle.  Then shouldRunPass and checkPass would also need to have their second parameters changed to Twine.  Since we are already gating the string construction on isEnabled, this will provide benefit only in a few cases.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58406/new/

https://reviews.llvm.org/D58406





More information about the llvm-commits mailing list