Commit Graph

5694 Commits

Author SHA1 Message Date
Bill Wendling
ef4a661725 Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
information for EH.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:20:55 +00:00
Duncan Sands
f7331b3dd7 Fold the adjust_trampoline intrinsic into
init_trampoline.  There is now only one
trampoline intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 14:10:23 +00:00
Bill Wendling
d60da495cd The personality function on Darwin needs a global stub. We then refer to
that global stub instead of doing the ".set" thingy we were doing before.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 08:27:17 +00:00
Owen Anderson
29ce95511f Add a ValueInfoT template parameter to DenseMap so that it can properly make decisions
based on whether the key AND the value require ctors/dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 05:08:05 +00:00
Owen Anderson
98153ecbc1 Don't bother to initialize values corresponding to empty or tombstone
keys.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 04:43:51 +00:00
Daniel Berlin
16ebc260bd Fix bugs with &=, intersect with complement. Add three argument version of intersect with complement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 04:11:28 +00:00
Owen Anderson
9544dc294f Fix non-deterministic behavior in the DenseMap copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 03:48:08 +00:00
Daniel Berlin
1b6998e8d6 Add remaining functions necessary for andersen's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 01:38:07 +00:00
Daniel Berlin
2f5d5937ec Add SparseBitVector implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41790 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-09 01:10:40 +00:00
Chuck Rose III
418d360518 Fix for VisualStudio. It is treating a 2 bit enum as a signed int for comparison purposes, causing failures. Using an extra bit fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 04:17:08 +00:00
Rafael Espindola
588af2fb99 Add support for having different alignment for objects on call frames.
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
8806c7b1f5 Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41763 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 11:39:35 +00:00
Owen Anderson
718cb665ca Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 04:06:50 +00:00
David Greene
af992f782f Constify to catch bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 19:46:46 +00:00
Dale Johannesen
43421b3dd7 Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 18:13:44 +00:00
David Greene
2c17c4d8d9 Pluggable coalescers inplementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 16:18:45 +00:00
Evan Cheng
38a90969ea Accidentially left this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:58:18 +00:00
Evan Cheng
f3bb2e65d1 Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:46:51 +00:00
Evan Cheng
188b5224fd Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:41:34 +00:00
Dale Johannesen
6d5e7d917b fix reversal bug in preceding checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41705 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 17:32:27 +00:00
David Greene
b8f74793b9 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 15:46:09 +00:00
Dale Johannesen
c4dd3c3b51 Add mod, copysign, abs operations to APFloat.
Implement some constant folding in SelectionDAG and
DAGCombiner using APFloat.  Remove double versions
of constructor and getValue from ConstantFPSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 23:34:27 +00:00
Dale Johannesen
ee8476847d Revise per review of previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41645 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 17:03:33 +00:00
Evan Cheng
d4e4937b79 Remove an unnecessary element, saving 4 bytes per LiveInterval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 08:26:44 +00:00
Dale Johannesen
eaf089430e Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 04:03:46 +00:00
Ted Kremenek
1a0190f4f0 Added Graphviz escaping for the '|' character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 17:01:41 +00:00
Evan Cheng
35b35c5c32 Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 05:52:20 +00:00
Evan Cheng
42a0f9a4fb Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41596 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 05:50:32 +00:00
Dale Johannesen
f04afdbb48 Change LegalFPImmediates to use APFloat.
Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 00:23:21 +00:00
Evan Cheng
7ecb38be0a Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 20:45:00 +00:00
Chris Lattner
a5c0d1ec77 Silence implicit 64->32-bit conversion warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41567 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 16:32:50 +00:00
Chris Lattner
cd3c4cac6e getMinSignedBits needs to take into consider the sign bit when the value is positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41566 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 16:21:18 +00:00
Dan Gohman
3e1a7aef17 Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-28 20:32:58 +00:00
Evan Cheng
1a66f0a4f2 Recover most of the compile time regression due to recent live interval changes.
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
   performs slowly when the vector size is very large.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-28 08:28:51 +00:00
David Greene
f1355a55f8 Update InvokeInst to work like CallInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 19:04:21 +00:00
Dan Gohman
5f43f92c69 If the source and destination pointers in an llvm.memmove are known
to not alias each other, it can be translated as an llvm.memcpy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 16:26:13 +00:00
Duncan Sands
6590b0457c There is an impedance matching problem between LLVM and
gcc exception handling: if an exception unwinds through
an invoke, then execution must branch to the invoke's
unwind target.  We previously tried to enforce this by
appending a cleanup action to every selector, however
this does not always work correctly due to an optimization
in the C++ unwinding runtime: if only cleanups would be
run while unwinding an exception, then the program just
terminates without actually executing the cleanups, as
invoke semantics would require.  I was hoping this
wouldn't be a problem, but in fact it turns out to be the
cause of all the remaining failures in the LLVM testsuite
(these also fail with -enable-correct-eh-support, so turning
on -enable-eh didn't make things worse!).  Instead we need
to append a full-blown catch-all to the end of each
selector.  The correct way of doing this depends on the
personality function, i.e. it is language dependent, so
can only be done by gcc.  Thus this patch which generalizes
the eh.selector intrinsic so that it can handle all possible
kinds of action table entries (before it didn't accomodate
cleanups): now 0 indicates a cleanup, and filters have to be
specified using the number of type infos plus one rather than
the number of type infos.  Related gcc patches will cause
Ada to pass a cleanup (0) to force the selector to always
fire, while C++ will use a C++ catch-all (null).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 15:47:50 +00:00
Dan Gohman
81975f6dfd Add explicit keywords and remove spurious trailing semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 14:50:10 +00:00
Dale Johannesen
e6c1742914 Revise per review comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 01:18:27 +00:00
Dale Johannesen
87503a63d5 Add APFloat interface to ConstantFPSDNode. Change
over uses in DAGCombiner.  Fix interfaces to work
with APFloats.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41407 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 22:10:57 +00:00
Chris Lattner
48884cd80b rename isOperandValidForConstraint to LowerAsmOperandForConstraint,
changing the interface to allow for future changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 00:47:38 +00:00
Dale Johannesen
21dcae17f5 Comment out declaration of operator== (undefined).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 00:40:41 +00:00
Dale Johannesen
12595d7b16 Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.
This means backing out the preceding change to Constants.cpp, alas.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41378 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 22:09:56 +00:00
Dale Johannesen
8bb369b807 Use APFloat internally for ConstantFPSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 20:59:15 +00:00
Chris Lattner
cd406fe123 sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.
This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst
both have an out-of-line virtual method to home the class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41371 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 20:48:18 +00:00
Dale Johannesen
d3b51fd170 Revised per review feedback from previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 05:08:11 +00:00
Dale Johannesen
343e770983 Change internal representation of ConstantFP to use APFloat.
Interface to rest of the compiler unchanged, as yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41348 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 00:56:33 +00:00
Chris Lattner
006f5a3c66 default this to radix 10 like the toString(Un)Signed methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 05:21:48 +00:00
Chris Lattner
028760fd88 Avoid hiding issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 05:20:48 +00:00
Chris Lattner
9132a2b818 rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 05:15:32 +00:00