Skip to content

[flang] Implement !DIR$ NOVECTOR and !DIR$ NOUNROLL[_AND_JAM] #133885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

JDPailleux
Copy link
Contributor

Hi,
This patch implements support for the following directives :

  • !DIR$ NOUNROLL_AND_JAM to disable unrolling and jamming on a DO LOOP.
  • !DIR$ NOUNROLL to disable unrolling on a DO LOOP.
  • !DIR$ NOVECTOR to disable vectorization on a DO LOOP.

@JDPailleux JDPailleux requested review from kiranchandramohan and jeanPerier and removed request for kiranchandramohan April 1, 2025 08:55
Copy link
Contributor

@kiranchandramohan kiranchandramohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.

@JDPailleux JDPailleux force-pushed the jdp/flang/no-unroll-vector-directives branch from 7132c5a to ae5a0e4 Compare April 1, 2025 13:15
Copy link
Contributor

@kiranchandramohan kiranchandramohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.

va = mlir::LLVM::LoopVectorizeAttr::get(builder->getContext(),
/*disable=*/trueAttr,
{}, {}, {}, {}, {}, {});
has_attrs = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this patch. But has_attrs should be renamed to hasAttrs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll keep that in mind for the next one.

@JDPailleux JDPailleux merged commit c309abd into llvm:main Apr 2, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants