1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

1731 Commits

Author SHA1 Message Date
Nick Lewycky
26652f5681 Don't crash when encountering a BasicBlock that hasn't been registered yet.
llvm-svn: 35756
2007-04-08 01:02:12 +00:00
Owen Anderson
7cf9d12f2e Add DomSet back, and revert the changes to LoopSimplify. Apparently the
ETForest updating mechanisms don't work as I thought they did.  These changes
will be reapplied once the issue is worked out.

llvm-svn: 35741
2007-04-07 18:23:27 +00:00
Owen Anderson
85b0e20f2a Completely purge DomSet. This is the (hopefully) final patch for PR1171.
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Reid Spencer
5d36a01dba For PR1209:
Implement Type class's ContainedTys without using a std::vector.

llvm-svn: 35693
2007-04-06 02:02:20 +00:00
Reid Spencer
6eb55df794 Implement the llvm.bit.part_select.iN.iN.iN overloaded intrinsic.
llvm-svn: 35678
2007-04-04 23:48:25 +00:00
Reid Spencer
d371e2e492 For PR1297:
Implement "actual" argument types for the Intrinsic member functions. This
involves changing the getName, getType, and getDeclaration methods to have
optional parameters for the actual types. These are necessary in order for
the type/name to be constructed properly for overloaded intrinsics. Only
the caller knows the actual argument types desired.

llvm-svn: 35541
2007-04-01 07:25:33 +00:00
Reid Spencer
1db694fe4b For PR1297:
1. Clear up confusion between "GotBits" and "ExpectBits". GotBits is the
   type actually provided. ExpectedBits is the type expected for the
   intrinsics. Before this patch, it was reversed!
2. Implement checks for overloaded intrinsics. This involves computing the
   suffix expected and making sure the suffix matches the function name. It
   also includes some intrinsic-specific checks such as ensuring that the
   bswap parameter and result are the same width and an even number of bytes.

llvm-svn: 35540
2007-04-01 07:22:57 +00:00
Chris Lattner
546138e3dd add a method to turn a type into a VT.
llvm-svn: 35526
2007-03-31 04:03:02 +00:00
Devang Patel
7cde72cbc1 It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also.

llvm-svn: 35423
2007-03-28 14:57:43 +00:00
Reid Spencer
bd89a6ea1c No need to generate the implementation keyword any more. Its frivolous.
llvm-svn: 35405
2007-03-28 01:53:20 +00:00
Devang Patel
67eede36f7 Use SmallPtrSet.
llvm-svn: 35388
2007-03-27 20:50:46 +00:00
Devang Patel
8330ee3120 Spell check.
llvm-svn: 35374
2007-03-27 00:16:08 +00:00
Devang Patel
58a8e74de6 It is not possible to determie dominance between two PHI nodes
based on their ordering.

llvm-svn: 35369
2007-03-26 23:18:28 +00:00
Devang Patel
3062ae001d Use std::vector<DFCalculateWorkObject> instead of
std::vector<DFCalculateWorkObject *> to reduce malloc/free traffic.

llvm-svn: 35368
2007-03-26 23:17:19 +00:00
Reid Spencer
4af99334ea Add a comment to explain a folding transform.
llvm-svn: 35360
2007-03-26 20:09:02 +00:00
Chris Lattner
f4ff1dc689 fold constantexprs more aggressively, fixing PR1265
llvm-svn: 35336
2007-03-25 05:47:04 +00:00
Chris Lattner
3a16450eaf add a valuetype for v1i64, which is needed by mmx.
llvm-svn: 35298
2007-03-24 17:36:26 +00:00
Reid Spencer
7a9c981d80 Fix constant fold of div by zero and rem by zero to match IEEE 754
requirements. We must return NaN in some cases and correctly signed
infinity in other cases. Passes CFP2006 (not that that says much).

llvm-svn: 35277
2007-03-23 05:33:23 +00:00
Dan Gohman
d0a0ea9916 Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Reid Spencer
a2d8b5e7a1 Add the NoUnwind function attribute.
llvm-svn: 35260
2007-03-22 02:14:48 +00:00
Devang Patel
3a426e1c86 DominanceFrontier::calculate().
Avoid recursion, Use iterative algorithm.

llvm-svn: 35225
2007-03-20 21:25:31 +00:00
Devang Patel
18146cf2a2 LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.

llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Chris Lattner
6dbed4d4ca Fix a nasty memory leak, caused by my revamp of the value symbol table.
llvm-svn: 35195
2007-03-20 00:18:10 +00:00
Reid Spencer
7d20e42a97 Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35181
2007-03-19 20:39:08 +00:00
Reid Spencer
135ca5e8c4 For PR1258:
Radically simplify the SlotMachine. There is no need to keep Value planes
around any more. This change causes slot numbering to number all un-named,
non-void values starting at 0 and incrementing monotonically through the
function, regardless of type (including BasicBlocks). Getting slot numbers
is now a single lookup operation instead of a double lookup.

llvm-svn: 35171
2007-03-19 18:32:53 +00:00
Devang Patel
94228897e7 Speed Up Pass Manager.
- Check Immutableness before searching PreservedSet.
- Avoid unnecessary traversal while setting Last User.

llvm-svn: 35028
2007-03-08 19:05:01 +00:00
Evan Cheng
7513c95267 Added ContainsRelocations() to check if a constant might only be resolvable at load time.
llvm-svn: 35014
2007-03-08 00:59:12 +00:00
Devang Patel
b9e705f09e Keep track of higher level analysis.
llvm-svn: 34974
2007-03-06 17:52:53 +00:00
Devang Patel
45343b04b3 Keep track of inherited analysis. For example, if a loop pass does not
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.

llvm-svn: 34942
2007-03-06 01:55:46 +00:00
Devang Patel
edbde240be Add preparePassManager() hook. This allows each pass to check whether
current active pass manager is appropriate or not.

A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this  hook
and use new LPPassManager for itself.

llvm-svn: 34941
2007-03-06 01:06:16 +00:00
Devang Patel
79495d839e Current pass manager, not the parent pass manager, assumes the role of
last user when one of the managed pass uses info provided by parent pass
manager.

This was exposed by LPPassManager work.

llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Devang Patel
6668a341ae Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel
ca90313b39 Account for time consumed by releaseMemory() properly.
llvm-svn: 34932
2007-03-05 18:20:51 +00:00
Jeff Cohen
98c99a3a02 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Reid Spencer
6037b564a0 Fix constant folding of fp->int bitcast for vectors.
llvm-svn: 34880
2007-03-03 08:32:46 +00:00
Reid Spencer
1f970769e8 Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
Constant::isNullValue() in situations where it is possible.

llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer
5790924b21 Use the APInt versions of the bit-wise conversions of float/double to int
and back. While this is not strictly necessary, it does pave the way for
future changes in casting. It should now be possible to improve vector
casting to deal with un-equal fp/int sizes.

llvm-svn: 34808
2007-03-01 20:44:23 +00:00
Reid Spencer
5d9574f37e Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.

llvm-svn: 34806
2007-03-01 20:27:41 +00:00
Reid Spencer
b0a7bfa105 Use a simpler constructor when constructing ConstantInst.
llvm-svn: 34793
2007-03-01 19:31:12 +00:00
Reid Spencer
b4e877c488 Drop the ConstantInt(const Type&, const APInt&) constructor. It is
redundant and more verbose than the ConstantInt(const APInt&) constructor.

llvm-svn: 34792
2007-03-01 19:30:34 +00:00
Reid Spencer
32d0051c64 Reduce #includage by taking a method out of line.
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Reid Spencer
f632e1cd14 Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.

llvm-svn: 34760
2007-02-28 22:00:54 +00:00
Reid Spencer
a9d0cc903b Implement a convenience method to construct a ConstantInt directly from an
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.

llvm-svn: 34757
2007-02-28 19:50:21 +00:00
Reid Spencer
24430077d5 Pull out the stops.
llvm-svn: 34703
2007-02-27 23:33:03 +00:00
Reid Spencer
58f7a497bb Remove some redundancy.
llvm-svn: 34702
2007-02-27 23:27:26 +00:00
Reid Spencer
8178fd7bd5 Adjust to changes in the APInt interface.
llvm-svn: 34681
2007-02-27 20:25:25 +00:00
Reid Spencer
a3b5b71616 For PR1205:
Implement review feedback:
1. Use new APInt::RoundDoubleToAPInt interface to specify the bit width so
   that we don't have to truncate or extend in constant folding.
2. Fix a pasteo in SDiv that prevented a check for overflow.
3. Fix the shift operators: undef happens when the shift amount is equal
   to the bitwidth.

llvm-svn: 34677
2007-02-27 19:29:54 +00:00
Devang Patel
89791371ce Make getPassManagerType() const.
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Reid Spencer
b05cb31bdf Allow the AsmWriter to print out arbitrary precision integers.
llvm-svn: 34664
2007-02-27 08:34:09 +00:00
Reid Spencer
74764708fa Correct the implelmentation of ConstantInt::getAllOnesValue() for bit
widths > 64 bits.

llvm-svn: 34663
2007-02-27 07:57:53 +00:00