diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-03-24 03:19:54 +0000 | 
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-03-24 03:19:54 +0000 | 
| commit | 025fdf98b6b68b78a8658ec70d96b2a736b173c8 (patch) | |
| tree | a4e3aa24b3361207642ed8f66bab7362006520d8 /llvm | |
| parent | 2d3ea22379a43b1e89f3937556fe21421ce15bbf (diff) | |
| download | bcm5719-llvm-025fdf98b6b68b78a8658ec70d96b2a736b173c8.tar.gz bcm5719-llvm-025fdf98b6b68b78a8658ec70d96b2a736b173c8.zip  | |
Rename pass to DecomposeMultiDimRefs.
llvm-svn: 1960
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 12 | ||||
| -rw-r--r-- | llvm/tools/opt/opt.cpp | 5 | 
2 files changed, 13 insertions, 4 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index c4422adfbaf..140151b69f6 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -10,6 +10,7 @@  #include "llvm/Transforms/Instrumentation/TraceValues.h"  #include "llvm/Transforms/ChangeAllocations.h"  #include "llvm/Transforms/HoistPHIConstants.h" +#include "llvm/Transforms/Scalar/DecomposeMultiDimRefs.h"  #include "llvm/Assembly/PrintModulePass.h"  #include "llvm/Bytecode/WriteBytecodePass.h"  #include "llvm/Transforms/ConstantMerge.h" @@ -92,8 +93,13 @@ int main(int argc, char **argv) {      // Eliminate duplication in constant pool      Passes.add(createDynamicConstantMergePass()); -       -    // Then write out the module with tracing code before code generation  +  } +   +  // Decompose multi-dimensional refs into a sequence of 1D refs +  Passes.add(createDecomposeMultiDimRefsPass()); +   +  // Write out the module with tracing code just before code generation +  if (TraceValues != TraceOff) {   // If tracing enabled...      assert(InputFilename != "-" &&             "files on stdin not supported with tracing");      string traceFileName = GetFileNameRoot(InputFilename) + ".trace.bc"; @@ -104,7 +110,7 @@ int main(int argc, char **argv) {             << "Use -f command line argument to force output\n";        return 1;      } - +          std::ostream *os = new std::ofstream(traceFileName.c_str());      if (!os->good()) {        cerr << "Error opening " << traceFileName diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index a7ad98ea887..3fad1ec4427 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -26,6 +26,7 @@  #include "llvm/Transforms/Scalar/IndVarSimplify.h"  #include "llvm/Transforms/Scalar/InstructionCombining.h"  #include "llvm/Transforms/Scalar/PromoteMemoryToRegister.h" +#include "llvm/Transforms/Scalar/DecomposeMultiDimRefs.h"  #include "llvm/Transforms/Instrumentation/TraceValues.h"  #include "llvm/Transforms/Instrumentation/ProfilePaths.h"  #include "Support/CommandLine.h" @@ -38,7 +39,7 @@ enum Opts {    dce, die, constprop, inlining, constmerge, strip, mstrip, mergereturn,    // Miscellaneous Transformations -  raiseallocs, cleangcc, +  raiseallocs, cleangcc, lowerrefs,    // Printing and verifying...    print, verify, @@ -91,6 +92,7 @@ struct {    { globaldce  , createGlobalDCEPass },    { swapstructs, createSwapElementsPass },    { sortstructs, createSortElementsPass }, +  { lowerrefs,   createDecomposeMultiDimRefsPass }   };  // Command line option handling code... @@ -129,6 +131,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,    clEnumVal(paths      , "Insert path profiling instrumentation"),    clEnumVal(print      , "Print working method to stderr"),    clEnumVal(verify     , "Verify module is well formed"), +  clEnumVal(lowerrefs  , "Decompose multi-dimensional structure/array refs to use one index per instruction"),  0);  | 

