Commit Graph

25209 Commits

Author SHA1 Message Date
Chris Lattner
8e173de059 Add a note that Nate noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28808 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 21:33:31 +00:00
Jim Laskey
f8a01a9661 1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28807 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 20:51:43 +00:00
Jim Laskey
d5a932b92a Was pointed out that structure alignment and type alignment are not the same
thing.  Doubles still need to be special cased.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:37:14 +00:00
Jim Laskey
e4808ed44a Make sure global doubles and vectors are aligned properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28805 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:35:07 +00:00
Chris Lattner
1f2d22ab94 Add some more matcher classes for shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28804 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:25:28 +00:00
Chris Lattner
afe91a5f26 Implement Transforms/InstCombine/bswap.ll, turning common shift/and/or bswap
idioms into bswap intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:07:26 +00:00
Chris Lattner
c0ea2335f3 new testcase, instcombine should turn these into llvm.bswap intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:06:42 +00:00
Chris Lattner
9ec2c3d455 Fix building on case-sensitive file systems, grr :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28801 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 17:31:22 +00:00
Reid Spencer
68464b74b8 Actually add instructions to the list of defined values so it gets
recognized as such!  This prevents the CppWriter from treating every
operand as a forward reference and making a mess of the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 16:09:59 +00:00
Jim Laskey
35f8c208a9 Alignment of globals has not been quite right. Needed to drop the pointer type
to get the alignment of the element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 13:10:58 +00:00
Evan Cheng
31f7be9fb7 Vector extract / insert index operand should have ptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:19:05 +00:00
Evan Cheng
a7dc4a59cb Type of extract_element index operand should be iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:18:06 +00:00
Evan Cheng
015188ffbc Type of vector extract / insert index operand should be iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:14:54 +00:00
Evan Cheng
a844126c43 Consistency. EXTRACT_ELEMENT index operand should have ptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:11:54 +00:00
Evan Cheng
a9767f6218 Assert. Rather than silently stop printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:56 +00:00
Evan Cheng
f4432fac14 Avoid undesirable behavior when assert is not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28793 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:27 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Evan Cheng
d7c2c86239 Allow more use of iPTR in patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 00:16:37 +00:00
Evan Cheng
fae2994302 X86 call instructions can take variable number of operands. Parameters of
vector types are passed via XMM registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 22:24:55 +00:00
Evan Cheng
e945f4d3d4 Added support for variable_ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 22:22:20 +00:00
Chris Lattner
4b5a352f25 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 21:26:18 +00:00
Chris Lattner
ca0173bc0a new testcase, not currently working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 21:24:57 +00:00
Evan Cheng
bc6b86a89e Fix support for optional input flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 19:27:50 +00:00
Evan Cheng
b69d113201 Add argument registers to the end of call operand list (partial fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 18:17:40 +00:00
Jim Laskey
ed4e566dda Change versioning to per debug info descriptor (merged with tag.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 14:45:39 +00:00
Jim Laskey
014f98c7e5 Place dwarf headers at earliest possible point. Well behaved when skipping
functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 11:35:03 +00:00
Chris Lattner
f7a1212850 Fix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitch
bug exposed by the recent lcssa work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 04:46:17 +00:00
Chris Lattner
2c54676d70 new testcase, distilled from povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28778 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 04:45:45 +00:00
Owen Anderson
90245d4cbb When asked not to delete useless PHIs, really don't delete them, no matter how
redundant they are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 04:43:14 +00:00
Chris Lattner
13a68e4257 Use the PotDoms map to memoize 'dominating value' lookup. With this patch,
LCSSA is still the slowest pass when gccas'ing 252.eon, but now it only takes
39s instead of 289s. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28776 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 01:13:57 +00:00
Evan Cheng
50c997e26a getOperandNum(): error if specified operand number is out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 21:47:27 +00:00
Owen Anderson
8b92d0cae1 Fix another instance where PHI nodes need special treatment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:50:09 +00:00
Owen Anderson
3cc86cc11f Update isLCSSAForm to handle PHI nodes specially for live-out detection. This
is the same as the recent patch to LCSSA.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28773 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:45:22 +00:00
Andrew Lenharth
c8aba85e1c I am sure I had commited this workaround before. Perhaps soon I should sort it all out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:34:47 +00:00
Owen Anderson
7be3f1e078 Fix a bug that was causing major slowdowns in povray. This was due to LCSSA
not handling PHI nodes correctly when determining if a value was live-out.

This patch reduces the number of detected live-out variables in the testcase
from 6565 to 485.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 19:37:18 +00:00
Andrew Lenharth
0e4dd01ffc It really helps to be returning to the correct place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 18:27:39 +00:00
Chris Lattner
c4fa603347 Port some bugfixes in shift handling from SimplifyDemandedBits over to
ComputeMaskedBits.  DemandedMasks and KnownZero/One masks should never have
bits set out of the range of the base datatype.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28768 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 16:52:37 +00:00
Jim Laskey
209f437303 My original test case was bogus. Reverting to crasher case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 15:22:49 +00:00
Jim Laskey
df1530a5e3 Tests to make sure that ComputeMaskedBits discards bits for shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28766 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 13:10:44 +00:00
Jim Laskey
9bfa2dcff6 TargetLowering::ComputeMaskedBits was not clearing reciprocal bits on shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28765 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 13:08:58 +00:00
Evan Cheng
004fb92615 Cygwin support: use _alloca to allocate stack if > 4k. Patch by Anton Korobeynikov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 05:14:44 +00:00
Chris Lattner
9686ae7f4e Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 03:10:48 +00:00
Chris Lattner
81c01f0d2c Decribe the "implementation" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 03:05:47 +00:00
Chris Lattner
e67304fb78 Gaar! Don't use r11 for CR save/restore, use R0. R11 can be register
allocated, thus live across the save/reload.  This fixes

llc-beta /MultiSource/Applications/spiff/spiff
llc-beta /MultiSource/Benchmarks/sim/sim:
llc-beta /MultiSource/Benchmarks/Ptrdist/bc/bc
llc-beta /MultiSource/Benchmarks/McCat/12-IOtest/iotest:
llc-beta /MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow
llc-beta /MultiSource/Benchmarks/Fhourstones-3.1/fhourstones3.1
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/rawdaudio
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/rawcaudio
llc-beta /MultiSource/Benchmarks/mediabench/g721/g721encode/encode
llc-beta /MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg

and probably others, with -regalloc=local.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 23:59:16 +00:00
Chris Lattner
b47e0897a0 Fix spilling and reloading of CR regs to reload the right values. This fixes
Olden/power (and probably others) with -regalloc=local.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 21:50:57 +00:00
Owen Anderson
6edf399bb4 Reapply my 6/9 changes. The bug Evan saw no longer occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 21:49:21 +00:00
Chris Lattner
7f2e1dd5d4 Fix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 20:18:01 +00:00
Chris Lattner
b2035f2287 TEstcase that makes simplifycfg infloop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 20:17:44 +00:00
Chris Lattner
f6dc20fcc0 Add a new -compileflags options, remove old externals location specifiers.
People should just use -with-externals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 19:03:17 +00:00
Chris Lattner
a3bb86dd6b Make sure to update the CFG correctly if a switch only has a default dest.
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28755 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 18:25:29 +00:00