projects
/
platform
/
upstream
/
tvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a05f73e
)
[codegen][Build] it's more readable to move the if condition out of the loop (#4501)
author
Liang ZOU
<liang.d.zou@gmail.com>
Wed, 11 Dec 2019 17:33:08 +0000
(
01:33
+0800)
committer
Zhi
<5145158+zhiics@users.noreply.github.com>
Wed, 11 Dec 2019 17:33:08 +0000
(09:33 -0800)
src/codegen/codegen.cc
patch
|
blob
|
history
diff --git
a/src/codegen/codegen.cc
b/src/codegen/codegen.cc
index
8464e3d
..
ded8fce
100644
(file)
--- a/
src/codegen/codegen.cc
+++ b/
src/codegen/codegen.cc
@@
-41,8
+41,8
@@
runtime::Module Build(const Array<LoweredFunc>& funcs,
mode = mode.substr(0, pos);
}
Array<LoweredFunc> transformed_funcs;
-
for (const auto& x : funcs
) {
-
if (BuildConfig::Current()->disable_assert
) {
+
if (BuildConfig::Current()->disable_assert
) {
+
for (const auto& x : funcs
) {
auto func = ir::SkipAssert(x);
transformed_funcs.push_back(func);
}