Convert memref to riscv
convert_memref_to_riscv
¶
ConvertMemRefAllocOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
match_and_rewrite(op: memref.AllocOp, rewriter: PatternRewriter) -> None
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefDeallocOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
match_and_rewrite(op: memref.DeallocOp, rewriter: PatternRewriter) -> None
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefStoreOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
match_and_rewrite(op: memref.StoreOp, rewriter: PatternRewriter)
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefLoadOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
match_and_rewrite(op: memref.LoadOp, rewriter: PatternRewriter)
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefGlobalOp
dataclass
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
xlen: int = 32
class-attribute
instance-attribute
¶
__init__(xlen: int = 32) -> None
¶
match_and_rewrite(op: memref.GlobalOp, rewriter: PatternRewriter)
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefGetGlobalOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
match_and_rewrite(op: memref.GetGlobalOp, rewriter: PatternRewriter)
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
ConvertMemRefSubviewOp
¶
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
match_and_rewrite(op: memref.SubviewOp, rewriter: PatternRewriter)
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
ConvertMemRefToRiscvPass
dataclass
¶
Bases: ModulePass
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
name = 'convert-memref-to-riscv'
class-attribute
instance-attribute
¶
xlen: int = 32
class-attribute
instance-attribute
¶
apply(ctx: Context, op: ModuleOp) -> None
¶
Source code in xdsl/backend/riscv/lowering/convert_memref_to_riscv.py
get_strided_pointer(src_ptr: SSAValue, indices: Iterable[SSAValue], memref_type: MemRefType[Any]) -> tuple[list[Operation], SSAValue]
¶
Given a buffer pointer 'src_ptr' which was originally of type 'memref_type', returns a new pointer to the element being accessed by the 'indices'.