mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,8 @@ namespace {
|
||||
cl::desc("Use Simple RA instead of Local RegAlloc"));
|
||||
cl::opt<bool> PrintCode("print-machineinstrs",
|
||||
cl::desc("Print generated machine code"));
|
||||
cl::opt<bool> NoPatternISel("disable-pattern-isel", cl::init(true),
|
||||
cl::desc("Use the 'simple' X86 instruction selector"));
|
||||
}
|
||||
|
||||
// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine
|
||||
@@ -59,7 +61,10 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
|
||||
// FIXME: Implement the switch instruction in the instruction selector!
|
||||
PM.add(createLowerSwitchPass());
|
||||
|
||||
PM.add(createX86SimpleInstructionSelector(*this));
|
||||
if (NoPatternISel)
|
||||
PM.add(createX86SimpleInstructionSelector(*this));
|
||||
else
|
||||
PM.add(createX86PatternInstructionSelector(*this));
|
||||
|
||||
// TODO: optional optimizations go here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user