diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-11-07 00:43:24 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-11-07 00:43:24 +0000 |
| commit | b3ba9319f1ab748f63399f64d4492ee7b02e0353 (patch) | |
| tree | 5a3202635dc9f6be2674e615155a60046ab65a6b /llvm/lib/Target/SparcV9 | |
| parent | bf5d39fe3e3e1d698b565375977e61577eeb952a (diff) | |
| download | bcm5719-llvm-b3ba9319f1ab748f63399f64d4492ee7b02e0353.tar.gz bcm5719-llvm-b3ba9319f1ab748f63399f64d4492ee7b02e0353.zip | |
Decompose* is V9 specific, make it internal
llvm-svn: 17547
Diffstat (limited to 'llvm/lib/Target/SparcV9')
| -rw-r--r-- | llvm/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/SparcV9/SparcV9Internals.h | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp b/llvm/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp index 40e1be5d461..e530611647b 100644 --- a/llvm/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp +++ b/llvm/lib/Target/SparcV9/DecomposeMultiDimRefs.cpp @@ -15,7 +15,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Transforms/Scalar.h" +#include "SparcV9Internals.h" #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" #include "llvm/Constant.h" diff --git a/llvm/lib/Target/SparcV9/SparcV9Internals.h b/llvm/lib/Target/SparcV9/SparcV9Internals.h index 1f6599892c0..6cdc9285f1d 100644 --- a/llvm/lib/Target/SparcV9/SparcV9Internals.h +++ b/llvm/lib/Target/SparcV9/SparcV9Internals.h @@ -29,6 +29,7 @@ namespace llvm { class LiveRange; class SparcV9TargetMachine; class ModulePass; +class GetElementPtrInst; enum SparcV9InstrSchedClass { SPARC_NONE, /* Instructions with no scheduling restrictions */ @@ -97,6 +98,19 @@ FunctionPass *createStackSlotsPass(const TargetMachine &TM); /// FunctionPass *createPreSelectionPass(const TargetMachine &TM); +// DecomposeMultiDimRefs - Convert multi-dimensional references consisting of +// any combination of 2 or more array and structure indices into a sequence of +// 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. +FunctionPass *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); + /// Peephole optimization pass operating on machine code /// FunctionPass *createPeepholeOptsPass(const TargetMachine &TM); |

