mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,16 +24,12 @@
|
|||||||
#include "llvm/Transforms/Utils/Cloning.h"
|
#include "llvm/Transforms/Utils/Cloning.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
|
using namespace llvm;
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
bool DisableSimplifyCFG = false;
|
bool DisableSimplifyCFG = false;
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
using namespace llvm;
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
NoADCE("disable-adce",
|
NoADCE("disable-adce",
|
||||||
@@ -46,8 +42,6 @@ namespace {
|
|||||||
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
|
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace llvm {
|
|
||||||
|
|
||||||
/// deleteInstructionFromProgram - This method clones the current Program and
|
/// deleteInstructionFromProgram - This method clones the current Program and
|
||||||
/// deletes the specified instruction from the cloned module. It then runs a
|
/// deletes the specified instruction from the cloned module. It then runs a
|
||||||
/// series of cleanup passes (ADCE and SimplifyCFG) to eliminate any code which
|
/// series of cleanup passes (ADCE and SimplifyCFG) to eliminate any code which
|
||||||
@@ -114,7 +108,11 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
|
|||||||
CleanupPasses.push_back(getPI(createFunctionResolvingPass()));
|
CleanupPasses.push_back(getPI(createFunctionResolvingPass()));
|
||||||
CleanupPasses.push_back(getPI(createGlobalDCEPass()));
|
CleanupPasses.push_back(getPI(createGlobalDCEPass()));
|
||||||
CleanupPasses.push_back(getPI(createDeadTypeEliminationPass()));
|
CleanupPasses.push_back(getPI(createDeadTypeEliminationPass()));
|
||||||
|
|
||||||
|
if (MayModifySemantics)
|
||||||
CleanupPasses.push_back(getPI(createDeadArgHackingPass()));
|
CleanupPasses.push_back(getPI(createDeadArgHackingPass()));
|
||||||
|
else
|
||||||
|
CleanupPasses.push_back(getPI(createDeadArgEliminationPass()));
|
||||||
|
|
||||||
std::swap(Program, M);
|
std::swap(Program, M);
|
||||||
std::string Filename;
|
std::string Filename;
|
||||||
@@ -134,5 +132,3 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
|
|||||||
}
|
}
|
||||||
return M;
|
return M;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End llvm namespace
|
|
||||||
|
Reference in New Issue
Block a user