/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test
src/opt/ImproveMemoryOps.h
34 строки
1 KB
Arina Neshlyaeva
Ported individual passes to new PM
10 июл 2023, 23:08
10 июл 2023, 23:08
49d0506
Код
Авторство
О чём код?
/* Copyright (c) 2022-2023, Intel Corporation SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include "ISPCPass.h" namespace ispc { /** When the front-end emits gathers and scatters, it generates an array of vector-width pointers to represent the set of addresses to read from or write to. This optimization detects cases when the base pointer is a uniform pointer or when the indexing is into an array that can be converted into scatters/gathers from a single base pointer and an array of offsets. See for example the comments discussing the __pseudo_gather functions in builtins.cpp for more information about this. */ class ImproveMemoryOpsPass : public llvm::PassInfoMixin<ImproveMemoryOpsPass> { public: explicit ImproveMemoryOpsPass() {} static llvm::StringRef getPassName() { return "Improve Memory Ops"; } llvm::PreservedAnalyses run(llvm::Function &F, llvm::FunctionAnalysisManager &FAM); private: bool improveMemoryOps(llvm::BasicBlock &BB); }; } // namespace ispc