[llvm-commits] [llvm] r57270 - in /llvm/trunk: lib/CodeGen/LLVMTargetMachine.cpp test/CodeGen/X86/2008-05-21-CoalescerBug.ll

Dan Gohman gohman at apple.com
Tue Oct 7 16:00:56 PDT 2008


Author: djg
Date: Tue Oct  7 18:00:56 2008
New Revision: 57270

URL: http://llvm.org/viewvc/llvm-project?rev=57270&view=rev
Log:
Remove -disable-fast-isel. Use cl::boolOrDefault with -fast-isel
instead.

So now: -fast-isel or -fast-isel=true enable fast-isel, and
-fast-isel=false disables it. Fast-isel is also on by default
with -fast, and off by default otherwise.

Modified:
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
    llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=57270&r1=57269&r2=57270&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Oct  7 18:00:56 2008
@@ -56,12 +56,9 @@
 // Enable or disable FastISel. Both options are needed, because
 // FastISel is enabled by default with -fast, and we wish to be
 // able to enable or disable fast-isel independently from -fast.
-static cl::opt<bool>
+static cl::opt<cl::boolOrDefault>
 EnableFastISelOption("fast-isel", cl::Hidden,
   cl::desc("Enable the experimental \"fast\" instruction selector"));
-static cl::opt<bool>
-DisableFastISelOption("disable-fast-isel", cl::Hidden,
-  cl::desc("Disable the experimental \"fast\" instruction selector"));
 
 FileModel::Model
 LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
@@ -175,10 +172,8 @@
   // Standard Lower-Level Passes.
 
   // Enable FastISel with -fast, but allow that to be overridden.
-  assert((!EnableFastISelOption || !DisableFastISelOption) &&
-         "Both -fast-isel and -disable-fast-isel given!");
-  if (EnableFastISelOption ||
-      (Fast && !DisableFastISelOption))
+  if (EnableFastISelOption == cl::BOU_TRUE ||
+      (Fast && EnableFastISelOption != cl::BOU_FALSE))
     EnableFastISel = true;
 
   // Ask the target for an isel.

Modified: llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll?rev=57270&r1=57269&r2=57270&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll Tue Oct  7 18:00:56 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=x86 -fast -disable-fast-isel | grep mov | count 5
+; RUN: llvm-as < %s | llc -march=x86 -fast -fast-isel=false | grep mov | count 5
 ; PR2343
 
 	%llvm.dbg.anchor.type = type { i32, i32 }





More information about the llvm-commits mailing list