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

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 09:47:33 PST 2019


andrew.w.kaylor added a comment.

For the record, I'm not sure about the previous decision that passing strings is too expensive. On the one hand, bisection is almost always disabled and is disabled in 100% of cases where anyone cares about compile time (though that may not be true of all opt gate use cases). On the other hand, even for a relatively large file with many functions and loops this is going to be on the order of 200,000 calls to this interface. Sure, building 200,000 strings isn't cheap, but in a compilation that's running 200,000 optimization passes it's minuscule.

I'm OK with either solution, and the latest revision looks good to me. I just don't think we need to go to any great lengths just to avoid building a string before running a pass. If we're really concerned about the string cost, an OptPassGate::isEnabled() call would likely accomplish the same thing.


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

https://reviews.llvm.org/D58406





More information about the llvm-commits mailing list