[llvm-commits] [llvm] r56930 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Evan Cheng evan.cheng at apple.com
Wed Oct 1 13:51:07 PDT 2008


Woot! Now if only the Sparc maintainer can add fast-isel hooks to take  
advantage of it! :-)

Evan

On Oct 1, 2008, at 1:39 PM, Dan Gohman wrote:

> Author: djg
> Date: Wed Oct  1 15:39:19 2008
> New Revision: 56930
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56930&view=rev
> Log:
> Enable FastISel by default (on x86 and x86-64) with the -fast option.
>
> Modified:
>    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
>
> Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=56930&r1=56929&r2=56930&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Wed Oct  1 15:39:19  
> 2008
> @@ -53,10 +53,15 @@
>                        cl::desc("Disable scheduling after register  
> allocation"),
>                        cl::init(true));
>
> -static cl::opt<bool, true>
> -FastISelOption("fast-isel", cl::Hidden,
> -               cl::desc("Enable the experimental \"fast\"  
> instruction selector"),
> -               cl::location(EnableFastISel));
> +// 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>
> +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,
> @@ -169,6 +174,13 @@
>
>   // 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))
> +    EnableFastISel = true;
> +
>   // Ask the target for an isel.
>   if (addInstSelector(PM, Fast))
>     return true;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list