Allow transformation DecomposeArrayRef(GetElementPtrInst* GEP) to
authorVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 16 Sep 2002 16:07:19 +0000 (16:07 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 16 Sep 2002 16:07:19 +0000 (16:07 +0000)
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

index 2649366ff450aaf9b28062e3e75b7bb324c7ae4b..20dd48e2de48403f285398df0c94266293d00bc5 100644 (file)
@@ -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);
 
 //===----------------------------------------------------------------------===//
 //