1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

5754 Commits

Author SHA1 Message Date
Chris Lattner
6b18ffcafe remove dead enum value.
llvm-svn: 41925
2007-09-13 06:18:04 +00:00
Chris Lattner
7b29e6a714 Make single-argument ctors explicit to avoid tricky bugs :)
llvm-svn: 41924
2007-09-13 06:15:57 +00:00
Evan Cheng
827f269fac Added getNumDefs().
llvm-svn: 41901
2007-09-13 00:16:29 +00:00
Evan Cheng
e88f30877d Yet another getTargetNode variant.
llvm-svn: 41898
2007-09-12 23:39:49 +00:00
Daniel Berlin
f778d9ea43 Move dump out of class, use "\n" instead of endl
llvm-svn: 41872
2007-09-11 22:58:27 +00:00
Dale Johannesen
7bc3969cea Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).

llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Daniel Berlin
b4c820ecfd Convert to use ilist and non-pointer lists for extra goodness
llvm-svn: 41855
2007-09-11 17:42:22 +00:00
Bill Wendling
bde1aacffa Add accessor method.
llvm-svn: 41854
2007-09-11 17:24:38 +00:00
Bill Wendling
74888e63e7 Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
information for EH.

llvm-svn: 41852
2007-09-11 17:20:55 +00:00
Duncan Sands
c358890f73 Fold the adjust_trampoline intrinsic into
init_trampoline.  There is now only one
trampoline intrinsic.

llvm-svn: 41841
2007-09-11 14:10:23 +00:00
Bill Wendling
3c6a8b2814 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.

llvm-svn: 41838
2007-09-11 08:27:17 +00:00
Owen Anderson
0c2fdab32a 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.

llvm-svn: 41837
2007-09-11 05:08:05 +00:00
Owen Anderson
a96cf4c60a Don't bother to initialize values corresponding to empty or tombstone
keys.

llvm-svn: 41834
2007-09-11 04:43:51 +00:00
Daniel Berlin
c0ef77b9f6 Fix bugs with &=, intersect with complement. Add three argument version of intersect with complement.
llvm-svn: 41832
2007-09-11 04:11:28 +00:00
Owen Anderson
8014c7f1f3 Fix non-deterministic behavior in the DenseMap copy constructor.
llvm-svn: 41831
2007-09-11 03:48:08 +00:00
Daniel Berlin
be8b616451 Add remaining functions necessary for andersen's
llvm-svn: 41830
2007-09-11 01:38:07 +00:00
Daniel Berlin
f0f3834ee6 Add SparseBitVector implementation
llvm-svn: 41790
2007-09-09 01:10:40 +00:00
Chuck Rose III
788df70ec3 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.
llvm-svn: 41784
2007-09-08 04:17:08 +00:00
Rafael Espindola
8c57e70f93 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.

llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
899c0c9c8d 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 :)

llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Owen Anderson
4b71e55287 Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!

llvm-svn: 41758
2007-09-07 04:06:50 +00:00
David Greene
04a132ad5f Constify to catch bugs.
llvm-svn: 41751
2007-09-06 19:46:46 +00:00
Dale Johannesen
86f367a6b7 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.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
David Greene
2ca4b270db Pluggable coalescers inplementation.
llvm-svn: 41743
2007-09-06 16:18:45 +00:00
Evan Cheng
884b7c0c81 Accidentially left this out.
llvm-svn: 41730
2007-09-05 21:58:18 +00:00
Evan Cheng
3bda699975 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.
llvm-svn: 41729
2007-09-05 21:46:51 +00:00
Evan Cheng
5977c55f5d Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
llvm-svn: 41728
2007-09-05 21:41:34 +00:00
Dale Johannesen
1f864b259a fix reversal bug in preceding checkin
llvm-svn: 41705
2007-09-04 17:32:27 +00:00
David Greene
8cda5af2e7 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Dale Johannesen
b34e6b4898 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.

llvm-svn: 41664
2007-08-31 23:34:27 +00:00
Dale Johannesen
a79f7d4068 Revise per review of previous patch.
llvm-svn: 41645
2007-08-31 17:03:33 +00:00
Evan Cheng
3157d0991b Remove an unnecessary element, saving 4 bytes per LiveInterval.
llvm-svn: 41641
2007-08-31 08:26:44 +00:00
Dale Johannesen
81d6ecb886 Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.

llvm-svn: 41632
2007-08-31 04:03:46 +00:00
Ted Kremenek
120f680489 Added Graphviz escaping for the '|' character.
llvm-svn: 41610
2007-08-30 17:01:41 +00:00
Evan Cheng
58ea935f6f Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
llvm-svn: 41597
2007-08-30 05:52:20 +00:00
Evan Cheng
0862876c80 Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
llvm-svn: 41596
2007-08-30 05:50:32 +00:00
Dale Johannesen
e91a908971 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.

llvm-svn: 41587
2007-08-30 00:23:21 +00:00
Evan Cheng
5a5046b83f 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.

llvm-svn: 41579
2007-08-29 20:45:00 +00:00
Chris Lattner
5e16fd8310 Silence implicit 64->32-bit conversion warnings.
llvm-svn: 41567
2007-08-29 16:32:50 +00:00
Chris Lattner
d49a347b87 getMinSignedBits needs to take into consider the sign bit when the value is positive.
llvm-svn: 41566
2007-08-29 16:21:18 +00:00
Dan Gohman
cbb2ee9062 Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
scheduling.

llvm-svn: 41556
2007-08-28 20:32:58 +00:00
Evan Cheng
1f3724ee2d 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.

llvm-svn: 41536
2007-08-28 08:28:51 +00:00
David Greene
5b85021be8 Update InvokeInst to work like CallInst
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Dan Gohman
2e7e251f24 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.

llvm-svn: 41489
2007-08-27 16:26:13 +00:00
Duncan Sands
883740b39f 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).

llvm-svn: 41484
2007-08-27 15:47:50 +00:00
Dan Gohman
e2c92effea Add explicit keywords and remove spurious trailing semicolons.
llvm-svn: 41482
2007-08-27 14:50:10 +00:00
Dale Johannesen
2ceade197b Revise per review comments.
llvm-svn: 41409
2007-08-26 01:18:27 +00:00
Dale Johannesen
b52093236e Add APFloat interface to ConstantFPSDNode. Change
over uses in DAGCombiner.  Fix interfaces to work
with APFloats.

llvm-svn: 41407
2007-08-25 22:10:57 +00:00
Chris Lattner
1e089aac3a rename isOperandValidForConstraint to LowerAsmOperandForConstraint,
changing the interface to allow for future changes.

llvm-svn: 41384
2007-08-25 00:47:38 +00:00
Dale Johannesen
ab02edb700 Comment out declaration of operator== (undefined).
llvm-svn: 41383
2007-08-25 00:40:41 +00:00
Dale Johannesen
9ec1e28e79 Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.
This means backing out the preceding change to Constants.cpp, alas.

llvm-svn: 41378
2007-08-24 22:09:56 +00:00
Dale Johannesen
5c0b0ec1d6 Use APFloat internally for ConstantFPSDNode.
llvm-svn: 41372
2007-08-24 20:59:15 +00:00
Chris Lattner
af91aa2f5e 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.

llvm-svn: 41371
2007-08-24 20:48:18 +00:00
Dale Johannesen
0aaabb858b Revised per review feedback from previous patch.
llvm-svn: 41353
2007-08-24 05:08:11 +00:00
Dale Johannesen
a3ab055b9d Change internal representation of ConstantFP to use APFloat.
Interface to rest of the compiler unchanged, as yet.

llvm-svn: 41348
2007-08-24 00:56:33 +00:00
Chris Lattner
346bc59e4f default this to radix 10 like the toString(Un)Signed methods.
llvm-svn: 41311
2007-08-23 05:21:48 +00:00
Chris Lattner
66d4ebe00f Avoid hiding issues.
llvm-svn: 41310
2007-08-23 05:20:48 +00:00
Chris Lattner
742b745b0c rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method.

llvm-svn: 41309
2007-08-23 05:15:32 +00:00
Devang Patel
e92ff0baef No need to hardcode SmallVector size.
llvm-svn: 41228
2007-08-21 16:39:43 +00:00
David Greene
43c5188c32 Doxygenize comments.
llvm-svn: 41222
2007-08-21 14:57:58 +00:00
Devang Patel
f06e667e9c Use SmallVector instead of std::vector.
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Chris Lattner
401698e8b5 initial checkin of Neil's APFloat work.
llvm-svn: 41203
2007-08-20 22:49:32 +00:00
Chris Lattner
08c7c36908 clarify precedence, no functionality change.
llvm-svn: 41199
2007-08-20 21:31:08 +00:00
Chris Lattner
24d536e26b add reverse iterators to smallvector
llvm-svn: 41198
2007-08-20 21:22:48 +00:00
Anton Korobeynikov
4e15adaf04 - Use correct header for SCEV inside LoopPass.cpp
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug

llvm-svn: 41197
2007-08-20 21:17:26 +00:00
David Greene
6b3b5e7a54 Add FilteredPassNameParser along with PassArgFilter to filter passes
based on their Arg members.

llvm-svn: 41192
2007-08-20 19:54:01 +00:00
Dan Gohman
908f4e65ed Add Type::isIntOrIntVector, like Type::isFPOrFPVector.
llvm-svn: 41190
2007-08-20 19:25:59 +00:00
Rafael Espindola
68d95ff2b1 Partial implementation of calling functions with byval arguments:
*) The needed information is propagated to the DAG
 *) The X86-64 backend detects it and aborts

llvm-svn: 41179
2007-08-20 15:18:24 +00:00
Nick Lewycky
068c7d20e2 Simplify.
llvm-svn: 41167
2007-08-18 14:46:55 +00:00
Chris Lattner
d5f075ed16 Compute the argument list as lazily as possible. This ensures that clients
that don't use it don't have to pay the memory cost for the arguments.  This
allows us to avoid creating Argument nodes for many prototypes and for clients
who lazily deserialize code from a bytecode file.

llvm-svn: 41166
2007-08-18 06:14:52 +00:00
Devang Patel
fded73828f When one branch of condition is eliminated then head of the other
branch is not necessary immediate dominators of merge blcok in all cases.

llvm-svn: 41144
2007-08-17 21:59:16 +00:00
Chris Lattner
790dceee30 improve iplist comments. Switch iplist from allocating its sentinal object (for
end()) eagerly to allocating it lazily.  This saves a lot of memory for JIT applications
that read a module but don't materialize most of the functions (e.g. 62K for 252.eon).

llvm-svn: 41142
2007-08-17 16:49:19 +00:00
Reid Spencer
c1b981ab85 Fix PR1606:
The AC_CHECK_HEADER macro was used instead of AC_CHECK_HEADERS. The former does
not automatically add a #define to the configure variables while the latter
does. Consequently, the HAVE_PTHREAD_H symbol was not defined which caused the
Mutex.cpp file to compile to an empty implementation. 

llvm-svn: 41137
2007-08-17 05:44:59 +00:00
Dan Gohman
b499ea1cf6 Add MVT::fAny for overloading intrinsics on floating-point types.
llvm-svn: 41128
2007-08-16 21:57:19 +00:00
Owen Anderson
03cbda804e Cache non-local memory dependence analysis. This is a significant compile
time performance win in most cases.

llvm-svn: 41126
2007-08-16 21:27:05 +00:00
Chris Lattner
4c6c787315 This adds a bunch of static functions that implement unsigned
two's complement bignum arithmetic.  They could be used to
implement much of APInt, but the idea is they are enough to
implement APFloat as well, which the current APInt interface
is not suited for.

Patch by Neil Booth!

llvm-svn: 41124
2007-08-16 15:56:55 +00:00
Evan Cheng
e2bb505d7c Comments.
llvm-svn: 41119
2007-08-16 07:25:37 +00:00
Owen Anderson
06cbd29787 Forgot a line.
llvm-svn: 41115
2007-08-16 00:25:42 +00:00
Owen Anderson
868a1a5ed6 Add a copy constructor and an assignment operator to DenseMap.
llvm-svn: 41114
2007-08-16 00:18:32 +00:00
Anton Korobeynikov
958dcad32d Properly use const qualifiers
llvm-svn: 41111
2007-08-15 21:12:30 +00:00
Devang Patel
35c1c452b0 No need to use iterator to erase basic block.
llvm-svn: 41074
2007-08-14 16:53:24 +00:00
Evan Cheng
215f802b75 Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized.
llvm-svn: 41060
2007-08-13 23:45:17 +00:00
Devang Patel
993388b1ee Add methods to erase basic block entry.
llvm-svn: 41052
2007-08-13 22:10:29 +00:00
Reid Spencer
8c5c7c8453 Change casts from old style to new style. This helps document the details
better, gives the compiler a chance to validate the cast and reduces warnings
if the user turns on -Wold-style-cast option.

llvm-svn: 41033
2007-08-12 08:12:35 +00:00
Evan Cheng
8968affb6d Code to maintain kill information during register coalescing.
llvm-svn: 41016
2007-08-11 00:59:19 +00:00
Christopher Lamb
e0c9bd8d2e Move isSubRegOf into MRegisterInfo. Fix a missed move elimination in LowerSubregs and add more debugging output there.
llvm-svn: 41005
2007-08-10 21:11:55 +00:00
Devang Patel
fa7277dd34 Do not overuse std::string. Pass around char * directly.
llvm-svn: 41001
2007-08-10 18:29:32 +00:00
Devang Patel
d412a2a0ed Add utility to clone loops.
llvm-svn: 40997
2007-08-10 17:59:47 +00:00
Devang Patel
80f51489aa Add #ifndef guard.
llvm-svn: 40991
2007-08-10 15:58:23 +00:00
Chris Lattner
15b13dc5f9 add #ifndef guards
llvm-svn: 40990
2007-08-10 15:53:08 +00:00
Chris Lattner
de900e3b6c add Value::getNameStart/getNameLen() accessors.
llvm-svn: 40989
2007-08-10 15:34:35 +00:00
Rafael Espindola
b20b9e985a propagate struct size and alignment of byval arguments to the DAG
llvm-svn: 40986
2007-08-10 14:44:42 +00:00
Chris Lattner
f570f023cf memcpy with zero length is hugely expensive, so avoid it. This speeds up coallescing from 1.17s to 0.88s on siod.
llvm-svn: 40984
2007-08-10 07:02:50 +00:00
Chris Lattner
8995eae095 small speedup in the case where a smallvector is default ctor'd from
an empty vector.  This speeds up llc slightly.

llvm-svn: 40983
2007-08-10 06:54:38 +00:00
Bill Wendling
55c3dc2409 Adding SSSE3 intrinsics.
llvm-svn: 40982
2007-08-10 06:22:27 +00:00
Chris Lattner
bbe3b1dbee avoid copying strings.
llvm-svn: 40980
2007-08-10 06:17:04 +00:00
Dale Johannesen
a1340d5916 Update per review comments.
llvm-svn: 40965
2007-08-09 17:27:48 +00:00
Owen Anderson
3eba1e8f5c Make NonLocal and None const in the right way. :-)
llvm-svn: 40961
2007-08-09 04:42:44 +00:00
Dale Johannesen
79551baaad long double 9 of N. This finishes up the X86-32 bits
(constants are still not handled).  Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).

llvm-svn: 40958
2007-08-09 01:04:01 +00:00
Owen Anderson
24f6b332cb Add one more comment.
llvm-svn: 40949
2007-08-08 21:54:33 +00:00
Owen Anderson
f4aec9115f Cleanup and comment-ize the memdep header.
llvm-svn: 40948
2007-08-08 21:53:20 +00:00
Owen Anderson
f988c3ee5c Change the None and NonLocal markers in memdep to be const.
llvm-svn: 40946
2007-08-08 21:39:39 +00:00
Reid Spencer
6f88014eeb Make it clear that getSTDIN returns null when stdin is empty.
llvm-svn: 40940
2007-08-08 20:02:20 +00:00
Evan Cheng
5227e36428 Adding kill info to val#.
llvm-svn: 40925
2007-08-08 07:03:29 +00:00
Evan Cheng
02e7fbd7c8 Clean up and bug fix.
llvm-svn: 40921
2007-08-08 05:56:18 +00:00
Chris Lattner
65d638a918 reimplement dfs number computation to be significantly faster. This speeds up
natural loop canonicalization (which does many cfg xforms) by 4.3x, for 
example.  This also fixes a bug in postdom dfnumber computation.

llvm-svn: 40920
2007-08-08 05:51:24 +00:00
Evan Cheng
12d72cc1a0 - Each val# can have multiple kills.
- Fix some minor bugs related to special markers on val# def. ~0U means
  undefined, ~1U means dead val#.

llvm-svn: 40916
2007-08-08 03:00:28 +00:00
Evan Cheng
0182b495fd - LiveInterval value#'s now have 3 components: def instruction #,
kill instruction #, and source register number (iff the value# is defined by a
copy).
- Now def instruction # is set for every value#, not just for copy defined ones.
- Update some outdated code related inactive live ranges.
- Kill info not yet set. That's next patch.

llvm-svn: 40913
2007-08-07 23:49:57 +00:00
Devang Patel
8289b6e663 Fix comment.
llvm-svn: 40911
2007-08-07 23:16:03 +00:00
Owen Anderson
d0c7aad800 Get rid of unnecessary #include.
llvm-svn: 40885
2007-08-07 00:38:16 +00:00
Owen Anderson
22d94da65b Clean up a bunch of caching stuff in memdep. This reduces the time to run GVN
on 403.gcc from ~15s to ~10s.

llvm-svn: 40884
2007-08-07 00:33:45 +00:00
Devang Patel
228dc09ff6 Begin loop index split pass.
llvm-svn: 40883
2007-08-07 00:25:56 +00:00
Chris Lattner
fb1e3a7d2c remove #if 0 code.
llvm-svn: 40880
2007-08-06 22:03:19 +00:00
Chris Lattner
cce6cf78e4 remove #if 0 code.
llvm-svn: 40879
2007-08-06 22:01:53 +00:00
Chandler Carruth
e717210757 This fixes resizing issues with BitVectors. It ensures that the BitWord type and type size is always used, and ensures completely correct clearing of unused high bits, and setting of bits when resizing. It should resolve PR1563.
llvm-svn: 40871
2007-08-06 20:52:17 +00:00
Reid Spencer
5b204d32f8 @verbatim needs to be on a line by itself.
llvm-svn: 40865
2007-08-06 17:10:29 +00:00
Christopher Lamb
8875f43912 Implement review feedback. No functionality change.
llvm-svn: 40863
2007-08-06 16:33:56 +00:00
Chris Lattner
99df553268 Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
llvm-svn: 40856
2007-08-06 06:15:43 +00:00
Reid Spencer
3e54e72ef1 Fix minor doxygen nits.
llvm-svn: 40854
2007-08-05 20:06:04 +00:00
Reid Spencer
2a23af68c8 Document a missing parameter.
llvm-svn: 40852
2007-08-05 19:36:39 +00:00
Chris Lattner
ab61b6f01e Fix a bug in DenseMap::clear, where we never reset a tombstone
to EmptyKey.

llvm-svn: 40839
2007-08-05 08:43:36 +00:00
Chris Lattner
10db9656ba When clearing a SmallPtrSet, if the set had a huge capacity, but the
contents of the set were small, deallocate and shrink the set.  This
avoids having us to memset as much data, significantly speeding up
some pathological cases.  For example, this speeds up the verifier
from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a 
release build.

llvm-svn: 40837
2007-08-05 07:32:14 +00:00
Chris Lattner
a5a692b9bb Switch the internal "Info" map from an std::map to a DenseMap. This
speeds up idom by about 45% and postidom by about 33%.

Some extra precautions must be taken not to invalidate densemap iterators.

llvm-svn: 40827
2007-08-05 00:02:00 +00:00
Chris Lattner
5912537997 switch the DomTreeNodes and IDoms maps in idom/postidom to a
DenseMap instead of an std::map.  This speeds up postdomtree
by about 25% and domtree by about 23%.  It also speeds up clients,
for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%.

llvm-svn: 40826
2007-08-04 23:48:07 +00:00
Chandler Carruth
00e56b0e81 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen
976a1cf6cf long double patch 3 of N. Add to MVT.
llvm-svn: 40793
2007-08-03 20:51:37 +00:00
Dale Johannesen
dda00eb44d Long double, part 1 of N. Support in IR.
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
Anders Carlsson
122059b2e9 Fix bug spotted by Chris.
llvm-svn: 40725
2007-08-02 06:05:19 +00:00
Anders Carlsson
89ea07e724 Add extend and extOrTrunc methods that do sign or zero extension depending on whether the integer is signed or not
llvm-svn: 40724
2007-08-02 06:00:13 +00:00
Evan Cheng
a06b9cf09f Do not emit copies for physical register output if it's not used.
llvm-svn: 40722
2007-08-02 05:29:38 +00:00
Evan Cheng
14bd520741 Instead of adding copyfromreg's to handle physical definitions. Now isel can
simply specify them as results and let scheduledag handle them. That
is, instead of
SDOperand Flag = DAG.getTargetNode(Opc, MVT::i32, MVT::Flag, ...)
SDOperand Result = DAG.getCopyFromReg(Chain, X86::EAX, MVT::i32, Flag)

Just write:
SDOperand Result = DAG.getTargetNode(Opc, MVT::i32, MVT::i32, ...)

And let scheduledag emit the move from X86::EAX to a virtual register.

llvm-svn: 40710
2007-08-02 00:28:15 +00:00
Evan Cheng
8f126e59f5 Added TargetInstrDescriptor::numDefs - num of results.
llvm-svn: 40709
2007-08-02 00:20:17 +00:00
Owen Anderson
7028dfaf9d Make non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.
llvm-svn: 40692
2007-08-01 22:01:54 +00:00
Dan Gohman
7dd04fb91c More explicit keywords.
llvm-svn: 40673
2007-08-01 15:32:29 +00:00
Dan Gohman
53bb686577 Make ImmutablePass::runOnModule non-virtual, since it is not
intended to be overridden.

llvm-svn: 40671
2007-08-01 14:28:20 +00:00
Owen Anderson
58e64df595 Rename FastDSE to just DSE.
llvm-svn: 40668
2007-08-01 06:36:51 +00:00
David Greene
f06a395bb9 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.

llvm-svn: 40660
2007-08-01 03:43:44 +00:00
David Greene
4251f42689 Fix GLIBCXX_DEBUG error owing to dereference of end iterator. There's
no guarantee that an instruction returned by getDependency exists in
the maps.

llvm-svn: 40647
2007-07-31 20:01:27 +00:00
Devang Patel
6dd3a5f747 Introduce Simple Analysis interface for loop passes.
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value.

llvm-svn: 40625
2007-07-31 08:00:57 +00:00
Anton Korobeynikov
13fd2f7128 Add detection of __dso_handle presence during configure. Use this information in the
JITer (short path is added for darwin). This is needed to properly JIT llvm-gcc-4.2-built
binaries, since cxa_atexit is enabled by default on much more targets.

llvm-svn: 40600
2007-07-30 20:02:02 +00:00
Dan Gohman
51e7be7b8f Fix the comments for the 'fast' parameter in addPassesToEmitFile.
llvm-svn: 40592
2007-07-30 15:04:59 +00:00
Dan Gohman
23f9a3ad3b Fix the comment for getClosestTargetForJIT to reflect the fact that
it does not have a Module parameter.

llvm-svn: 40590
2007-07-30 14:58:59 +00:00
Dan Gohman
75473b49ea More explicit keywords.
llvm-svn: 40589
2007-07-30 14:51:59 +00:00
Dan Gohman
b757cdd2e6 Fix pastos in comments for doFinalization functions.
llvm-svn: 40588
2007-07-30 14:51:13 +00:00
Devang Patel
780ecf20d1 Add facility to dump pass manager structure
to make it easier to understand failure.

llvm-svn: 40567
2007-07-27 20:06:09 +00:00
Devang Patel
a03e82d7ee Use SmallPtrSet.
llvm-svn: 40560
2007-07-27 18:34:27 +00:00
Owen Anderson
997b15d967 Allow SmallPtrSet to hold pointers to const data.
llvm-svn: 40556
2007-07-27 18:07:02 +00:00
Duncan Sands
e8bb2c6d32 Support for trampolines, except for X86 codegen which is
still under discussion.

llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Christopher Lamb
258dab5389 Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions.
llvm-svn: 40521
2007-07-26 08:18:32 +00:00
Christopher Lamb
08bcd5c0f8 Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350
llvm-svn: 40520
2007-07-26 08:12:07 +00:00