[llvm] r330263 - [llvm-exegesis] Early out if the scheduler models have no extra info.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 07:46:54 PDT 2018
Author: rksimon
Date: Wed Apr 18 07:46:54 2018
New Revision: 330263
URL: http://llvm.org/viewvc/llvm-project?rev=330263&view=rev
Log:
[llvm-exegesis] Early out if the scheduler models have no extra info.
We were calling getExtraProcessorInfo() without checking hasExtraProcessorInfo(), resulting in an assertion.
Modified:
llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
Modified: llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp?rev=330263&r1=330262&r2=330263&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp Wed Apr 18 07:46:54 2018
@@ -57,7 +57,7 @@ namespace exegesis {
void main() {
if (OpcodeName.empty() == (OpcodeIndex == 0)) {
llvm::report_fatal_error(
- "please provide one and only one of 'opcode-index' or 'opcode-name' ");
+ "please provide one and only one of 'opcode-index' or 'opcode-name'");
}
llvm::InitializeNativeTarget();
@@ -68,6 +68,9 @@ void main() {
const LLVMState State;
+ if (!State.getSubtargetInfo().getSchedModel().hasExtraProcessorInfo())
+ llvm::report_fatal_error("sched model is missing extra processor info!");
+
unsigned Opcode = OpcodeIndex;
if (Opcode == 0) {
// Resolve opcode name -> opcode.
More information about the llvm-commits
mailing list