[PIR] standardize the use of value[-5]. by winter-wang · Pull Request #57461 · PaddlePaddle/Paddle

PR types

Others

PR changes

APIs

Description

规范化代码中对Value的使用[-5]。

Value分两种,OpResult和BlockArgument. 由于之前没有BlockArgument, 大家都是混用Value和OpResult, 现在有了BlockArguemnt, 需要区分Value和OpResult的使用。
在需要支持BlockArgument的地方,将原本的OpResult升级为Value,使其能够兼容BlockArgument的行为。

本pr内容:

  • 移除pir::Value中的GetDefiningOp接口。
    -BlockArgument没有defining op,因此,本pr移除该接口。 对OpReusult而言,已存在功能等价的接口owner()。
  • 在TypeId、Type、OpInfo中移除相应的哈希友元,新增向const void的隐式类型转换。统一采用const void进行哈希计算。
  • 移除Type中无意义的const_cast使用。

参考pr:

Other

Pcard-67164