oota-llvm.git
13 years agoHe said *before* the last split point.
Jakob Stoklund Olesen [Sat, 16 Jul 2011 00:13:30 +0000 (00:13 +0000)]
He said *before* the last split point.

This should unbreak the build-self-4-mingw32 tester. I have a very
complicated test case that I will try to clean up.

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

13 years agofix rdar://9776316 - type remapping needed for inline asm blobs,
Chris Lattner [Fri, 15 Jul 2011 23:18:40 +0000 (23:18 +0000)]
fix rdar://9776316 - type remapping needed for inline asm blobs,
fixing some objc llvm-test crashes with LTO.

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

13 years agodeconstify getType()'s.
Chris Lattner [Fri, 15 Jul 2011 23:15:45 +0000 (23:15 +0000)]
deconstify getType()'s.

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

13 years agoLegalizeDAG doesn't need its own copy of this enum.
Dan Gohman [Fri, 15 Jul 2011 22:51:43 +0000 (22:51 +0000)]
LegalizeDAG doesn't need its own copy of this enum.

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

13 years agoGet rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr...
Owen Anderson [Fri, 15 Jul 2011 22:49:31 +0000 (22:49 +0000)]
Get rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr, using pseudo-instructions to lower to the single final opcode.  Update the ARM disassembler for this change.

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

13 years agoDelete LegalizeDAG's own version of isTypeLegal and getTypeAction
Dan Gohman [Fri, 15 Jul 2011 22:39:09 +0000 (22:39 +0000)]
Delete LegalizeDAG's own version of isTypeLegal and getTypeAction
and just use the ones from TargetLowering directly.

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

13 years agoFix a couple of things:
Bruno Cardoso Lopes [Fri, 15 Jul 2011 22:24:33 +0000 (22:24 +0000)]
Fix a couple of things:

1) Make non-legal 256-bit loads to be promoted to v4i64. This lets us
canonize the loads and handle things the same way we use to handle
for 128-bit registers. Despite of what one of the removed comments
explained, the load promotion would not mess with VPERM, it's only a
matter of doing the appropriate bitcasts when this instructions comes
to be introduced. Also make LOAD v8i32 legal.

2) Doing 1) exposed two bugs:
- v4i64 was being promoted to itself for several opcodes (introduced
in r124447 by David Greene) causing endless recursion and the stack to
explode.
- there was no support for allOnes BUILD_VECTORs and ANDNP would fail to
match because it was generating early target constant pools during
lowering.

3) The testcases are already checked-in, doing 1) exposed the
bugs in the current testcases.

4) Tidy up code to be more clear and explicit about AVX.

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

13 years agoAdd a few patterns for 256-bit bitcasts. No testcases now, they are
Bruno Cardoso Lopes [Fri, 15 Jul 2011 22:24:17 +0000 (22:24 +0000)]
Add a few patterns for 256-bit bitcasts. No testcases now, they are
comming together with other tests.

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

13 years agoDelete an unused variable and a redundant assert.
Dan Gohman [Fri, 15 Jul 2011 22:19:02 +0000 (22:19 +0000)]
Delete an unused variable and a redundant assert.

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

13 years agoExtract parts of RAGreedy::splitAroundRegion as SplitKit methods.
Jakob Stoklund Olesen [Fri, 15 Jul 2011 21:47:57 +0000 (21:47 +0000)]
Extract parts of RAGreedy::splitAroundRegion as SplitKit methods.

This gets rid of some of the gory splitting details in RAGreedy and
makes them available to future SplitKit clients.

Slightly generalize the functionality to support multi-way splitting.
Specifically, SplitEditor::splitLiveThroughBlock() supports switching
between different register intervals in a block.

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

13 years agoModernize comments.
Dan Gohman [Fri, 15 Jul 2011 21:42:20 +0000 (21:42 +0000)]
Modernize comments.

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

13 years agoPR10370: Make sure we know how to relax push correctly on x86-64.
Eli Friedman [Fri, 15 Jul 2011 21:28:39 +0000 (21:28 +0000)]
PR10370: Make sure we know how to relax push correctly on x86-64.

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

13 years agoUse DebugLoc directly to map inlined functions' instructions to respective lexical...
Devang Patel [Fri, 15 Jul 2011 21:25:44 +0000 (21:25 +0000)]
Use DebugLoc directly to map inlined functions' instructions to respective lexical scope.

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

13 years agoA real testcase for r135286.
Chad Rosier [Fri, 15 Jul 2011 20:58:38 +0000 (20:58 +0000)]
A real testcase for r135286.

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

13 years agoUpdate these tests, no longer outputting names for the variables.
Eric Christopher [Fri, 15 Jul 2011 20:58:16 +0000 (20:58 +0000)]
Update these tests, no longer outputting names for the variables.

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

13 years agoFix pointer heuristic. Check whether predicator is ICMP_NE instead of if it is
Jakub Staszak [Fri, 15 Jul 2011 20:51:06 +0000 (20:51 +0000)]
Fix pointer heuristic. Check whether predicator is ICMP_NE instead of if it is
not isEquality().

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

13 years agoA couple of minor fixes to the OCaml tutorial. PR10025 and PR10316. Patches by...
Eli Friedman [Fri, 15 Jul 2011 20:03:30 +0000 (20:03 +0000)]
A couple of minor fixes to the OCaml tutorial.  PR10025 and PR10316.  Patches by Damien Schoof!

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

13 years agoAdd testcase for r135286.
Chad Rosier [Fri, 15 Jul 2011 19:06:58 +0000 (19:06 +0000)]
Add testcase for r135286.

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

13 years agoRemove VMOVDneon and VMOVQ, which are just aliases for VORR. This continues to simpl...
Owen Anderson [Fri, 15 Jul 2011 18:46:47 +0000 (18:46 +0000)]
Remove VMOVDneon and VMOVQ, which are just aliases for VORR.  This continues to simplify the path towards an auto-generated disassembler.

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

13 years agoTeach llvm-objdump to disassemble sections symbol by symbol.
Benjamin Kramer [Fri, 15 Jul 2011 18:39:24 +0000 (18:39 +0000)]
Teach llvm-objdump to disassemble sections symbol by symbol.

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

13 years agoObjectFile: Add a method to check whether a section contains a symbol.
Benjamin Kramer [Fri, 15 Jul 2011 18:39:21 +0000 (18:39 +0000)]
ObjectFile: Add a method to check whether a section contains a symbol.

- No ELF or COFF implementation yet, I don't have a way to test that.
  Should be straightforward to add though.

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

13 years agoHave tblgen produce code that tolerates operands that return an invalid match class.
Kevin Enderby [Fri, 15 Jul 2011 18:30:43 +0000 (18:30 +0000)]
Have tblgen produce code that tolerates operands that return an invalid match class.

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

13 years agoDisable loop idiom recognition of memset/memcpy if the function being compiled
Chad Rosier [Fri, 15 Jul 2011 18:25:04 +0000 (18:25 +0000)]
Disable loop idiom recognition of memset/memcpy if the function being compiled
is named after a common idiom (i.e., memset/memcpy).  Otherwise, we can run into
infinite recursion.  Ideally, the user should use the correct -fno-builtin flag,
but in case they don't we should play nicely.
rdar://9763412

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

13 years agoRemove unnecessary duplicate instruction definitions that simply overloaded the type...
Owen Anderson [Fri, 15 Jul 2011 17:48:05 +0000 (17:48 +0000)]
Remove unnecessary duplicate instruction definitions that simply overloaded the type of VEXT.  This can be achieved with a Pat definition, and is much more disassembler friendly.

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

13 years agoMachOObjectFile: Get symbol functions ready for 64 bit.
Benjamin Kramer [Fri, 15 Jul 2011 17:32:45 +0000 (17:32 +0000)]
MachOObjectFile: Get symbol functions ready for 64 bit.

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

13 years agoNo need to explicitly invoke the ArrayRef constructor here.
Frits van Bommel [Fri, 15 Jul 2011 17:13:23 +0000 (17:13 +0000)]
No need to explicitly invoke the ArrayRef constructor here.

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

13 years agoEliminate redundant map.
Devang Patel [Fri, 15 Jul 2011 16:38:42 +0000 (16:38 +0000)]
Eliminate redundant map.

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

13 years agoEliminate "const" from extern const to fix breakeage since r135184 on msvc.
NAKAMURA Takumi [Fri, 15 Jul 2011 12:50:21 +0000 (12:50 +0000)]
Eliminate "const" from extern const to fix breakeage since r135184 on msvc.

MSVC decorates (and distinguishes) "const" in mangler. It brought linkage error between "extern const" declarations and definitions.

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

13 years agoFor my ego.
Francois Pichet [Fri, 15 Jul 2011 11:26:11 +0000 (11:26 +0000)]
For my ego.

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

13 years agoIn Twine::str(), if the Twine stores only a std::string, just return a direct copy...
Frits van Bommel [Fri, 15 Jul 2011 11:05:37 +0000 (11:05 +0000)]
In Twine::str(), if the Twine stores only a std::string, just return a direct copy of that instead of first copying to a SmallString and converting that to a std::string. Also fix some indentation.

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

13 years agoConvert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.
Francois Pichet [Fri, 15 Jul 2011 10:59:52 +0000 (10:59 +0000)]
Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.

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

13 years agoConvert CallInst and InvokeInst APIs to use ArrayRef.
Jay Foad [Fri, 15 Jul 2011 08:37:34 +0000 (08:37 +0000)]
Convert CallInst and InvokeInst APIs to use ArrayRef.

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

13 years agoExplicitly cast the second argument to unsigned in order to select the
Chandler Carruth [Fri, 15 Jul 2011 07:31:10 +0000 (07:31 +0000)]
Explicitly cast the second argument to unsigned in order to select the
desired overload.

This is a bit of a hackish workaround to fix the compile after r135259.
Let me know if there is a better approach.

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

13 years agoAdd an APFloat::convertToInt(APSInt) function that automatically manages the
Jeffrey Yasskin [Fri, 15 Jul 2011 07:04:56 +0000 (07:04 +0000)]
Add an APFloat::convertToInt(APSInt) function that automatically manages the
memory for the result.

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

13 years agoReverting r135232. It's causing infinite looping in DbgScope::openInsnRange.
Evan Cheng [Fri, 15 Jul 2011 06:26:35 +0000 (06:26 +0000)]
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.

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

13 years agoremove the old and dangerous uncheckedReplaceAllUsesWith method,
Chris Lattner [Fri, 15 Jul 2011 06:18:52 +0000 (06:18 +0000)]
remove the old and dangerous uncheckedReplaceAllUsesWith method,
which was just replaceAllUsesWith without some assertions.  It was
needed back when type refinement was alive.

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

13 years agodevirtualize Constant::isNullValue:
Chris Lattner [Fri, 15 Jul 2011 06:14:08 +0000 (06:14 +0000)]
devirtualize Constant::isNullValue:

 4 files changed, 15 insertions(+), 60 deletions(-)

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

13 years agostart using the new helper methods a bit.
Chris Lattner [Fri, 15 Jul 2011 06:08:15 +0000 (06:08 +0000)]
start using the new helper methods a bit.

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

13 years agoadd CFP::isNegative() and ConstnatInt::isNegative() methods.
Chris Lattner [Fri, 15 Jul 2011 05:58:04 +0000 (05:58 +0000)]
add CFP::isNegative() and ConstnatInt::isNegative() methods.

Devirtualize the isNegativeZeroValue method.

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

13 years agobump pointer allocate LLVM IR types, since they are never deallocated.
Chris Lattner [Fri, 15 Jul 2011 05:49:15 +0000 (05:49 +0000)]
bump pointer allocate LLVM IR types, since they are never deallocated.

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

13 years agoremove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
Chris Lattner [Fri, 15 Jul 2011 05:21:59 +0000 (05:21 +0000)]
remove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
that type refinement is toast.

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

13 years agoRemove an unnecessary header from this file. I don't think this header
Chandler Carruth [Fri, 15 Jul 2011 04:16:38 +0000 (04:16 +0000)]
Remove an unnecessary header from this file. I don't think this header
was really intended, and it may have been required prior to some of the
recent refactors. Including it however causes LLVMX86Desc to need
symbols from LLVMX86CodeGen, forming a dependency cycle. This was masked
in almost all builds: Clang, and GCC w/ optimizations didn't actually
emit the symbols!

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

13 years agoThe *MCAsmInfo.cpp files use ADT/Triple code, so add the Support dep.
Chandler Carruth [Fri, 15 Jul 2011 02:34:03 +0000 (02:34 +0000)]
The *MCAsmInfo.cpp files use ADT/Triple code, so add the Support dep.

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

13 years agoMove some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
Evan Cheng [Fri, 15 Jul 2011 02:09:41 +0000 (02:09 +0000)]
Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
solution but it is a small step towards removing the horror that is
TargetAsmInfo.

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

13 years agoRemove setting the bit for personality function. It should be set by the linker.
Bill Wendling [Fri, 15 Jul 2011 01:42:32 +0000 (01:42 +0000)]
Remove setting the bit for personality function. It should be set by the linker.

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

13 years agoMajor update to CMake build to reflect changes in r135219 in the
Chandler Carruth [Fri, 15 Jul 2011 00:40:52 +0000 (00:40 +0000)]
Major update to CMake build to reflect changes in r135219 in the
backend. Moved some MCAsmInfo files down into the MCTargetDesc
sublibraries, removed some (i suspect long) dead files from other parts
of the CMake build, etc. Also copied the include directory hack from the
Makefile.

Finally, updated the lib deps. I spot checked this, and think its
correct, but review appreciated there.

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

13 years agoAdd new configure option, --with-bug-report-url, which allows users/vendors to
Chad Rosier [Fri, 15 Jul 2011 00:37:26 +0000 (00:37 +0000)]
Add new configure option, --with-bug-report-url, which allows users/vendors to
specify where bug reports should be submitted.
Part of rdar://9575623

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

13 years agoDo not get confused by multiple empty lexical scopes inlined at one location.
Devang Patel [Fri, 15 Jul 2011 00:30:39 +0000 (00:30 +0000)]
Do not get confused by multiple empty lexical scopes inlined at one location.

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

13 years agoOutput MachO section names in the form SEGMENT,section.
Benjamin Kramer [Fri, 15 Jul 2011 00:29:02 +0000 (00:29 +0000)]
Output MachO section names in the form SEGMENT,section.

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

13 years agoAdd support for 64 bit objects to MachOObjectFile.
Benjamin Kramer [Fri, 15 Jul 2011 00:14:48 +0000 (00:14 +0000)]
Add support for 64 bit objects to MachOObjectFile.

- I don't see a better way than duplicating all the code.

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

13 years agoMachOObjectFile: Change isSectionText to return true for sections named text, not...
Benjamin Kramer [Fri, 15 Jul 2011 00:14:46 +0000 (00:14 +0000)]
MachOObjectFile: Change isSectionText to return true for sections named text, not for load commands name __TEXT (which isn't the case in actual object files)

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

13 years agoEncode that we have a personality function.
Bill Wendling [Fri, 15 Jul 2011 00:07:31 +0000 (00:07 +0000)]
Encode that we have a personality function.

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

13 years agoRename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc...
Evan Cheng [Thu, 14 Jul 2011 23:50:31 +0000 (23:50 +0000)]
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.

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

13 years agoCMake: Add a new configuration option LLVM_BUILD_CLANG that's
Douglas Gregor [Thu, 14 Jul 2011 23:49:55 +0000 (23:49 +0000)]
CMake: Add a new configuration option LLVM_BUILD_CLANG that's
available when Clang is found within the LLVM tree. If enabled (the
default), Clang will be built as part of LLVM. If disabled, Clang will
be skipped... and can be built by configuring a separate object
directory just for Clang. This helps break up the monolithic
LLVM+Clang project that many Clang developers use, improving
build/load times.

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

13 years ago* If we have an LSDA, we need to mark it in the encoding.
Bill Wendling [Thu, 14 Jul 2011 23:34:45 +0000 (23:34 +0000)]
* If we have an LSDA, we need to mark it in the encoding.
* The personality function should be encoded as an absolute pointer to the function.

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

13 years agoRefactor.
Devang Patel [Thu, 14 Jul 2011 23:17:49 +0000 (23:17 +0000)]
Refactor.

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

13 years agocmake/modules/LLVMLibDeps.cmake: Update since r135184.
NAKAMURA Takumi [Thu, 14 Jul 2011 23:12:02 +0000 (23:12 +0000)]
cmake/modules/LLVMLibDeps.cmake: Update since r135184.

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

13 years agoEliminate redundant LLVMContext argument.
Devang Patel [Thu, 14 Jul 2011 22:30:56 +0000 (22:30 +0000)]
Eliminate redundant LLVMContext argument.
Improve DbgScope->dump() output.

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

13 years agoUndo r135191 (i.e. reapply Chris's patch. Now linker maps NamedMDNodes first, so...
Devang Patel [Thu, 14 Jul 2011 22:14:06 +0000 (22:14 +0000)]
Undo r135191 (i.e. reapply Chris's patch. Now linker maps NamedMDNodes first, so there is not any need to map DebugLoc).

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

13 years agoLink NamedMDNode before linking function bodies.
Devang Patel [Thu, 14 Jul 2011 22:13:07 +0000 (22:13 +0000)]
Link NamedMDNode before linking function bodies.

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

13 years agoARM diagnostic when 's' suffix on mnemonic that can't set flags.
Jim Grosbach [Thu, 14 Jul 2011 22:04:21 +0000 (22:04 +0000)]
ARM diagnostic when 's' suffix on mnemonic that can't set flags.

For example, "mlss r0, r1, r2, r3".

The MLS instruction does not have a flag-setting variant.

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

13 years ago* Redo the permutation encoding for frameless stacks to be more like what the
Bill Wendling [Thu, 14 Jul 2011 22:01:34 +0000 (22:01 +0000)]
* Redo the permutation encoding for frameless stacks to be more like what the
  unwind library expects.
* Comment the permutation encoding for frameless stacks.

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

13 years agoAdd dump()
Devang Patel [Thu, 14 Jul 2011 21:50:04 +0000 (21:50 +0000)]
Add dump()

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

13 years agoAdd OperandTypes for Thumb branch targets.
Benjamin Kramer [Thu, 14 Jul 2011 21:47:24 +0000 (21:47 +0000)]
Add OperandTypes for Thumb branch targets.

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

13 years agoPort operand types for ARM and X86 over from EDIS to the .td files.
Benjamin Kramer [Thu, 14 Jul 2011 21:47:22 +0000 (21:47 +0000)]
Port operand types for ARM and X86 over from EDIS to the .td files.

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

13 years agoAdd a new field to MCOperandInfo that contains information about the type of the...
Benjamin Kramer [Thu, 14 Jul 2011 21:47:18 +0000 (21:47 +0000)]
Add a new field to MCOperandInfo that contains information about the type of the Operand.

- The actual values are from the MCOI::OperandType enum.
- Teach tblgen to read it from the instruction definition.
- This is a better implementation of the hacks in edis.

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

13 years agoAdd some testcases for ARM MLA/MLS instructions.
Jim Grosbach [Thu, 14 Jul 2011 21:43:05 +0000 (21:43 +0000)]
Add some testcases for ARM MLA/MLS instructions.

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

13 years agoARM MCRR/MCRR2 immediate operand range checking.
Jim Grosbach [Thu, 14 Jul 2011 21:26:42 +0000 (21:26 +0000)]
ARM MCRR/MCRR2 immediate operand range checking.

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

13 years agorevert r135172 until Devang and I figure out the right answer.
Chris Lattner [Thu, 14 Jul 2011 21:25:42 +0000 (21:25 +0000)]
revert r135172 until Devang and I figure out the right answer.

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

13 years agoARM MCR/MCR2 assembly parsing operand constraints.
Jim Grosbach [Thu, 14 Jul 2011 21:19:17 +0000 (21:19 +0000)]
ARM MCR/MCR2 assembly parsing operand constraints.

The immediate operands are restricted to 0-7. Enforce that when parsing
assembly.

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

13 years agoAfter type-system-rewrite branch update the Cpp backend to not use OpaqueType.
Nicolas Geoffray [Thu, 14 Jul 2011 21:04:35 +0000 (21:04 +0000)]
After type-system-rewrite branch update the Cpp backend to not use OpaqueType.

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

13 years agoEnable some tests we now handle correctly.
Jim Grosbach [Thu, 14 Jul 2011 21:02:23 +0000 (21:02 +0000)]
Enable some tests we now handle correctly.

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

13 years agoNext round of MC refactoring. This patch factor MC table instantiations, MC
Evan Cheng [Thu, 14 Jul 2011 20:59:42 +0000 (20:59 +0000)]
Next round of MC refactoring. This patch factor MC table instantiations, MC
registeration and creation code into XXXMCDesc libraries.

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

13 years agosimplify this logic now that GlobalAlias::isDeclaration is fixed.
Chris Lattner [Thu, 14 Jul 2011 20:23:05 +0000 (20:23 +0000)]
simplify this logic now that GlobalAlias::isDeclaration is fixed.

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

13 years agoFix GlobalValue::isDeclaration() to always consider aliases to be definitions.
Chris Lattner [Thu, 14 Jul 2011 20:22:18 +0000 (20:22 +0000)]
Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.

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

13 years agoCheck register class matching instead of width of type matching
Eric Christopher [Thu, 14 Jul 2011 20:13:52 +0000 (20:13 +0000)]
Check register class matching instead of width of type matching
when determining validity of matching constraint. Allow i1
types access to the GR8 reg class for x86.

Fixes PR10352 and rdar://9777108

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

13 years agoReorganize ARM assembler aliases.
Jim Grosbach [Thu, 14 Jul 2011 19:47:47 +0000 (19:47 +0000)]
Reorganize ARM assembler aliases.

Consolidate the individual declarations together for ease of reference. This
mirrors the organization in X86, as well, so is good for consistency. No
functional change.

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

13 years agoAdd LLVMConstNamedStruct to the C api to let its users create constants
Rafael Espindola [Thu, 14 Jul 2011 19:09:08 +0000 (19:09 +0000)]
Add LLVMConstNamedStruct to the C api to let its users create constants
of named struct types.

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

13 years agoDebugLoc's don't hide any interesting types for TypeFinder to find.
Chris Lattner [Thu, 14 Jul 2011 18:58:40 +0000 (18:58 +0000)]
DebugLoc's don't hide any interesting types for TypeFinder to find.

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

13 years agomanually copy debugloc over to a new instruction in clone() instead
Chris Lattner [Thu, 14 Jul 2011 18:57:51 +0000 (18:57 +0000)]
manually copy debugloc over to a new instruction in clone() instead
of calling getAllMetadata().  This is semantically identical, but doing
it this way avoids unpacking the DebugLoc.

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

13 years agoStop the ValueMapper from calling getAllMetadata, which unpacks DebugLoc into
Chris Lattner [Thu, 14 Jul 2011 18:53:50 +0000 (18:53 +0000)]
Stop the ValueMapper from calling getAllMetadata, which unpacks DebugLoc into
an MDNode.  This saves a bunch of time and memory in the IR linker, e.g. when
doing LTO of files with debug info.

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

13 years agoAdd 256-bit load/store recognition and matching in several places.
Bruno Cardoso Lopes [Thu, 14 Jul 2011 18:50:58 +0000 (18:50 +0000)]
Add 256-bit load/store recognition and matching in several places.

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

13 years agoDon't leak operands when putting them into a shift.
Benjamin Kramer [Thu, 14 Jul 2011 18:41:22 +0000 (18:41 +0000)]
Don't leak operands when putting them into a shift.

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

13 years agoUpdate ARM Assembly of LDM/STM.
Jim Grosbach [Thu, 14 Jul 2011 18:35:38 +0000 (18:35 +0000)]
Update ARM Assembly of LDM/STM.

ldm/stm are the cannonical spellings for ldmia/stmia, so use them as such.
Update the parsing/encoding tests accordingly.

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

13 years agoThe key of a StringMap can contain nul's in it, so having first() return
Chris Lattner [Thu, 14 Jul 2011 18:31:43 +0000 (18:31 +0000)]
The key of a StringMap can contain nul's in it, so having first() return
const char* doesn't make sense.  Have it return StringRef instead.

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

13 years agothough it isn't the case here, the key of a StringMap can
Chris Lattner [Thu, 14 Jul 2011 18:21:58 +0000 (18:21 +0000)]
though it isn't the case here, the key of a StringMap can
conceptually have nuls in it.

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

13 years agoadd comments.
Chris Lattner [Thu, 14 Jul 2011 18:12:44 +0000 (18:12 +0000)]
add comments.

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

13 years agoconsolidate GlobalValue::isDeclaration into one
Chris Lattner [Thu, 14 Jul 2011 18:10:41 +0000 (18:10 +0000)]
consolidate GlobalValue::isDeclaration into one
non-virtual function.

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

13 years agoARM ISB assembly parsing tests.
Jim Grosbach [Thu, 14 Jul 2011 18:02:25 +0000 (18:02 +0000)]
ARM ISB assembly parsing tests.

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

13 years agocode cleanup
Chris Lattner [Thu, 14 Jul 2011 18:01:49 +0000 (18:01 +0000)]
code cleanup

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

13 years agoARM ISB instruction assembly parsing.
Jim Grosbach [Thu, 14 Jul 2011 18:00:31 +0000 (18:00 +0000)]
ARM ISB instruction assembly parsing.

The ISB instruction takes an optional operand, just like DMB/DSB. Typically
only 'sy' is meaningful.

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

13 years agoChange Intrinsic::getDeclaration and friends to take an ArrayRef.
Benjamin Kramer [Thu, 14 Jul 2011 17:45:39 +0000 (17:45 +0000)]
Change Intrinsic::getDeclaration and friends to take an ArrayRef.

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

13 years agoadd a couple more missing C api, patch by Vitaly Lugovskiy!
Chris Lattner [Thu, 14 Jul 2011 16:20:28 +0000 (16:20 +0000)]
add a couple more missing C api, patch by Vitaly Lugovskiy!

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

13 years agoUpdate XCoreRegisterInfo::eliminateFrameIndex() to handle DBG_VALUE
Richard Osborne [Thu, 14 Jul 2011 14:03:48 +0000 (14:03 +0000)]
Update XCoreRegisterInfo::eliminateFrameIndex() to handle DBG_VALUE
instructions.

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

13 years agoSimplify some functions in the C API by using an ArrayRef to directly reference the...
Frits van Bommel [Thu, 14 Jul 2011 11:44:09 +0000 (11:44 +0000)]
Simplify some functions in the C API by using an ArrayRef to directly reference the array passed to them instead of copying it to a std::vector.

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

13 years ago[VECTOR-SELECT]
Nadav Rotem [Thu, 14 Jul 2011 11:11:14 +0000 (11:11 +0000)]
[VECTOR-SELECT]
During type legalization we often use the SIGN_EXTEND_INREG SDNode.
When this SDNode is legalized during the LegalizeVector phase, it is
scalarized because non-simple types are automatically marked to be expanded.
In this patch we add support for lowering SIGN_EXTEND_INREG manually.
This fixes CodeGen/X86/vec_sext.ll when running with the '-promote-elements'
flag.

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

13 years agoAdd assertion for the chain value type
Nadav Rotem [Thu, 14 Jul 2011 10:37:54 +0000 (10:37 +0000)]
Add assertion for the chain value type

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

13 years agoMention all API changes I've made since 2.9 was branched.
Jay Foad [Thu, 14 Jul 2011 09:19:05 +0000 (09:19 +0000)]
Mention all API changes I've made since 2.9 was branched.

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

13 years agoAdd a testcase for r135123.
Eric Christopher [Thu, 14 Jul 2011 06:23:09 +0000 (06:23 +0000)]
Add a testcase for r135123.

Part of rdar://9761830

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

13 years agoadd C api for hte new type system rewrite API. Patch by Vitaly Lugovskiy!
Chris Lattner [Thu, 14 Jul 2011 05:53:17 +0000 (05:53 +0000)]
add C api for hte new type system rewrite API.  Patch by Vitaly Lugovskiy!

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