Commit Graph

6652 Commits

Author SHA1 Message Date
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
Evan Cheng
f30a49d9e0 Special handling of zero-sized live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:40:27 +00:00
Evan Cheng
419852ca8a - Treat a live range defined by an implicit_def as a zero-sized one.
- Eliminate an implicit_def when it's being spilled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49166 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:39:43 +00:00
Evan Cheng
8a50f1fcf0 Start of a series of patches related to implicit_def.
There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:36:07 +00:00
Evan Cheng
6397c64441 Backing out 48222 temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49124 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 03:13:16 +00:00
David Greene
a022e3fc2f Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

Re-apply 49056 with SmallVector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49106 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:24:46 +00:00
Evan Cheng
ea1d9cdc4e Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:04:08 +00:00
Evan Cheng
1088317675 Remove #include<map> from LiveVariables.h. Not referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:23:50 +00:00
Torok Edwin
56c2f99f00 Add new file Support/DataFlow.h.
It allows Use-Def and Def-Use relations to be treated as graphs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 14:57:52 +00:00