/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test
src/opt/MakeInternalFuncsStatic.h
31 строка
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 { /** There are a number of target-specific functions that we use during these optimization passes. By the time we are done with optimization, any uses of these should be inlined and no calls to these functions should remain. This pass marks all of these functions as having private linkage so that subsequent passes can eliminate them as dead code, thus cleaning up the final code output by the compiler. We can't just declare these as static from the start, however, since then they end up being eliminated as dead code during early optimization passes even though we may need to generate calls to them during later optimization passes. */ class MakeInternalFuncsStaticPass : public llvm::PassInfoMixin<MakeInternalFuncsStaticPass> { public: explicit MakeInternalFuncsStaticPass() {} static llvm::StringRef getPassName() { return "Make internal funcs \"static\""; } llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &MAM); }; } // namespace ispc