mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 13:10:42 +00:00
LevelRaise now gets target data from passmanager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5705f0c2ea
commit
961f7b4e4f
@ -23,9 +23,6 @@
|
||||
#include <fstream>
|
||||
|
||||
namespace {
|
||||
// FIXME: This should eventually be parameterized...
|
||||
TargetData TD("gccas target");
|
||||
|
||||
cl::opt<std::string>
|
||||
InputFilename(cl::Positional,cl::desc("<input llvm assembly>"),cl::init("-"));
|
||||
|
||||
@ -74,7 +71,7 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
|
||||
addPass(PM, createDeadInstEliminationPass()); // Remove Dead code/vars
|
||||
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
||||
addPass(PM, createIndVarSimplifyPass()); // Simplify indvars
|
||||
addPass(PM, createRaisePointerReferencesPass(TD));// Recover type information
|
||||
addPass(PM, createRaisePointerReferencesPass());// Recover type information
|
||||
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
||||
addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs
|
||||
addPass(PM, createReassociatePass()); // Reassociate expressions
|
||||
@ -97,6 +94,9 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
|
||||
int main(int argc, char **argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv, " llvm .s -> .o assembler for GCC\n");
|
||||
|
||||
// FIXME: This should eventually be parameterized...
|
||||
TargetData TD("gccas target");
|
||||
|
||||
std::auto_ptr<Module> M;
|
||||
try {
|
||||
// Parse the file now...
|
||||
|
Loading…
Reference in New Issue
Block a user