Commit Graph

50287 Commits

Author SHA1 Message Date
Jim Grosbach
5aa1684e5d Add Thumb2 eh_sjlj_setjmp implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 19:42:21 +00:00
Daniel Dunbar
3524bd7551 Simplify ConstantExpr::getInBoundsGetElementPtr and fix a possible crash, if
constant folding eliminated the GEP instruction.
 - clang was hitting this on its test suite (for x86_64, at least).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 18:28:09 +00:00
Daniel Dunbar
3603d7a352 Revert 78680 until I figure out why it completely broke things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 18:11:15 +00:00
Devang Patel
ab67e705f5 Link NamedMDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 18:01:24 +00:00
Dan Gohman
e2574d3215 Add convenience functions for creating inbounds GEPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:57:01 +00:00
David Goodwin
7cd0118c36 Use DEBUG macro for debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:56:42 +00:00
Chris Lattner
1d96ccc69a add a trivial line # cache to SourceMgr to make repeated queries to
FindLineNumber much faster when in sequence.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78693 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:49:14 +00:00
Daniel Dunbar
b27a41b440 llvm-mc: Fix a crash on invalid due to a typo in relocatable expression
evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:47:52 +00:00
Benjamin Kramer
12ddd40953 Make LLVMContext and LLVMContextImpl classes instead of structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:45:13 +00:00
Daniel Dunbar
c588d55810 Remove some unnecessary LoadInst constructors, missed during Twinification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:38:47 +00:00
Chris Lattner
5731020b2f make owen happy by being explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:38:15 +00:00
David Goodwin
c93d8373c9 Add some debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:35:23 +00:00
Benjamin Kramer
754bdacf46 Fix struct/class mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:27:20 +00:00
Dan Gohman
104eac156e Use isa instead of dyn_cast when the result is only converted to bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:20:16 +00:00
Devang Patel
a44fa8333e Fix cut-n-pasto in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:15:47 +00:00
Jim Grosbach
cdc17ebc2b fix GetInstSizeInBytes for eh_sjlj_setjmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:08:15 +00:00
Dan Gohman
59c4f5c2fc Add convenience functions for creating exact sdiv operators, and
use them in CreatePtrDiff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:05:24 +00:00
Dan Gohman
d30658c3ff Avoid implicitly depending on Instructions.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:03:18 +00:00
Chris Lattner
02552decf9 move some 32-bit instrs to x86instrinfo.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 16:58:39 +00:00
Benjamin Kramer
f221c0bd0d Revert 78662 to fix broken windows build. Add a comment which explains the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 16:41:22 +00:00
Benjamin Kramer
327365e58f This void is implicit in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 16:03:08 +00:00
Dan Gohman
ffef8acc3e Tidy #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 16:02:12 +00:00
Dan Gohman
3108222c2c Simplify this code. The case where one class is GR64RegClass and the
other is a subclass of it is effectively handled by the prior tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:59:48 +00:00
Dan Gohman
b2d746ce6d Add an explicit keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:57:42 +00:00
Dan Gohman
7f4151bc69 ConstantFolder and NoFolder no longer require their Context members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:56:12 +00:00
Chris Lattner
d3fe75e2bf now that these are in file-check format, we can merge them together
into one bigger test (which runs faster)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:54:17 +00:00
Dan Gohman
a124430492 Fix a typo in an assertion string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:53:15 +00:00
Dan Gohman
3751aa559d Use the default copy-ctor, copy-assignment, and destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:52:30 +00:00
Dan Gohman
d1ad72f54f Add a comment about the additional meaning of setPreservesCFG() for
MachineFunctionPass passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:50:56 +00:00
Dan Gohman
004072508b Don't assume that external global variables are aligned at their preferred
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:50:03 +00:00
Dan Gohman
00b0a243bd Remove unnecessary throw() specifications; LLVM doesn't use exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78667 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:35:57 +00:00
Jim Grosbach
764ab52dd8 Whitespace cleanup. Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78666 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:33:49 +00:00
Jim Grosbach
f128787f94 Move ~ARMConstantPoolValue() to the .cpp file to avoid needing to include <cstdlib> in the header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:26:27 +00:00
Dan Gohman
1b2d0b8397 Remove unnecessary casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:15:10 +00:00
Dan Gohman
d443ee6884 Add const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:13:43 +00:00
Dan Gohman
3c8178e625 Remove an unnecessary mutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:03:52 +00:00
Shantonu Sen
7e83697c8e Regenerate per request of Gabor Greif (r78628)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 13:39:52 +00:00
Benjamin Kramer
6b831983fe Silence MSVC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78660 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 11:01:19 +00:00
Evan Cheng
195c71b472 Fix the previous accidental commit. Now shrinking common Thumb2 load / store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 09:37:40 +00:00
Evan Cheng
3a21425dbe Fix Thumb2 load / store addressing mode matching code. Do not use so_reg form to
match base only address, i.e. [r] since Thumb2 requires a offset register field.
For those, use [r + imm12] where the immediate is zero.
Note the generated assembly code does not look any different after the patch.
But the bug would have broken the JIT (if there is Thumb2 support) and it can
break later passes which expect the address mode to be well-formed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 08:52:18 +00:00
Evan Cheng
1cf5783dd7 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 08:47:46 +00:00
Erick Tryzelaar
ccf9f2b12e Change llvm-c's ordering of contexts to make it consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 07:46:16 +00:00
Evan Cheng
4a8ea215e6 Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 07:36:14 +00:00
Evan Cheng
7fb8c3ffc0 Adding a blank line back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 07:32:58 +00:00
Devang Patel
ae709eaeb1 Link metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 06:46:31 +00:00
Devang Patel
9d3627ea27 Remove dead metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 06:31:57 +00:00
Jakob Stoklund Olesen
8c54a62061 Rebuild RegScavenger::DistanceMap each time it is needed.
The register scavenger maintains a DistanceMap that maps MI pointers to their
distance from the top of the current MBB. The DistanceMap is built
incrementally in forward() and in bulk in findFirstUse(). It is used by
scavengeRegister() to determine which candidate register has the longest
unused interval.

Unfortunately the DistanceMap contents can become outdated. The first time
scavengeRegister() is called, the DistanceMap is filled to cover the MBB. If
then instructions are inserted in the MBB (as they always are following
scavengeRegister()), the recorded distances are too short. This causes bad
behaviour in the included test case where a register use /after/ the current
position is ignored because findFirstUse() thinks is is /before/ the current
position. A "using an undefined register" assertion follows promptly.

The fix is to build a fresh DistanceMap at the top of scavengeRegister(), and
discard it after use. This means that DistanceMap is no longer needed as a
RegScavenger member variable, and forward() doesn't need to update it.

The fix then discloses issue number two in the same test case: The candidate
search in scavengeRegister() finds a CSR that has been saved in the prologue,
but is currently unused. It would be both inefficient and wrong to spill such
a register in the emergency spill slot. In the present case, the emergency
slot restore is placed immediately before the normal epilogue restore, leading
to a "Redefining a live register" assertion.

Fix number two: When scavengerRegister() stumbles upon an unused register that
is overwritten later in the MBB, return that register early. It is important
to verify that the register is defined later in the MBB, otherwise it might be
an unspilled CSR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 06:25:12 +00:00
Daniel Dunbar
d4d415a1e7 Fix a -Asserts warning.
- Since the function is never called in NDEBUG mode, just dropped the DEBUG()
   uses here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 06:22:47 +00:00
Bob Wilson
d1fa3f58a0 Convert more Neon tests to use FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 05:51:19 +00:00
Bob Wilson
b0abb4dc42 Use vAny type to get rid of Neon intrinsics that differed only in whether
the overloaded vector types allowed floating-point or integer vector elements.
Most of these operations actually depend on the element type, so bitcasting
was not an option.

If you include the vpadd intrinsics that I updated earlier, this gets rid
of 20 intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 05:39:44 +00:00