[llvm] 5a7b39c - [llc] Use CPUStr instead of calling codegen::getMCPU(). NFC
Weining Lu via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 17:49:27 PDT 2022
Author: Weining Lu
Date: 2022-08-31T08:48:58+08:00
New Revision: 5a7b39ce75a70855aa2eb1146275977b9f655588
URL: https://github.com/llvm/llvm-project/commit/5a7b39ce75a70855aa2eb1146275977b9f655588
DIFF: https://github.com/llvm/llvm-project/commit/5a7b39ce75a70855aa2eb1146275977b9f655588.diff
LOG: [llc] Use CPUStr instead of calling codegen::getMCPU(). NFC
`getCPUStr()` fallsback to `getMCPU()`.
The only difference between `getCPUStr()` and `getMCPU()` is that
`getCPUStr()` handles `-mcpu=native`. That doesn't matter for this case.
This is just a simplification of the original code and it does not
change the functionality. So no new tests added.
Differential Revision: https://reviews.llvm.org/D132849
Added:
Modified:
llvm/tools/llc/llc.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index f084ee2daa93..24017dbafedc 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -467,8 +467,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
};
auto MAttrs = codegen::getMAttrs();
- bool SkipModule = codegen::getMCPU() == "help" ||
- (!MAttrs.empty() && MAttrs.front() == "help");
+ bool SkipModule =
+ CPUStr == "help" || (!MAttrs.empty() && MAttrs.front() == "help");
CodeGenOpt::Level OLvl = CodeGenOpt::Default;
switch (OptLevel) {
More information about the llvm-commits
mailing list