diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-30 20:48:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-30 20:48:29 +0000 |
commit | ff1ab062a51053954ae59f3ed7154d1b2e983c2b (patch) | |
tree | a4d734b78f499759b6a02ba25019e8faa5e07f8a /lib/CodeGen | |
parent | e723593bfd951754955cad403772fbde26e5549b (diff) | |
download | external_llvm-ff1ab062a51053954ae59f3ed7154d1b2e983c2b.zip external_llvm-ff1ab062a51053954ae59f3ed7154d1b2e983c2b.tar.gz external_llvm-ff1ab062a51053954ae59f3ed7154d1b2e983c2b.tar.bz2 |
Move the primary fast-isel top-level comments to FastISel.cpp, where
they'll be a little more visible. Also, update and reword them a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index dcb30ad..9f70bc9 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -9,6 +9,34 @@ // // This file contains the implementation of the FastISel class. // +// "Fast" instruction selection is designed to emit very poor code quickly. +// Also, it is not designed to be able to do much lowering, so most illegal +// types (e.g. i64 on 32-bit targets) and operations (e.g. calls) are not +// supported. It is also not intended to be able to do much optimization, +// except in a few cases where doing optimizations reduces overall compile +// time (e.g. folding constants into immediate fields, because it's cheap +// and it reduces the number of instructions later phases have to examine). +// +// "Fast" instruction selection is able to fail gracefully and transfer +// control to the SelectionDAG selector for operations that it doesn't +// support. In many cases, this allows us to avoid duplicating a lot of +// the complicated lowering logic that SelectionDAG currently has. +// +// The intended use for "fast" instruction selection is "-O0" mode +// compilation, where the quality of the generated code is irrelevant when +// weighed against the speed at which the code can be generated. Also, +// at -O0, the LLVM optimizers are not running, and this makes the +// compile time of codegen a much higher portion of the overall compile +// time. Despite its limitations, "fast" instruction selection is able to +// handle enough code on its own to provide noticeable overall speedups +// in -O0 compiles. +// +// Basic operations are supported in a target-independent way, by reading +// the same instruction descriptions that the SelectionDAG selector reads, +// and identifying simple arithmetic operations that can be directly selected +// from simple operators. More complicated operations currently require +// target-specific code. +// //===----------------------------------------------------------------------===// #include "llvm/Function.h" |