[NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs
authorMircea Trofin <mtrofin@google.com>
Thu, 19 Nov 2020 04:54:04 +0000 (20:54 -0800)
committerMircea Trofin <mtrofin@google.com>
Thu, 19 Nov 2020 05:20:21 +0000 (21:20 -0800)
commit8ab2353a4c3dc430b28190b98b16418ef8ffce30
tree7c43d5083cb5b2a11f973fc680370b57b74206dd
parent43c0e4f6657666df335a4bb4dad74f32fcfef607
[NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs

The lookup logic is also reusable.

Also refactored the API to return the loaded vector - this makes it more
clear what state it is in in the case of error (as it won't be
returned).

Differential Revision: https://reviews.llvm.org/D91759
llvm/include/llvm/Analysis/Utils/TFUtils.h
llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
llvm/lib/Analysis/TFUtils.cpp