summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-07-06 18:59:04 +0000
committerNate Begeman <natebegeman@mac.com>2005-07-06 18:59:04 +0000
commit8a0933608aecebc7ede3af2776a726b27e5af7c8 (patch)
tree4d68ba4b50e1d40e269a3beb6b845ef87569c63c /llvm/lib/Target/TargetMachine.cpp
parenta7220851c05d590630598ad6f6af36217f0b5f94 (diff)
downloadbcm5719-llvm-8a0933608aecebc7ede3af2776a726b27e5af7c8.tar.gz
bcm5719-llvm-8a0933608aecebc7ede3af2776a726b27e5af7c8.zip
First round of support for doing scalar FP using the SSE2 ISA extension and
XMM registers. There are many known deficiencies and fixmes, which will be addressed ASAP. The major benefit of this work is that it will allow the LLVM register allocator to allocate FP registers across basic blocks. The x86 backend will still default to x87 style FP. To enable this work, you must pass -enable-sse-scalar-fp and either -sse2 or -sse3 to llc. An example before and after would be for: double foo(double *P) { double Sum = 0; int i; for (i = 0; i < 1000; ++i) Sum += P[i]; return Sum; } The inner loop looks like the following: x87: .LBB_foo_1: # no_exit fldl (%esp) faddl (%eax,%ecx,8) fstpl (%esp) incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit SSE2: addsd (%eax,%ecx,8), %xmm0 incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit llvm-svn: 22340
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index f4b9039f482..90f10c1fccb 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -27,6 +27,7 @@ namespace llvm {
bool NoExcessFPPrecision;
int PatternISelTriState;
bool UnsafeFPMath;
+ bool PICEnabled;
};
namespace {
cl::opt<bool, true> PrintCode("print-machineinstrs",
@@ -52,6 +53,11 @@ namespace {
cl::desc("Enable optimizations that may decrease FP precision"),
cl::location(UnsafeFPMath),
cl::init(false));
+ cl::opt<bool, true>
+ EnablePIC("enable-pic",
+ cl::desc("Enable generation of position independant code"),
+ cl::location(PICEnabled),
+ cl::init(false));
};
//---------------------------------------------------------------------------
OpenPOWER on IntegriCloud