Commit Graph

17470 Commits

Author SHA1 Message Date
Devang Patel
8ded5852fe Add facility that allows LoopPass to re-insert a loop into
Loop Pass Manager's queue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 00:16:44 +00:00
Devang Patel
5afdc7d785 Add LPPassManager interface that LoopPass can use to skip
rest of the passes in the queue for a loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 00:10:16 +00:00
Chris Lattner
c740d06290 remove obsolete file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:48:43 +00:00
Devang Patel
643a79b4b3 Populate and walk loop queue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:45:15 +00:00
Devang Patel
d0e6e33043 Add LoopQueue. This is used by loop pass manager to manage loop nest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:30:07 +00:00
Evan Cheng
30cac02a92 Remove unnecessary isKill properties if a live range has been lengthened due to coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:03:39 +00:00
Jim Laskey
774b864f0e Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 18:51:19 +00:00
Jim Laskey
5df3ad8b7a Missing end of abbreviations - correction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 18:48:52 +00:00
Jim Laskey
7b1b39d9bc Missing end of abbreviations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34500 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 18:22:42 +00:00
Jim Laskey
9bb3c93af2 Need to init.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 18:04:49 +00:00
Jim Laskey
033c9715d9 Remove isAccessable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:39:03 +00:00
Jim Laskey
a4e7cd947e Use exception flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34496 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:22:15 +00:00
Jim Laskey
7d4853896c Revert changes for a simplier solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:21:18 +00:00
Jim Laskey
f9b1cbc80d Remove assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:12:17 +00:00
Jim Laskey
cbfdb7b871 Tighten up error checking of args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34493 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:10:05 +00:00
Jim Laskey
735b6f8cc3 Handle lowering invoke to call correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34492 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 15:38:06 +00:00
Jim Laskey
2bc210d99f Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34491 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 15:37:19 +00:00
Jim Laskey
2ad9f17fee Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 14:56:36 +00:00
Devang Patel
16a31c4ebf Add Loop Pass Manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34487 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 08:56:17 +00:00
Reid Spencer
15aab8a723 When converting from 64 to 32-bits, use the actual number of words to
extract the value, not the number of words implied by the active bits.
This fixes numerous, but not all divide bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 00:58:45 +00:00
Reid Spencer
ab2b2c827c Fix countLeadingZeros in the case that the bitwidth evenly divides the
word size. This fixes all reads of uninitialized data (buffer over read)
and makes APInt.cpp memory clean, per valgrind. The only remaining
problem is division in a few cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 00:22:00 +00:00
Jim Laskey
62819f3144 Support to provide exception and selector registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:54:50 +00:00
Jim Laskey
b180aa1753 Selection and lowering for exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34481 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:53:45 +00:00
Jim Laskey
c518ccfeb5 Itanium ABI exception handing support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34480 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:49:50 +00:00
Jim Laskey
bacd304463 Exception handling support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:48:45 +00:00
Jim Laskey
bda9b0ec7b Add support for changes in DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:47:38 +00:00
Jim Laskey
a15be8ce3a Add TAI field for exception table section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:43:40 +00:00
Jim Laskey
02b3f5ec4a Make branch folding behave in the presence of landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:42:20 +00:00
Jim Laskey
9b25b8ca24 Allow for live in registers for eh landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:41:17 +00:00
Jim Laskey
59667fe203 Add structures used for collecting eh information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:38:31 +00:00
Evan Cheng
f46847172a ELF / PIC requires GOT be in the EBX register during calls via PLT GOT pointer.
Add implicit uses of EBX to calls to ensure liveintervalanalysis does not treat
the GOT in EBX move as dead upon definition.
This should fix PR1207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 21:18:14 +00:00
Reid Spencer
e0cdd3349d Reorganize some code to make it clearer, avoid a few uninitialized memory
reads, and reduce the number of temporary APInt instances we construct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34467 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 08:21:52 +00:00
Reid Spencer
60c0a6a74b Fix the carry in addition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 05:44:56 +00:00
Reid Spencer
385f7547b9 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
2007-02-21 03:55:44 +00:00
Evan Cheng
788fb1c103 Out of bound reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 02:27:39 +00:00
Evan Cheng
957840b3e1 Use BitVector instead. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34460 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 02:22:03 +00:00
Reid Spencer
e549c4940c 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
2007-02-21 00:29:48 +00:00
Reid Spencer
54362ca095 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
2007-02-20 23:40:25 +00:00
Evan Cheng
e811636f33 This cast broke lots of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 21:30:56 +00:00
Dan Gohman
e26bff22db Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 20:52:03 +00:00
Reid Spencer
61eb180a53 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
2007-02-20 20:42:10 +00:00
Reid Spencer
580546a82b 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
2007-02-20 18:29:12 +00:00
Reid Spencer
9c0696f153 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
2007-02-20 08:51:03 +00:00
Chris Lattner
9b4ee0c1bd 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
2007-02-20 07:17:17 +00:00
Chris Lattner
6b6f6ba66c 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
2007-02-20 06:39:57 +00:00
Chris Lattner
d283566319 Not all managedstatics need object pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 06:18:57 +00:00
Chris Lattner
d1afbd02ef 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
2007-02-20 06:11:36 +00:00
Chris Lattner
eb41bddfdf 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
2007-02-20 05:55:46 +00:00
Chris Lattner
e0e769607c 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
2007-02-20 05:46:39 +00:00
Chris Lattner
bb9a041100 remove reoptimizer-specific passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34439 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 05:31:49 +00:00