Commit Graph

43220 Commits

Author SHA1 Message Date
Bill Wendling
52370a1089 Add initial support for fast-isel of the [SU]ADDO intrinsics. It isn't
complete. For instance, it lowers the common case into this less-than-optimal
code:

        addl    %ecx, %eax
        seto    %cl
        testb   %cl, %cl
        jne     LBB1_2  ## overflow

instead of:

        addl    %ecx, %eax
        jo      LBB1_2  ## overflow

That will come in a future commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 02:42:50 +00:00
Dan Gohman
5fb580efd6 Fix the name of ISD::TokenFactor in a comment. Thanks Gabor!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 02:18:52 +00:00
Chris Lattner
fe1d9e9588 remove two unneeded forward declarations, pointed out by Gabor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 02:10:10 +00:00
Dan Gohman
aeac8f9cb4 Don't charge full latency for an anti-dependence, in this simplistic
pipeline model.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 00:26:46 +00:00
Dan Gohman
55fdaec36a Fix a couple of mistaken switch case fall-throughs. Thanks to Bill
for spotting these!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 23:50:06 +00:00
Devang Patel
51d8b669f1 Actually test something. Use PR3170 test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 23:44:46 +00:00
Chris Lattner
20fa76ef6f remove DebugIterations option. Despite the accusations,
jump threading has been shown to only expose problems not
have bugs itself.  I'm sure it's completely bug free! ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 22:44:07 +00:00
Evan Cheng
e4d1082b2c Re-apply 60689 now my head is screwed on right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60711 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 19:29:03 +00:00
Dan Gohman
a629b48a66 Fix the top-level comments, and fix some 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60707 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:50:35 +00:00
Dan Gohman
b79a01111d Move the conversion to intptr_t to a separate statement. This
avoids GCC's warning even on 64-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60706 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:41:24 +00:00
Dan Gohman
2d4e9bc922 Revert 60689. It caused many regressions on Darwin targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60705 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:38:02 +00:00
Ted Kremenek
4cd3145223 Use 'delete []' instead of 'delete' in OwningArray::reset().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60703 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:28:11 +00:00
Devang Patel
042b877e84 Fix spelling.
Thanks Duncan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60702 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:07:24 +00:00
Devang Patel
6d9896f153 Undo previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60701 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:02:37 +00:00
Duncan Sands
174f938bd0 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60698 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 14:10:36 +00:00
Duncan Sands
1832705b06 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 14:01:59 +00:00
Dan Gohman
c8a1a3c426 Factor out the code for sign-extending/truncating gep indices
and use it in x86 address mode folding. Also, make
getRegForValue return 0 for illegal types even if it has a
ValueMap for them, because Argument values are put in the
ValueMap. This fixes PR3181.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:57:47 +00:00
Chris Lattner
11dcd8d38d add another level of caching for non-local pointer queries, keeping
track of whether the CachedNonLocalPointerInfo for a block is specific
to a block.  If so, just return it without any pred scanning.  This is
good for a 6% speedup on GVN (when it uses this lookup method, which
it doesn't right now).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:31:50 +00:00
Chris Lattner
59779c5605 consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:21:39 +00:00
Chris Lattner
bedb8c1d35 introduce a new RoundUpAlignment helper function, use it to
remove some more 64-bit divs and rems from the StructLayout 
ctor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:11:56 +00:00
Dan Gohman
149cfc3519 Make ConstantAggregateZero::get return a ConstantAggregateZero*,
as suggested in PR3182.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60691 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:10:54 +00:00
Dan Gohman
f923129fc3 Update CPP backend for PrintModulePass API changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60690 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:07:24 +00:00
Evan Cheng
dda346aa71 Perform cheap checks first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 06:52:43 +00:00
Chris Lattner
0a3ba71a05 Speed up getABITypeSize by turning a i64 mul and div into an
AND.  This is speedup on any reasonable target, but particularly
on 32-bit targets where this often turns into a libcall like udivdi3.

We know that alignments are a power of two but the compiler doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 06:50:51 +00:00
Chris Lattner
295d4e953a Some minor optimizations for isObjectSmallerThan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 06:28:54 +00:00
Dan Gohman
fb4b58c9aa Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60685 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:54:58 +00:00
Dan Gohman
2e3e5bf427 Move createVirtualRegister out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60684 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:54:11 +00:00
Dan Gohman
c93ced5b34 Clarify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60683 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:53:23 +00:00
Dan Gohman
230591900c Add svn:ignore property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:11:50 +00:00
Dan Gohman
70ef449741 Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.

This enables the following use cases:
 - bugpoint llc against an llc command from a different build
 - bugpoint llc against the same llc with different command-line options
 - and more...

Also, document the existing "custom" interpreter options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:02:47 +00:00
Nick Lewycky
28ea4f6c07 Fixes for Visual Studio users. Patch by OvermindDL1 on llvm-dev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 00:45:02 +00:00
Dan Gohman
c765a5acad Use bool instead of int, now that it no longer evokes a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 21:33:27 +00:00
Dan Gohman
994fd5354b Use intptr_t instead of unsigned here, which is more appropriate
in a really obscure way, but more importantly has the side effect
of avoiding a GCC warning in the case that IntType is bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 21:28:00 +00:00
Chris Lattner
3f7eb5b795 add an assert. the cast<> below would catch this but a message is more
useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 18:45:15 +00:00
Chris Lattner
0655f73ef7 factor some code better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 18:42:51 +00:00
Chris Lattner
d44745d241 factor some code, fixing some fixme's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60672 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 18:39:13 +00:00
Chris Lattner
e91a4881e1 fix a typo duncan noticed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60671 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 18:21:37 +00:00
Oscar Fuentes
f76eda70fa CMake: Added Tool.cpp to tools/llvmc/driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 17:01:16 +00:00
Mikhail Glushenkov
24dc52d56e Man page update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:48:07 +00:00
Mikhail Glushenkov
4410e3203d Describe recent changes in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:42 +00:00
Mikhail Glushenkov
b4ced5a3c4 Make 'extern' an option property.
Makes (forward) work better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
940cdfe697 Plugin updates: support more options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:46:23 +00:00
Mikhail Glushenkov
b677df82ed Join tools couldn't be used in the middle of the toolchain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:45:37 +00:00
Mikhail Glushenkov
ad889a7f88 Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:45:12 +00:00
Mikhail Glushenkov
15b71ba122 Re-apply Cedric's changes.
Use B instead of Beg (for consistency), but NodeA and NodeB instead of A
and B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:44:47 +00:00
Mikhail Glushenkov
abb009d2fd Add some clarifying comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:44:15 +00:00
Mikhail Glushenkov
0bef2ad481 Enable the Clang plugin by default.
This will eventually replace `ccc`. The command `llvmc -clang` now uses
the Clang toolchain instead of `llvm-gcc`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:43:42 +00:00
Mikhail Glushenkov
c8813da34a Update plugins to use (actions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60660 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:43:17 +00:00
Mikhail Glushenkov
b59dbad710 Try to guess when the auto-generated cl::Sink option should be marked 'extern'.
This would be much easier to do if the CommandLine library didn't use
global state. Global state is evil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:42:47 +00:00
Mikhail Glushenkov
08509493e5 Add a (progn)-like construct for (actions). Implemented as a DAG list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60658 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:42:22 +00:00