Commit Graph

25424 Commits

Author SHA1 Message Date
Evan Cheng
79d5b5acae Handle cases where there aren't uses in the barrier mbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 23:49:39 +00:00
Dan Gohman
5d9759bd04 Make comments and code for QuietWarnings and QuietErrors
actually correspond to what their names suggest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58146 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 17:57:20 +00:00
Dan Gohman
048ca55dc1 SDNodes may have at most one Flag result. Update this comment
to reflect that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 17:51:24 +00:00
Dan Gohman
71b7f646de Move the code that adds the DeadMachineInstructionElimPass from
target-independent code to target-specific code. This prevents it
from running on targets that aren't using fast-isel.

In addition to saving compile time, this addresses the problem
that not all targets are prepared for it. In order to use this
pass, all instructions must declare all their fixed uses and
defs of physical registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 17:46:52 +00:00
Gordon Henriksen
a2cbe6c5b5 Related to PR2911, reject as invalid non-pointer GC roots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 16:28:35 +00:00
Nicolas Geoffray
46fa139e26 Support for allocation of TLS variables in the JIT. Allocation of a global
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 15:41:43 +00:00
Nicolas Geoffray
b74f370e43 Generate code for TLS instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58141 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 15:22:06 +00:00
Oscar Fuentes
28df32b559 CMake: lib/Target/ARM/AsmPrinter/CMakeLists.txt added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:40:32 +00:00
Oscar Fuentes
ddbbb4fe89 CMake: Cross-platform support for using pre-generated llvmAsmParser.cpp and llvmAsmParser.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:19:08 +00:00
Evan Cheng
78dfef771b If val# def is ~0U, meaning it's defined by a PHI, and it's previously split, spill before the barrier because it's impossible to determine if all the defs are spilled in the same spill slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58129 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 00:52:41 +00:00
Dale Johannesen
f14df02340 Mark MFCR as reading all condition code registers.
Prevents some more overzealous deletions (mostly
in AltiVec code).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58121 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 22:08:01 +00:00
Dale Johannesen
c12e5812be Rewrite logic to figure out whether LR needs to
be saved/restored in the prolog/epilog.  We need
to do this iff something in the function stores
into it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58116 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 21:24:23 +00:00
Torok Edwin
61df3b751a move the note to the correct README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58104 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 19:23:07 +00:00
Torok Edwin
db1b3bc276 add note about va_arg code on x86 and x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 19:20:05 +00:00
Evan Cheng
56ab0def90 Fix a pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58102 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 18:46:44 +00:00
Duncan Sands
4047f4a0b4 Fix translateX86CC: if SetCCOpcode is SETULE and
LHS is a foldable load, then LHS and RHS are swapped
and SetCCOpcode is changed to SETUGT.  But the later
code is expecting operands to be the wrong way round
for SETUGT, but they are not in this case, resulting
in an inverted compare.  The solution is to move the
load normalization before the correction for SETUGT.
This bug was tickled by LegalizeTypes which happened
to legalize the testcase slightly differently to
LegalizeDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 13:03:10 +00:00
Cedric Venet
389b715e0f Modify the cmake build system so that if it doesn't find bison, it will use the pregenerated file in from the svn (.cvs). Work only for windows for the moment. Tested on Vista64 with MSVC2008express.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 11:24:33 +00:00
Nick Lewycky
04aa2c3520 Don't try to create a mask when we don't need one. Fixes a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58075 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 06:14:27 +00:00
Evan Cheng
2efe3fd79a Fix a end() dereference; remove an abort() that wasn't meant to be left in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58072 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 05:53:44 +00:00
Nick Lewycky
79cce5c51b Add value range analyzing of Add and Sub.
Understand that mul %x, 1 = %x.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 04:00:26 +00:00
Evan Cheng
06587497dc Avoid splitting an interval multiple times; avoid splitting re-materializable val# (for now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 02:05:00 +00:00
Dan Gohman
c9f3cc3bda Fix constant-offset emission for x86-64 absolute addresses. This
fixes a bunch of test-suite JIT failures on x86-64 in
-relocation-model=static mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58066 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 01:57:54 +00:00
Dale Johannesen
fea9088030 Initialize uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58057 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 01:06:58 +00:00
Ted Kremenek
43d1f02b54 Added raw_fd_ostream::close().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:49:09 +00:00
Evan Cheng
f5cd4f0d70 Committing a good chunk of the pre-register allocation live interval splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58044 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 20:43:13 +00:00
Dale Johannesen
639076fb84 Mark defs and uses of CTR and LR correctly.
Prevents DeadMachineInstructionElim from thinking
things like MTCTR are dead (fixes massive
testsuite breakage at -O0).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58043 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 20:41:28 +00:00
Daniel Dunbar
e2e9d8e6aa Make sure to set stdout to binary when writing bitcode files via
std::ostream API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58042 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 19:37:34 +00:00
Duncan Sands
ee4c619b3b Fix thinko - the operand number has nothing to do
with the result number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 19:34:23 +00:00
Daniel Dunbar
394f0441e0 Change create*Pass factory functions to return Pass* instead of
LoopPass*.
 - Although less precise, this means they can be used in clients
   without RTTI (who would otherwise need to include LoopPass.h, which
   eventually includes things using dynamic_cast). This was the
   simplest solution that presented itself, but I am happy to use a
   better one if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58010 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:32:42 +00:00
Jim Grosbach
c64bdf6aa5 remove extraneous #ifdef's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 22:27:51 +00:00
Daniel Dunbar
d1ce3b48e2 Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass.
- The old versions are still hanging around, but should be migrated
   away from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:39:14 +00:00
Dale Johannesen
e80d67ec11 Remove allocation of unused stack slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57987 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:26:06 +00:00
Julien Lerouge
e7d3af5473 Fix for PR2881: fix a small leak exposed by valgrind, using a ManagedStatic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 16:30:41 +00:00
Duncan Sands
2cbe7fe396 LegalizeTypes soft-float support for fpow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 11:49:09 +00:00
Duncan Sands
6b6aeb3806 Get this working with LegalizeTypes: (1) don't
assume that i64 has been turned into a BUILD_PAIR
node (when called from LegalizeTypes this hasn't
happened yet) and don't use a vector shuffle mask
with an illegal element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 11:24:12 +00:00
Duncan Sands
f9410141f7 Be nice to CellSPU: for this target getSetCCResultType
may return i8, which can result in SELECT nodes for
which the type of the condition is i8, but there are
no patterns for select with i8 condition.  Tweak the
LegalizeTypes logic to avoid this as much as possible.
This isn't a real fix because it is still perfectly
possible to end up with such select nodes - CellSPU
needs to be fixed IMHO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57968 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:23:20 +00:00
Duncan Sands
29a2822f28 Port from LegalizeDAG the logic to only generate
ADDC/ADDE/SUBC/SUBE if the target supports it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57967 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:07:29 +00:00
Duncan Sands
3b521d5acc Add some comments explaining the meaning of a boolean
that is not of type MVT::i1 in SELECT and SETCC nodes.
Relax the LegalizeTypes SELECT condition promotion
sanity checks to allow other condition types than i1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57966 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:06:24 +00:00
Duncan Sands
0954aefd81 Temporarily allow the operands of a BUILD_VECTOR
to have a different type to the vector element
type.  This should be fairly harmless because in
the past guys like this were being built all over
the place (and were cleaned up when I added this
check).  The reason for relaxing this check is
that it helps LegalizeTypes legalize vector
shuffles: the mask is a BUILD_VECTOR that it is
*not always possible* to legalize while keeping it
a BUILD_VECTOR (vector_shuffle requires the mask
to be a BUILD_VECTOR, as opposed to a vector with
the right vector type).  With this check it is even
harder to legalize the mask - turning the check off
means that LegalizeTypes manages to legalize almost
all vector shuffles encountered in practice.  The
correct solution is to change vector_shuffle to be a
variadic node with the mask built into it as operands.
While waiting for that change, this hack stops the
problem with vector_shuffle from blocking the turning
on of LegalizeTypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:00:33 +00:00
Chris Lattner
aecc22a7b8 Fix PR2907 by digging through constant expressions to find FP constants that
are their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 04:53:16 +00:00
Daniel Dunbar
3b0da26e20 Move Print*Pass to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:25:22 +00:00
Oscar Fuentes
5c5b6dfd0e CMake: Turned some libraries into partially linked objects. Corrected
names of LLVMCore and ARMCodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 02:51:53 +00:00
Dale Johannesen
9ae0d6df51 Adjust comments for pedantic satisfaction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57940 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 00:02:32 +00:00
Oscar Fuentes
305c7077f5 CMake: updated lib/VMCore/CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57937 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:52:03 +00:00
Daniel Dunbar
f4db3a51c7 Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
 - So clients who compile w/o RTTI can use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:33:38 +00:00
Dale Johannesen
040225fcb7 Add comments to explain uint64->f64 algorithm,
well, sort of.  (Algorithm by Ian Ollmann.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57932 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:07:49 +00:00
Dale Johannesen
1c15bf58a3 Add an SSE2 algorithm for uint64->f64 conversion.
The same one Apple gcc uses, faster.  Also gets the
extreme case in gcc.c-torture/execute/ieee/rbug.c
correct which we weren't before; this is not
sufficient to get the test to pass though, there
is another bug.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 20:50:01 +00:00
Dan Gohman
7ea1ca6229 Fix SelectionDAGBuild lowering of Select instructions to
handle first-class aggregate values. Also, fix a bug in
the Ret handling for empty aggregates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 20:00:42 +00:00
Daniel Dunbar
48534b31d8 Clear raw_fd_ostream error string on success and explain behavior in
documentation.

Add C++ header marker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 19:53:10 +00:00
Dan Gohman
7b66e04182 Implement the optimized FCMP_OEQ/FCMP_UNE code for x86 fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57915 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 18:24:51 +00:00