aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-09-16 16:07:19 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-09-16 16:07:19 +0000
commitbe376cf6d4cd148c2fba88622ab35a48320cbffb (patch)
treef62868f6196c70a0eef87297a59e0855468d40e8
parente8f1df6446bf6ebf368401b813a0ca8eee69d871 (diff)
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
-rw-r--r--include/llvm/Transforms/Scalar.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h
index 2649366ff4..20dd48e2de 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);
//===----------------------------------------------------------------------===//
//