Commit Graph

41952 Commits

Author SHA1 Message Date
Chris Lattner
58f15c482a add an assert so that PR2356 explodes instead of running off an
array.  Improve some minor comments, refactor some helpers in
AsmOperandInfo.  No functionality change for valid code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 16:21:11 +00:00
Gabor Greif
86af90d802 remove spurious space in link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 14:43:58 +00:00
Gabor Greif
4fbed982fb Add comment on how tagged pointers are
distinguished from normal (untagged) ones
as per review comment.

I am sufficiently unaquainted with doxygen to
defer the markup to someone with more experience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 08:31:36 +00:00
Evan Cheng
6784598895 Fix a very subtle spiller bug: UpdateKills should not forget to track defs of aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 06:16:07 +00:00
Chris Lattner
abec474236 add some simple hacky long double support for the CBE. This
should work for intel long double, but ppc long double aborts
in convert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57672 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 06:11:48 +00:00
Dan Gohman
b2a1432507 Use INT64_C to emit constant values, to avoid problems with
constants that don't fit in an int. This fixes
"this decimal constant is unsigned only in ISO C90"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 04:40:39 +00:00
Dan Gohman
63f97201dc Fun x86 encoding tricks: when adding an immediate value of 128,
use a SUB instruction instead of an ADD, because -128 can be
encoded in an 8-bit signed immediate field, while +128 can't be.
This avoids the need for a 32-bit immediate field in this case.

A similar optimization applies to 64-bit adds with 0x80000000,
with the 32-bit signed immediate field.

To support this, teach tablegen how to handle 64-bit constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 01:33:43 +00:00
Dan Gohman
74feef261a Define patterns for shld and shrd that match immediate
shift counts, and patterns that match dynamic shift counts
when the subtract is obscured by a truncate node.

Add DAGCombiner support for recognizing rotate patterns
when the shift counts are defined by truncate nodes.

Fix and simplify the code for commuting shld and shrd
instructions to work even when the given instruction doesn't
have a parent, and when the caller needs a new instruction.

These changes allow LLVM to use the shld, shrd, rol, and ror
instructions on x86 to replace equivalent code using two
shifts and an or in many more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 01:23:35 +00:00
Dan Gohman
a1fcd77ccf Use 0 instead of false to return a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57660 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 00:56:52 +00:00
Dan Gohman
c90a5c2878 Fix this test so it actually runs the grep lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57653 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 23:57:54 +00:00
Dan Gohman
f522068412 Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57649 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 20:18:31 +00:00
Chris Lattner
cc4ba7834f fix typo noticed by sdt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 17:02:50 +00:00
Gabor Greif
023f84ecaf Introduce a typing refinenement on tagged data
using the 'volatile' qualifier. This should not have any operational consequences
on code, because tags should always be stripped off (giving a non-volatile pointer)
before dereferencing. The new qualification is there to catch some attempts to use
tagged pointers in a context where an untagged pointer is appropriate.

Notably this approach does not catch dereferencing of tagged pointers, but helps
in separating the two concepts a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 15:33:02 +00:00
Mikhail Glushenkov
cc30d9caa5 Re-apply Makefile changes. Fix build with srcdir != objdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 14:02:29 +00:00
Duncan Sands
e79f5ef4e7 Fix warnings about mb/me being potentially used
uninitialized in these functions with gcc-4.3.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 13:02:33 +00:00
Duncan Sands
ddbe5cbb10 Fix "large integer implicitly truncated to unsigned type"
warning on x86-64 with gcc-4.3.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 09:14:58 +00:00
Duncan Sands
078ae1e6ee Testcase for PR2762.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 08:56:46 +00:00
Chris Lattner
a354825650 add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 07:04:06 +00:00
Chris Lattner
c74092ba8f add some notes and a file to collect unimplemented features in the
x86 backend.  These will all be answered with "patches welcome", so
a PR doesn't help drive them along.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 06:46:12 +00:00
Chris Lattner
0d5d05b553 mark some targets as experimental. Andrew, if you think that Alpha is
basically working, feel free to remove the tag.  The other targets have
really basic things that break them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 06:16:50 +00:00
Chris Lattner
d3745476de Verify prefetch arguments, PR2576.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 06:00:36 +00:00
Chris Lattner
868510328f apply Eli's patch for PR2165 and provide a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 05:26:51 +00:00
Dan Gohman
8e8b8a223c Const-ify several TargetInstrInfo methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:49:15 +00:00
Dan Gohman
fcab2bd2f3 Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:47:47 +00:00
Dan Gohman
9a8af451a3 Fix Instruction::isIdenticalTo and isSameOperationAs to recognize
additional information in Loads, Stores, Calls, Invokes,
InsertValueInsts, and ExtractValueInsts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:24:45 +00:00
Zhongxing Xu
1a26daa9c3 Fix a calculation error in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:21:44 +00:00
Dan Gohman
131161bc6e Rename AliasSet to SubRegs, to reflect changes in the surrounding code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:06:18 +00:00
Dan Gohman
7ddcadc7ee Move the include of MachineLocation.h into MachineModuleInfo.h
because it declares a std::vector<MachineMove>, and strict
concept checking requires the definition of MachineMove to be
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:20:14 +00:00
Dan Gohman
254a886057 Implement a SmallVector insert method that can insert multiple
copies of a value, and add several additional utilities to make
SmallVector better conform to the Container concept.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:15:24 +00:00
Dan Gohman
3d4227bec5 Fix several places that called mapped_iterator's constructor without
passing in a function object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:12:39 +00:00
Dan Gohman
b382c4dc23 Fix a subtle bug in DeadMachineInstructionElim's liveness
computation. A def of a register doesn't necessarily kill
live super-registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:11:23 +00:00
Dan Gohman
a7250ddc28 Fix the predicate for memop64 to be a regular load, not just
an unindexed load.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57612 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:03:00 +00:00
Dan Gohman
2276a7bc8e Teach instcombine's visitLoad to scan back several instructions
to find opportunities for store-to-load forwarding or load CSE,
in the same way that visitStore scans back to do DSE. Also, define
a new helper function for testing whether the addresses of two
memory accesses are known to have the same value, and use it in
both visitStore and visitLoad.

These two changes allow instcombine to eliminate loads in code
produced by front-ends that frequently emit obviously redundant
addressing for memory references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57608 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 23:19:35 +00:00
Dan Gohman
95c2cc51eb Correct the name of isTrapping in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 22:56:21 +00:00
Dan Gohman
65ac2fa880 Fix whitespace in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 22:55:03 +00:00
Duncan Sands
27d860e566 Testcase for PR2894.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 22:34:34 +00:00
Nicolas Geoffray
56d313dc4b Remove naming Tilmann for generics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 20:25:04 +00:00
Anton Korobeynikov
747b78dfa0 Add global variable to test for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57597 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 20:22:44 +00:00
Anton Korobeynikov
99131d0a5f This is not failing anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 20:13:10 +00:00
Anton Korobeynikov
d13726f1e9 Also properly handle linking of strong alias and weak global
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57595 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 20:10:50 +00:00
Anton Korobeynikov
e655e37032 Properly handle linking of strong alias with weak function, this fixes PR2883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57594 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 20:10:08 +00:00
Bill Wendling
eabb8866d8 Testcase for PR1638.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57590 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 18:27:15 +00:00
Dan Gohman
2b6c3d9ff1 Fix a missing space after the return type in invoke statements.
This fixes PR2894.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57589 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 18:02:08 +00:00
Chris Lattner
a870039277 Fix PR2115 by doxygenating Use more, and make some more methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:56:14 +00:00
Chris Lattner
3b364cb986 move PR1941 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57586 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:33:52 +00:00
Bill Wendling
e90842ca52 Unbreak the build. Please test out the proper fix for this by compiling LLVM
with the build directory different from the source directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:20:13 +00:00
Chris Lattner
db03983238 move PR1604 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:06:03 +00:00
Chris Lattner
f4fee2a976 move PR1488 into this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:02:15 +00:00
Anton Korobeynikov
b2029c98ea Temporary revert r57567 and unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 14:22:06 +00:00
Nuno Lopes
8a5f34776e regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 12:05:02 +00:00