oota-llvm.git
12 years agoSource order scheduler should not preschedule nodes with multiple uses. rdar://11096639
Evan Cheng [Thu, 22 Mar 2012 19:31:17 +0000 (19:31 +0000)]
Source order scheduler should not preschedule nodes with multiple uses. rdar://11096639

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153270 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAssign node orders to target intrinsics which do not produce results. rdar://11096639
Evan Cheng [Thu, 22 Mar 2012 19:29:09 +0000 (19:29 +0000)]
Assign node orders to target intrinsics which do not produce results. rdar://11096639

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153269 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRefactor the code for visiting instructions out into helper functions.
Dan Gohman [Thu, 22 Mar 2012 18:24:56 +0000 (18:24 +0000)]
Refactor the code for visiting instructions out into helper functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153267 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCleanup IVUsers::addUsersIfInteresting.
Andrew Trick [Thu, 22 Mar 2012 17:47:33 +0000 (17:47 +0000)]
Cleanup IVUsers::addUsersIfInteresting.

Keep the public interface clean, even though LLVM proper does not
currently use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153263 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused simplifyIVUsers
Andrew Trick [Thu, 22 Mar 2012 17:47:30 +0000 (17:47 +0000)]
Remove unused simplifyIVUsers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153262 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove -enable-iv-rewrite, which has been unsupported since 3.0.
Andrew Trick [Thu, 22 Mar 2012 17:10:11 +0000 (17:10 +0000)]
Remove -enable-iv-rewrite, which has been unsupported since 3.0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153260 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConvert -indvars tests that rely on SCEV expansion to -loop-reduce tests.
Andrew Trick [Thu, 22 Mar 2012 17:10:07 +0000 (17:10 +0000)]
Convert -indvars tests that rely on SCEV expansion to -loop-reduce tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153259 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove tests: indvars trivially preserves GEPs now.
Andrew Trick [Thu, 22 Mar 2012 17:09:46 +0000 (17:09 +0000)]
Remove tests: indvars trivially preserves GEPs now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153258 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove test: trivial canonical IV test which is covered by other SCEV tests.
Andrew Trick [Thu, 22 Mar 2012 17:09:34 +0000 (17:09 +0000)]
Remove test: trivial canonical IV test which is covered by other SCEV tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153257 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest scalar evolution directly instead of testing the result of
Andrew Trick [Thu, 22 Mar 2012 17:09:31 +0000 (17:09 +0000)]
Test scalar evolution directly instead of testing the result of
canonical indvars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153256 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove redundant -enable-iv-rewrite=false flags from test cases.
Andrew Trick [Thu, 22 Mar 2012 17:09:04 +0000 (17:09 +0000)]
Remove redundant -enable-iv-rewrite=false flags from test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153255 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdded soft fail checks for the disassembler when decoding some corner cases of the...
Silviu Baranga [Thu, 22 Mar 2012 14:14:49 +0000 (14:14 +0000)]
Added soft fail checks for the disassembler when decoding some corner cases of the STRD, STRH, LDRD, LDRH, LDRSH and LDRSB instructions on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153252 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdded soft fail cases for the disassembler when decoding LDRSBT, LDRHT or LDRSHT...
Silviu Baranga [Thu, 22 Mar 2012 13:24:43 +0000 (13:24 +0000)]
Added soft fail cases for the disassembler when decoding LDRSBT, LDRHT or LDRSHT instruction on ARM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153251 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdded soft fail cases for the disassembler when decoding MUL instructions on ARM.
Silviu Baranga [Thu, 22 Mar 2012 13:14:39 +0000 (13:14 +0000)]
Added soft fail cases for the disassembler when decoding MUL instructions on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153250 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[python] Add negative MemoryBuffer testcase
Anders Waldenborg [Thu, 22 Mar 2012 11:23:52 +0000 (11:23 +0000)]
[python] Add negative MemoryBuffer testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153248 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove some unnecessary forward declarations.
Craig Topper [Thu, 22 Mar 2012 06:52:14 +0000 (06:52 +0000)]
Remove some unnecessary forward declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153245 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert a series of commits to MCJIT to get the build working in CMake
Chandler Carruth [Thu, 22 Mar 2012 05:44:06 +0000 (05:44 +0000)]
Revert a series of commits to MCJIT to get the build working in CMake
(and hopefully on Windows). The bots have been down most of the day
because of this, and it's not clear to me what all will be required to
fix it.

The commits started with r153205, then r153207, r153208, and r153221.
The first commit seems to be the real culprit, but I couldn't revert
a smaller number of patches.

When resubmitting, r153207 and r153208 should be folded into r153205,
they were simple build fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153241 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPPC::DBG_VALUE must use Reg+Imm frame-index elimination even for large offsets. Fixes...
Hal Finkel [Thu, 22 Mar 2012 05:28:19 +0000 (05:28 +0000)]
PPC::DBG_VALUE must use Reg+Imm frame-index elimination even for large offsets. Fixes PR12203.

I don't have a small test case yet, but I'll try to construct one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153240 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd load/store volatility control to the C API, patch by Yiannis Tsiouris!
Chris Lattner [Thu, 22 Mar 2012 03:54:15 +0000 (03:54 +0000)]
add load/store volatility control to the C API, patch by Yiannis Tsiouris!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153238 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agodon't use "signed", just something I noticed in patches flying by.
Chris Lattner [Thu, 22 Mar 2012 03:46:58 +0000 (03:46 +0000)]
don't use "signed", just something I noticed in patches flying by.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153237 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn erroneous inline assembly we could mistakenly try to access the
Eric Christopher [Thu, 22 Mar 2012 01:33:51 +0000 (01:33 +0000)]
In erroneous inline assembly we could mistakenly try to access the
metadata operand as an actual operand, leading to an assert. Error
out in this case.

rdar://11007633

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153234 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[fast-isel] Fold "urem x, pow2" -> "and x, pow2-1". This should fix the 271%
Chad Rosier [Thu, 22 Mar 2012 00:21:17 +0000 (00:21 +0000)]
[fast-isel] Fold "urem x, pow2" -> "and x, pow2-1".  This should fix the 271%
execution-time regression for nsieve-bits on the ARMv7 -O0 -g nightly tester.
This may also improve compile-time on architectures that would otherwise
generate a libcall for urem (e.g., ARM) or fall back to the DAG selector.
rdar://10810716

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153230 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[PathV2]: Fix bug in create_directories which caused infinite recursion on
Michael J. Spencer [Wed, 21 Mar 2012 23:09:14 +0000 (23:09 +0000)]
[PathV2]: Fix bug in create_directories which caused infinite recursion on
som inputs.

Bug found and fix proposed by Kal Conley!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153225 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a release note for r145714.
Nick Lewycky [Wed, 21 Mar 2012 22:58:28 +0000 (22:58 +0000)]
Add a release note for r145714.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153224 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: tag a few XFAILs that I plan to fix
Andrew Trick [Wed, 21 Mar 2012 22:31:31 +0000 (22:31 +0000)]
misched: tag a few XFAILs that I plan to fix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153222 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRe-factored RuntimeDyld.
Danil Malyshev [Wed, 21 Mar 2012 21:06:29 +0000 (21:06 +0000)]
Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153221 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix ARM disassembly of VST1 and VST2 instructions with writeback. And add test
Kevin Enderby [Wed, 21 Mar 2012 20:54:32 +0000 (20:54 +0000)]
Fix ARM disassembly of VST1 and VST2 instructions with writeback.  And add test
case for all opcodes handed by DecodeVSTInstruction() in ARMDisassembler.cpp .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153218 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix windows compilation warning. Patch by Micah.
Jan Sjödin [Wed, 21 Mar 2012 20:00:30 +0000 (20:00 +0000)]
Fix windows compilation warning. Patch by Micah.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153215 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a ${pathsep} variable to lit that expands to : (or ; on win32).
Nico Weber [Wed, 21 Mar 2012 19:56:42 +0000 (19:56 +0000)]
Add a ${pathsep} variable to lit that expands to : (or ; on win32).

This is in braces so that it doesn't conflict with the existing %p.
It uses braces instead of parens because parens would have to be
regex-escaped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153213 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agogit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153208 91177308-0d34-0410...
Danil Malyshev [Wed, 21 Mar 2012 19:13:08 +0000 (19:13 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153208 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMissed getPointerToNamedFunction() declaration.
Danil Malyshev [Wed, 21 Mar 2012 18:47:10 +0000 (18:47 +0000)]
Missed getPointerToNamedFunction() declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153207 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBased on this discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of...
Danil Malyshev [Wed, 21 Mar 2012 18:26:47 +0000 (18:26 +0000)]
Based on this discussion: lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html
1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager
2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153205 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChecking a build_vector for an all-ones value.
Jim Grosbach [Wed, 21 Mar 2012 17:48:04 +0000 (17:48 +0000)]
Checking a build_vector for an all-ones value.

Type legalization can zero-extend the elements of the build_vector node, so,
for example, we may have an <8 x i8> with i32 elements of value 255. That
should return 'true' for the vector being all ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153203 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[asan] fix one more bug related to long double
Kostya Serebryany [Wed, 21 Mar 2012 15:28:50 +0000 (15:28 +0000)]
[asan] fix one more bug related to long double

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153189 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPut Is64BitMemOperand into !defined(NDEBUG) for now.
Joerg Sonnenberger [Wed, 21 Mar 2012 14:09:26 +0000 (14:09 +0000)]
Put Is64BitMemOperand into !defined(NDEBUG) for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153185 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse a signed value for this enum to avoid spuriuos warnings from gcc.
Benjamin Kramer [Wed, 21 Mar 2012 13:48:11 +0000 (13:48 +0000)]
Use a signed value for this enum to avoid spuriuos warnings from gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153184 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach instsimplify to gracefully degrade in the presence of instructions
Chandler Carruth [Wed, 21 Mar 2012 10:58:47 +0000 (10:58 +0000)]
Teach instsimplify to gracefully degrade in the presence of instructions
not attched to a basic block or function. There are conservatively
correct answers in these cases, and this makes the analysis more useful
in contexts where we have a partially formed bit of IR.

I don't have any way to test this directly... suggestions welcome here,
but I'm not seeing anything sadly. I only found this using a subsequent
patch to the inliner which runs instsimplify on partially inlined
instructions, and even then only on a quite large program. I never got
a reasonable testcase out of it, and anything I do get is likely to be
quite fragile due to requiring an interaction of two different passes,
and the only result being a segfault if it goes wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153176 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[python] Add some paths where to find test binary
Anders Waldenborg [Wed, 21 Mar 2012 08:34:58 +0000 (08:34 +0000)]
[python] Add some paths where to find test binary

Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153174 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[python] Mark get_test_binary as not being a test
Anders Waldenborg [Wed, 21 Mar 2012 08:18:19 +0000 (08:18 +0000)]
[python] Mark get_test_binary as not being a test

get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153173 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agolit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python...
NAKAMURA Takumi [Wed, 21 Mar 2012 07:49:44 +0000 (07:49 +0000)]
lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions.

We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.

Disable win32file at ImportError. Thanks to Francois to let me know.

FIXME: Could we report warning or notification if win32file were not found?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153172 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFinish organizing C API docs.
Gregory Szorc [Wed, 21 Mar 2012 07:28:27 +0000 (07:28 +0000)]
Finish organizing C API docs.

Remaining "uncategorized" functions have been organized into their
proper place in the hierarchy. Some functions were moved around so
groups are defined together.

No code changes were made.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153169 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix generation of the address size override prefix. Add assertions for
Joerg Sonnenberger [Wed, 21 Mar 2012 05:48:07 +0000 (05:48 +0000)]
Fix generation of the address size override prefix. Add assertions for
the invalid cases. At least 16bit operand in 64bit mode is currently not
rejected in the parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153166 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoI meant to disable this test, not XFAIL it
Andrew Trick [Wed, 21 Mar 2012 05:18:53 +0000 (05:18 +0000)]
I meant to disable this test, not XFAIL it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153165 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: beginning to add unit tests
Andrew Trick [Wed, 21 Mar 2012 04:12:19 +0000 (04:12 +0000)]
misched: beginning to add unit tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153163 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: fix LiveInterval update for bottom-up scheduling
Andrew Trick [Wed, 21 Mar 2012 04:12:16 +0000 (04:12 +0000)]
misched: fix LiveInterval update for bottom-up scheduling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153162 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: trace LiveIntervals after scheduling.
Andrew Trick [Wed, 21 Mar 2012 04:12:12 +0000 (04:12 +0000)]
misched: trace LiveIntervals after scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153161 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: obvious iterator update fixes for bottom-up.
Andrew Trick [Wed, 21 Mar 2012 04:12:10 +0000 (04:12 +0000)]
misched: obvious iterator update fixes for bottom-up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153160 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: cleanup main loop
Andrew Trick [Wed, 21 Mar 2012 04:12:07 +0000 (04:12 +0000)]
misched: cleanup main loop

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153159 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomisched: fix LI update for bottom-up.
Andrew Trick [Wed, 21 Mar 2012 04:12:01 +0000 (04:12 +0000)]
misched: fix LI update for bottom-up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153158 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOrganize LLVM C API docs into doxygen modules; add docs
Gregory Szorc [Wed, 21 Mar 2012 03:54:29 +0000 (03:54 +0000)]
Organize LLVM C API docs into doxygen modules; add docs

This gives a lot of love to the docs for the C API. Like Clang's
documentation, the C API is now organized into a Doxygen "module"
(LLVMC). Each C header file is a child of the main module. Some modules
(like Core) have a hierarchy of there own. The produced documentation is
thus better organized (before everything was in one monolithic list).

This patch also includes a lot of new documentation for APIs in Core.h.
It doesn't document them all, but is better than none. Function docs are
missing @param and @return annotation, but the documentation body now
commonly provides help details (like the expected llvm::Value sub-type
to expect).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153157 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd typecast to silence -Wswitch warning introduced by r153153.
Craig Topper [Wed, 21 Mar 2012 02:28:53 +0000 (02:28 +0000)]
Add typecast to silence -Wswitch warning introduced by r153153.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153155 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSpacing fixes and using 'unsigned' instead of 'int' to index to select shuffle elemen...
Craig Topper [Wed, 21 Mar 2012 02:14:01 +0000 (02:14 +0000)]
Spacing fixes and using 'unsigned' instead of 'int' to index to select shuffle elements for consistency with other shuffle code in X86 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153154 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIncremental big endian patch by Jack Carter.
Akira Hatanaka [Wed, 21 Mar 2012 00:52:01 +0000 (00:52 +0000)]
Incremental big endian patch by Jack Carter.

These changes allow us to compile big endian from the command line for 32 bit
Mips targets. This patch will result in code and data actually being produced
in the correct endianess.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153153 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoZap some dead code pointed out by Chandler.
Eric Christopher [Tue, 20 Mar 2012 23:28:58 +0000 (23:28 +0000)]
Zap some dead code pointed out by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153150 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure ImmutableSet never inserts Tombstone/Entry into DenseMap.
Anna Zaks [Tue, 20 Mar 2012 22:56:27 +0000 (22:56 +0000)]
Make sure ImmutableSet never inserts Tombstone/Entry into DenseMap.

ImmutAVLTree uses random unsigned values as keys into a DenseMap,
which could possibly happen to be the same value as the Tombstone or
Entry keys in the DenseMap.

Test case is hard to come up with. We randomly get failures on the
internal static analyzer bot, which most likely hits this issue
(hard to be 100% sure without the full stack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153148 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRuntimeDyldMachO has the ability to keep track of
Sean Callanan [Tue, 20 Mar 2012 22:25:39 +0000 (22:25 +0000)]
RuntimeDyldMachO has the ability to keep track of
relocations (i.e., pieces of data whose addresses
are referred to elsewhere in the binary image) and
update the references when the section containing
the relocations moves.  The way this works is that
there is a map from section IDs to lists of
relocations.

Because the relocations are associated with the
section containing the data being referred to, they
are updated only when the target moves.  However,
many data references are relative and also depend
on the location of the referrer.

To solve this problem, I introduced a new data
structure, Referrer, which simply contains the
section being referred to and the index of the
relocation in that section.  These referrers are
associated with the source containing the
reference that needs to be updated, so now
regardless of which end of the relocation moves,
the relocation will now be updated correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153147 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix test case from r153135.
Chad Rosier [Tue, 20 Mar 2012 21:49:54 +0000 (21:49 +0000)]
Fix test case from r153135.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153140 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[avx] Add patterns for combining vextractf128 + vmovaps/vmovups/vmobdqu to
Chad Rosier [Tue, 20 Mar 2012 21:43:40 +0000 (21:43 +0000)]
[avx] Add patterns for combining vextractf128 + vmovaps/vmovups/vmobdqu to
vextractf128 with 128-bit mem dest.

Combines

vextractf128 $0, %ymm0, %xmm0
vmovaps %xmm0, (%rdi)

to

    vextractf128 $0, %ymm0, (%rdi)

rdar://11082570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153139 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAssembler should accept redefinitions of unused variable symbols.
Jim Grosbach [Tue, 20 Mar 2012 21:33:21 +0000 (21:33 +0000)]
Assembler should accept redefinitions of unused variable symbols.

rdar://11027851

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153137 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up.
Jim Grosbach [Tue, 20 Mar 2012 21:33:17 +0000 (21:33 +0000)]
Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153136 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange conditional instructions definitions, e.g. ANDCC, ARMPseudoExpand and t2Pseudo...
Evan Cheng [Tue, 20 Mar 2012 21:28:05 +0000 (21:28 +0000)]
Change conditional instructions definitions, e.g. ANDCC, ARMPseudoExpand and t2PseudoExpand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153135 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLoopSimplify bug fix. Handle indirect loop back edges.
Andrew Trick [Tue, 20 Mar 2012 21:24:52 +0000 (21:24 +0000)]
LoopSimplify bug fix. Handle indirect loop back edges.

Do not call SplitBlockPredecessors on a loop preheader when one of the
predecessors is an indirectbr. Otherwise, you will hit this assert:
!isa<IndirectBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from an IndirectBrInst"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153134 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agowhitespace
Andrew Trick [Tue, 20 Mar 2012 21:24:47 +0000 (21:24 +0000)]
whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153133 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLSR: teach isSimplifiedLoopNest to handle PHI IVUsers.
Andrew Trick [Tue, 20 Mar 2012 21:24:44 +0000 (21:24 +0000)]
LSR: teach isSimplifiedLoopNest to handle PHI IVUsers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153132 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLSR: fix IVUsers isSimplifiedLoopNest to perform a full domtree walk
Andrew Trick [Tue, 20 Mar 2012 21:24:40 +0000 (21:24 +0000)]
LSR: fix IVUsers isSimplifiedLoopNest to perform a full domtree walk
instead of skipping the current loop.

My prior fix was incomplete because of an overzealous compile-time optimization:
Better fix for: <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153131 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReserve number of MI operands to accom,odate complex patterns.
Evan Cheng [Tue, 20 Mar 2012 21:07:51 +0000 (21:07 +0000)]
Reserve number of MI operands to accom,odate complex patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153125 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoremove unused variable
Matt Beaumont-Gay [Tue, 20 Mar 2012 19:52:05 +0000 (19:52 +0000)]
remove unused variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153116 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[avx] Add the AddedComplexity to the VINSERTI128 avx2 patterns to give
Chad Rosier [Tue, 20 Mar 2012 19:45:07 +0000 (19:45 +0000)]
[avx] Add the AddedComplexity to the VINSERTI128 avx2 patterns to give
precedence over the VINSERTF128 avx1 patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153114 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRequire a base pointer for stack realignment when SP may vary dynamically.
Bob Wilson [Tue, 20 Mar 2012 19:28:25 +0000 (19:28 +0000)]
Require a base pointer for stack realignment when SP may vary dynamically.

ARMBaseRegisterInfo::canRealignStack was checking for variable-sized objects
but not for stack adjustments around calls.  Use hasReservedCallFrame() to
check for both.  The hasBasePointer function was already correctly checking
both conditions, so the effect of this was that a base pointer would be used
without checking whether the base pointer register could be reserved. I don't
have a small testcase for this.

<rdar://problem/11075906>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153110 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove some redundant checks.
Bob Wilson [Tue, 20 Mar 2012 19:28:22 +0000 (19:28 +0000)]
Remove some redundant checks.

ARMFrameLowering::hasReservedCallFrame is already checking for variable
sized objects, so there's no point in checking it twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153109 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhitespace.
Chad Rosier [Tue, 20 Mar 2012 18:38:33 +0000 (18:38 +0000)]
Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153105 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[avx] Move the vextractf128 patterns closer to the vextractf128 def. Remove
Chad Rosier [Tue, 20 Mar 2012 18:24:55 +0000 (18:24 +0000)]
[avx] Move the vextractf128 patterns closer to the vextractf128 def.  Remove
whitespace from test case.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153103 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix assembling ARM vst2 instructions with double-spaced registers.
Kevin Enderby [Tue, 20 Mar 2012 17:41:51 +0000 (17:41 +0000)]
Fix assembling ARM vst2 instructions with double-spaced registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153099 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM non-scattered MachO relocations for movw/movt.
Jim Grosbach [Tue, 20 Mar 2012 17:25:45 +0000 (17:25 +0000)]
ARM non-scattered MachO relocations for movw/movt.

Needed when building -mdynamic-no-pic code.

rdar://10459256

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153097 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix test.
Chad Rosier [Tue, 20 Mar 2012 17:20:46 +0000 (17:20 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153095 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[avx] Adjust the VINSERTF128rm pattern to allow for unaligned loads.
Chad Rosier [Tue, 20 Mar 2012 17:08:51 +0000 (17:08 +0000)]
[avx] Adjust the VINSERTF128rm pattern to allow for unaligned loads.

This results in things such as

vmovups 16(%rdi), %xmm0
vinsertf128 $1, %xmm0, %ymm0, %ymm0

to be combined to

    vinsertf128 $1, 16(%rdi), %ymm0, %ymm0

rdar://11076953

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153092 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe ARM instructions that have an unpredictable behavior when the pc register operand...
Silviu Baranga [Tue, 20 Mar 2012 15:54:56 +0000 (15:54 +0000)]
The ARM instructions that have an unpredictable behavior when the pc register operand is given now fail with soft fail. Modified the regression tests to reflect this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153089 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest commit
Silviu Baranga [Tue, 20 Mar 2012 13:12:38 +0000 (13:12 +0000)]
test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153086 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest Commit - add a newline
Richard Barton [Tue, 20 Mar 2012 10:50:35 +0000 (10:50 +0000)]
Test Commit - add a newline

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153083 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIt's possible to have a constant expression who's size is quite big (e.g.,
Bill Wendling [Tue, 20 Mar 2012 08:56:43 +0000 (08:56 +0000)]
It's possible to have a constant expression who's size is quite big (e.g.,
i128). In that case, we may not be able to print out the MCExpr as an
expression. For instance, we could have an MCExpr like this:

    0xBEEF0000BEEF0000 | (0xBEEF0000BEEF0000 << 64)

The MCExpr printer handles sizes up to 64-bits, but this expression would
require 128-bits. In this situation, try to evaluate the constant expression and
emit that as the value into 64-bit chunks.
<rdar://problem/11070338>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153081 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove code that prevented lowering shuffles if they are used by load and themselves...
Craig Topper [Tue, 20 Mar 2012 07:17:59 +0000 (07:17 +0000)]
Remove code that prevented lowering shuffles if they are used by load and themselves used by a extract_vector_elt. This was done to allow the DAG combiner to collapse to a single element load. Unfortunately, sometimes the extract_vector_elt would disappear before DAG combine could do the transformation leaving a vector_shuffle that isel couldn't handle. New code lets the shuffle be converted to a target specific node, but then adds a combine routine that can convert target specific nodes back to vector_shuffles if the folding criteria are met.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153080 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFactor out target shuffle mask decoding from getShuffleScalarElt and use a SmallVecto...
Craig Topper [Tue, 20 Mar 2012 06:42:26 +0000 (06:42 +0000)]
Factor out target shuffle mask decoding from getShuffleScalarElt and use a SmallVector of int instead of unsigned for shuffle mask in decode functions. Preparation for another change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153079 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen combining (vextract shuffle (load ), <1,u,u,u>), 0) -> (load ), add users of...
Craig Topper [Tue, 20 Mar 2012 05:28:39 +0000 (05:28 +0000)]
When combining (vextract shuffle (load ), <1,u,u,u>), 0) -> (load ), add users of the final load to the worklist too. Needed by changes I'm preparing to make to X86 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153078 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDo everything up to generating code to try to get a register for
Eric Christopher [Tue, 20 Mar 2012 01:07:58 +0000 (01:07 +0000)]
Do everything up to generating code to try to get a register for
a variable. The previous code would break the debug info changing
code invariant. This will regress debug info for arguments where
we elide the alloca created.

Fixes rdar://11066468

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153074 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUntabify.
Eric Christopher [Tue, 20 Mar 2012 01:07:56 +0000 (01:07 +0000)]
Untabify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153073 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd another debugging statement here.
Eric Christopher [Tue, 20 Mar 2012 01:07:53 +0000 (01:07 +0000)]
Add another debugging statement here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153072 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse lookUpRegForValue here instead of duplicating the code.
Eric Christopher [Tue, 20 Mar 2012 01:07:47 +0000 (01:07 +0000)]
Use lookUpRegForValue here instead of duplicating the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153071 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix two bugpoint bugs:
Chris Lattner [Mon, 19 Mar 2012 23:42:11 +0000 (23:42 +0000)]
Fix two bugpoint bugs:

1) opt is not usually in the same path as the target program. Even for
the bugpoint as a standalone app, it should be more portable to search
in PATH, isn't it?
2) bugpoint driver accounts opt plugins, but does not list them in the
final output command.

Patch by Dmitry Mikushin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153066 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).
Chris Lattner [Mon, 19 Mar 2012 23:40:48 +0000 (23:40 +0000)]
fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153065 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agof16 FDIV can now be legalized by promoting to f32
Pete Cooper [Mon, 19 Mar 2012 23:38:12 +0000 (23:38 +0000)]
f16 FDIV can now be legalized by promoting to f32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153064 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix a build failure with libc++
Chris Lattner [Mon, 19 Mar 2012 23:31:01 +0000 (23:31 +0000)]
fix a build failure with libc++

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153063 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM branch relaxation for unconditional t1 branches.
Jim Grosbach [Mon, 19 Mar 2012 21:32:32 +0000 (21:32 +0000)]
ARM branch relaxation for unconditional t1 branches.

rdar://11059157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153055 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM assembly, accept optional '#' on lane index number.
Jim Grosbach [Mon, 19 Mar 2012 20:39:53 +0000 (20:39 +0000)]
ARM assembly, accept optional '#' on lane index number.

rdar://11057160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153053 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[Object/COFF]: Expose getSectionContents.
Michael J. Spencer [Mon, 19 Mar 2012 20:27:37 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionContents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153051 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[Object/COFF]: Expose getSectionName.
Michael J. Spencer [Mon, 19 Mar 2012 20:27:15 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionName.
Also add some documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153050 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPerform mul combine when multiplying wiht negative constants.
Anton Korobeynikov [Mon, 19 Mar 2012 19:19:50 +0000 (19:19 +0000)]
Perform mul combine when multiplying wiht negative constants.
Patch by Weiming Zhao!
This fixes PR12212

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153049 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd an option to the MI scheduler to cut off scheduling after a fixed number of
Lang Hames [Mon, 19 Mar 2012 18:38:38 +0000 (18:38 +0000)]
Add an option to the MI scheduler to cut off scheduling after a fixed number of
instructions have been scheduled. Handy for tracking down scheduler bugs, or
bugs exposed by scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153045 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are...
Kostya Serebryany [Mon, 19 Mar 2012 16:40:35 +0000 (16:40 +0000)]
[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are currently used only for experiments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153040 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.
NAKAMURA Takumi [Mon, 19 Mar 2012 16:16:03 +0000 (16:16 +0000)]
llvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153038 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix DAG combine which creates illegal vector shuffles. Patch by Heikki Kultala.
Duncan Sands [Mon, 19 Mar 2012 15:35:44 +0000 (15:35 +0000)]
Fix DAG combine which creates illegal vector shuffles.  Patch by Heikki Kultala.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153035 91177308-0d34-0410-b5e6-96231b3b80d8