Commit Graph

107892 Commits

Author SHA1 Message Date
Benjamin Kramer 8665f8d916 Revert a part of r126557 which could create unschedulable DAGs.
llvm-svn: 134067
2011-06-29 13:47:25 +00:00
David Chisnall 91f5b811ff Make ARC support default to true. Please can we stop making Objective-C runtime features part of the platform description? This only makes sense for Darwin.
llvm-svn: 134066
2011-06-29 13:17:23 +00:00
David Chisnall 920e83b00b Add ARC support for the GNUstep runtime.
llvm-svn: 134065
2011-06-29 13:16:41 +00:00
Francois Pichet 2ac15f4a5d Change AsmName's type from StringRef to std::string. AsmName was pointing to a temporary string object that was destroyed. This is undefined behavior and MSVC didn't like it.
This fixes over 300+ failing tests on MSVC.
Credit for this fix goes to chapuni.

llvm-svn: 134064
2011-06-29 11:25:34 +00:00
Eli Friedman 4774b7e456 We don't pass classes with a copy-constructor or destructor byval, so the address takes up an integer register (if one is available). Make sure the x86-64 ABI implementation takes that into account properly.
The fixed implementation is compatible with the implementation both gcc and llvm-gcc use.

rdar://9686430 . (This is the issue that was reported in the thread "[LLVMdev] Segfault calling LLVM libs from a clang-compiled executable".)

llvm-svn: 134059
2011-06-29 07:04:55 +00:00
Rafael Espindola 4c0dfcec7e Let simplify cfg simplify bb with only debug and lifetime intrinsics.
llvm-svn: 134057
2011-06-29 05:25:47 +00:00
Enrico Granata 595ca06397 just a test for commit access - ignore this
llvm-svn: 134056
2011-06-29 04:18:11 +00:00
NAKAMURA Takumi 7e26682c71 Fix CMake build.
llvm-svn: 134055
2011-06-29 03:26:17 +00:00
Andrew Trick efe2b1963d indvars -disable-iv-rewrite: just because SCEV ignores casts doesn't
mean they can be removed.

llvm-svn: 134054
2011-06-29 03:13:40 +00:00
Jakob Stoklund Olesen 8628435c06 Revert r134047 while investigating a llvm-gcc-i386-linux-selfhost
miscompile.

llvm-svn: 134053
2011-06-29 02:03:36 +00:00
Evan Cheng fbaa5b1077 Revert accidental commit.
llvm-svn: 134052
2011-06-29 01:23:25 +00:00
Evan Cheng eeb486dda5 SubtargetFeature.h has been moved to MC.
llvm-svn: 134050
2011-06-29 01:14:32 +00:00
Evan Cheng 8264e272a9 Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Evan Cheng 6502f0094e Trim include
llvm-svn: 134048
2011-06-29 00:35:31 +00:00
Jakob Stoklund Olesen ffbc05b715 Rewrite RAGreedy::splitAroundRegion, now with cool ASCII art.
This function has to deal with a lot of special cases, and the old
version got it wrong sometimes. In particular, it would sometimes leave
multiple uses in the stack interval in a single block. That causes bad
code with multiple reloads in the same basic block.

The new version handles block entry and exit in a single pass. It first
eliminates all the easy cases, and then goes on to create a local
interval for the blocks with difficult interference. Previously, we
would only create the local interval for completely isolated blocks.

It can happen that the stack interval becomes completely empty because
we could allocate a register in all edge bundles, and the new local
intervals deal with the interference. The empty stack interval is
harmless, but we need to remove a SplitKit assertion that checks for
empty intervals.

llvm-svn: 134047
2011-06-29 00:24:24 +00:00
Johnny Chen 8ebed74e6e Add fuzz calls for SBTarget and SBThread.
llvm-svn: 134046
2011-06-29 00:05:40 +00:00
Fariborz Jahanian fc510bdd94 Under a compiler flag, -freset-local-blocks,
wipe out stack blocks when they go out of scope.
// rdar://9227352

llvm-svn: 134045
2011-06-28 23:51:26 +00:00
Johnny Chen c74ed6b0de Add fuzz calls for SBSymbol and SBSymbolContext.
llvm-svn: 134042
2011-06-28 23:38:38 +00:00
Daniel Dunbar 421bb42c9f Revert r133024, "[format strings] correctly suggest correct type for '%@'
specifiers.  Fixes <rdar://problem/9607158>." because it causes false positives
on some code that uses CF toll free bridging.
 - I'll let Doug or Ted figure out the right fix here, possibly just to accept
   any pointer type.

llvm-svn: 134041
2011-06-28 23:33:55 +00:00
Johnny Chen dedd7d6ed6 Add fuzz calls for SBStringList and add obj.Clear() calls for some files.
llvm-svn: 134040
2011-06-28 23:29:14 +00:00
Chandler Carruth 8ea21dc2af Update this test to reflect the new (deterministic) order in r134038.
This was part of Kaelyn's original patch that got dropped while I was
working on it, but after I ran my tests. =/ Sorry.

llvm-svn: 134039
2011-06-28 22:58:10 +00:00
Chandler Carruth 7d85c9b6b2 Fix non-determinism in selecting between equal-length names which refer
to the same declaration when correcting typos. This is done by
essentially sorting the corrections as they're added.

Original patch by Kaelyn Uhrain, but modified for style and correctness
by accounting for more than just the textual spelling.

This still is a bit of a WIP hack to make this deterministic. Kaelyn
(and myself) are working on a more principled solution going forward.

llvm-svn: 134038
2011-06-28 22:48:40 +00:00
Johnny Chen a25bf6efb5 Add fuzz calls for SBModule and SBProcess.
llvm-svn: 134037
2011-06-28 22:32:15 +00:00
Daniel Dunbar d1c487cd00 build/Darwin: Fix epic typo fail.
llvm-svn: 134036
2011-06-28 22:30:17 +00:00
Chad Rosier c8a215f251 Modify test case to allow buildbots to make forward progress. This test should
now (incorrectly) pass.  Once the appropriate fixes have been made this test
should be reverted.

llvm-svn: 134035
2011-06-28 22:29:53 +00:00
NAKAMURA Takumi 6fbc1cd198 Fix a CMake warning, following up to r134008.
llvm-svn: 134033
2011-06-28 21:46:21 +00:00
Chandler Carruth b198e5a911 Fix an invalid use of ::back() on an newly emptied vector. Also tighten
up several places where we never expect to have NULL pointers to assert
early.

This fixes a valgrind error within CorrectTypo, but not the
non-determinism.

llvm-svn: 134032
2011-06-28 21:43:34 +00:00
Evan Cheng d051f0a837 Unbreak every backend.
llvm-svn: 134031
2011-06-28 21:33:11 +00:00
Evan Cheng 194c3dc01f Move CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.
llvm-svn: 134030
2011-06-28 21:14:33 +00:00
Johnny Chen 4e77f6f499 Add fuzz calls for SBListener.
llvm-svn: 134029
2011-06-28 20:57:22 +00:00
Johnny Chen 520eeff0ef Add fuzz calls for SBLineEntry.
llvm-svn: 134028
2011-06-28 20:46:03 +00:00
Evan Cheng 0beca53a29 Hide more details in tablegen generated MCRegisterInfo ctor function.
llvm-svn: 134027
2011-06-28 20:44:22 +00:00
Evan Cheng df8974ef2f Add MCInstrInfo registeration machinery.
llvm-svn: 134026
2011-06-28 20:29:03 +00:00
Daniel Dunbar 044a3908ef Driver/Darwin: -force_load can be specified multiple times.
llvm-svn: 134025
2011-06-28 20:16:02 +00:00
Evan Cheng 1e210d08d8 Merge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc
llvm-svn: 134024
2011-06-28 20:07:07 +00:00
Johnny Chen 6638174378 Add @expectedFailure for TestCallStdStringFunction.py (radar was filed) and
remove @expectedFailure from TestObjCMethods.py's print_ivars_correctly()
function (it has been passing for a while).

llvm-svn: 134022
2011-06-28 19:39:19 +00:00
Evan Cheng 6cc775f905 - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.

llvm-svn: 134021
2011-06-28 19:10:37 +00:00
Johnny Chen 6f306a4859 Add fuzz calls for SBInstruction and SBInstructionList.
llvm-svn: 134020
2011-06-28 19:07:02 +00:00
Greg Clayton b10d72f019 Remove the disassembly option: "eOptionShowCurrentLine" and replaced it with
two:

eOptionMarkPCSourceLine = (1u << 2), // Mark the source line that contains the current PC (mixed mode only)
eOptionMarkPCAddress    = (1u << 3)  // Mark the disassembly line the contains the PC

This allows mixed mode to show the line that contains the current PC, and it
allows us to mark the PC address in the disassembly if desired. Having these
be separate gives more control on the disassembly output. SBFrame::Disassemble()
doesn't enable any of these options.

llvm-svn: 134019
2011-06-28 19:01:40 +00:00
Jakob Stoklund Olesen 7297e7e223 Clean up the handling of the x87 fp stack to make it more robust.
Drop the FpMov instructions, use plain COPY instead.

Drop the FpSET/GET instruction for accessing fixed stack positions.
Instead use normal COPY to/from ST registers around inline assembly, and
provide a single new FpPOP_RETVAL instruction that can access the return
value(s) from a call. This is still necessary since you cannot tell from
the CALL instruction alone if it returns anything on the FP stack. Teach
fast isel to use this.

This provides a much more robust way of handling fixed stack registers -
we can tolerate arbitrary FP stack instructions inserted around calls
and inline assembly. Live range splitting could sometimes break x87 code
by inserting spill code in unfortunate places.

As a bonus we handle floating point inline assembly correctly now.

llvm-svn: 134018
2011-06-28 18:32:28 +00:00
Chad Rosier 772a91f8e4 Reinstate r133516 "Remove some unnecessary uses of c_str()." A trailing null
character in std::string was causing failures for a few ObjC and Obj-C++ tests
when -flto was enabled.  Revision 133999 resolved this issue. Thanks Jay!
rdar://9685235
PR10210

llvm-svn: 134017
2011-06-28 18:26:12 +00:00
Eric Christopher fd9a5f4f66 Split out logic for valid clobbers and valid inline asm registers.
Fixes rdar://9281377

llvm-svn: 134016
2011-06-28 18:20:53 +00:00
Fariborz Jahanian b26d578b41 Eliminate most uses of ShallowCollectObjCIvars which requires
a vector for collection. Use iterators where needed instead.
// rdar://6817577

llvm-svn: 134015
2011-06-28 18:05:25 +00:00
Chad Rosier 6b610b387d Remove warning: 'c0' may be used uninitialized in this function.
llvm-svn: 134014
2011-06-28 17:26:57 +00:00
Jakob Stoklund Olesen a1dceb0e3c Print registers by name instead of by number.
llvm-svn: 134013
2011-06-28 17:24:32 +00:00
John McCall 15547bbdd1 Be more thorough about mangling unresolved types.
llvm-svn: 134011
2011-06-28 16:49:23 +00:00
Andrew Trick 4426f5b388 cleanup: misleading comment.
llvm-svn: 134010
2011-06-28 16:45:04 +00:00
Douglas Gregor 29cdc6bec0 Dynamically allocate the StringMaps used in typo correction so that we
don't rely on the existence of a copy constructor.

llvm-svn: 134009
2011-06-28 16:44:39 +00:00
Andrew Trick b46fdac460 cmake: Our MSVC build does not support config-time build mode.
llvm-svn: 134008
2011-06-28 16:32:01 +00:00
Douglas Gregor c2fa169d6c Add support for C++ namespace-aware typo correction, e.g., correcting
vector<int>

to

  std::vector<int>

Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.

Thanks Kaelyn!

llvm-svn: 134007
2011-06-28 16:20:02 +00:00