Commit Graph

36214 Commits

Author SHA1 Message Date
David Greene
74a6a7990c Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:56:34 +00:00
David Greene
4d58b64125 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:56:22 +00:00
David Greene
f6fa186cf9 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:56:10 +00:00
David Greene
73657df388 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:55:58 +00:00
David Greene
f749efae8b Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:55:37 +00:00
David Greene
1b58cab38c Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:55:24 +00:00
David Greene
0e2236c70c Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96229 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:55:07 +00:00
David Greene
67c9d42f93 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:53:33 +00:00
David Greene
140a5d6413 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:49:52 +00:00
David Greene
ba2b297ca5 Add non-temporal flags to MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:48:31 +00:00
Duncan Sands
b0bc6c361d Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 16:12:20 +00:00
Andrew Lenharth
6ceeba6043 Fix changes from r75027
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 15:00:44 +00:00
Dan Gohman
50922bbe74 When testing whether a given SCEV depends on a temporary symbolic
name, test whether the SCEV itself is that temporary symbolic name,
in addition to checking whether the symbolic name appears as a
possibly-indirect operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96216 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 10:28:37 +00:00
Chris Lattner
020bb08026 no need to add the instruction count anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 06:38:41 +00:00
Chris Lattner
17f26b4fd2 enhance raw_svector_ostream::write_impl to work with unbuffered streams,
which may call write_impl on things that are not the usual buffer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96209 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 02:18:26 +00:00
Chris Lattner
efbdaa6463 make PadToColumn return the stream so you can use:
OS.PadToColumn(42) << "foo";



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96208 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 02:17:50 +00:00
Dale Johannesen
3da6e09de5 Ignore DBG_VALUE in a couple more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 01:45:47 +00:00
Dan Gohman
4559855013 When restoring a saved insert location, check to see if the saved
insert location has become an "inserted" instruction since the time
it was saved. If so, advance to the first non-"inserted" instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 00:21:43 +00:00
Chris Lattner
eb079a3491 mark "addr" as having type "iPTR", eliminating some type comparisons
in hte generated dag isel fil.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 21:53:19 +00:00
Dan Gohman
441a38993e Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:51:39 +00:00
Dan Gohman
6020d85c41 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:51:20 +00:00
Dan Gohman
ce947366ec When complicated expressions are broken down into subexpressions
with multiplication by constants distributed through, occasionally
those subexpressions can include both x and -x. For now, if this
condition is discovered within LSR, just prune such cases away,
as they won't be profitable. This fixes a "zero allocated in a
base register" assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:50:49 +00:00
Sanjiv Gupta
44de6823fc fixes to pagesel/banksel inserter.
1. restore these across direct/indirect calls.
2. restore pagesel for any macros with gotos.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:27:42 +00:00
Anton Korobeynikov
77709ac7db Forgot to commit the header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:25:41 +00:00
Chris Lattner
782ab584e5 follow-on to PR6280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:20:09 +00:00
Anton Korobeynikov
245ba9698e Drop winmcasminfo and use normal AT&T COFF for all windows targets.
Otherwise AT&T asm printer is used with non-compatible MCAsmInfo and
there is no way to override this behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 15:19:54 +00:00
Johnny Chen
2faf3919d4 Try to factorize the specification of saturating add/subtract operations a bit,
as suggested by Bob Wilson.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96153 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 06:32:20 +00:00
Dan Gohman
590bfe8641 Actually, this code doesn't have to be quite so conservative in
the no-TLI case. But it should still default to declining the
transformation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96152 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 03:21:49 +00:00
Dan Gohman
1d826a76f5 In rememberInstruction, if the value being remembered is the
current insertion point, advance the current insertion point.
This avoids a use-before-def situation in a testcase extracted
from clang which is difficult to reduce to a reasonable-sized
regression test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 03:12:47 +00:00
Dan Gohman
0402577f38 Simplify this code; no need for a custom subclass if it doesn't need
to override anything from the parent class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96150 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 02:48:58 +00:00
Dan Gohman
2763dfdc70 Don't attempt aggressive post-inc uses if TargetLowering is not available,
because profitability can't be sufficiently approximated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 02:45:21 +00:00
John McCall
6d09ab8ba2 Make LSR not crash if invoked without target lowering info, e.g. if invoked
from opt.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 23:40:16 +00:00
Eric Christopher
77ffe3b31e Fix a problem where we had bitcasted operands that gave us
odd offsets since the bitcasted pointer size and the offset pointer
size are going to be different types for the GEP vs base object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 23:38:01 +00:00
Chris Lattner
1cea10a663 teach the encoder to handle pseudo instructions like FP_REG_KILL,
encoding them into nothing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 19:16:53 +00:00
Chris Lattner
c09687bb7e remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 19:07:06 +00:00
Daniel Dunbar
591047f714 MCAssembler: Fix pcrel relocations. Oh and,
--
ddunbar@ozzy:tmp$ clang -m32 -integrated-as hello.c && ./a.out
hello world!
--

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:45:59 +00:00
Daniel Dunbar
f6346769b3 MC/Mach-O: Start emitting fixups/relocations for instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:29:02 +00:00
Daniel Dunbar
2be2fd0730 MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96094 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:54 +00:00
Daniel Dunbar
0bcf074867 MCAssembler: Sink fixup list into MCDataFragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96093 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:43 +00:00
Daniel Dunbar
a4766d7af9 MCAssembler: Switch MCFillFragment to only taking constant values. Symbolic expressions can always be emitted as data + fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:32 +00:00
Daniel Dunbar
45f4874611 MC/Mach-O: Implement EmitValue using data fragments + fixups instead of fill fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:22 +00:00
Daniel Dunbar
3a30b827a5 MCAssembler: Start applying fixups in the data section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96090 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:15 +00:00
Daniel Dunbar
b7c3a4b195 MCAssembler: Add assorted dump() methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96089 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:28:03 +00:00
Daniel Dunbar
a8dfb79e6f X86: Move extended MCFixupKinds into X86FixupKinds.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 09:27:52 +00:00
Chris Lattner
98d5c3141e Split some code out to a helper function (FindReusablePredBB)
and add a doxygen comment.

Cache the phi entry to avoid doing tons of 
PHINode::getBasicBlockIndex calls in the common case.

On my insane testcase from re2c, this speeds up CGP from
617.4s to 7.9s (78x).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 05:35:08 +00:00
Chris Lattner
6686c6bf68 Speed up codegen prepare from 3.58s to 0.488s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 05:01:14 +00:00
Chris Lattner
277cccc58f PHINode::getBasicBlockIndex is O(n) in the number of inputs
to a PHI, avoid it in the common case where the BB occurs
in the same index for multiple phis.  This speeds up CGP on
an insane testcase from 8.35 to 3.58s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 04:24:19 +00:00
Chris Lattner
2f36ea8b74 iterate over preds using PHI information when available instead of
using pred_begin/end.  It is much faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 04:15:26 +00:00
Chris Lattner
3f65b5e733 speed up CGP a bit by scanning predecessors through phi operands
instead of with pred_begin/end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 04:04:42 +00:00
Chris Lattner
b779033a23 add encoder support and tests for rdtscp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 03:42:24 +00:00