From 76b0c64bc5b4ce9788dfdd68ee9822abf038413d Mon Sep 17 00:00:00 2001 From: Prakalp Srivastava <psrivas2@illinois.edu> Date: Wed, 2 Mar 2016 17:29:19 -0600 Subject: [PATCH] Added function in DFNode to check if this is an allocation node --- llvm/include/llvm/IR/DFGraph.h | 4 ++++ llvm/include/llvm/IR/IntrinsicsVISC.td | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/llvm/include/llvm/IR/DFGraph.h b/llvm/include/llvm/IR/DFGraph.h index 8fc52b865a..7820e8c20e 100644 --- a/llvm/include/llvm/IR/DFGraph.h +++ b/llvm/include/llvm/IR/DFGraph.h @@ -358,6 +358,10 @@ public: return isEntryNode() || isExitNode(); } + bool isAllocationNode() { + // If Allocation Property is defined then it is not an allocation node + return PropertyList.count(Allocation) != 0; + } void setRank(int r); bool isEntryNode(); bool isExitNode(); diff --git a/llvm/include/llvm/IR/IntrinsicsVISC.td b/llvm/include/llvm/IR/IntrinsicsVISC.td index e7edce15af..c4df5f488c 100644 --- a/llvm/include/llvm/IR/IntrinsicsVISC.td +++ b/llvm/include/llvm/IR/IntrinsicsVISC.td @@ -163,6 +163,10 @@ let TargetPrefix = "visc" in { */ def int_visc_barrier : Intrinsic<[], [], []>; + /* Memory allocation inside the graph + * i8* llvm.visc.malloc(); + */ + def int_visc_malloc : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], []>; /* Find the vector length supported by target architecture * intrinsic - -- GitLab