Skip to content

[LLVM] Validate generated LLVM module before optimization#14564

Merged
kparzysz-quic merged 3 commits intoapache:mainfrom
Lunderberg:llvm_verify_before_optimize
Apr 12, 2023
Merged

[LLVM] Validate generated LLVM module before optimization#14564
kparzysz-quic merged 3 commits intoapache:mainfrom
Lunderberg:llvm_verify_before_optimize

Conversation

@Lunderberg
Copy link
Copy Markdown
Contributor

Because LLVM's optimizations assume that the generated module is valid, validation should be done before optimization, rather than after. This has the additional benefit of providing error messages from LLVM that more closely relate to the TVM-generated LLVM IR, rather than the optimized LLVM IR.

Because LLVM's optimizations assume that the generated module is
valid, validation should be done before optimization, rather than
after.  This has the additional benefit of providing error messages
from LLVM that more closely relate to the TVM-generated LLVM IR,
rather than the optimized LLVM IR.
@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented Apr 10, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: llvm See #10317 for details

Generated by tvm-bot

@Lunderberg
Copy link
Copy Markdown
Contributor Author

This was useful for debugging purposes when tracking down a failure reported by llvm::verifyModule on a dev branch (related to #14563).

@Lunderberg
Copy link
Copy Markdown
Contributor Author

@tvm-bot rerun

@kparzysz-quic kparzysz-quic merged commit b1ab4dc into apache:main Apr 12, 2023
@Lunderberg Lunderberg deleted the llvm_verify_before_optimize branch April 12, 2023 18:49
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.

3 participants