llvm-project/llvm/include/llvm/CodeGen/ShadowStackGCLowering.h
paperchalice 1c43e64d70
[CodeGen] Port ShadowStackGCLowering to new pass manager (#75324)
IIUC the new pass system was designed with parallelism. This pass needs
to add some global variables into the current module, this is not
allowed by

[WritingAnLLVMPass](https://llvm.org/docs/WritingAnLLVMPass.html#the-functionpass-class),
so convert it to module pass, see FIXME in `GetFrameMap`.

Therefore, this will trigger assertion in `CodeGenPassBuilder`:
effd47ed45/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h (L200-L207)
Will fix it in future.
2024-01-06 09:25:15 +08:00

25 lines
745 B
C++

//===- llvm/CodeGen/ShadowStackGCLowering.h ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SHADOWSTACKGCLOWERING_H
#define LLVM_CODEGEN_SHADOWSTACKGCLOWERING_H
#include "llvm/IR/PassManager.h"
namespace llvm {
class ShadowStackGCLoweringPass
: public PassInfoMixin<ShadowStackGCLoweringPass> {
public:
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
};
} // namespace llvm
#endif // LLVM_CODEGEN_SHADOWSTACKGCLOWERING_H