mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it for
narrowing, no matter what. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a012299ce
commit
47ae4a1cee
@ -27,6 +27,8 @@ class ReduceCrashingBlocks;
|
|||||||
class CBE;
|
class CBE;
|
||||||
class GCC;
|
class GCC;
|
||||||
|
|
||||||
|
extern bool DisableSimplifyCFG;
|
||||||
|
|
||||||
class BugDriver {
|
class BugDriver {
|
||||||
const std::string ToolName; // Name of bugpoint
|
const std::string ToolName; // Name of bugpoint
|
||||||
std::string ReferenceOutputFile; // Name of `good' output file
|
std::string ReferenceOutputFile; // Name of `good' output file
|
||||||
|
@ -304,11 +304,13 @@ bool BugDriver::debugCrash() {
|
|||||||
// to a return instruction then running simplifycfg, which can potentially
|
// to a return instruction then running simplifycfg, which can potentially
|
||||||
// shrinks the code dramatically quickly
|
// shrinks the code dramatically quickly
|
||||||
//
|
//
|
||||||
std::vector<BasicBlock*> Blocks;
|
if (!DisableSimplifyCFG) {
|
||||||
for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
|
std::vector<BasicBlock*> Blocks;
|
||||||
for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
|
for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
|
||||||
Blocks.push_back(FI);
|
for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
|
||||||
ReduceCrashingBlocks(*this).reduceList(Blocks);
|
Blocks.push_back(FI);
|
||||||
|
ReduceCrashingBlocks(*this).reduceList(Blocks);
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: This should use the list reducer to converge faster by deleting
|
// FIXME: This should use the list reducer to converge faster by deleting
|
||||||
// larger chunks of instructions at a time!
|
// larger chunks of instructions at a time!
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include "llvm/Constant.h"
|
#include "llvm/Constant.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
|
|
||||||
|
bool DisableSimplifyCFG = false;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
NoADCE("disable-adce",
|
NoADCE("disable-adce",
|
||||||
@ -23,8 +25,8 @@ namespace {
|
|||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
NoDCE ("disable-dce",
|
NoDCE ("disable-dce",
|
||||||
cl::desc("Do not use the -dce pass to reduce testcases"));
|
cl::desc("Do not use the -dce pass to reduce testcases"));
|
||||||
cl::opt<bool>
|
cl::opt<bool, true>
|
||||||
NoSCFG("disable-simplifycfg",
|
NoSCFG("disable-simplifycfg", cl::location(DisableSimplifyCFG),
|
||||||
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
|
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
NoFinalCleanup("disable-final-cleanup",
|
NoFinalCleanup("disable-final-cleanup",
|
||||||
@ -67,7 +69,7 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
|
|||||||
//Passes.add(createInstructionCombiningPass());
|
//Passes.add(createInstructionCombiningPass());
|
||||||
if (Simplification > 1 && !NoDCE)
|
if (Simplification > 1 && !NoDCE)
|
||||||
Passes.add(createDeadCodeEliminationPass());
|
Passes.add(createDeadCodeEliminationPass());
|
||||||
if (Simplification && !NoSCFG)
|
if (Simplification && !DisableSimplifyCFG)
|
||||||
Passes.add(createCFGSimplificationPass()); // Delete dead control flow
|
Passes.add(createCFGSimplificationPass()); // Delete dead control flow
|
||||||
|
|
||||||
Passes.add(createVerifierPass());
|
Passes.add(createVerifierPass());
|
||||||
|
Loading…
Reference in New Issue
Block a user