[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Apr 25 00:23:01 PDT 2003
Changes in directory llvm/tools/llc:
llc.cpp updated: 1.66 -> 1.67
---
Log message:
Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine
---
Diffs of the changes:
Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.66 llvm/tools/llc/llc.cpp:1.67
--- llvm/tools/llc/llc.cpp:1.66 Thu Apr 24 13:36:39 2003
+++ llvm/tools/llc/llc.cpp Fri Apr 25 00:22:29 2003
@@ -173,6 +173,7 @@
assert(target.get() && "Could not allocate target machine!");
TargetMachine &Target = *target.get();
+ const TargetData &TD = Target.getTargetData();
// Load the module to be compiled...
std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename));
@@ -184,6 +185,10 @@
// Build up all of the passes that we want to do to the module...
PassManager Passes;
+
+ Passes.add(new TargetData("llc", TD.isLittleEndian(), TD.getSubWordDataSize(),
+ TD.getIntegerRegSize(), TD.getPointerSize(),
+ TD.getPointerAlignment()));
// Create a new optimization pass for each one specified on the command line
// Deal specially with tracing passes, which must be run differently than opt.
More information about the llvm-commits
mailing list