oota-llvm.git
17 years agoThree changes:
Chris Lattner [Sat, 21 Oct 2006 05:08:28 +0000 (05:08 +0000)]
Three changes:
1. Remove a bunch of ifdef'd code.
2. When a block just contains an uncond branch, change all blocks branching
   to it to jump to the destination instead.
3. If branch analysis tells us some edges in the machinecfg are not actually
   possible, remove them.

#2 triggers a suprisingly large number of times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31094 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate assert message
Chris Lattner [Sat, 21 Oct 2006 04:42:29 +0000 (04:42 +0000)]
update assert message

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31093 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd an experimental cross-jumping implementation.
Chris Lattner [Sat, 21 Oct 2006 00:47:49 +0000 (00:47 +0000)]
Add an experimental cross-jumping implementation.
This is currently disabled by default and limited in several ways, but does
have a positive effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31090 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotypo
Chris Lattner [Fri, 20 Oct 2006 22:44:45 +0000 (22:44 +0000)]
typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31089 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement MachineOperand::isIdenticalTo
Chris Lattner [Fri, 20 Oct 2006 22:39:59 +0000 (22:39 +0000)]
implement MachineOperand::isIdenticalTo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31088 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd isIdenticalTo method to machineinstr/operand.
Chris Lattner [Fri, 20 Oct 2006 22:39:36 +0000 (22:39 +0000)]
add isIdenticalTo method to machineinstr/operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31087 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agollvm-extract should remove module-level asm
Chris Lattner [Fri, 20 Oct 2006 21:35:41 +0000 (21:35 +0000)]
llvm-extract should remove module-level asm

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31086 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agobugfix
Chris Lattner [Fri, 20 Oct 2006 20:44:34 +0000 (20:44 +0000)]
bugfix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31074 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
Chris Lattner [Fri, 20 Oct 2006 20:19:08 +0000 (20:19 +0000)]
Fix an ugly problem in SCCP.  This fixes Benchmarks/Misc-C++/mandel-text.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31073 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix miscompilation of MallocBench/espresso which code review pointed out
Chris Lattner [Fri, 20 Oct 2006 18:20:21 +0000 (18:20 +0000)]
Fix miscompilation of MallocBench/espresso which code review pointed out
but apparently didn't make it into the final patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31070 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChanged the pattern matching so that it will hopefully work on Linux.
Bill Wendling [Fri, 20 Oct 2006 18:15:24 +0000 (18:15 +0000)]
Changed the pattern matching so that it will hopefully work on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31069 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTest case for
Devang Patel [Fri, 20 Oct 2006 18:06:37 +0000 (18:06 +0000)]
Test case for
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061016/038780.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31068 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake flag and chain edges visually distinguishable from value edges in DOT
Chris Lattner [Fri, 20 Oct 2006 18:06:09 +0000 (18:06 +0000)]
Make flag and chain edges visually distinguishable from value edges in DOT
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31067 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd method
Chris Lattner [Fri, 20 Oct 2006 18:00:03 +0000 (18:00 +0000)]
add method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31066 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement branch analysis/xform hooks required by the branch folding pass.
Chris Lattner [Fri, 20 Oct 2006 17:42:20 +0000 (17:42 +0000)]
Implement branch analysis/xform hooks required by the branch folding pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31065 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a comment to be accurate.
Reid Spencer [Fri, 20 Oct 2006 07:24:55 +0000 (07:24 +0000)]
Fix a comment to be accurate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31064 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Fri, 20 Oct 2006 07:07:24 +0000 (07:07 +0000)]
For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhile creating mask, use 1ULL instead of 1.
Devang Patel [Fri, 20 Oct 2006 01:16:56 +0000 (01:16 +0000)]
While creating mask, use 1ULL instead of 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31062 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.
Chris Lattner [Fri, 20 Oct 2006 00:42:07 +0000 (00:42 +0000)]
Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31061 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase for PR957
Chris Lattner [Fri, 20 Oct 2006 00:41:31 +0000 (00:41 +0000)]
new testcase for PR957

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31060 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a method to determine whether evaluation of a constant can trap.
Chris Lattner [Fri, 20 Oct 2006 00:27:06 +0000 (00:27 +0000)]
add a method to determine whether evaluation of a constant can trap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31059 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTestcase for P926
Bill Wendling [Thu, 19 Oct 2006 23:21:59 +0000 (23:21 +0000)]
Testcase for P926

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31058 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPartially in response to PR926: insert the newly created machine basic
Bill Wendling [Thu, 19 Oct 2006 21:46:38 +0000 (21:46 +0000)]
Partially in response to PR926: insert the newly created machine basic
blocks into the basic block list when lowering the switch inst. into a
binary tree of if-then statements. This allows the "visitSwitchCase" func
to allow for fall-through behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31057 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIt is OK to remove extra cast if operation is EQ/NE even though source
Devang Patel [Thu, 19 Oct 2006 20:59:13 +0000 (20:59 +0000)]
It is OK to remove extra cast if operation is EQ/NE even though source
and destination sign may not match but other conditions are met.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31056 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTypo Typo.
Devang Patel [Thu, 19 Oct 2006 19:21:36 +0000 (19:21 +0000)]
Typo Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31055 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTypo.
Devang Patel [Thu, 19 Oct 2006 19:05:38 +0000 (19:05 +0000)]
Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31054 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix bug in PR454 resolution. Added new test case.
Devang Patel [Thu, 19 Oct 2006 18:54:08 +0000 (18:54 +0000)]
Fix bug in PR454 resolution. Added new test case.
This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31053 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agouse Pat to implement extloadi8 and extloadi16
Rafael Espindola [Thu, 19 Oct 2006 17:05:03 +0000 (17:05 +0000)]
use Pat to implement extloadi8 and extloadi16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31052 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago80 cols fix.
Reid Spencer [Thu, 19 Oct 2006 15:24:04 +0000 (15:24 +0000)]
80 cols fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31050 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement undef
Rafael Espindola [Thu, 19 Oct 2006 13:45:00 +0000 (13:45 +0000)]
implement undef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31049 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoprint common symbols
Rafael Espindola [Thu, 19 Oct 2006 13:30:40 +0000 (13:30 +0000)]
print common symbols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31048 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement extloadi8 and extloadi16
Rafael Espindola [Thu, 19 Oct 2006 12:45:04 +0000 (12:45 +0000)]
implement extloadi8 and extloadi16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31047 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand SIGN_EXTEND_INREG
Rafael Espindola [Thu, 19 Oct 2006 12:06:50 +0000 (12:06 +0000)]
expand SIGN_EXTEND_INREG

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31046 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand brind so that we don't have to implement jump tables right now
Rafael Espindola [Thu, 19 Oct 2006 10:56:43 +0000 (10:56 +0000)]
expand brind so that we don't have to implement jump tables right now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31045 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBeef up the output from DiffFilesWithTolerance by setting the error code
Reid Spencer [Wed, 18 Oct 2006 20:23:52 +0000 (20:23 +0000)]
Beef up the output from DiffFilesWithTolerance by setting the error code
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31044 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd llvm.spec, a generated file.
Reid Spencer [Wed, 18 Oct 2006 19:23:56 +0000 (19:23 +0000)]
Add llvm.spec, a generated file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31041 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd option for controlling inclusion of global AA.
Jim Laskey [Wed, 18 Oct 2006 19:08:31 +0000 (19:08 +0000)]
Add option for controlling inclusion of global AA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31040 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofit in 80 cols
Chris Lattner [Wed, 18 Oct 2006 18:26:48 +0000 (18:26 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31039 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Wed, 18 Oct 2006 17:04:09 +0000 (17:04 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31038 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd blx
Rafael Espindola [Wed, 18 Oct 2006 16:21:43 +0000 (16:21 +0000)]
add blx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31037 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd isTerminatortto b and bcond
Rafael Espindola [Wed, 18 Oct 2006 16:20:57 +0000 (16:20 +0000)]
add isTerminatortto b and bcond

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31036 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse global info for alias analysis.
Jim Laskey [Wed, 18 Oct 2006 12:29:57 +0000 (12:29 +0000)]
Use global info for alias analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31035 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement CallingConv::Fast as CallingConv::C
Rafael Espindola [Wed, 18 Oct 2006 12:03:07 +0000 (12:03 +0000)]
implement CallingConv::Fast as CallingConv::C

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31034 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFixed mingw\cygwin linkonce linkage once again.
Anton Korobeynikov [Wed, 18 Oct 2006 09:12:29 +0000 (09:12 +0000)]
Fixed mingw\cygwin linkonce linkage once again.
Added workaround for linker bug with linkonce sections.
Changed sections prefix to allow linker merge them
(PE loader doesn't like too much long-named sections :) )
All of this unbreaks libstdc++ on mingw32 allowing (small)
programs to be compiled, linked and run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31033 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd LCSSA to the LLVM lexicon.
Owen Anderson [Wed, 18 Oct 2006 05:50:12 +0000 (05:50 +0000)]
Add LCSSA to the LLVM lexicon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31032 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd support for the new "target data" information in .ll files. This provides
Owen Anderson [Wed, 18 Oct 2006 02:21:48 +0000 (02:21 +0000)]
Add support for the new "target data" information in .ll files.  This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

Update the generated files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31031 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd support for the new "target data" information in .ll files. This provides
Owen Anderson [Wed, 18 Oct 2006 02:21:12 +0000 (02:21 +0000)]
Add support for the new "target data" information in .ll files.  This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31030 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Wed, 18 Oct 2006 01:21:35 +0000 (01:21 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31029 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoset the ppc64 stack pointer right, dynamic alloca now works for ppc64
Chris Lattner [Wed, 18 Oct 2006 01:20:43 +0000 (01:20 +0000)]
set the ppc64 stack pointer right, dynamic alloca now works for ppc64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31028 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoExpand alloca for ppc64
Chris Lattner [Wed, 18 Oct 2006 01:18:48 +0000 (01:18 +0000)]
Expand alloca for ppc64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31027 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTeach the branch folder to update debug info if it removes blocks with line
Chris Lattner [Tue, 17 Oct 2006 23:17:27 +0000 (23:17 +0000)]
Teach the branch folder to update debug info if it removes blocks with line
# notes in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31026 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a method to remove a line # record.
Chris Lattner [Tue, 17 Oct 2006 23:16:42 +0000 (23:16 +0000)]
add a method to remove a line # record.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31025 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpose DWARF_LABEL opcode# so the branch folder can update debug info properly.
Chris Lattner [Tue, 17 Oct 2006 22:41:45 +0000 (22:41 +0000)]
expose DWARF_LABEL opcode# so the branch folder can update debug info properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31024 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoupdate comment
Chris Lattner [Tue, 17 Oct 2006 22:12:15 +0000 (22:12 +0000)]
update comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31023 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDo not leak all of the SourceLineInfo objects. Do not bother mallocing each
Chris Lattner [Tue, 17 Oct 2006 22:06:46 +0000 (22:06 +0000)]
Do not leak all of the SourceLineInfo objects.  Do not bother mallocing each
one separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31022 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agominor cleanups
Chris Lattner [Tue, 17 Oct 2006 21:51:44 +0000 (21:51 +0000)]
minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31021 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTrivial patch to speed up legalizing common i64 constants.
Chris Lattner [Tue, 17 Oct 2006 21:47:13 +0000 (21:47 +0000)]
Trivial patch to speed up legalizing common i64 constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31020 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll
Chris Lattner [Tue, 17 Oct 2006 21:24:15 +0000 (21:24 +0000)]
Fix CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31019 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase, miscompilation of llvm with itself.
Chris Lattner [Tue, 17 Oct 2006 21:23:20 +0000 (21:23 +0000)]
new testcase, miscompilation of llvm with itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31018 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix printer for StoreSDNode.
Evan Cheng [Tue, 17 Oct 2006 21:18:26 +0000 (21:18 +0000)]
Fix printer for StoreSDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31017 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReflect MemOpAddrMode change; added a helper to create pre-indexed load.
Evan Cheng [Tue, 17 Oct 2006 21:14:32 +0000 (21:14 +0000)]
Reflect MemOpAddrMode change; added a helper to create pre-indexed load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31016 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSplit PRE_INDEXED to PRE_INC / PRE_DEC and similarly for POST_INDEXED.
Evan Cheng [Tue, 17 Oct 2006 21:12:56 +0000 (21:12 +0000)]
Split PRE_INDEXED to PRE_INC / PRE_DEC and similarly for POST_INDEXED.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31015 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM
Rafael Espindola [Tue, 17 Oct 2006 21:05:33 +0000 (21:05 +0000)]
expand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31014 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd the FPUnaryOp and DFPUnaryOp classes
Rafael Espindola [Tue, 17 Oct 2006 20:45:22 +0000 (20:45 +0000)]
add the FPUnaryOp and DFPUnaryOp classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31013 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd FABSS and FABSD
Rafael Espindola [Tue, 17 Oct 2006 20:33:13 +0000 (20:33 +0000)]
add FABSS and FABSD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31012 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdding linkonce linkage codegeneration support for mingw32\cygwin
Anton Korobeynikov [Tue, 17 Oct 2006 20:29:49 +0000 (20:29 +0000)]
Adding linkonce linkage codegeneration support for mingw32\cygwin
targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31011 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocleanup some tests
Rafael Espindola [Tue, 17 Oct 2006 20:20:07 +0000 (20:20 +0000)]
cleanup some tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31010 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake it simplier to dump DAGs while in DAGCombiner. Remove a nasty optimization.
Jim Laskey [Tue, 17 Oct 2006 19:33:52 +0000 (19:33 +0000)]
Make it simplier to dump DAGs while in DAGCombiner.  Remove a nasty optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31009 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove extra [] in stores
Rafael Espindola [Tue, 17 Oct 2006 18:29:14 +0000 (18:29 +0000)]
remove extra [] in stores

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31008 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoEnable deleting branches to successor blocks. With the previous patches,
Chris Lattner [Tue, 17 Oct 2006 18:16:40 +0000 (18:16 +0000)]
Enable deleting branches to successor blocks.  With the previous patches,
branch folding can now compile stuff like this:

void foo(int W, int X, int Y, int Z) {
  if (W & 1) {
    for (; X;--X) bar();
  } else if (W & 2) {
    for (; Y;--Y) bar();
  } else if (W & 4) {
    for (; Z;--Z) bar();
  } else if (W & 8) {
    for (; W;--W) bar();
  }

  if (W) {
    bar();
  }
}

contrived testcase where loops exits all end up merging together.  To have
the loop merges be:

...
        cmplw cr0, r30, r27
        bne cr0, LBB1_14        ;bb38
LBB1_16:        ;cond_next48.loopexit
        mr r27, r29
LBB1_20:        ;cond_next48
        cmplwi cr0, r27, 0
        beq cr0, LBB1_22        ;UnifiedReturnBlock
...

instead of:

...
        cmplw cr0, r30, r27
        bne cr0, LBB1_14        ;bb38
LBB1_16:        ;cond_next48.loopexit
        mr r27, r29
        b LBB1_20       ;cond_next48
LBB1_17:        ;cond_next48.loopexit1
        b LBB1_20       ;cond_next48
LBB1_18:        ;cond_next48.loopexit2
        b LBB1_20       ;cond_next48
LBB1_19:        ;cond_next48.loopexit3
LBB1_20:        ;cond_next48
        cmplwi cr0, r27, 0
        beq cr0, LBB1_22        ;UnifiedReturnBlock
...

This is CodeGen/PowerPC/branch-opt.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31006 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 17 Oct 2006 18:14:39 +0000 (18:14 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31005 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd support for inserting an uncond branch
Chris Lattner [Tue, 17 Oct 2006 18:06:55 +0000 (18:06 +0000)]
add support for inserting an uncond branch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31003 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoinitial implementation of addressing mode 5
Rafael Espindola [Tue, 17 Oct 2006 18:04:53 +0000 (18:04 +0000)]
initial implementation of addressing mode 5

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31002 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoClean up interface to getGlobalLinkName.
Jim Laskey [Tue, 17 Oct 2006 17:17:24 +0000 (17:17 +0000)]
Clean up interface to getGlobalLinkName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31001 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReenable this pass, fixing the bugs in it.
Chris Lattner [Tue, 17 Oct 2006 17:13:52 +0000 (17:13 +0000)]
Reenable this pass, fixing the bugs in it.
It now correctly deletes unreachable blocks and blocks that are empty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31000 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake sure operand does have size and element type operands.
Evan Cheng [Tue, 17 Oct 2006 17:06:35 +0000 (17:06 +0000)]
Make sure operand does have size and element type operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30999 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd the immediate to the Offset in eliminateFrameIndex
Rafael Espindola [Tue, 17 Oct 2006 14:34:02 +0000 (14:34 +0000)]
add the immediate to the Offset in eliminateFrameIndex

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30998 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBasic support for getGlobalLinkName.
Jim Laskey [Tue, 17 Oct 2006 13:41:07 +0000 (13:41 +0000)]
Basic support for getGlobalLinkName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30997 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd FSTD and FSTS
Rafael Espindola [Tue, 17 Oct 2006 13:36:07 +0000 (13:36 +0000)]
add FSTD and FSTS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30996 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd FCPYS and FCPYD
Rafael Espindola [Tue, 17 Oct 2006 13:13:23 +0000 (13:13 +0000)]
add FCPYS and FCPYD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30995 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse S_debug for dwarf info.
Jim Laskey [Tue, 17 Oct 2006 11:30:57 +0000 (11:30 +0000)]
Use S_debug for dwarf info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30994 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProper fix.
Evan Cheng [Tue, 17 Oct 2006 00:24:49 +0000 (00:24 +0000)]
Proper fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30993 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOne more try.
Evan Cheng [Mon, 16 Oct 2006 23:44:08 +0000 (23:44 +0000)]
One more try.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30992 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUndo Chris' last patch, it caused a regression.
Reid Spencer [Mon, 16 Oct 2006 23:08:08 +0000 (23:08 +0000)]
Undo Chris' last patch, it caused a regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30991 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUnbreak x86-64 build.
Evan Cheng [Mon, 16 Oct 2006 22:53:28 +0000 (22:53 +0000)]
Unbreak x86-64 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30990 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBe careful when looking through a vbit_convert. Optimizing this:
Evan Cheng [Mon, 16 Oct 2006 22:49:37 +0000 (22:49 +0000)]
Be careful when looking through a vbit_convert. Optimizing this:
(vector_shuffle
  (vbitconvert (vbuildvector (copyfromreg v4f32), 1, v4f32), 4, f32),
  (undef, undef, undef, undef), (0, 0, 0, 0), 4, f32)
to the
  vbitconvert
is a very bad idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30989 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd fdivs e fdivd
Rafael Espindola [Mon, 16 Oct 2006 21:50:04 +0000 (21:50 +0000)]
add fdivs e fdivd

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30988 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS
Rafael Espindola [Mon, 16 Oct 2006 21:10:32 +0000 (21:10 +0000)]
expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30987 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded a X86CompilationCallback variant which saves XMM argument registers for targets...
Evan Cheng [Mon, 16 Oct 2006 21:01:55 +0000 (21:01 +0000)]
Added a X86CompilationCallback variant which saves XMM argument registers for targets with SSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30986 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProper fix for rdar://problem/4770604 Thanks to Stuart Hastings!
Evan Cheng [Mon, 16 Oct 2006 21:00:37 +0000 (21:00 +0000)]
Proper fix for rdar://problem/4770604   Thanks to Stuart Hastings!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30985 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPass AliasAnalysis thru to DAGCombiner.
Jim Laskey [Mon, 16 Oct 2006 20:52:31 +0000 (20:52 +0000)]
Pass AliasAnalysis thru to DAGCombiner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30984 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a ReplaceMBBInJumpTables method
Chris Lattner [Mon, 16 Oct 2006 20:41:42 +0000 (20:41 +0000)]
add a ReplaceMBBInJumpTables method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30983 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoGlobal name regression.
Jim Laskey [Mon, 16 Oct 2006 19:38:41 +0000 (19:38 +0000)]
Global name regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30982 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the DFPBinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:39:22 +0000 (18:39 +0000)]
define the DFPBinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30981 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd the FPBinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:32:36 +0000 (18:32 +0000)]
add the FPBinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30980 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the Addr1BinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:18:14 +0000 (18:18 +0000)]
define the Addr1BinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30979 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the IntBinOp class and use it to implement the multiply instructions
Rafael Espindola [Mon, 16 Oct 2006 17:57:20 +0000 (17:57 +0000)]
define the IntBinOp class and use it to implement the multiply instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30978 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix assembly syntax
Rafael Espindola [Mon, 16 Oct 2006 17:38:12 +0000 (17:38 +0000)]
fix assembly syntax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30977 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement LDRB, LDRSB, LDRH and LDRSH
Rafael Espindola [Mon, 16 Oct 2006 17:17:22 +0000 (17:17 +0000)]
implement LDRB, LDRSB, LDRH and LDRSH

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30976 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement smull and umull
Rafael Espindola [Mon, 16 Oct 2006 16:33:29 +0000 (16:33 +0000)]
implement smull and umull

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30975 91177308-0d34-0410-b5e6-96231b3b80d8