Skip to content
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

[CINN]backend support stmt to expr visitor and run on func body #70739

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Hongqing-work
Copy link
Contributor

PR Category

CINN

PR Types

Improvements

Description

pcard-67164
This PR Improves CINN backend IR in the following part:

  • add stmt to expr default visitor
  • allow expr inplace modify
  • allow func pass only run on func body

Copy link

paddle-bot bot commented Jan 9, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Comment on lines +84 to +87
class ExprPass : public Pass<ir::Expr*> {
public:
explicit ExprPass(const std::string& name) : Pass(PassKind::PK_STMT, name) {}
virtual LogicalResult Run(ir::Expr expr) = 0;
virtual LogicalResult Run(ir::Expr* expr) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Expr本身已经是一个指针类型了,为什么要换成Expr*类型?

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