Commit Graph

107984 Commits

Author SHA1 Message Date
Jim Grosbach 89bbfc434a ARM assembler support for ldmfd/stmfd mnemonics.
llvm-svn: 133936
2011-06-27 20:32:18 +00:00
Eric Christopher aff7ed55bc Allow lr in the register options here.
llvm-svn: 133935
2011-06-27 20:31:01 +00:00
Bob Wilson cbf87061d3 Minor grammatical fix for error message. Radar 9681093.
llvm-svn: 133934
2011-06-27 20:25:49 +00:00
Johnny Chen 89109ed13c Add TestPrintObj.py to go with lang/objc/print-objc, which:
Test "print object" where another thread blocks the print object from making progress.

Set a breakpoint on the line in my_pthread_routine.  Then switch threads
to the main thread, and do print the lock_me object.  Since that will
try to get the lock already gotten by my_pthread_routime thread, it will
have to switch to running all threads, and that should then succeed.

llvm-svn: 133933
2011-06-27 20:05:23 +00:00
Jim Grosbach 29882a75eb ARM assembler support for vpush/vpop.
Add aliases for the vpush/vpop mnemonics to the VFP load/store multiple
writeback instructions w/ SP as the base pointer.

rdar://9683231

llvm-svn: 133932
2011-06-27 20:00:07 +00:00
Nico Weber 8aba2d8014 Revert parts of r133860 to fix a crash. Add a test.
llvm-svn: 133931
2011-06-27 19:46:54 +00:00
Argyrios Kyrtzidis d289104e29 [libclang] Avoid having the cursor of an expression replace the declaration cursor
when the expression source range overlaps the declaration range.

This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:

  MyCXXClass foo; // Make sure pointing at 'foo' returns a VarDecl cursor.

rdar://9124499.

llvm-svn: 133930
2011-06-27 19:42:23 +00:00
Argyrios Kyrtzidis 66cd1dacbc [libclang] Avoid having the cursor of an expression "overwrite" the annotation of the
variable declaration that it belongs to.

This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:

  MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor.

rdar://9124499.

llvm-svn: 133929
2011-06-27 19:42:20 +00:00
Evan Cheng c8b39c7952 Rename unnecessary forward declaration.
llvm-svn: 133928
2011-06-27 19:41:39 +00:00
Evan Cheng 2977f0ade3 More refactoring. MC doesn't need know about subreg indices.
llvm-svn: 133927
2011-06-27 19:24:13 +00:00
Bill Wendling 087605809a libprofile_rt may be installed as a dylib on Darwin.
If we cannot find the static library, use the dylib instead.

llvm-svn: 133926
2011-06-27 19:15:03 +00:00
Jim Grosbach b5ee311602 ARM Assembly syntax support for arithmetic implied dest operand.
When the destination operand is the same as the first source register
operand for arithmetic instructions, the destination operand may be omitted.

For example, the following two instructions are equivalent:
  sub r2, r2, #6
  sub r2, #6

rdar://9682597

llvm-svn: 133925
2011-06-27 19:09:15 +00:00
Douglas Gregor db1ab7dccf Reduce the size of the ExtInfo bitfield in FunctionType from 9 bits
down to 8 by restricting the maximum allowed regparm value to 6
(previously it was 7). I need the extra bit in Type to handle
instantiation-dependence.

llvm-svn: 133924
2011-06-27 18:45:19 +00:00
Owen Anderson b0a5a1ee29 The index stored in the RegDefIter is one after the current index. When getting the index, decrement it so that it points to the current element. Fixes an off-by-one bug encountered when trying to make use of MVT::untyped.
llvm-svn: 133923
2011-06-27 18:34:12 +00:00
Evan Cheng d9997acd14 Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.inc
into XXXGenRegisterInfo.inc.

llvm-svn: 133922
2011-06-27 18:32:37 +00:00
Johnny Chen 1e256d2ac6 Simplified Makefile.
llvm-svn: 133921
2011-06-27 18:32:19 +00:00
Johnny Chen 43730185e0 Move sample objc program to reside under lang/objc.
llvm-svn: 133920
2011-06-27 18:30:03 +00:00
Johnny Chen fd70999bb4 Move top level test dirs platform and inferior-crashing to reside under functionalities and order to reside under macosx.
llvm-svn: 133919
2011-06-27 18:25:00 +00:00
Johnny Chen 85f21f2029 Move top level test dirs inlined_breakpoints, load_unload, and embedded_interpreter to reside under functionalities.
llvm-svn: 133918
2011-06-27 18:17:24 +00:00
Andrew Trick 31f25bc66f pre-RA-sched: Cleanup register pressure tracking.
Removed the check that peeks past EXTRA_SUBREG, which I don't think
makes sense any more. Intead treat it as a normal register def. No
significant affect on x86 or ARM benchmarks.

llvm-svn: 133917
2011-06-27 18:01:20 +00:00
Jakob Stoklund Olesen f68976071d Move all inline-asm-fpstack tests to a single file.
Also fix some of the tests that were actually testing wrong behavior -
An input operand in {st} is only popped by the inline asm when {st} is
also in the clobber list.

The original bug reports all had ~{st} clobbers as they should.

llvm-svn: 133916
2011-06-27 17:27:37 +00:00
Douglas Gregor 3bdcff5866 When instantiating a C++ "new" expression, don't fake source locations
for the '(' and ')' around the initializer unless we actually have an
initializer. Fixes PR10197, an issue where we were value-initializing
rather than default-initializing.

llvm-svn: 133913
2011-06-27 16:55:54 +00:00
Chandler Carruth 4cc3f296a9 Cleanup a fixme by using a specific diagnostic for subscripting
a pointer to void.

llvm-svn: 133912
2011-06-27 16:32:27 +00:00
Douglas Gregor 7a20096874 Improve header search for MinGW(-w64), from Ruben Van Boxem!
llvm-svn: 133911
2011-06-27 15:47:15 +00:00
Jakob Stoklund Olesen 79f1b714a2 Track live-out physical registers in MachineDCE.
Patch by Sanjoy Das!

llvm-svn: 133910
2011-06-27 15:00:36 +00:00
Chandler Carruth 5925926a2f Fix missing braces around two statements that were intended to be part
of a single if block. This is really annoying to track down and test.
Silly changes to the test case caused it to stop showing up. I wish
there were a more concrete way of asserting that a note attaches to the
intended diagnostic.

This fixes PR10195.

llvm-svn: 133907
2011-06-27 08:31:58 +00:00
Chandler Carruth c933221826 Factor out (some of) the checking for invalid forms of pointer
arithmetic into a couple of common routines. Use these to make the
messages more consistent in the various contexts, especially in terms of
consistently diagnosing binary operators with invalid types on both the
left- and right-hand side. Also, improve the grammar and wording of the
messages some, handling both two pointers and two (different) types.

The wording of function pointer arithmetic diagnostics still strikes me
as poorly phrased, and I worry this makes them slightly more awkward if
more consistent. I'm hoping to fix that with a follow-on patch and test
case that will also make them more helpful when a typedef or template
type parameter makes the type completely opaque.

Suggestions on better wording are very welcome, thanks to Richard Smith
for some initial help on that front.

llvm-svn: 133906
2011-06-27 08:02:19 +00:00
Nick Lewycky a61df3f843 Teach one piece of scalarrepl to handle lifetime markers. When transforming an
alloca that only holds a copy of a global and we're going to replace the users
of the alloca with that global, just nuke the lifetime intrinsics. Part of
PR10121.

llvm-svn: 133905
2011-06-27 05:40:02 +00:00
Nick Lewycky 3e334a42d7 Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by other
passes as well.

llvm-svn: 133904
2011-06-27 04:20:45 +00:00
Jakob Stoklund Olesen ff653a2eed Grow the X86FloatingPoint register map to hold 16 registers.
This allows for more live scratch registers which is needed to handle
live ST registers before return and inline asm instructions.

llvm-svn: 133903
2011-06-27 04:08:36 +00:00
Jakob Stoklund Olesen 537a302d1a Distinguish early clobber output operands from clobbered registers.
Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we
now use two different asm operand kinds.

The new Kind_Clobber is treated identically to the old
Kind_RegDefEarlyClobber for now, but x87 floating point stack inline
assembly does care about the difference.

This will pop a register off the stack:

  asm("fstp %st" : : "t"(x) : "st");

While this will pop the input and push an output:

  asm("fst %st" : "=&t"(r) : "t"(x));

We need to know if ST0 was a clobber or an output operand, and we can't
depend on <dead> flags for that.

llvm-svn: 133902
2011-06-27 04:08:33 +00:00
Jakob Stoklund Olesen 6b356b18b4 Decode and pretty print inline asm operand descriptors.
The INLINEASM MachineInstrs have an immediate operand describing each
original inline asm operand. Decode the bits in MachineInstr::print() so
it is easier to read:

  INLINEASM <es:rorq $1,$0>, $0:[regdef], %vreg0<def>, %vreg1<def>, $1:[imm], 1, $2:[reguse] [tiedto:$0], %vreg2, %vreg3, $3:[regdef-ec], %EFLAGS<earlyclobber,imp-def>

llvm-svn: 133901
2011-06-27 04:08:29 +00:00
Rafael Espindola 2cf9489cf6 Remove unused methods.
llvm-svn: 133900
2011-06-26 22:44:34 +00:00
Rafael Espindola 676c405acb There is only one register coalescer. Merge it into the base class and
remove the analysis group.

llvm-svn: 133899
2011-06-26 22:34:10 +00:00
Richard Smith 95ce4f67a3 Fix PR10187: when diagnosing a two-phase-lookup-related failure, don't assert that any names we find are valid candidates for the call.
llvm-svn: 133898
2011-06-26 22:19:54 +00:00
Rafael Espindola ea1a9c342d Merge SimpleRegisterCoalescing.cpp into RegisterCoalescer.cpp.
llvm-svn: 133897
2011-06-26 22:06:36 +00:00
Rafael Espindola 14a314b1c6 merge SimpleRegisterCoalescing.h into RegisterCoalescer.h.
llvm-svn: 133896
2011-06-26 21:54:28 +00:00
Rafael Espindola fef3c64a1f Move RegisterCoalescer.h to lib/CodeGen.
llvm-svn: 133895
2011-06-26 21:41:06 +00:00
Johnny Chen 2027e2af21 Move more top level test dirs to reside under functionalities dir.
llvm-svn: 133894
2011-06-26 21:36:28 +00:00
Johnny Chen 1429bcb330 A couple of directory renamings; get rid of 'tests' from the directory names.
llvm-svn: 133893
2011-06-26 21:27:27 +00:00
Johnny Chen 436975b26c Move some top level directories to reside under functionalities dir.
llvm-svn: 133892
2011-06-26 21:24:46 +00:00
Johnny Chen e9d979f463 Create new directory named 'functionalities' to house some existing top level directories.
llvm-svn: 133891
2011-06-26 21:11:46 +00:00
Johnny Chen a9dd83be4b Move hello_world to now reside under python_api dir.
llvm-svn: 133890
2011-06-26 20:59:36 +00:00
Johnny Chen 4ad8edd10f Simplified the test cases, before moving the file to reside under python_api dir.
llvm-svn: 133889
2011-06-26 20:48:37 +00:00
Rafael Espindola 4c9613c5e5 Remove unnecessary wrapper.
llvm-svn: 133886
2011-06-26 19:47:36 +00:00
Johnny Chen 8d798eb3c6 Move struct_types, stepping, and set_values dirs to now reside under lang/c.
Move stl dir to now reside under lang/cpp.

llvm-svn: 133884
2011-06-25 21:07:03 +00:00
Johnny Chen 23beac3368 Move global_variables dir to lang/c and foundation dir to lang/objc.
llvm-svn: 133883
2011-06-25 20:55:22 +00:00
Johnny Chen 04d9e8323e Move test dirs forward and function_types to now reside under lang/c.
llvm-svn: 133882
2011-06-25 20:49:06 +00:00
Johnny Chen fb8cd3712a Move some directories to now reside under lang/c or lang/cpp.
llvm-svn: 133881
2011-06-25 20:43:57 +00:00
Johnny Chen 6684b1e19a Move enum_types to now reside under lang/c.
llvm-svn: 133880
2011-06-25 20:29:41 +00:00