Commit Graph

107928 Commits

Author SHA1 Message Date
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
Douglas Gregor d79f9666c8 Fix test case; we may end up linking against the libprofile_rt dylib.
llvm-svn: 134006
2011-06-28 15:40:31 +00:00
Roman Divacky 4394e68c24 Implement ISD::VAARG lowering on PPC32.
llvm-svn: 134005
2011-06-28 15:30:42 +00:00
Jay Foad 2a31eb49c7 PR10210: New method ConstantArray::getAsCString(). Use it in LTO to
avoid getting embedded trailing null bytes in std::strings.

llvm-svn: 133999
2011-06-28 08:24:19 +00:00
Andrew Trick 9083ef1918 FileCheckify and prepare for -disable-iv-rewrite.
llvm-svn: 133998
2011-06-28 06:34:10 +00:00
Jakob Stoklund Olesen 74dd400410 FileCheckize a couple of tests.
Also and add a test for popping dead return values and avoid testing the
spill precision.

llvm-svn: 133997
2011-06-28 06:25:03 +00:00
Andrew Trick 526605d06f Cleanup. Fix a stupid variable name.
llvm-svn: 133996
2011-06-28 05:44:06 +00:00
Andrew Trick 154d78a661 Cleanup. Fix a stupid variable name.
llvm-svn: 133995
2011-06-28 05:41:52 +00:00
Jordy Rose 7770a8c6c5 [analyzer] strnlen isn't a builtin, don't test for it
llvm-svn: 133994
2011-06-28 05:34:40 +00:00
Chris Lattner ac57f21cd1 Fix PR9279 - Macro expansion stack trace seriously broken with function-style macros, by not recursively printing notes for other 'instantiated from' notes.
This is a one line fix here:
+      // Don't print recursive instantiation notes from an instantiation note.
+      Loc = SM.getSpellingLoc(Loc);

While here, fix the testcase to be more precise (it got filecheck'ized
brutally), and fix EmitCaretDiagnostic to be private and to not pass down
the unused 'Level' argument.

llvm-svn: 133993
2011-06-28 05:11:33 +00:00
Andrew Trick 411daa5e81 SCEVExpander: give new insts a name that identifies the reponsible pass.
llvm-svn: 133992
2011-06-28 05:07:32 +00:00
Andrew Trick 60ab3efb3e whitespace
llvm-svn: 133991
2011-06-28 05:04:16 +00:00
Nick Lewycky fa44dc6509 Fix typo in comment.
llvm-svn: 133990
2011-06-28 03:57:31 +00:00
Rafael Espindola 09932bd5b6 Fix cmake build.
llvm-svn: 133989
2011-06-28 03:17:03 +00:00
Andrew Trick 56b315a9cf indvars --disable-iv-rewrite: sever ties with IVUsers.
llvm-svn: 133988
2011-06-28 03:01:46 +00:00