From be376cf6d4cd148c2fba88622ab35a48320cbffb Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Mon, 16 Sep 2002 16:07:19 +0000 Subject: [PATCH] Allow transformation DecomposeArrayRef(GetElementPtrInst* GEP) to be invoked on a single instruction at a time, for use in other passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3751 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Scalar.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 2649366ff45..20dd48e2de4 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -10,6 +10,8 @@ class Pass; class TargetData; +class BasicBlock; +class GetElementPtrInst; //===----------------------------------------------------------------------===// // @@ -60,9 +62,14 @@ Pass *createAggressiveDCEPass(); // instructions (using getelementpr and cast) so that each instruction has at // most one index (except structure references, which need an extra leading // index of [0]). -// + +// This pass decomposes all multi-dimensional references in a function. Pass *createDecomposeMultiDimRefsPass(); +// This function decomposes a single instance of such a reference. +// Return value: true if the instruction was replaced; false otherwise. +// +bool DecomposeArrayRef(GetElementPtrInst* GEP); //===----------------------------------------------------------------------===// //