Commit Graph

22678 Commits

Author SHA1 Message Date
Chris Lattner 67bec133b2 fix a bug introduced by Nicholas' "unwinds to" stuff: we
lost newlines between blocks.

llvm-svn: 50024
2008-04-21 04:20:33 +00:00
Chris Lattner ad0d42ba15 don't assume that the argument passed to fprintf("%s" is a string. This
fixes a crash in opt on 433.milc.

llvm-svn: 50023
2008-04-21 03:18:33 +00:00
Chris Lattner f6236cc2e9 Use the new SplitBlockPredecessors to implement a todo.
llvm-svn: 50022
2008-04-21 02:57:57 +00:00
Chris Lattner a5b11705b6 Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
as a global helper function.  At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input.  This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.

llvm-svn: 50020
2008-04-21 01:28:02 +00:00
Chris Lattner d418b06abf Move domtree/frontier updating earlier, allowing us to use it to update phi
nodes, removing a hack.

llvm-svn: 50019
2008-04-21 01:05:08 +00:00
Chris Lattner 96e9e22269 Factor dominator tree and frontier updating into SplitBlockPredecessors
instead of doing it after every call.

llvm-svn: 50018
2008-04-21 00:54:38 +00:00
Chris Lattner 559c867ece fit some more code in 80 cols.
llvm-svn: 50016
2008-04-21 00:25:49 +00:00
Chris Lattner aca912d793 simplify code, fit in 80 cols.
llvm-svn: 50015
2008-04-21 00:23:14 +00:00
Chris Lattner 38806c3e9c fit in 80 cols
llvm-svn: 50014
2008-04-21 00:19:16 +00:00
Nicolas Geoffray 481f44e12f Be pessimistic in computing the buffer size when aligning.
llvm-svn: 50008
2008-04-20 23:39:44 +00:00
Nicolas Geoffray 984e7199cc Don't forget to update the current operand when getting the size of an instruction.
llvm-svn: 50007
2008-04-20 23:36:47 +00:00
Chris Lattner ff1c6e388c finish the first cut of a jump threading pass implementation.
llvm-svn: 50006
2008-04-20 22:39:42 +00:00
Chris Lattner 567166c0a8 replace a slow and verbose version of Instruction::isUsedOutsideOfBlock with
a call to Instruction::isUsedOutsideOfBlock.

llvm-svn: 50005
2008-04-20 22:18:22 +00:00
Chris Lattner 8ec6e8af60 add a handy helper method to instruction, useful for determining
whether it is used outside of some block.  This can be used to see
if there are any non-local references, for example.

llvm-svn: 50004
2008-04-20 22:11:30 +00:00
Chris Lattner 9c1f1a82bf we can only thread blocks when there is a pred we can determine the succ of.
llvm-svn: 50003
2008-04-20 21:18:09 +00:00
Chris Lattner 2115722ffa improve comments, infrastructure, and add some validity checks for threading.
Add a cost function.

llvm-svn: 50002
2008-04-20 21:13:06 +00:00
Chris Lattner b3b6007c8b Add a new Jump Threading pass, which will handle cases
such as those in PR2235.  Right now the pass is not very
effective. :)

llvm-svn: 50000
2008-04-20 20:35:01 +00:00
Chris Lattner 912bec79ca hopefully resolve PR2240
llvm-svn: 49999
2008-04-20 19:59:12 +00:00
Chris Lattner 6b05605829 rearrange some code, simplify handling of shifts.
llvm-svn: 49995
2008-04-20 18:24:14 +00:00
Dale Johannesen aac27592f0 Check we aren't trying to convert PPC long double.
This fixes the testsuite failure on ppcf128-4.ll.

llvm-svn: 49994
2008-04-20 18:23:46 +00:00
Nicolas Geoffray f77618e6e8 Cosmetic changes, as suggested by Evan. No functionality changes.
llvm-svn: 49993
2008-04-20 17:44:19 +00:00
Dale Johannesen 6145727b43 (re)fix handling of UGT. Pointed out by Nick Lewycky.
llvm-svn: 49991
2008-04-20 16:58:57 +00:00
Torok Edwin ab20784740 g++-4.3 build-fix: CHAR_BIT requires <climits>.
llvm-svn: 49989
2008-04-20 08:33:11 +00:00
Nicolas Geoffray 568f9818f7 Do not hold the JIT lock when materializing a function and verify if the
function has already been codegen'd. This is required by the Java class loading
mechanism which executes Java code when materializing a function.

llvm-svn: 49988
2008-04-20 08:33:02 +00:00
Chris Lattner 470ab00c76 A better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.
llvm-svn: 49986
2008-04-20 05:52:46 +00:00
Dale Johannesen 64bbdb17f5 Check that APFloat::convert is not trying to target
ppc long double, which doesn't work.

This may break some stuff temporarily, but I want to
avoid the propagation of code that assumes this works.

llvm-svn: 49983
2008-04-20 01:34:03 +00:00
Chris Lattner 167dbe5e39 regenerate
llvm-svn: 49978
2008-04-20 00:41:19 +00:00
Chris Lattner 3b18762f40 Switch to using Simplified ConstantFP::get API.
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Chris Lattner d3018e6a0e Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
llvm-svn: 49976
2008-04-20 00:26:06 +00:00
Chris Lattner bc26e1bb8a Implement PR2206.
llvm-svn: 49967
2008-04-19 22:17:26 +00:00
Chris Lattner 334d33cad1 refactor handling of symbolic constant folding, picking up
a few new cases( see Integer/a1.ll), but not anything that
would happen in practice.

llvm-svn: 49965
2008-04-19 21:58:19 +00:00
Chris Lattner 6072ead8e2 indentation fix.
llvm-svn: 49964
2008-04-19 21:13:00 +00:00
Chris Lattner eb6bb803a7 Allow argpromote to promote struct arguments with a specified number
of elements.  Patch by Matthijs Kooijman!

llvm-svn: 49962
2008-04-19 19:50:01 +00:00
Evan Cheng 5102bd9359 64-bit atomic operations.
llvm-svn: 49949
2008-04-19 02:30:38 +00:00
Evan Cheng 5e7ee0a002 Also LXCHG64 -> XCHG64rm.
llvm-svn: 49948
2008-04-19 02:05:42 +00:00
Evan Cheng 51096affb5 PPC32 atomic operations.
llvm-svn: 49947
2008-04-19 01:30:48 +00:00
Evan Cheng 7f4240a47c xchg which references a memory operand does not need to lock prefix. Atomicity is guaranteed.
llvm-svn: 49946
2008-04-19 01:20:30 +00:00
Dan Gohman 41eb949aaf Teach llvm-as to accept function types with multiple return types.
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Dale Johannesen ce9dc86994 Fix a scalar evolution bug. Reversing everything
does not work because of 0; 2>0 but -2U is also >0.

llvm-svn: 49928
2008-04-18 21:38:31 +00:00
Nicolas Geoffray 85a9f1911e Enable jitting with a known memory size.
llvm-svn: 49924
2008-04-18 20:59:31 +00:00
Duncan Sands 1ec193e90b Implement a bit more softfloat support in
LegalizeTypes.  Correct the load logic so
that it actually works, and also teach it
to handle floating point extending loads.

llvm-svn: 49923
2008-04-18 20:56:03 +00:00
Dan Gohman ad4071a9e1 Fix the handling of va_copy on x86-64. As of llvm-gcc r49920
llvm-gcc is now lowering va_copy on x86-64, so this completes
the fix for PR2230.

llvm-svn: 49922
2008-04-18 20:55:41 +00:00
Evan Cheng 00bd8d904a - Fix atomic operation JIT encoding.
- Remove unused instructions.

llvm-svn: 49921
2008-04-18 20:55:36 +00:00
Duncan Sands a8a61562af Add some more FIXME's for indexed loads and stores.
llvm-svn: 49916
2008-04-18 20:27:12 +00:00
Duncan Sands b4e0b24e0a Provide an explicit list of operands to MakeLibcall,
rather than having it suck them out of a node.  Add
a bunch of new libcalls, and remove dead softfloat
code (dead, because FloatToInt is used not Expand
in this case).  Note that indexed stores probably
aren't handled properly, likewise for loads.

llvm-svn: 49915
2008-04-18 20:25:14 +00:00
Evan Cheng d556115e7e Correct comment.
llvm-svn: 49913
2008-04-18 19:25:26 +00:00
Evan Cheng 495a516390 Not safe to "kill" a register if its live range extends pass the end of block branch.
llvm-svn: 49911
2008-04-18 19:22:23 +00:00
Evan Cheng 5879213597 Also support Intel asm syntax.
llvm-svn: 49878
2008-04-17 23:35:10 +00:00
Dan Gohman 75c895dbc4 Remove the implicit conversion from SDOperandPtr to SDOperand*; this
may fix a build error on Visual Studio.

llvm-svn: 49876
2008-04-17 23:02:12 +00:00
Evan Cheng 4704baa555 Fix assembly code for atomic operations.
llvm-svn: 49869
2008-04-17 21:26:35 +00:00