@@ -242,19 +242,6 @@ cannot. These materializations are used by the conversion framework to ensure
242
242
type safety during the conversion process. There are several types of
243
243
materializations depending on the situation.
244
244
245
- * Argument Materialization
246
-
247
- - An argument materialization is used when converting the type of a block
248
- argument during a [signature conversion](#region-signature-conversion).
249
- The new block argument types are specified in a `SignatureConversion`
250
- object. An original block argument can be converted into multiple
251
- block arguments, which is not supported everywhere in the dialect
252
- conversion. (E.g., adaptors support only a single replacement value for
253
- each original value.) Therefore, an argument materialization is used to
254
- convert potentially multiple new block arguments back into a single SSA
255
- value. An argument materialization is also used when replacing an op
256
- result with multiple values.
257
-
258
245
* Source Materialization
259
246
260
247
- A source materialization is used when a value was replaced with a value
@@ -343,17 +330,6 @@ class TypeConverter {
343
330
/// Materialization functions must be provided when a type conversion may
344
331
/// persist after the conversion has finished.
345
332
346
- /// This method registers a materialization that will be called when
347
- /// converting (potentially multiple) block arguments that were the result of
348
- /// a signature conversion of a single block argument, to a single SSA value
349
- /// with the old argument type.
350
- template <typename FnT,
351
- typename T = typename llvm::function_traits<FnT>::template arg_t<1>>
352
- void addArgumentMaterialization(FnT &&callback) {
353
- argumentMaterializations.emplace_back(
354
- wrapMaterialization<T>(std::forward<FnT>(callback)));
355
- }
356
-
357
333
/// This method registers a materialization that will be called when
358
334
/// converting a replacement value back to its original source type.
359
335
/// This is used when some uses of the original value persist beyond the main
@@ -406,12 +382,11 @@ done explicitly via a conversion pattern.
406
382
To convert the types of block arguments within a Region, a custom hook on the
407
383
` ConversionPatternRewriter ` must be invoked; ` convertRegionTypes ` . This hook
408
384
uses a provided type converter to apply type conversions to all blocks of a
409
- given region. As noted above, the conversions performed by this method use the
410
- argument materialization hook on the ` TypeConverter ` . This hook also takes an
411
- optional ` TypeConverter::SignatureConversion ` parameter that applies a custom
412
- conversion to the entry block of the region. The types of the entry block
413
- arguments are often tied semantically to the operation, e.g.,
414
- ` func::FuncOp ` , ` AffineForOp ` , etc.
385
+ given region. This hook also takes an optional
386
+ ` TypeConverter::SignatureConversion ` parameter that applies a custom conversion
387
+ to the entry block of the region. The types of the entry block arguments are
388
+ often tied semantically to the operation, e.g., ` func::FuncOp ` , ` AffineForOp ` ,
389
+ etc.
415
390
416
391
To convert the signature of just one given block, the
417
392
` applySignatureConversion ` hook can be used.
0 commit comments