Bill Wendling
7840023704
Temporarily reverting r55137. This was causing the bootstrap to go into an
...
infinite loop.
llvm-svn: 55149
2008-08-21 22:40:10 +00:00
David Greene
e14ab14892
Fix ComputeMaskedBits to handle phis correctly. We need to take the
...
minimum of the known zeros.
llvm-svn: 55137
2008-08-21 20:45:12 +00:00
Dan Gohman
db5b503d60
Fix a bogus srem rule - a negative value srem'd by a power-of-2
...
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.
llvm-svn: 54767
2008-08-13 23:12:35 +00:00
Matthijs Kooijman
96d9bcbdf6
Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
...
also use *idx_begin in the same expression, giving unpredictable results.
This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html
llvm-svn: 53670
2008-07-16 10:47:35 +00:00
Evan Cheng
2005804de6
- Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
...
- Correctly handle memcpy from constant string which is zero-initialized.
llvm-svn: 52891
2008-06-30 07:31:25 +00:00
Anton Korobeynikov
6f260767ec
Revert (52748 and friends):
...
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.
This unbreaks llvm-gcc bootstrap.
llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Chris Lattner
090d81df5e
Add back the capability to include nul characters in strings with
...
GetConstantStringInfo. This will hopefully restore llvm-gcc to
happy bootstrap land.
llvm-svn: 52851
2008-06-28 05:33:32 +00:00
Chris Lattner
98b286ff98
Tighten up checking.
...
llvm-svn: 52850
2008-06-28 04:37:04 +00:00
Chris Lattner
c94b39d65c
fix the regressions from Eric's patch by making GetConstantStringInfo
...
tolerate a non-nul-terminated string, and handling a direct global
reference.
llvm-svn: 52813
2008-06-27 03:36:51 +00:00
Owen Anderson
8c36469880
Reserve the size we'll need in advance.
...
llvm-svn: 52763
2008-06-26 04:47:41 +00:00
Eric Christopher
4f05c48718
Move GetConstantStringInfo to lib/Analysis. Remove
...
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.
llvm-svn: 52748
2008-06-26 00:31:12 +00:00
Duncan Sands
054b82d555
Fix some warnings reported by gcc-4.3. Hopefully
...
this still compiles on windows - I can't test!
llvm-svn: 52488
2008-06-19 08:47:31 +00:00
Matthijs Kooijman
dd18157e57
Use a SmallVector instead of an array, since auto_ptr doesn't handle arrays
...
properly.
llvm-svn: 52390
2008-06-17 08:24:37 +00:00
Matthijs Kooijman
2ba9a750dd
Make BuildSubAggregate use FindInsertedElement again to prevent it from
...
inserting extractvalues. In particular, this prevents the insertion of
extractvalues that can't be folded away later. Also add an example of when this
stuff is needed.
llvm-svn: 52328
2008-06-16 14:13:46 +00:00
Matthijs Kooijman
544c9b2fb0
Make the InsertBefore argument to FindInsertedValue optional, so you can find an inserted value without modifying the code.
...
llvm-svn: 52319
2008-06-16 13:28:31 +00:00
Matthijs Kooijman
238b1e8d69
Pass around Instruction* instead of Instruction& in FindInsertedValue and friends.
...
llvm-svn: 52318
2008-06-16 13:13:08 +00:00
Matthijs Kooijman
dedcf00fcc
80 column fixes.
...
llvm-svn: 52316
2008-06-16 12:57:37 +00:00
Matthijs Kooijman
1dd7d9cdc1
Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. While
...
I'm at it, rename it to FindInsertedValue.
The only functional change is that newly created instructions are no longer
added to instcombine's worklist, but that is not really necessary anyway (and
I'll commit some improvements next that will completely remove the need).
llvm-svn: 52315
2008-06-16 12:48:21 +00:00
Chris Lattner
5839247e92
Add #includes required by GCC 4.3, thanks for Zhongxing Xu
...
for reporting this.
llvm-svn: 51926
2008-06-04 04:46:14 +00:00
Chris Lattner
3e1cd5c9bf
Remove unneeded code I added.
...
llvm-svn: 51878
2008-06-02 18:39:07 +00:00
Chris Lattner
ea60f0ccc3
move CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.
...
llvm-svn: 51864
2008-06-02 01:29:46 +00:00
Chris Lattner
4960857273
move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
...
out of instcombine into a new file in libanalysis. This also teaches
ComputeNumSignBits about the number of sign bits in a constantint.
llvm-svn: 51863
2008-06-02 01:18:21 +00:00