Chris Lattner [Fri, 26 Aug 2005 21:49:18 +0000 (21:49 +0000)]
Minor cleanups:
* avoid calling getClass() multiple times (it is relatively expensive)
* Allow -disable-fp-elim to turn of frame pointer elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:39:15 +0000 (21:39 +0000)]
Checking types here is not safe, because multiple types can map to the same
register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:23:58 +0000 (21:23 +0000)]
implement SELECT_CC fully for the DAG->DAG isel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:06:40 +0000 (21:06 +0000)]
add some forward defs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:55:40 +0000 (20:55 +0000)]
spell this right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23099
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:54:47 +0000 (20:54 +0000)]
Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserter
flag is set on an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:53:44 +0000 (20:53 +0000)]
spell this right!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:53:09 +0000 (20:53 +0000)]
Add a hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:42:52 +0000 (20:42 +0000)]
spell this variable right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:40:46 +0000 (20:40 +0000)]
Expose a new flag to TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:31:24 +0000 (20:31 +0000)]
Add a new instruction flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:29:01 +0000 (20:29 +0000)]
Add a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:25:03 +0000 (20:25 +0000)]
Make fsel emission work with both the pattern and dag-dag selectors, by
giving it a non-instruction opcode. The dag->dag selector used to not
select the operands of the fsel, because it thought that whole tree was
already selected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:17:00 +0000 (20:17 +0000)]
add a marker at the end of the instruction enum list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:46:49 +0000 (18:46 +0000)]
implement the fold for:
bool %test(int %X, int %Y) {
%C = setne int %X, 0
ret bool %C
}
to:
_test:
addic r2, r3, -1
subfe r3, r2, r3
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:37:23 +0000 (18:37 +0000)]
Changes to adjust to new ReplaceAllUsesWith syntax. Change FP_EXTEND to
just return its input, instead of emitting an explicit copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:36:28 +0000 (18:36 +0000)]
Revampt ReplaceAllUsesWith to be more efficient and easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:35:58 +0000 (18:35 +0000)]
Add a new version of ReplaceAllUsesWith, make the comments more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23086
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 17:45:06 +0000 (17:45 +0000)]
Remove some code made dead by the fsel patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:40:39 +0000 (17:40 +0000)]
now that fsel is formed during legalization, this code is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23084
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:36:52 +0000 (17:36 +0000)]
implement the other half of the select_cc -> fsel lowering, which handles
when the RHS of the comparison is 0.0. Turn this on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:18:44 +0000 (17:18 +0000)]
Fix a bug in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:15:30 +0000 (17:15 +0000)]
Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool. This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 16:38:51 +0000 (16:38 +0000)]
Fix some warnings in an optimized build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 16:36:26 +0000 (16:36 +0000)]
Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
every other SD API. Fix it to take the opcode before the types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23079
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 26 Aug 2005 09:25:54 +0000 (09:25 +0000)]
Changed unsigned long to unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23078
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 26 Aug 2005 09:24:46 +0000 (09:24 +0000)]
Change unsigned lng to unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23077
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 04:11:42 +0000 (04:11 +0000)]
Fix JIT encoding of conditional branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:52:45 +0000 (00:52 +0000)]
add initial support for converting select_cc -> fsel in the legalizer
instead of in the backend. This currently handles fsel cases with registers,
but doesn't have the 0.0 and -0.0 optimization enabled yet.
Once this is finished, special hack for fp immediates can go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:43:46 +0000 (00:43 +0000)]
the 5th operand is the 4th number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23074
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 00:34:06 +0000 (00:34 +0000)]
SUBFIC produces two results, not one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23073
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 00:28:00 +0000 (00:28 +0000)]
Implement SHL_PARTS and SRL_PARTS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23072
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:23:59 +0000 (00:23 +0000)]
Add support for targets that want to custom expand select_cc in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:14:16 +0000 (00:14 +0000)]
Allow LowerOperation to return a null SDOperand in case it wants to lower
some things given to it, but not all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:13:12 +0000 (00:13 +0000)]
Fix a nasty bug from a previous patch of mine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:36:49 +0000 (23:36 +0000)]
Emit the lo/hi parts in the right order :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23068
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 23:31:45 +0000 (23:31 +0000)]
Added cl::bits option type (bit vectors). See "Collecting options as a set
of flags" in the Command Line doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:21:06 +0000 (23:21 +0000)]
implement support for 64-bit add/sub, fix a broken assertion for 64-bit
return. Allow the udiv breaker-upper to work with any non-zero constant
operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:19:58 +0000 (23:19 +0000)]
simplify the add/sub_parts code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23065
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 23:01:25 +0000 (23:01 +0000)]
Tweak of multiple occurance paragraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23064
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 22:52:43 +0000 (22:52 +0000)]
Documentation updated to include upcoming support for bit vector support
(flags.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 22:04:30 +0000 (22:04 +0000)]
Finish implementing SDIV/UDIV by copying over the majik constant code from
ISelPattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 22:03:50 +0000 (22:03 +0000)]
Simplify some code. It's not clear why the UDIV expanded sequence
doesn't work for large uint constants, but we'll keep the current behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 21:39:42 +0000 (21:39 +0000)]
Implement setcc correctly for G5 and non-G5 systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 20:08:18 +0000 (20:08 +0000)]
implement setcc on the G5. We're still missing the non-g5 specific bits, but
they will come later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23059
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 25 Aug 2005 20:04:38 +0000 (20:04 +0000)]
New fold for SELECT_CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23058
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 25 Aug 2005 20:01:10 +0000 (20:01 +0000)]
Remove option to make SetCC illegal on PowerPC after long discussion with
Chris. This will be accomplished through correctly modeling CR's and
subregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 19:12:10 +0000 (19:12 +0000)]
Don't auto-cse nodes that return flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:59:23 +0000 (17:59 +0000)]
add printer support for flag operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:54:58 +0000 (17:54 +0000)]
simplify the code a bit using isOperationLegal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:50:06 +0000 (17:50 +0000)]
Add support for sdiv by 2^k and -2^k. Producing code like:
_test:
srawi r2, r3, 2
addze r3, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:49:31 +0000 (17:49 +0000)]
fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:48:54 +0000 (17:48 +0000)]
Add support for flag operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:24:09 +0000 (17:24 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:07:09 +0000 (17:07 +0000)]
add an enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23048
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 16:44:13 +0000 (16:44 +0000)]
Remove Support/Search.h entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23047
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 16:21:56 +0000 (16:21 +0000)]
Recommended to use std::algorithms instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23046
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 13:42:04 +0000 (13:42 +0000)]
Added Support/Search.h to project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23045
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 13:32:25 +0000 (13:32 +0000)]
Added support for generic linear/binary search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23044
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 05:45:31 +0000 (05:45 +0000)]
Fix a problem Duraid noticed, where we weren't removing values from the kills
list when doing two-address and phi node lowering during register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 05:04:11 +0000 (05:04 +0000)]
Implement support for taking the address of constant pool indices, which
is used by the int -> FP code among other things. This gets
2005-05-12-Int64ToFP past that failure, to dying on lack of support for add_parts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23042
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 05:03:06 +0000 (05:03 +0000)]
ADd support for TargetConstantPool nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 05:02:41 +0000 (05:02 +0000)]
Add support for TargetConstantPool node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23040
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 25 Aug 2005 04:59:49 +0000 (04:59 +0000)]
For PR614:
Move the implementation of the fix from Makefile.rules to Makefile. This
ensures that it is only checked on a top-level rebuild, and not in every
single subdirectory. This removes some annoying messages from the build and
numerous executions of config.status if the .in file changes but not
substantively enough to cause the .h file to be modified by config.status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 04:47:18 +0000 (04:47 +0000)]
Add support for FP constants, fixing UnitTests/2004-02-02-NegativeZero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23038
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Thu, 25 Aug 2005 04:44:18 +0000 (04:44 +0000)]
Don't attempt to update LLVM configured header files from a build in a
project. Thanks to Chris for pointing out this deficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23037
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:45:43 +0000 (00:45 +0000)]
Fully implement frame index, so that we can pass the address of alloca's
around to functions and stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23036
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:43:01 +0000 (00:43 +0000)]
add a new TargetFrameIndex node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:29:58 +0000 (00:29 +0000)]
implement unconditional branches, fixing UnitTests/2003-05-02-DependentPHI.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23034
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:26:22 +0000 (00:26 +0000)]
LFS/STFS load and store FP values, not integer ones. This change allows us
to codegen this: float foo() { return 1.245; }
into this:
_foo:
lis r2, ha16(.CPI_foo_0)
lfs f1, lo16(.CPI_foo_0)(r2)
blr
instead of this:
_foo:
lis r2, ha16(.CPI_foo_0)
lfs r2, lo16(.CPI_foo_0)(r2) <-- ouch
or f1, r2, r2 <-- ouch
blr
with the dag isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:19:12 +0000 (00:19 +0000)]
Fix a broken assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23032
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:05:15 +0000 (00:05 +0000)]
Fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:03:21 +0000 (00:03 +0000)]
fix a warning in optimized build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23030
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 00:00:26 +0000 (00:00 +0000)]
Fix some warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23029
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 23:08:16 +0000 (23:08 +0000)]
Split IMPLICIT_DEF into IMPLICIT_DEF_GPR and IMPLICIT_DEF_FP, so that the
instructions take a consistent reg class. Implement ISD::UNDEF in the dag->dag
selector to generate this, fixing UnitTests/2003-07-06-IntOverflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23028
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 23:00:29 +0000 (23:00 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23027
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 22:45:17 +0000 (22:45 +0000)]
implement support for calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23026
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 22:44:39 +0000 (22:44 +0000)]
Add ReplaceAllUsesWith that can take a vector of replacement values.
Add some foldings to hopefully help the illegal setcc issue, and move some code around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23025
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 22:43:53 +0000 (22:43 +0000)]
add two new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23024
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 22:21:47 +0000 (22:21 +0000)]
Remove some dead cases.
Emit the indcall sequence as:
mtctr inreg
mr R12, inreg
btctr
If inreg and R12 aren't coallesced, this reduces the odds of having the mtctr
and btctr in the same dispatch group. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23023
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 22:02:41 +0000 (22:02 +0000)]
Add support for external symbols, and support for variable arity instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 18:30:00 +0000 (18:30 +0000)]
Fix pasto that prevented VT ndoes from showing up in -view-isel-dags correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23021
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 18:15:24 +0000 (18:15 +0000)]
add an idea
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23020
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 17:55:32 +0000 (17:55 +0000)]
Fix Regression/Transforms/Reassociate/2005-08-24-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23019
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 17:54:56 +0000 (17:54 +0000)]
new testcase that crashes -reassociate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23018
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 17:22:17 +0000 (17:22 +0000)]
Transform floor((double)FLT) -> (double)floorf(FLT), implementing
Regression/Transforms/SimplifyLibCalls/floor.ll. This triggers 19 times in
177.mesa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23017
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 17:20:30 +0000 (17:20 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23016
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:58:56 +0000 (16:58 +0000)]
floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
in mesa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23015
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:48:49 +0000 (16:48 +0000)]
Make sure this doesn't break when we're improving the isels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23014
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:46:55 +0000 (16:46 +0000)]
teach selection dag mask tracking about the fact that select_cc operates like
select. Also teach it that the bit count instructions can only set the low bits
of the result, depending on the size of the input.
This allows us to compile this:
int %eq0(int %a) {
%tmp.1 = seteq int %a, 0 ; <bool> [#uses=1]
%tmp.2 = cast bool %tmp.1 to int ; <int> [#uses=1]
ret int %tmp.2
}
To this:
_eq0:
cntlzw r2, r3
srwi r3, r2, 5
blr
instead of this:
_eq0:
cntlzw r2, r3
rlwinm r3, r2, 27, 31, 31
blr
when setcc is marked illegal on ppc (which restores parity to non-illegal
setcc). Thanks to Nate for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23013
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:35:28 +0000 (16:35 +0000)]
Start using isOperationLegal and isTypeLegal to simplify the code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23012
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:34:59 +0000 (16:34 +0000)]
rename hasNativeSupportFor* -> is(Operation|Type)Legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23011
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Aug 2005 16:34:12 +0000 (16:34 +0000)]
Adjust to new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23010
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 24 Aug 2005 14:03:07 +0000 (14:03 +0000)]
Wrap long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23009
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 Aug 2005 10:57:30 +0000 (10:57 +0000)]
Remove some tabs.
Wrap a line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23008
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 Aug 2005 10:55:07 +0000 (10:55 +0000)]
Whoops, don't use PROJ variables, these are all LLVM headers. This allows
projects to compile properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23007
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 Aug 2005 10:43:10 +0000 (10:43 +0000)]
For PR619:
Make any header files that are automatically generated be preconditions of
the compilation. This ensures that if a *.h.in file is changed then its
corresponding *.h file gets updated on the next rebuild. Note that this can
lead to confusing (but correct) results if the *.h.in file changed
unsubstantially so that autoheader doesn't update the *.h file. In that case,
manually touch the *.h file in question to restore order. Moral of the story,
if you're going to "touch" a *.in file then modify it substantially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23006
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 Aug 2005 10:07:20 +0000 (10:07 +0000)]
For PR616:
These patches make threading optional in LLVM. The configuration scripts are now
modified to accept a --disable-threads switch. If this is used, the Mutex class
will be implemented with all functions as no-op. Furthermore, linking against
libpthread will not be done. Finally, the ParallelJIT example needs libpthread
so its makefile was changed to always add -lpthread to the link line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23003
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 24 Aug 2005 05:06:48 +0000 (05:06 +0000)]
Whoops, fix a thinko. All cases except SETNE are now handled by the
target independent code in SelectionDAG.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23002
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 24 Aug 2005 05:03:20 +0000 (05:03 +0000)]
Remove unused statistic
Prefer 'neg X' to 'subfic 0, X' since neg does not set XER[CA]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23001
91177308-0d34-0410-b5e6-
96231b3b80d8