| 244 | class Differ { |
| 245 | public: |
| 246 | Differ(opt::IRContext* src, opt::IRContext* dst, std::ostream& out, |
| 247 | Options options) |
| 248 | : src_context_(src), |
| 249 | dst_context_(dst), |
| 250 | src_(src->module()), |
| 251 | dst_(dst->module()), |
| 252 | options_(options), |
| 253 | out_(out), |
| 254 | src_id_to_(src_), |
| 255 | dst_id_to_(dst_), |
| 256 | id_map_(src_->IdBound(), dst_->IdBound()) { |
| 257 | // Cache function bodies in canonicalization order. |
| 258 | GetFunctionBodies(src_context_, &src_funcs_, &src_func_insts_); |
| 259 | GetFunctionBodies(dst_context_, &dst_funcs_, &dst_func_insts_); |
| 260 | } |
| 261 | |
| 262 | // Match ids or instructions of different sections. |
| 263 | void MatchCapabilities(); |