Commit Graph

42253 Commits

Author SHA1 Message Date
Evan Cheng
afaf12036d Minor code restructuring. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 21:02:39 +00:00
Dale Johannesen
283c6965d0 Fix some ppcf128 regressions: make ExpandFloatRes_LOAD
work correctly, and bring over a late change to ppcf128
SetCC handling.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 20:47:45 +00:00
Duncan Sands
d821726a91 Make VAARG promotion work correctly with large funky
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now.  But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 20:22:12 +00:00
Dan Gohman
20cd13f54f Overload AddInteger on int/long/long long instead of on int/int64_t,
to avoid overload ambiguities. This fixes build errors introduced
by r58623.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 19:40:18 +00:00
Devang Patel
265ca5dff5 Ignore conditions that are outside the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 19:38:07 +00:00
Andrew Lenharth
06a1242207 add a period at the end of the comment, ignoring the fact that the comment would be hard pressed to be considered a sentence, but if it makes Bill happy...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 19:29:29 +00:00
Jim Grosbach
0a4b9dc9b1 Add binary encoding support for multiply instructions. Some blanks left to fill in, but the basics are there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:38:31 +00:00
Devang Patel
58d43d4a41 Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:32:19 +00:00
Dan Gohman
8f092252d3 Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 18:22:42 +00:00
Dan Gohman
3a5797d946 Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 17:56:27 +00:00
Daniel Dunbar
eb909ca524 Comment fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 17:33:36 +00:00
Dan Gohman
958fdf07b5 Remove redundant inline keywords from functions defined within
class definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 17:10:24 +00:00
Andrew Lenharth
97bd9a914b Ensure that we are checking only calls to the function we are interested in specializing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 16:05:35 +00:00
Anton Korobeynikov
d1000d9927 Testcase for recent llvm-gcc fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 14:43:31 +00:00
Duncan Sands
5c58a3168f Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58608 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 11:51:11 +00:00
Matthijs Kooijman
06140888b1 Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 11:16:43 +00:00
Evan Cheng
9200605cd5 Silence a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 07:14:02 +00:00
Nick Lewycky
b90c37f64c Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58594 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 03:50:40 +00:00
Nick Lewycky
af38613e31 Replace explicit loop with utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 03:49:14 +00:00
Nick Lewycky
8f4d5eb9e5 Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58592 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 02:43:49 +00:00
Owen Anderson
ae61ca0206 Revert my last patch until I consult with Evan about it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58591 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 02:33:28 +00:00
Nick Lewycky
6feb333695 Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 16:46:26 +00:00
Anton Korobeynikov
e491515730 Testcase for PR2691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 16:46:17 +00:00
Anton Korobeynikov
fc09f64209 Silence a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 11:47:11 +00:00
Duncan Sands
5baf8ece83 Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 09:00:33 +00:00
Owen Anderson
6423c6c0e8 Don't do pre-splitting if doing so would create a value join that did not
exist before.  Updating the live intervals in that care is tricky in the general
case.

Evan, if you see a tighter guard condition for this, let me know.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 08:08:18 +00:00
Oscar Fuentes
2b82b7e77e CMake: added a source file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58559 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 06:01:39 +00:00
Nick Lewycky
49d2275e51 Whoops! Remove test Output/ directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 05:53:37 +00:00
Nick Lewycky
579a024661 Add a new MergeFunctions pass. It finds identical functions and merges them.
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 05:52:50 +00:00
Nick Lewycky
8e39432ea9 Fix demanded bits analysis with srem by negative number. Based on a patch
by Richard Osborne.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 02:41:50 +00:00
Dan Gohman
21440acc06 Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58549 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 00:17:33 +00:00
Mon P Wang
3efcd4a65c Added interface to allow clients to create a MemIntrinsicNode for
target intrinsics that touches memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-01 20:24:53 +00:00
Sanjiv Gupta
de5b06b3e1 Reverting back 58505. Will commit it once I have the bc reader/writer/docs
ready.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58547 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-01 10:57:12 +00:00
Bill Wendling
7ab1fc1490 Whitespace fixes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 21:26:08 +00:00
Anton Korobeynikov
3d2c131592 Testcase for PR2613
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 20:10:49 +00:00
Anton Korobeynikov
ed532cac7c Invalidate debug/eh/gc labels when unreachable MBB is deleted.
Based on patch by Martin Nowack!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58536 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 20:08:30 +00:00
Evan Cheng
2583b2a713 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58533 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:56:03 +00:00
Evan Cheng
938b9d8ef7 Use better data structure for ConstPoolId2AddrMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:55:13 +00:00
Evan Cheng
ba44df60d6 Actually make debug output understandable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58529 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:15:52 +00:00
Mon P Wang
fd532d7cd9 x86_64 rip-relative and magic mode address
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:13:42 +00:00
Evan Cheng
c072966838 Forgot this in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:11:09 +00:00
Evan Cheng
eb4ed4b266 Encode PICADD; some code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:10:44 +00:00
Dan Gohman
87e82f00ad Remove some unused virtual function bodies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 19:06:33 +00:00
Bill Wendling
f7c094000f Revert r58489. It isn't correct for all cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 18:30:19 +00:00
Anton Korobeynikov
476527a19d Symbol visibility is unsupported on cygwin too.
Patch by Jay Foad!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 18:05:01 +00:00
Torok Edwin
d24931632b Add an assert to catch user errors like:
MyFunctionPass() : FunctionPass(ID) {}

when the user actually meant to write:
MyFunctionPass() : FunctionPass(&ID) {}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58518 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 17:27:41 +00:00
Evan Cheng
9ed08f4a41 Change x86 register allocation ordering to match that of gcc. Otherwise some tools get confused by prologue generated by llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58517 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 16:52:57 +00:00
Evan Cheng
36f3adfe7f Add a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 16:41:59 +00:00
Dan Gohman
00b58dfc88 Totally disable the setSubgraphColor calls temporarily, as they're
currently troublesome even for #ifndef NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 16:12:56 +00:00
Duncan Sands
06f0aff69e Add a bunch of libcalls for ppcf128 that were somehow
completely forgotten about when writing LegalizeTypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 14:06:52 +00:00