Owen Anderson
1629a1fa87
Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39926 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 21:27:44 +00:00
Reid Spencer
bde6869ef4
Return Undef if the block has no dominator. This was required to allow
...
llvm-gcc build to succeed. Without this change it fails in libstdc++
compilation. This causes no regressions in dejagnu tests. However,
someone who knows this code better might want to review it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 21:03:44 +00:00
Dan Gohman
384152444d
Use ConstantFoldFP for folding all unary floating-point operations which may
...
have an error, and refector out the code for binary operators into
ConstantFoldBinaryFP and use it for all binary floating-point operations
which may have an error. These functions still rely exclusively on errno
to detect errors though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 15:26:22 +00:00
Dan Gohman
d6257fe581
Fix the documentation for llvm.sqrt so that sqrt(0) has defined behavior,
...
which appears to be the intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 14:37:41 +00:00
Dan Gohman
07a96765da
Fix comments about vectors to use the current wording.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39921 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 14:29:03 +00:00
Dan Gohman
318f0dee83
Remove the trailing semicolon from function declarations in LLVM,
...
where it's interpreted as a comment, not part of the syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 13:37:30 +00:00
Bill Wendling
18bf0d01b6
Fix validation errors
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 08:52:56 +00:00
Bill Wendling
22e37c3f7f
Clean up some formatting
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 08:46:40 +00:00
Bill Wendling
77f7469981
Clean up some formatting. Add some doc_code div tags.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 08:44:39 +00:00
Reid Spencer
09d0594d0b
Prepare for building from llvm-top. Unfortunately, this doesn't work because
...
of the cyclic depndency between llvm and llvm-gcc-4-0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39910 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 08:05:18 +00:00
Chris Lattner
cb7122bb7d
Repair a regression in Transforms/InstCombine/mul.ll that Reid noticed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 04:15:34 +00:00
Chris Lattner
e2ece3f479
rename function to avoid llvm-upgrade warning
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39895 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 04:09:00 +00:00
Nick Lewycky
5380e941ef
Start adding and cleaning up comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39894 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 02:58:37 +00:00
Nick Lewycky
eefdebe002
Handle decrementing loops properly. Fixes PR1533.
...
Always pass the constant as the second parameter to HowManyLessThans.
Remove obsolete "isSigned" parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 02:08:00 +00:00
Chris Lattner
f7b71c64cf
add a helper method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39885 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 23:32:03 +00:00
Chris Lattner
04d519e160
new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39882 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 22:30:34 +00:00
Chris Lattner
4241e4da85
Implement shift-simplify.ll:test[45].
...
First teach instcombine that sign bit checks only demand the
sign bit, this allows simplify demanded bits to hack on
expressions better.
Second, teach instcombine that ashr is useless if only the
sign bit is demanded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 20:54:51 +00:00
Chris Lattner
a0141b90a3
Implement shift-simplify.ll:test3, turning:
...
(X << 31) <s 0 --> (X&1) != 0
This happens dozens of times in the CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 20:42:37 +00:00
Nick Lewycky
28753f8df2
Clarify the language. Pointed out by Duncan Sands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 17:41:03 +00:00
Nick Lewycky
6d4b711e7f
Fix the build. Patch from Holger Schurig.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 15:11:14 +00:00
Anton Korobeynikov
2365f51ed0
Long live the exception handling!
...
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39855 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 14:06:15 +00:00
Nick Lewycky
a73d11efd4
Use maximal intersection algorithm exclusively. Fixes miscompile bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 04:28:04 +00:00
Nick Lewycky
377b1190cb
Add alternate ConstantRange intersection algorithm.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39851 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 02:51:34 +00:00
Evan Cheng
7722ceb7de
Added test case from PR1540.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39845 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 23:57:33 +00:00
Devang Patel
b4559a2179
Make LCSSA a loop pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 23:57:11 +00:00
Evan Cheng
03494d7c8f
Fix for PR1540: Specify F0, F1 are sub-registers of D0, etc.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 23:55:50 +00:00
Owen Anderson
a08971559d
Handle GEPs with all-zero indices in the same way we handle pointer-pointer bitcasts. Also, fix a potentia infinite loop.
...
This brings FastDSE to parity with old DSE on 175.vpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39839 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 22:50:48 +00:00
Devang Patel
fba36b8cba
Disable claims to preserve analysis until open issues are resolved.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 21:53:42 +00:00
Dan Gohman
3bf6e183d5
Eliminate an unused parameter.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39828 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:16:50 +00:00
Dan Gohman
a346615d11
Fix the comment for LegalizeOp to more accurately reflect what it does.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39827 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:14:11 +00:00
Chris Lattner
744ff41e0e
remove obsolete note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39825 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:08:19 +00:00
Dan Gohman
05d92fe7c4
Don't call SimplifyVBinOp for non-vector operations, following earlier review
...
feedback. This theoretically makes the common (scalar) case more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39823 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:03:40 +00:00
Chris Lattner
3e63a9d52c
fix some bugs in the manual
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39822 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:01:46 +00:00
Owen Anderson
3e8d001799
Be more aggressive in removing dead stores, and in removing instructions trivially dead after DSE.
...
This drastically improves the effect of FastDSE on kimwitu++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39819 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 18:26:26 +00:00
Dale Johannesen
72f1596403
Modify previous patch per review comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39817 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 17:31:29 +00:00
Dale Johannesen
e7e7d0d7e3
Skeleton of post-RA scheduler; doesn't do anything yet.
...
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39816 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 17:13:54 +00:00
Chris Lattner
8dc4b59b85
Fix CodeGen/Generic/print-arith-fp.ll on sparc (PR1551)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39813 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 16:24:10 +00:00
Gabor Greif
7f6d4e8b6b
these tests do not need a triple on Solaris. Thanks sabre!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39803 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 10:08:18 +00:00
Reid Spencer
96cf58777b
Regenerate to pick up Gabor's changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39802 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 10:05:30 +00:00
Reid Spencer
28522b3bfd
Set the mime-type of this file to text/plain because (silly) SVN
...
doesn't know that application/x-sh is text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 10:02:45 +00:00
Gabor Greif
f70414f3d0
* llvm.spec.in: update blurb
...
* autoconf/AutoRegen.sh: use variables for autofoo versions
* autoconf/configure.ac: test for some more functions
that are not guaranteed on solaris
Note: the svn:mime-type of autoconf/AutoRegen.sh
should be set to something that allows for
text compares using svn diff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39800 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 09:48:29 +00:00
Owen Anderson
43b2676cc2
Reimplement removing stores to allocas at the end of a function. This should be safe now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39790 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 21:41:30 +00:00
Owen Anderson
dd61c2b25c
Make the condition-checking for free with non-trivial dependencies more correct.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39789 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 18:08:51 +00:00
Owen Anderson
1b4542b6df
Remove the end-block handling code. It was unsafe, and making it safe would have resulted in falling back to the slow DSE case. I need to think some more about the right way to handle this.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39788 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 17:52:20 +00:00
Dale Johannesen
66a2a8f878
ARM: make branch folder remove unconditional branches
...
following jump tables that it earlier inserted. This
would be OK on other targets but is needed for correctness
only on ARM (constant islands needs to find jump tables).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39782 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 16:45:35 +00:00
Duncan Sands
bb821dd79b
The type ids making up a filter are unsigned, and
...
should be output as unsigned values. Checked against
gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 13:51:39 +00:00
Gabor Greif
3b0a7ea66e
checked in as obvious,
...
thanks Benoit Boissinot!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39774 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 13:31:38 +00:00
Gabor Greif
fe20273427
fix the remaining 3 testcases that missed a target triple
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 13:21:08 +00:00
Chris Lattner
ca23e17adf
another missed SSE optimization
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 06:31:38 +00:00
Owen Anderson
1cb960a4bb
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39769 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 00:06:21 +00:00