Skip to content

Commit

Permalink
Improve vectorization of bindings for the newbackend (#10875)
Browse files Browse the repository at this point in the history
- Turn on vectorization of bindings when `--newBackend` is used.
- Fix vectorization of some cases by using the indexed prefix in
  flattenCrefSplitSubscripts instead of the non-indexed one.
  • Loading branch information
perost committed Jun 20, 2023
1 parent b18049e commit 18f104f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFFlatten.mo
Expand Up @@ -1427,7 +1427,7 @@ protected
algorithm
sub_map := UnorderedMap.new<SubscriptList>(InstNode.hash, InstNode.refEqual);

for cr in ComponentRef.toListReverse(Prefix.prefix(prefix)) loop
for cr in ComponentRef.toListReverse(Prefix.indexedPrefix(prefix)) loop
if ComponentRef.hasSubscripts(cr) then
UnorderedMap.addUnique(ComponentRef.node(cr), ComponentRef.getSubscripts(cr), sub_map);
end if;
Expand Down
1 change: 1 addition & 0 deletions OMCompiler/Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -297,6 +297,7 @@ function resetGlobalFlags
algorithm
if Flags.getConfigBool(Flags.NEW_BACKEND) then
FlagsUtil.set(Flags.NF_SCALARIZE, false);
FlagsUtil.set(Flags.VECTORIZE_BINDINGS, true);
end if;

// gather here all the flags to disable expansion
Expand Down

0 comments on commit 18f104f

Please sign in to comment.