From: Vikram S. Adve Date: Mon, 16 Sep 2002 16:07:19 +0000 (+0000) Subject: Allow transformation DecomposeArrayRef(GetElementPtrInst* GEP) to X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=be376cf6d4cd148c2fba88622ab35a48320cbffb;p=oota-llvm.git 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 --- 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); //===----------------------------------------------------------------------===// //