Reid Spencer [Wed, 21 Feb 2007 05:44:56 +0000 (05:44 +0000)]
Fix the carry in addition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34465
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 21 Feb 2007 03:56:12 +0000 (03:56 +0000)]
Add a dump() method for debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34464
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 21 Feb 2007 03:55:44 +0000 (03:55 +0000)]
1. Add a dump() method for faster debugging.
2. Change 0 initialization of union to larger component so all is zeroed.
3. Fix the borrow logic in subtraction so it works for > 128 bits.
4. Rewrite fromString to use a simpler but correct algorithm and also to
not set the bit width contrary to the user's request.
5. Optimize toString a bit by making it only do one Knuth divide per
iteration instead of two.
With these changes, all arithmetic passes (verified by pari/GP) up to
1024 bits except for certain division cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34463
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 21 Feb 2007 02:36:31 +0000 (02:36 +0000)]
Fix memory leak (PR 775).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34462
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 21 Feb 2007 02:27:39 +0000 (02:27 +0000)]
Out of bound reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34461
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 21 Feb 2007 02:22:03 +0000 (02:22 +0000)]
Use BitVector instead. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34460
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 21 Feb 2007 00:29:48 +0000 (00:29 +0000)]
Fix countLeadingZeros to actually return the correct number.
Fix toString to correctly return "0" for zero valued APInts over 128 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34459
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Feb 2007 23:40:25 +0000 (23:40 +0000)]
Make long addition and subtraction work. Speed things up by using internal
functions more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34458
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Feb 2007 21:30:56 +0000 (21:30 +0000)]
This cast broke lots of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 Feb 2007 20:52:03 +0000 (20:52 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34456
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Feb 2007 20:42:10 +0000 (20:42 +0000)]
Clean up variable names in operator*.
Attempt #3 for getting a portable INFINITY value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34454
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Feb 2007 18:29:12 +0000 (18:29 +0000)]
Use INFINITY macro from math.h instead of constructing hex floating point
constants (avoids warnings).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34452
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Feb 2007 08:51:03 +0000 (08:51 +0000)]
First version that can process arith.cpp test case up to 1024 bits:
1. Ensure pVal is set to 0 in each constructor.
2. Fix roundToDouble to make correct calculations and not read beyond the
end of allocated memory.
3. Implement Knuth's "classical algorithm" for division from scratch and
eliminate buffer overflows and uninitialized mememory reads. Document
it properly too.
4. Implement a wrapper function for KnuthDiv which handles the 64-bit to
32-bit conversion and back. It also implement short division for the
n == 1 case that Knuth's algorithm can't handle.
5. Simplify the logic of udiv and urem a little, make them exit early, and
have them use the "divide" wrapper function to perform the division
or remainder operation.
6. Move the toString function to the end of the file, closer to where
the division functions are located.
Note: division is still broken for some > 64 bit values, but at least it
doesn't crash any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34449
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Feb 2007 08:43:42 +0000 (08:43 +0000)]
Add an internal convenience method for division that urem and udiv use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 07:18:01 +0000 (07:18 +0000)]
eliminate some dead friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 07:17:17 +0000 (07:17 +0000)]
switch ConstantFP's from ValueMap to DenseMap, which is much faster to query
and is more memory efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 06:39:57 +0000 (06:39 +0000)]
cleanup ConstantInt to use a single DenseMap for uniquing instead of the
heavy-weight ValueMap class. This reduces mem usage bc reading kc++ by 29K,
even though it only creates 2955 constant ints!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 06:18:57 +0000 (06:18 +0000)]
Not all managedstatics need object pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 06:11:36 +0000 (06:11 +0000)]
Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 06:08:37 +0000 (06:08 +0000)]
add a way to register an arbitrary cleanup function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:55:46 +0000 (05:55 +0000)]
Clean up the internals of the ConstantInt machinery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34441
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:46:39 +0000 (05:46 +0000)]
simplify some code that was not llvm_shutdown safe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:31:49 +0000 (05:31 +0000)]
remove reoptimizer-specific passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:31:35 +0000 (05:31 +0000)]
remove some dead passes and stuff specific to the reoptimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:31:04 +0000 (05:31 +0000)]
remove some passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34437
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Feb 2007 05:29:47 +0000 (05:29 +0000)]
remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34436
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Feb 2007 01:29:10 +0000 (01:29 +0000)]
Dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34435
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Feb 2007 00:39:09 +0000 (00:39 +0000)]
How the heck did I forget patterns for llvm.x86.sse2.cmp.sd?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34434
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 23:54:10 +0000 (23:54 +0000)]
Add a section on the target datalayout syntax and describe the defaults
and rules used by LLVM to construct the target's layout rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34433
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 23:30:10 +0000 (23:30 +0000)]
Simplify some code by moving variable declarations into the only block that
uses them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34432
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 22:35:00 +0000 (22:35 +0000)]
Implement support for non-standard integer bit widths of any size. The
rules alignment is to pick the alignment that corresponds to the smallest
specified alignment that is larger than the bit width of the type or the
largest specified integer alignment if none are larger than the bitwidth
of the type. For the byte size, the size returned is the next larger
multiple of the alignment for that type (using the above rule). This patch
also changes bit widths from "short" to "uint32_t" to ensure there are
enough bits to specify any bit width that LLVM can handle (currently 2^23);
16-bits isn't enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34431
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Feb 2007 21:53:59 +0000 (21:53 +0000)]
Added test case for PR1207.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34429
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Feb 2007 21:49:54 +0000 (21:49 +0000)]
Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34428
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Feb 2007 21:47:02 +0000 (21:47 +0000)]
Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 20:20:04 +0000 (20:20 +0000)]
this passes now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 20:01:23 +0000 (20:01 +0000)]
llvm-gcc issue fixed, revert reversal :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34425
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 19:46:17 +0000 (19:46 +0000)]
remove warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34424
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Feb 2007 19:23:41 +0000 (19:23 +0000)]
Temporarily reverting the patch. It's breaking llvm-gcc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34423
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 19:00:29 +0000 (19:00 +0000)]
Add a FIXME for unwritten code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34422
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 19 Feb 2007 18:32:40 +0000 (18:32 +0000)]
Corrected typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34421
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 17:38:38 +0000 (17:38 +0000)]
Some minor tweaks and grammar cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34420
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 07:44:24 +0000 (07:44 +0000)]
remove dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 07:41:31 +0000 (07:41 +0000)]
remove use of deprecated apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34418
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 07:34:47 +0000 (07:34 +0000)]
eliminate use of deprecated apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34417
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 07:34:02 +0000 (07:34 +0000)]
remove use of deprecated api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 07:23:24 +0000 (07:23 +0000)]
add alternate version of constant ctors that don't take a vector. For now
this offers no performance advantage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:57:46 +0000 (06:57 +0000)]
fix validation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34414
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:57:16 +0000 (06:57 +0000)]
more wording changes and some minor additions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34413
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:24:23 +0000 (06:24 +0000)]
add the definite article
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:19:16 +0000 (06:19 +0000)]
rename section to Copyright, License, and Patents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:15:33 +0000 (06:15 +0000)]
wording changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:13:50 +0000 (06:13 +0000)]
add strong words about patents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 06:05:58 +0000 (06:05 +0000)]
incremental changes to own section, protosection on patents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 05:59:30 +0000 (05:59 +0000)]
fix TOC, clarify bullet in incremental dev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 05:57:29 +0000 (05:57 +0000)]
refactor the top-level 'patches' section into a subsection of General Policies.
Much of its content is now in other parts of the doc, and this brings it up
immediately after 'stay informed' and right before 'code reviews'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 05:49:11 +0000 (05:49 +0000)]
minor changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 05:47:13 +0000 (05:47 +0000)]
remove terminology section (this is not a legal document)
move testcases above quality. Mention that a testcase is part of quality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 05:43:04 +0000 (05:43 +0000)]
Transmogrify 'Starting New Work' into 'Making a Major Change', add
incremental development as a subsection of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 03:50:31 +0000 (03:50 +0000)]
A bunch of editting. I'm still not done with the 'patches' section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Feb 2007 03:33:06 +0000 (03:33 +0000)]
clarify the 'developed by' line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34400
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 03:20:00 +0000 (03:20 +0000)]
For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34399
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Feb 2007 03:18:22 +0000 (03:18 +0000)]
Add some new constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34398
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 22:29:05 +0000 (22:29 +0000)]
1. Fix some indentation and variable names in the get{Min,Max}Value methods.
2. Implement toString for power-of-2 radix without using divide and always
printing full words. This allows hex/binary to look at the bit
respresentation of the APInt as well as avoid bugs in divide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Feb 2007 22:10:58 +0000 (22:10 +0000)]
fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Feb 2007 22:10:34 +0000 (22:10 +0000)]
simplify pass, delete dead gvar protos as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34394
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 20:37:44 +0000 (20:37 +0000)]
Remove broken links to gccas and gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34393
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 20:09:41 +0000 (20:09 +0000)]
1. Use APINT_WORD_SIZE instead of sizeof(uint64_t)
2. Teach slt about signedness.
3. Teach roundToDouble to properly sign extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34391
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 18:42:35 +0000 (18:42 +0000)]
1. "unsigned" -> "uint32_t" to gaurantee its bit width on all platforms.
Size matters in this case.
2. Remove the unused whichByte private function, which was also broken.
3. Remove the non-const overload of the getWord function, getWord() is
never used as an lvalue.
4. Rename some local variables for clarity (e.g. API -> Result).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34390
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 18:38:44 +0000 (18:38 +0000)]
1. Remove dead code (lshift function).
2. Consolidate memory allocation into just two inline functions.
3. Convert "unsigned" to uint32_t to gaurantee its size.
4. Eliminate magic constants and replace with symbolic equivalent.
5. Improve code documentation slightly.
6. Simplify the logical operator code because bitwidths must be the same.
7. Fix indentation per coding standards.
8. Use exit-early style to reduce indentation in several functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34389
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 06:39:42 +0000 (06:39 +0000)]
Make add_1 exit early if carry is 0.
Fix line breaks and 80 cols violation.
Simplify operator^= since bitwidths must be the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Feb 2007 03:03:41 +0000 (03:03 +0000)]
avoid collision with /usr/bin/sample if this ever gets installed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34387
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 18 Feb 2007 00:44:22 +0000 (00:44 +0000)]
Implement signed output for toString.
Fix bugs in countLeadingZeros and countTrailingZeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 23:14:24 +0000 (23:14 +0000)]
temporarily revert Devang's most recent patch, which caused a large
compile-time regression in LLC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34385
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 17 Feb 2007 22:38:07 +0000 (22:38 +0000)]
Fix some bugs in division logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34384
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:15:40 +0000 (11:15 +0000)]
- Changes how function livein's are handled, they now have a start index of 0.
- When coalescing a copy MI, if its destination is "dead", propagate the
property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34383
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:11:27 +0000 (11:11 +0000)]
Do not add livein's to entry MBB twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34382
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:10:48 +0000 (11:10 +0000)]
Added removeLiveIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34381
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:10:18 +0000 (11:10 +0000)]
Added findRegisterDefOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34380
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:09:47 +0000 (11:09 +0000)]
- Use MRegister::regsOverlap().
- Allow LiveVariables to track liveness of more registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34379
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:07:41 +0000 (11:07 +0000)]
Added removeLiveIn and more livein iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34378
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:07:08 +0000 (11:07 +0000)]
Allow LiveVariables to track liveness of more registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34377
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:06:00 +0000 (11:06 +0000)]
Added getReservedRegs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34376
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Feb 2007 11:04:35 +0000 (11:04 +0000)]
- Added regsOverlap() to test if two registers overlap. Or in case they are
virtual registers, test if they the same.
- Added a virtual method to return target specific reserved registers, e.g. SP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:57:26 +0000 (06:57 +0000)]
Fix ixaddrs as well, allowing ppc64 to compile to:
_test2:
li r2, 0
lis r3, 1
std r2, 9024(r3)
blr
instead of:
_test2:
lis r2, 1
li r3, 0
ori r2, r2, 9024
std r3, 0(r2)
blr
This implements CodeGen/PowerPC/LargeAbsoluteAddr.ll:test2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:57:11 +0000 (06:57 +0000)]
new test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34372
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:44:03 +0000 (06:44 +0000)]
Compile test/CodeGen/PowerPC/LargeAbsoluteAddr.ll to:
_test:
lis r2, 743
li r3, 0
stw r3, 32751(r2)
blr
instead of:
_test:
li r2, 0
stw r2, 32751(
48693248)
blr
Implement support for ppc64 as well, allowing it to produce better code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:41:57 +0000 (06:41 +0000)]
Test that large absolute addresses are properly folded into addr modes on
both ppc32 and ppc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34370
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:38:37 +0000 (06:38 +0000)]
print target nodes nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 06:00:35 +0000 (06:00 +0000)]
Implement i/n/s constraints correctly. This fixes
test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34368
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 05:59:01 +0000 (05:59 +0000)]
new testcase that crashes llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34367
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 05:44:57 +0000 (05:44 +0000)]
testcase for PR1170
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 05:07:40 +0000 (05:07 +0000)]
new testcase for -fwritable-strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34365
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Feb 2007 03:53:44 +0000 (03:53 +0000)]
Use inverted map to speedup collectLastUses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34364
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 17 Feb 2007 03:16:00 +0000 (03:16 +0000)]
Move static functions closer to their usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34363
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 17 Feb 2007 02:07:07 +0000 (02:07 +0000)]
Clean up the divide and remainder logic a bit (exit early). Use more
meaningful variable names. Add comments to document the flow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34362
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 01:44:21 +0000 (01:44 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34361
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sat, 17 Feb 2007 01:12:15 +0000 (01:12 +0000)]
adding PR 1200 comment by request
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34360
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sat, 17 Feb 2007 00:44:34 +0000 (00:44 +0000)]
Fixes PR 1200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34359
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Feb 2007 00:41:42 +0000 (00:41 +0000)]
Do not dereference invalid ranges. Generalize targetdata alignment model.
This fixes the UnitTests/Vector/sumarray-dbl regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34358
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 17 Feb 2007 00:18:01 +0000 (00:18 +0000)]
Fix bugs introduced by constructor parameter order change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34357
91177308-0d34-0410-b5e6-
96231b3b80d8