oota-llvm.git
13 years agoVector-Select: Address one of the problems in pr10902. Add handling for the
Nadav Rotem [Fri, 23 Sep 2011 09:33:24 +0000 (09:33 +0000)]
Vector-Select: Address one of the problems in pr10902. Add handling for the
integer-promotion of CONCAT_VECTORS.

Test: test/CodeGen/X86/widen_shuffle-1.ll

This patch fixes the above tests (when running in with -promote-elements).

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

13 years agoDon't allow 32-bit only instructions to be disassembled in 64-bit mode. Fixes part...
Craig Topper [Fri, 23 Sep 2011 06:57:25 +0000 (06:57 +0000)]
Don't allow 32-bit only instructions to be disassembled in 64-bit mode. Fixes part of PR10700.

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

13 years agoAdd definitions of 64-bit int registers.
Akira Hatanaka [Fri, 23 Sep 2011 02:33:15 +0000 (02:33 +0000)]
Add definitions of 64-bit int registers.

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

13 years agoDo not rely on the enum values of argument registers A0-A3 being consecutive.
Akira Hatanaka [Fri, 23 Sep 2011 00:58:33 +0000 (00:58 +0000)]
Do not rely on the enum values of argument registers A0-A3 being consecutive.

Define function getNextIntArgReg, which takes a register as a parameter and
returns the next O32 argument integer register. Use this function when double
precision floating point arguments are passed in two integer registers.

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

13 years agoWe're no longer going to bother supporting platforms that don't
Eric Christopher [Fri, 23 Sep 2011 00:53:10 +0000 (00:53 +0000)]
We're no longer going to bother supporting platforms that don't
support C89.

We probably didn't support them anyways.

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

13 years agoPR10989: Don't print .hidden on Windows.
Eli Friedman [Fri, 23 Sep 2011 00:13:02 +0000 (00:13 +0000)]
PR10989: Don't print .hidden on Windows.

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

13 years agoPR10991: make fast-isel correctly check whether accessing a global through an alias...
Eli Friedman [Thu, 22 Sep 2011 23:41:28 +0000 (23:41 +0000)]
PR10991: make fast-isel correctly check whether accessing a global through an alias involves thread-local storage.  (I'm not entirely sure how this is supposed to work, but this patch makes fast-isel consistent with the normal isel path.)

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

13 years agoMake changes in instruction and pattern definitions so that tablegen does not
Akira Hatanaka [Thu, 22 Sep 2011 23:31:54 +0000 (23:31 +0000)]
Make changes in instruction and pattern definitions so that tablegen does not
complain it cannot infer types in patterns. Fix a mistake in definition of
SDT_MipsExtractElementF64.

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

13 years agoAdd new files to CMake.
Owen Anderson [Thu, 22 Sep 2011 23:20:48 +0000 (23:20 +0000)]
Add new files to CMake.

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

13 years agoFix SimplifySelectCC to add newly created nodes to the DAGCombiner
Dan Gohman [Thu, 22 Sep 2011 23:01:29 +0000 (23:01 +0000)]
Fix SimplifySelectCC to add newly created nodes to the DAGCombiner
worklist, as it may be possible to perform further optimization on them.

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

13 years agoAdd support for GR32 <-> FR32 cross class copies.
Jakob Stoklund Olesen [Thu, 22 Sep 2011 22:45:24 +0000 (22:45 +0000)]
Add support for GR32 <-> FR32 cross class copies.

We already support GR64 <-> VR128 copies.  All of these copies break
partial register dependencies by zeroing the high part of the target
register.

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

13 years agoUpdate CMake build.
Benjamin Kramer [Thu, 22 Sep 2011 22:38:34 +0000 (22:38 +0000)]
Update CMake build.

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

13 years agoStart stubbing out MCModule and MCAtom, which provide an API for accessing the rich...
Owen Anderson [Thu, 22 Sep 2011 22:32:22 +0000 (22:32 +0000)]
Start stubbing out MCModule and MCAtom, which provide an API for accessing the rich disassembly of a complete object or executable.
These are very much a work in progress, and not really useful yet.

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

13 years agoConstrain register classes instead of emitting copies.
Jakob Stoklund Olesen [Thu, 22 Sep 2011 21:39:34 +0000 (21:39 +0000)]
Constrain register classes instead of emitting copies.

Sometimes register class constraints are trivial, like GR32->GR32_NOSP,
or GPR->rGPR.  Teach InstrEmitter to simply constrain the virtual
register instead of emitting a copy in these cases.

Normally, these copies are handled by the coalescer.  This saves some
coalescer work.

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

13 years agoAdd a MinNumRegs argument to MRI::constrainRegClass().
Jakob Stoklund Olesen [Thu, 22 Sep 2011 21:39:31 +0000 (21:39 +0000)]
Add a MinNumRegs argument to MRI::constrainRegClass().

The function will refuse to use a register class with fewer registers
than MinNumRegs.  This can be used by clients to avoid accidentally
increase register pressure too much.

The default value of MinNumRegs=0 doesn't affect how constrainRegClass()
works.

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

13 years agoSynthesize SSE3/AVX 128 bit horizontal add/sub instructions from
Duncan Sands [Thu, 22 Sep 2011 20:15:48 +0000 (20:15 +0000)]
Synthesize SSE3/AVX 128 bit horizontal add/sub instructions from
floating point add/sub of appropriate shuffle vectors.  Does not
synthesize the 256 bit AVX versions because they work differently.

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

13 years agoPR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.
Eli Friedman [Thu, 22 Sep 2011 18:56:30 +0000 (18:56 +0000)]
PR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.

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

13 years agoResynch intro to section with copyright section.
Chris Lattner [Thu, 22 Sep 2011 18:54:31 +0000 (18:54 +0000)]
Resynch intro to section with copyright section.

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

13 years agoPrint parentheses in next line.
Akira Hatanaka [Thu, 22 Sep 2011 18:29:29 +0000 (18:29 +0000)]
Print parentheses in next line.

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

13 years agoChange subreg index of AFPR64 from sub_fpeven to sub_32 per Jakob's comment.
Akira Hatanaka [Thu, 22 Sep 2011 18:24:21 +0000 (18:24 +0000)]
Change subreg index of AFPR64 from sub_fpeven to sub_32 per Jakob's comment.

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

13 years agoDefine a new sub-register index sub_32 for accessing the 32-bit sub-register of
Akira Hatanaka [Thu, 22 Sep 2011 17:57:32 +0000 (17:57 +0000)]
Define a new sub-register index sub_32 for accessing the 32-bit sub-register of
a 64-bit integer register. Move the subreg index definitions to the beginning
of the file.

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

13 years agoUse the C personality function instead of the C++ personality function.
Bill Wendling [Thu, 22 Sep 2011 17:56:40 +0000 (17:56 +0000)]
Use the C personality function instead of the C++ personality function.

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

13 years agoPrint three closing parentheses when Kind is either VK_Mips_GPOFF_HI or
Akira Hatanaka [Thu, 22 Sep 2011 17:44:37 +0000 (17:44 +0000)]
Print three closing parentheses when Kind is either VK_Mips_GPOFF_HI or
VK_Mips_GPOFF_LO.

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

13 years agoAdd F31 to the set of callee-saved registers.
Akira Hatanaka [Thu, 22 Sep 2011 17:35:03 +0000 (17:35 +0000)]
Add F31 to the set of callee-saved registers.

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

13 years agoFix for warnings: ignoring return value of ‘write’, declared with attribute warn_unus...
Galina Kistanova [Thu, 22 Sep 2011 17:33:24 +0000 (17:33 +0000)]
Fix for warnings: ignoring return value of ‘write’, declared with attribute warn_unused_result.

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

13 years agoFix typo.
Akira Hatanaka [Thu, 22 Sep 2011 17:26:58 +0000 (17:26 +0000)]
Fix typo.

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

13 years agoPTX: fixup test cases for register changes
Justin Holewinski [Thu, 22 Sep 2011 16:45:51 +0000 (16:45 +0000)]
PTX: fixup test cases for register changes

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

13 years agoPTX: Remove physical register defs
Justin Holewinski [Thu, 22 Sep 2011 16:45:48 +0000 (16:45 +0000)]
PTX: Remove physical register defs

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

13 years agoPTX: Use .param space for device function return values on SM 2.0+, and attempt
Justin Holewinski [Thu, 22 Sep 2011 16:45:46 +0000 (16:45 +0000)]
PTX: Use .param space for device function return values on SM 2.0+, and attempt
to fix up parameter passing on SM < 2.0

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

13 years agoPTX: Fix style issues
Justin Holewinski [Thu, 22 Sep 2011 16:45:43 +0000 (16:45 +0000)]
PTX: Fix style issues

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

13 years agoPTX: Fixup codegen to handle emission of virtual registers.
Justin Holewinski [Thu, 22 Sep 2011 16:45:40 +0000 (16:45 +0000)]
PTX: Fixup codegen to handle emission of virtual registers.

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

13 years agoPTX: Customize codegen passes in backend
Justin Holewinski [Thu, 22 Sep 2011 16:45:37 +0000 (16:45 +0000)]
PTX: Customize codegen passes in backend

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

13 years agoPTX: Add new PTX-specific register allocator that keeps virtual registers
Justin Holewinski [Thu, 22 Sep 2011 16:45:33 +0000 (16:45 +0000)]
PTX: Add new PTX-specific register allocator that keeps virtual registers
instead of allocating physical registers.

This is part of a work-in-progress overhaul of the PTX register allocation scheme.

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

13 years agoConverted Exception demo over to using new 3.0 landingpad instruction. This
Garrison Venn [Thu, 22 Sep 2011 15:45:14 +0000 (15:45 +0000)]
Converted Exception demo over to using new 3.0 landingpad instruction. This
was compiled and tested on OS X 10.7.1. It was not tested on LINUX. In
addition the defined OLD_EXC_SYSTEM was not tested with this version.

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

13 years agoThis is a hack to get the demo working with the new 3.0 exception
Garrison Venn [Thu, 22 Sep 2011 14:07:50 +0000 (14:07 +0000)]
This is a hack to get the demo working with the new 3.0 exception
infrastructure. As this makes the demo no longer a demo, and especially not a
demo on how to use the llvm exception mechanism, this hack will shortly be
changed to use the new 3.0 exception infrastructure. However for the time being
this demo is an example on how to use the AutoUpgrade
UpgradeExceptionHandling(...) function on < 3.0 exception handling code.

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

13 years agoFix register printing in disassembling of push/pop of segment registers and in/out...
Craig Topper [Thu, 22 Sep 2011 07:01:50 +0000 (07:01 +0000)]
Fix register printing in disassembling of push/pop of segment registers and in/out in Intel syntax mode. Fixes PR10960

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

13 years agoAdd definition of 64-bit floating registers used for Mips64.
Akira Hatanaka [Thu, 22 Sep 2011 03:48:47 +0000 (03:48 +0000)]
Add definition of 64-bit floating registers used for Mips64.

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

13 years agoThe SSE version differences for fmin/fmax are more involved than I thought.
Benjamin Kramer [Thu, 22 Sep 2011 03:27:22 +0000 (03:27 +0000)]
The SSE version differences for fmin/fmax are more involved than I thought.

- x87: no min or max.
- SSE1: min/max for single precision scalars and vectors.
- SSE2: min/max for single and double precision scalars and vectors.
- AVX: as SSE2, but also supports the wider ymm vectors. (this is covered by the isTypeLegal check)

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

13 years agoAdd enums and functions for symbols Mips64 uses.
Akira Hatanaka [Thu, 22 Sep 2011 03:09:07 +0000 (03:09 +0000)]
Add enums and functions for symbols Mips64 uses.

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

13 years agoX86: Don't form min/max nodes if the target is missing SSE.
Benjamin Kramer [Thu, 22 Sep 2011 03:01:42 +0000 (03:01 +0000)]
X86: Don't form min/max nodes if the target is missing SSE.

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

13 years agoMips64 aligns stack on 16-byte boundary.
Akira Hatanaka [Thu, 22 Sep 2011 02:53:37 +0000 (02:53 +0000)]
Mips64 aligns stack on 16-byte boundary.

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

13 years agoRemove unnecessary condition check.
Akira Hatanaka [Thu, 22 Sep 2011 02:41:29 +0000 (02:41 +0000)]
Remove unnecessary condition check.

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

13 years agoTurns out that Thumb2 ADR doesn't need special printing like LDR does. Fix other...
Owen Anderson [Wed, 21 Sep 2011 23:53:44 +0000 (23:53 +0000)]
Turns out that Thumb2 ADR doesn't need special printing like LDR does.  Fix other test failures I caused.

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

13 years agoPrint out immediate offset versions of PC-relative load/store instructions as [pc...
Owen Anderson [Wed, 21 Sep 2011 23:44:46 +0000 (23:44 +0000)]
Print out immediate offset versions of PC-relative load/store instructions as [pc, #123] rather than simply #123.

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

13 years agoDo not unnecessarily use AT_specification DIE because it does not add any value.
Devang Patel [Wed, 21 Sep 2011 23:41:11 +0000 (23:41 +0000)]
Do not unnecessarily use AT_specification DIE because it does not add any value.

Few weeks ago, llvm completely inverted the debug info graph. Earlier each debug info node used to keep track of its compile unit, now compile unit keeps track of important nodes. One impact of this change is that the global variable's do not have any context, which should be checked before deciding to use AT_specification DIE.

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

13 years agoFix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used uninitialized in...
Galina Kistanova [Wed, 21 Sep 2011 23:34:23 +0000 (23:34 +0000)]
Fix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used uninitialized in this function.

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

13 years agoThe last verification check for the new EH model.
Bill Wendling [Wed, 21 Sep 2011 22:57:02 +0000 (22:57 +0000)]
The last verification check for the new EH model.

This makes sure that the unwind destination of an invoke is a landing pad.

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

13 years agollvm-objdump: Detach symbol listing from section enumeration for mach-o.
Benjamin Kramer [Wed, 21 Sep 2011 22:16:43 +0000 (22:16 +0000)]
llvm-objdump: Detach symbol listing from section enumeration for mach-o.

This reduces memory usage as we don't add the same symbol multiple times anymore.

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

13 years agoAttempt to update the shadow stack GC pass to the new EH model.
Bill Wendling [Wed, 21 Sep 2011 22:14:28 +0000 (22:14 +0000)]
Attempt to update the shadow stack GC pass to the new EH model.

This inserts a cleanup landingpad instruction and a resume to mimic the old
unwind instruction.

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

13 years agoX86Disassembler: if verbose logging is going to nulls(), disable logging completely.
Benjamin Kramer [Wed, 21 Sep 2011 21:47:35 +0000 (21:47 +0000)]
X86Disassembler: if verbose logging is going to nulls(), disable logging completely.

Otherwise we'll spend a ridiculous amount of time pretty printing debug output and then discarding it.

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

13 years agoTidy up. Whitepsace.
Jim Grosbach [Wed, 21 Sep 2011 21:36:53 +0000 (21:36 +0000)]
Tidy up. Whitepsace.

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

13 years agoFix some simple copy-paste errors in MBlaze ASM Parser and Makefile.
Wesley Peck [Wed, 21 Sep 2011 19:23:46 +0000 (19:23 +0000)]
Fix some simple copy-paste errors in MBlaze ASM Parser and Makefile.
patch contributed by Jia Liu!

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

13 years agollvm-objdump: Take the data from the right object when there's no dSYM around.
Benjamin Kramer [Wed, 21 Sep 2011 18:18:53 +0000 (18:18 +0000)]
llvm-objdump: Take the data from the right object when there's no dSYM around.

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

13 years agoThese do not need to be conditional on the presence of CommentStream, as they have...
Owen Anderson [Wed, 21 Sep 2011 17:58:45 +0000 (17:58 +0000)]
These do not need to be conditional on the presence of CommentStream, as they have a fallback path now.

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

13 years agoRemove +.
Akira Hatanaka [Wed, 21 Sep 2011 17:43:48 +0000 (17:43 +0000)]
Remove +.

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

13 years agoRe-enable some of the disabled tests. Use FileCheck instead of grep to check
Akira Hatanaka [Wed, 21 Sep 2011 17:36:30 +0000 (17:36 +0000)]
Re-enable some of the disabled tests. Use FileCheck instead of grep to check
output.

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

13 years agoUndo a change made in r140254.
Akira Hatanaka [Wed, 21 Sep 2011 17:31:45 +0000 (17:31 +0000)]
Undo a change made in r140254.
MipsArchVersion needs to be initialized to Mips32.

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

13 years agoDWARF: avoid unnecessary map lookups.
Benjamin Kramer [Wed, 21 Sep 2011 17:31:42 +0000 (17:31 +0000)]
DWARF: avoid unnecessary map lookups.

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

13 years agofix comment
Nadav Rotem [Wed, 21 Sep 2011 17:14:40 +0000 (17:14 +0000)]
fix comment

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

13 years agoadd another testcase for pr10902
Nadav Rotem [Wed, 21 Sep 2011 17:13:40 +0000 (17:13 +0000)]
add another testcase for pr10902

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

13 years agoMipsArchVersion does not need to be in the initialization list and MipsABI
Akira Hatanaka [Wed, 21 Sep 2011 16:41:43 +0000 (16:41 +0000)]
MipsArchVersion does not need to be in the initialization list and MipsABI
should be initialized to UnknownABI.

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

13 years ago[VECTOR-SELECT] Address one of the bugs in pr10902.
Nadav Rotem [Wed, 21 Sep 2011 14:34:38 +0000 (14:34 +0000)]
[VECTOR-SELECT] Address one of the bugs in pr10902.

Vector SetCC result types need to be type-legalized.
This code worked before because scalar result types are known to be legal.

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

13 years agoInsert a sanity check on the combining of x86 truncing-store nodes. This comes to...
Nadav Rotem [Wed, 21 Sep 2011 08:45:10 +0000 (08:45 +0000)]
Insert a sanity check on the combining of x86 truncing-store nodes. This comes to replace the problematic check that was removed in r139995.

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

13 years agollvm-objdump: Fix use after free.
Benjamin Kramer [Wed, 21 Sep 2011 04:01:19 +0000 (04:01 +0000)]
llvm-objdump: Fix use after free.

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

13 years agoTest commit
David Meyer [Wed, 21 Sep 2011 03:34:31 +0000 (03:34 +0000)]
Test commit

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

13 years agoChange:
Richard Trieu [Wed, 21 Sep 2011 03:09:09 +0000 (03:09 +0000)]
Change:

  assert(!"error message");

To:

  assert(0 && "error message");

which is more consistant across the code base.

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

13 years agoAdd a base class for Mips TargetMachines and add Mips64 TargetMachines.
Akira Hatanaka [Wed, 21 Sep 2011 03:00:58 +0000 (03:00 +0000)]
Add a base class for Mips TargetMachines and add Mips64 TargetMachines.

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

13 years agoSet ABI if it hasn't been set on the command line.
Akira Hatanaka [Wed, 21 Sep 2011 02:45:29 +0000 (02:45 +0000)]
Set ABI if it hasn't been set on the command line.
Check if architecture & ABI combination is valid.

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

13 years agoFix typo.
Akira Hatanaka [Wed, 21 Sep 2011 02:24:25 +0000 (02:24 +0000)]
Fix typo.

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

13 years agoLower ARM adds/subs to add/sub after adding optional CPSR operand.
Andrew Trick [Wed, 21 Sep 2011 02:20:46 +0000 (02:20 +0000)]
Lower ARM adds/subs to add/sub after adding optional CPSR operand.

This is still a hack until we can teach tblgen to generate the
optional CPSR operand rather than an implicit CPSR def. But the
strangeness is now limited to the selection DAG. ADD/SUB MI's no
longer have implicit CPSR defs, nor do we allow flag setting variants
of these opcodes in machine code. There are several corner cases to
consider, and getting one wrong would previously lead to nasty
miscompilation. It's not the first time I've debugged one, so this
time I added enough verification to ensure it won't happen again.

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

13 years agowhitespace
Andrew Trick [Wed, 21 Sep 2011 02:17:37 +0000 (02:17 +0000)]
whitespace

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

13 years agollvm-objdump: Output line info next to the disassembly if available.
Benjamin Kramer [Wed, 21 Sep 2011 01:13:19 +0000 (01:13 +0000)]
llvm-objdump: Output line info next to the disassembly if available.

MachO-only at the moment, sorry.

Usage:
$ llvm-objdump -d -m -g -dsym=a.out.dSYM/Contents/Resources/DWARF/a.out a.out
_main:
100000e90: 55 pushq %rbp ## test.c:11:3


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

13 years agoDebugInfo: Add equality operators and default constructor to DILineInfo.
Benjamin Kramer [Wed, 21 Sep 2011 01:13:16 +0000 (01:13 +0000)]
DebugInfo: Add equality operators and default constructor to DILineInfo.

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

13 years agoRemove the rest of the compiler checking from the top level configure
Eric Christopher [Wed, 21 Sep 2011 00:53:42 +0000 (00:53 +0000)]
Remove the rest of the compiler checking from the top level configure
script. Only the testsuite project needs to know this information.

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

13 years agoIn the disassembler C API, be careful not to confuse the comment streamer that the...
Owen Anderson [Wed, 21 Sep 2011 00:25:23 +0000 (00:25 +0000)]
In the disassembler C API, be careful not to confuse the comment streamer that the disassembler outputs annotations on with the streamer that the InstPrinter will print them on.

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

13 years agoRemove llvm-gcc and various compiler handling from llvm. It's not needed
Eric Christopher [Tue, 20 Sep 2011 23:58:15 +0000 (23:58 +0000)]
Remove llvm-gcc and various compiler handling from llvm. It's not needed
here anymore and has been migrated to the test-suite project.

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

13 years agoChange the names of functions isMips* to hasMips*.
Akira Hatanaka [Tue, 20 Sep 2011 23:53:09 +0000 (23:53 +0000)]
Change the names of functions isMips* to hasMips*.

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

13 years agoThis test is completely invalid with the modern EH model. Delete.
Bill Wendling [Tue, 20 Sep 2011 23:52:09 +0000 (23:52 +0000)]
This test is completely invalid with the modern EH model. Delete.

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

13 years agoMake sure IPSCCP never marks a tracked call as overdefined in SCCPSolver::ResolvedUnd...
Eli Friedman [Tue, 20 Sep 2011 23:28:51 +0000 (23:28 +0000)]
Make sure IPSCCP never marks a tracked call as overdefined in SCCPSolver::ResolvedUndefsIn.  If we do, we can end up in a situation where a function is resolved to return a constant, but the caller is marked overdefined, which confuses the code later.

<rdar://problem/9956541> (again).

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

13 years agoAdd a DAGCombine for subvector extracts to remove useless chains of
Bruno Cardoso Lopes [Tue, 20 Sep 2011 23:19:33 +0000 (23:19 +0000)]
Add a DAGCombine for subvector extracts to remove useless chains of
subvector inserts and extracts. Initial patch by Rackover, Zvi with
some tweak done by me.

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

13 years agoRevert r140097, working on a better approach
Bruno Cardoso Lopes [Tue, 20 Sep 2011 23:19:29 +0000 (23:19 +0000)]
Revert r140097, working on a better approach

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

13 years agolib/Linker: add support of deps which does not end with ".so".
Ivan Krasin [Tue, 20 Sep 2011 22:52:35 +0000 (22:52 +0000)]
lib/Linker: add support of deps which does not end with ".so".
It happens (for example) when you want to have a dependency on the .so
with the specific version, like liblzma.so.1.0.0 or
libcrypto.so.0.9.8.

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

13 years agoSimplify max/minp[s|d] dagcombine matching
Bruno Cardoso Lopes [Tue, 20 Sep 2011 22:34:45 +0000 (22:34 +0000)]
Simplify max/minp[s|d] dagcombine matching

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

13 years agoUpdate this test to the new EH model.
Bill Wendling [Tue, 20 Sep 2011 22:29:43 +0000 (22:29 +0000)]
Update this test to the new EH model.

Though I think it may be obsolete with the loop extract changes. And I couldn't
get the old version of LLVM to compile so that I could reduce this testcase.

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

13 years agoRelax this condition.
Bill Wendling [Tue, 20 Sep 2011 22:28:17 +0000 (22:28 +0000)]
Relax this condition.

Some passes require breaking critical edges before they're called. Don't
segfault because of that.

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

13 years agoPlace the check for an exit landing pad where it will be run on both code paths throu...
Bill Wendling [Tue, 20 Sep 2011 22:27:16 +0000 (22:27 +0000)]
Place the check for an exit landing pad where it will be run on both code paths through the if-then-else.

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

13 years agoFix typos.
Eric Christopher [Tue, 20 Sep 2011 22:26:35 +0000 (22:26 +0000)]
Fix typos.

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

13 years agoOmit extracting a loop if one of the exits is a landing pad.
Bill Wendling [Tue, 20 Sep 2011 22:23:09 +0000 (22:23 +0000)]
Omit extracting a loop if one of the exits is a landing pad.

The landing pad must accompany the invoke when it's extracted. However, if it
does, then the loop isn't properly extracted. I.e., the resulting extraction has
a loop in it. The extracted function is then extracted, etc. resulting in an
infinite loop.

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

13 years agoRemove the hack to check UNAME_RELEASE when identifying the Darwin version.
Bob Wilson [Tue, 20 Sep 2011 22:05:56 +0000 (22:05 +0000)]
Remove the hack to check UNAME_RELEASE when identifying the Darwin version.

This was only needed to locate llvm-gcc's installation directory when clang
falls back to run llvm-gcc for i386 kexts.  As of clang svn r140187, we're
now just searching paths with several different Darwin versions on either
side of the current version, so this is no longer needed.

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

13 years agoTidy up a bit more, fix tab and remove trailing whitespaces
Bruno Cardoso Lopes [Tue, 20 Sep 2011 21:45:26 +0000 (21:45 +0000)]
Tidy up a bit more, fix tab and remove trailing whitespaces

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

13 years agoThe wrong relocation was being emitted for several SSSE3 instructions.
Bruno Cardoso Lopes [Tue, 20 Sep 2011 21:39:21 +0000 (21:39 +0000)]
The wrong relocation was being emitted for several SSSE3 instructions.
This fixes PR10963. Thanks to Benjamin for finding the wrong tablegen
declaration.

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

13 years agoTidy up code!
Bruno Cardoso Lopes [Tue, 20 Sep 2011 21:39:06 +0000 (21:39 +0000)]
Tidy up code!

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

13 years agoFix a bug introduced during refactoring a couple of months ago. Cortex-M3 does not...
Evan Cheng [Tue, 20 Sep 2011 21:38:18 +0000 (21:38 +0000)]
Fix a bug introduced during refactoring a couple of months ago. Cortex-M3 does not support Thumb2 dsp instructions. rdar://10152911.

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

13 years agoInitial Mips64 support. Patch by Liu with some modifications.
Akira Hatanaka [Tue, 20 Sep 2011 20:28:08 +0000 (20:28 +0000)]
Initial Mips64 support. Patch by Liu with some modifications.

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

13 years agoUpdate to new EH model.
Bill Wendling [Tue, 20 Sep 2011 20:21:16 +0000 (20:21 +0000)]
Update to new EH model.

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

13 years agoCheck the terminator, not the basic block.
Bill Wendling [Tue, 20 Sep 2011 20:20:50 +0000 (20:20 +0000)]
Check the terminator, not the basic block.

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

13 years agoWhen extracting a basic block that ends in an 'invoke' instruction, we need to
Bill Wendling [Tue, 20 Sep 2011 19:10:24 +0000 (19:10 +0000)]
When extracting a basic block that ends in an 'invoke' instruction, we need to
extract its associated landing pad block as well. However, that landing pad
block may have more than one predecessor. So split the landing pad block so that
individual landing pads have only one predecessor.

This type of transformation may produce a false positive with bugpoint.

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

13 years agoUse ArrayRef instead of an explicit 'const std::vector &'.
Bill Wendling [Tue, 20 Sep 2011 19:05:04 +0000 (19:05 +0000)]
Use ArrayRef instead of an explicit 'const std::vector &'.

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

13 years agoIf simple ownership works then friendship is not required.
Devang Patel [Tue, 20 Sep 2011 18:48:56 +0000 (18:48 +0000)]
If simple ownership works then friendship is not required.

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

13 years agoUse ArrayRef instead of 'const std::vector' to pass around the list of basic blocks...
Bill Wendling [Tue, 20 Sep 2011 18:42:07 +0000 (18:42 +0000)]
Use ArrayRef instead of 'const std::vector' to pass around the list of basic blocks to extract.

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