[PATCH] D155617: Pass to annotate functions with appropriate optimization level.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 11:53:32 PDT 2023
mtrofin added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp:84
- for (Function &F : M.functions())
- forceAttributes(F);
+ auto BufferOrError = MemoryBuffer::getFileOrSTDIN(CSVFilePath);
+ if (!BufferOrError) {
----------------
I'd check explicitly that `CSVFilePath.empty()`. Right now you're saying "we'll do the other behavior if the csv file path is invalid", but that's surprising to a user that means to use a csv file and mis-types it. So it should be:
- if the CSVFilePath is empty (== not given), then do the old thing
- otherwise, do the new thing, which includes emitting error if the path is invalid.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155617/new/
https://reviews.llvm.org/D155617
More information about the llvm-commits
mailing list