[llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 11:40:14 PDT 2025
================
@@ -24,18 +24,24 @@
//
//===----------------------------------------------------------------------===//
-#include "MCTargetDesc/NVPTXBaseInfo.h"
+#include "llvm/Support/NVPTXAddrSpace.h"
#include "NVPTX.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/Function.h"
+#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
using namespace llvm;
+using namespace NVPTXAS;
namespace {
class NVPTXLowerAlloca : public FunctionPass {
bool runOnFunction(Function &F) override;
+ bool doInitialization(Module &M) override;
----------------
AlexMaclean wrote:
Instead of using `doInitializaiton`, lets make this a module pass. This seems clearer and will be more compatible with the New Pass Manager.
https://github.com/llvm/llvm-project/pull/154814
More information about the llvm-commits
mailing list