Commit Graph

6567 Commits

Author SHA1 Message Date
Bill Wendling
a5261923b4 Add "empty()" method to sys::Path and remove unnecessary whitespace.
Patch by Mikhail Glushenkov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 18:27:02 +00:00
Roman Levenstein
9cac5259fe Ongoing work on improving the instruction selection infrastructure:
Rename SDOperandImpl back to SDOperand.
Introduce the SDUse class that represents a use of the SDNode referred by
an SDOperand. Now it is more similar to Use/Value classes.

Patch is approved by Dan Gohman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49795 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 16:15:27 +00:00
Gabor Greif
917365bef1 merge of r49785 (from branches/ggreif/use-diet): pass V to dyn_cast by const reference, this avoids copy-constructing and destructing all the time. especially important if these constructors are not accessible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 11:43:47 +00:00
Evan Cheng
0d4bdde327 Rewrite LiveVariable liveness computation. The new implementation is much simplified. It eliminated the nasty recursive routines and removed the partial def / use bookkeeping. There is also potential for performance improvement by replacing the conservative handling of partial physical register definitions. The code is currently disabled until live interval analysis is taught of the name scheme.
This patch also fixed a couple of nasty corner cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 09:46:40 +00:00
Owen Anderson
1f23e16319 Major repairs to the post-dominators implementation. Patch from Florian Brandner!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:21:16 +00:00
Chris Lattner
036a94ed61 fix off by one error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:10:37 +00:00
Chris Lattner
c0814dc606 give smallstring some methods to do 'itoa'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:05:02 +00:00
Dale Johannesen
94bef327aa Make 64-to-32 bit truncations explicit (prevent warnings).
All values here fit in 32 bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 18:44:59 +00:00
Nicolas Geoffray
6ccbbd8990 Change Divided flag to Split, as suggested by Evan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 08:08:50 +00:00
Evan Cheng
8102703d70 Sort sub-registers and super-registers lists according to super-sub register relations. e.g. X86::RAX sub-register list is EAX, AX, AL, AH (order of last two are not guaranteed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 07:56:03 +00:00
Dan Gohman
80792f3dde Treat EntryToken nodes as "passive" so that they aren't added to the
ScheduleDAG; they don't correspond to any actual instructions so they
don't need to be scheduled.

This fixes a bug where the EntryToken was being scheduled multiple
times in some cases, though it ended up not causing any trouble because 
EntryToken doesn't expand into anything. With this fixed the schedulers
reliably schedule the expected number of units, so we can check this
with an assertion.

This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it
ends up getting scheduled differently in a trivial way, though it was
enough to fool the prcontext+grep that the test does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49701 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 01:22:18 +00:00
Dan Gohman
89bf0a6b05 In -view-sunit-dags, display "special" chain dependencies as cyan
instead of blue to distinguish them from regular dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 23:15:07 +00:00
Dan Gohman
235fc57ef2 Teach AliasSetTracker about VAArgInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 18:34:50 +00:00
Dan Gohman
29e4bdbf27 Fix const-correctness issues with the SrcValue handling in the
memory intrinsic expansion code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:55:48 +00:00
Dale Johannesen
3541af73b6 Reverse sense of unwind-tables option. This means
stack tracebacks on Darwin x86-64 won't work by default;
nevertheless, everybody but me thinks this is a good idea.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:54:17 +00:00
Dan Gohman
ec1f1a8bd2 Clean up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:45:20 +00:00
Chris Lattner
75caee2419 add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:41:25 +00:00
Chris Lattner
f99b286154 Add support for equality comparison of CallSite's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:40:26 +00:00
Nicolas Geoffray
c0cb28fd3a Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 13:40:22 +00:00
Duncan Sands
89f6d88db3 Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 06:22:09 +00:00
Dan Gohman
707e018423 Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.

Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.

This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.

Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.

This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 04:36:06 +00:00
Evan Cheng
4cce6b4c78 Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 17:53:36 +00:00
Chris Lattner
30ac7df857 improvements for IntrusiveRefCntPtr, patch by Mikhail Glushenkov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 16:42:06 +00:00
Evan Cheng
5d3600f576 Allow registers defined by implicit_def to be clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:47:53 +00:00
Dan Gohman
b1e07ec6a4 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49502 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 22:27:06 +00:00
Dan Gohman
7d8143f0ef Make isVectorClearMaskLegal's operand list const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49446 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 20:09:42 +00:00
Dan Gohman
920c6828ee Fix some minor errors in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49445 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 20:08:06 +00:00
Dan Gohman
cedbacffd6 Add const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 18:31:41 +00:00
Dan Gohman
c76230b485 Update comments to use 2.0 syntax type names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 18:24:25 +00:00
Chris Lattner
d6d48c4e5b ConstantFP::get should be static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49434 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 17:16:28 +00:00
Owen Anderson
a723d1e48f Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00
Evan Cheng
a541931ddb Unbreak teh build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 07:06:01 +00:00
Chris Lattner
4592230265 add a version of ConstantFP::get that doesn't take a redundant Type* value,
start migrating code over to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 00:45:01 +00:00
Chris Lattner
def286408f make ConstantFP::isExactlyValue work for long double as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 00:03:58 +00:00
Devang Patel
cba931f601 Add CreateGetResult()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 20:41:22 +00:00
Devang Patel
7518583044 Add multiple value return instruction constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 07:30:13 +00:00
Duncan Sands
92432a8db1 Convenience method for setting the nounwind
attribute for a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 07:23:58 +00:00
Dale Johannesen
4e1b79459f Implement new llc flag -disable-required-unwind-tables.
Corresponds to -fno-unwind-tables (usually default in gcc).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49361 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 00:10:24 +00:00
Ted Kremenek
9b01cc0ede Make getDirnameSep a static method (not part of Path's interface).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49354 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 22:01:32 +00:00
Ted Kremenek
cf55c8e221 Added method Path::getDirname().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49352 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 21:53:57 +00:00
Sam Bishop
a0562001d0 Added support for Create() calls that take an argument besides the
deserializer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49350 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 21:36:46 +00:00
Dan Gohman
36b5c1338a Rename MemOperand to MachineMemOperand. This was suggested by
review feedback from Chris quite a while ago. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49348 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 19:35:22 +00:00
Owen Anderson
412821284f Add operator= implementations to SparseBitVector, allowing it to be used in GVN. This results
in both time and memory savings for GVN.  For example, one testcase went from 10.5s to 6s with
this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49345 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 17:38:23 +00:00
Roman Levenstein
dc1adac582 Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 10:06:32 +00:00
Owen Anderson
e5ffa900f8 Make GVN more memory efficient, particularly on code that contains a large number of
allocations, which GVN can't optimize anyways.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 09:59:07 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Evan Cheng
c5ea2010c0 Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-05 02:17:58 +00:00
Duncan Sands
b51a0d87ac If a value is cast to its own type, then the cast
is not needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 08:28:13 +00:00
Chris Lattner
f4cc3096fd Make ExecutionEngine::updateGlobalMapping return the old mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 04:47:41 +00:00
Ted Kremenek
a150ffeada Add member template version of SerializeTrait<T>::Create that also accepts
an optional argument for us by T's Create method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:44:37 +00:00