Commit Graph

16 Commits

Author SHA1 Message Date
Benjamin Kramer
71c1b22855 Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong answers for blocks larger than 3 instrs.
Also add a unit test. PR15727.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179370 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 08:33:11 +00:00
Dan Gohman
a070d2a035 Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31 02:00:45 +00:00
Bill Wendling
c83f6212a7 Fix test to not use the AttributeSet's AttributeWithIndex creation method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 03:39:10 +00:00
NAKAMURA Takumi
023d97d703 llvm/unittests: Use OwningPtr to fix --vg-leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173240 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:33:13 +00:00
NAKAMURA Takumi
d422e9f114 IRTests/WaymarkTest.cpp: Fix in --vg-leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:33:05 +00:00
NAKAMURA Takumi
e82a5fae03 IRTests/IRBuilderTest.cpp: GetIntTy: Delete DL at yourself since it is not linked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:31:28 +00:00
NAKAMURA Takumi
f25b003523 IRTests/IRBuilderTest.cpp: Let GV added to the module.
It fixes --vg-leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:30:39 +00:00
NAKAMURA Takumi
6bf3e46aa8 IRTests/ConstantsTest.cpp: AsInstructionsTest: Delete each instruction immediately if it is not linked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:30:26 +00:00
NAKAMURA Takumi
bde0f0f225 Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:30:21 +00:00
NAKAMURA Takumi
1a5812d7da DominatorTreeTest.cpp: Add the file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23 08:30:10 +00:00
Evgeniy Stepanov
655578f8b5 Allow vectors in CreatePointerCast of constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172615 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 14:41:46 +00:00
Evgeniy Stepanov
4802b9d6dc A test for r172535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172614 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 14:38:50 +00:00
Dmitri Gribenko
31659fa066 Improve r172464: const_cast is not needed if the variable is not const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 21:23:37 +00:00
David Greene
c8be88ab56 Fix Casts
Use const_cast<> to avoid cast-away-const errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 21:04:35 +00:00
Benjamin Kramer
8591fa38e6 Add a unit test to verifies that attribute uniquing works so it doesn't break again.
The folding set details can be subtle and broke twice in the last couple of weeks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172313 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12 14:13:45 +00:00
Chandler Carruth
c779e96158 Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 15:35:46 +00:00