-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nfc][mlgo][regalloc] Stop warnings about unused function
Added a `NoopSavedModelImpl` type which can be used as a mock AOT-ed saved model, and further minimize conditional compilation cases. This also removes unused function warnings on gcc.
- Loading branch information
Showing
2 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5a50ab4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Sorry for being a pain, but when compiling without asserts (-DLLVM_ENABLE_ASSERTIONS=OFF) I get a warning with clang8 on this patch:
In file included from ../lib/CodeGen/MLRegallocEvictAdvisor.cpp:20:
../include/llvm/Analysis/ReleaseModeModelRunner.h:82:15: error: private field 'ErrMsg' is not used [-Werror,-Wunused-private-field]
const char *ErrMsg = "The mock AOT-ed saved model is a compile-time stub and "
^
1 error generated.
Seems the llvm_unreachable macro doesn't use the provided string in NDEBUG builds.
Maybe just make ErrMsg public as well?
5a50ab4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot
llvm_unreachable
is itself a macro. Fixed.