masahi commented on a change in pull request #9223:
URL: https://github.com/apache/tvm/pull/9223#discussion_r728534141
##########
File path: src/target/llvm/llvm_common.cc
##########
@@ -139,8 +152,22 @@ std::unique_ptr<llvm::TargetMachine>
GetLLVMTargetMachine(const Target& target,
ICHECK(allow_null) << err << " target_triple=" << target_triple;
return nullptr;
}
- llvm::TargetMachine* tm =
- llvm_target->createTargetMachine(target_triple, mcpu, mattr, opt,
llvm::Reloc::PIC_);
+
+ Integer llvm_opt_level = target->GetAttr<Integer>("O").value_or(Integer(2));
Review comment:
See
https://github.com/apache/tvm/blob/3229cb329254764499dd672bb28fd9685ecd6a2e/src/target/llvm/codegen_llvm.cc#L346.
I think they refer to the same opt level.
I don't see why users would want to choose an opt level other than 3.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]