Commit Graph

97728 Commits

Author SHA1 Message Date
Greg Clayton d695334156 Fixed a crasher in the DWARF log channel code.
llvm-svn: 121810
2010-12-14 23:43:15 +00:00
Bill Wendling 5ab38b59e6 Comments and cleaning.
llvm-svn: 121809
2010-12-14 23:42:48 +00:00
Bill Wendling 00adcd6ed9 Make the ISel selections for LDR/STR the same as before the LDRr/LDRi split. In
particular, we want

   ldr r2, [r3]

to be equivalent to

   ldr r2, [r3, #0]

and not

   ldr r2, [r3, r0]

llvm-svn: 121808
2010-12-14 23:40:49 +00:00
Jakob Stoklund Olesen 0b7ca3a6a7 Simplify RegAllocGreedy's use of register aliases.
llvm-svn: 121807
2010-12-14 23:38:19 +00:00
Jakob Stoklund Olesen 47b93401d8 Simplify CCState's use of register aliases.
llvm-svn: 121806
2010-12-14 23:28:01 +00:00
Jakob Stoklund Olesen be1c8d3a82 Simplify AggressiveAntiDepBreaker's use of register aliases.
llvm-svn: 121805
2010-12-14 23:23:15 +00:00
Greg Clayton 48ebb0c767 Updated the code signing instructions to be more complete.
llvm-svn: 121804
2010-12-14 23:19:04 +00:00
Greg Clayton 30ddd1d012 Removed unused files that were out of date and causing issues with the
linux build.

llvm-svn: 121803
2010-12-14 23:13:51 +00:00
Johnny Chen c12a1893d2 Execute the test case teardown hooks in a LIFO (last in, first out) order.
ALso add a teardown hook to the LoadUnloadTestCase.test_dyld_library_path()
test case to have it restore the DYLD_LIBRARY_PATH environment variable.

llvm-svn: 121802
2010-12-14 23:13:03 +00:00
Jakob Stoklund Olesen 6a5bf7782a Simplyfy RegAllocBasic by using getOverlaps instead of getAliasSet.
llvm-svn: 121801
2010-12-14 23:10:48 +00:00
Jakob Stoklund Olesen 757f0e37ea Introduce TargetRegisterInfo::getOverlaps(Reg), returning a list of all
registers that alias Reg, including itself. This is almost the same as the
existing getAliasSet() method, except for the inclusion of Reg.

The name matches the reflexive TRI::regsOverlap(x, y) relation.

It is very common to do stuff to a register and all its aliases:

  stuff(Reg)
  for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias)
    stuff(*Alias);

That can now be written as the simpler:

  for (const unsigned *Alias = TRI->getOverlaps(Reg); *Alias; ++Alias)
    stuff(*Alias);

This change requires a bit more constant space for the alias lists because Reg
is included and because the empty alias list cannot be shared any longer.

If the getAliasSet method is eventually removed, this space can be reclaimed by
sharing overlap lists. For instance, %rax and %eax have identical overlap sets.

llvm-svn: 121800
2010-12-14 23:03:42 +00:00
Jim Grosbach 509dc2a700 Add support for MC-ized encoding of tLEApcrel and tLEApcrelJT. rdar://8755755
llvm-svn: 121798
2010-12-14 22:28:03 +00:00
Bill Wendling 6ea3053824 Fix comment.
llvm-svn: 121797
2010-12-14 22:26:49 +00:00
Johnny Chen ea7215f5f8 Added a test case LoadUnloadTestCase.test_dyld_library_path to test launching a process
linked with a dylib which has been relocated by specifying the DYLD_LIBRARY_PATH environment
variable.  Test that the function name breakpoint defined in the dylib is resolved.

llvm-svn: 121796
2010-12-14 22:26:34 +00:00
Abramo Bagnara 6d8106386c Added missing IgnoreParens().
llvm-svn: 121795
2010-12-14 22:11:44 +00:00
Bill Wendling ce4f87b3ba Multiclassify the LDR/STR encoding patterns. The only functionality difference
is the addition of the FoldableAsLoad & Rematerializable flags to some of the
load instructions. ARM has these flags set for them.

llvm-svn: 121794
2010-12-14 22:10:49 +00:00
Evan Cheng 19dc77cec6 Fix a minor bug in two-address pass. It was missing a commute opportunity.
regB = move RCX
regA = op regB, regC
RAX  = move regA
where both regB and regC are killed. If regB is constrainted to non-compatible
physical registers but regC is not constrainted at all, then it's better to
commute the instruction.
       movl    %edi, %eax
       shlq    $32, %rcx
       leaq    (%rcx,%rax), %rax
=>
       movl    %edi, %eax
       shlq    $32, %rcx
       orq     %rcx, %rax
rdar://8762995

llvm-svn: 121793
2010-12-14 21:34:53 +00:00
Jim Grosbach d96bd53d04 trailing whitespace
llvm-svn: 121792
2010-12-14 21:28:29 +00:00
Matt Beaumont-Gay 86a05d0bed Move debugging code entirely within DEBUG(). Silences an unused variable
warning in the opt build.

llvm-svn: 121791
2010-12-14 21:14:55 +00:00
Jim Grosbach 8c1fabe367 Refactor a bit for legibility.
llvm-svn: 121790
2010-12-14 21:10:47 +00:00
Jim Grosbach 2fc6561102 trailing whitespace.
llvm-svn: 121789
2010-12-14 20:46:39 +00:00
Jim Grosbach 96254146cf Make sure to propagate the predicate operands for LEApcrel to ADR.
llvm-svn: 121788
2010-12-14 20:45:47 +00:00
Jim Ingham fe0c425308 Fix the completion of "fr " and the like.
llvm-svn: 121785
2010-12-14 19:56:01 +00:00
Owen Anderson f636a64bfe Fix a small bug (typo?) in the fixup for Thumb1 CBZ/CBNZ instructions.
llvm-svn: 121784
2010-12-14 19:42:53 +00:00
Jakob Stoklund Olesen 5c3ad0d51e Add LiveIntervalUnion print methods, RegAllocGreedy::trySplit debug spew.
llvm-svn: 121783
2010-12-14 19:38:49 +00:00
Johnny Chen 94f928b83f Modify test cases to accomodate Python API change:
o SBFrame.LookupVar -> FindVariable
o SBFrame.LookupVarInScope -> FindValue

llvm-svn: 121782
2010-12-14 18:59:15 +00:00
Jakob Stoklund Olesen d5e38383e0 Use TRI::printReg instead of AbstractRegisterDescription when printing
LiveIntervalUnions.

llvm-svn: 121781
2010-12-14 18:53:47 +00:00
Jakob Stoklund Olesen 2dd1ee5fd5 Add TargetRegisterInfo::printReg() to pretty-print registers.
llvm-svn: 121780
2010-12-14 18:53:39 +00:00
Caroline Tice 472362e6ed Fix small bugs:
- Make sure cmd_obj & cmd_obj_sp contain a valid objects before attempting to 
dereference, in CommandObjectCommandsAlias::Execute and 
CommandInterpreter::HandleCommand.

- Modify CommandInterpreter::GetCommandSPExact to properly handle
multi-word command inputs.

llvm-svn: 121779
2010-12-14 18:51:39 +00:00
Jim Grosbach 41955ff958 ARM Fixups relative to thumb functions need to have the low bit of the value
set for interworking to work properly. rdar://8755956

llvm-svn: 121778
2010-12-14 18:46:57 +00:00
Greg Clayton 69b582fa94 Changed:
SBValue SBFrame::LookupVar(const char *name);
To
	SBValue SBFrame::FindVariable (const char *name);

Changed:
	SBValue LookupVarInScope (const char *name, const char *scope);
to
	SBValue FindValue (const char *name, ValueType value_type);

The latter makes it possible to not only find variables (params, locals, globals, and statics), but we can also now get register sets, registers and persistent variables using the frame as the context.

llvm-svn: 121777
2010-12-14 18:39:31 +00:00
John McCall fcef3cf510 Rewrite ComplexExprEvaluator::VisitCastExpr to use cast kinds, and fix
the basic casting logic to insert intermediate casts and preserve the
exact complex-cast design.  Fixes a crash in the test suite.

llvm-svn: 121776
2010-12-14 17:51:41 +00:00
Johnny Chen 6b4896fddb Change the golden output so that merely evaluating an existing persistent variable
does not result in a newly created persistent variable.  The old one is returned,
instead.

llvm-svn: 121775
2010-12-14 17:48:26 +00:00
Jakob Stoklund Olesen e7ee72087e Q.seenAllInterferences() must be called after Q.collectInterferingVRegs().
llvm-svn: 121774
2010-12-14 17:47:36 +00:00
Johnny Chen e85d9cb8e2 Fixed rdar://problem/8767055 test suite failure TestStaticVariables.py (ToT r121745).
Populate the variable list from the stack frame, first.

llvm-svn: 121773
2010-12-14 17:40:04 +00:00
Daniel Dunbar a9b9300bb8 MC/ARM: Fix-up fixup offset for fixup_arm_branch target specific fixup.
llvm-svn: 121772
2010-12-14 17:37:16 +00:00
Douglas Gregor 16ac0ad8b4 Minor fix for clang-completion-mode, from Dve Abrahams
llvm-svn: 121771
2010-12-14 16:52:29 +00:00
John McCall ed72e292c9 Improve some comments, shrink FunctionType::ExtInfo, and fix a bug found
by valgrind where we were doing the wrong thing in the presence of invalid
exception specs.

llvm-svn: 121770
2010-12-14 16:45:57 +00:00
Jim Grosbach e34793e960 Trailing whitespace
llvm-svn: 121769
2010-12-14 16:25:15 +00:00
Douglas Gregor e350923a9b Fix documentation typo, from nobled.
llvm-svn: 121768
2010-12-14 16:21:49 +00:00
Bill Wendling 6dd0c07622 Use the integer scheduling intrinsic for integer loads and stores.
llvm-svn: 121765
2010-12-14 12:33:05 +00:00
Chris Lattner 7499b452c1 - Insert new instructions before DomBlock's terminator,
which is simpler than finding a place to insert in BB.
 - Don't perform the 'if condition hoisting' xform on certain
   i1 PHIs, as it interferes with switch formation.

This re-fixes "example 7", without breaking the world hopefully.

llvm-svn: 121764
2010-12-14 08:46:09 +00:00
John McCall db40c7f573 Restore r121752 without modification.
llvm-svn: 121763
2010-12-14 08:05:40 +00:00
Chris Lattner 335f0e4ad4 fix two significant issues with FoldTwoEntryPHINode:
first, it can kick in on blocks whose conditions have been
folded to a constant, even though one of the edges will be
trivially folded.

second, it doesn't clean up the "if diamond" that it just 
eliminated away.  This is a problem because other simplifycfg
xforms kick in depending on the order of block visitation,
causing pointless work.

llvm-svn: 121762
2010-12-14 08:01:53 +00:00
Chris Lattner dc20a7d38c remove the instsimplify logic I added in r121754. It is apparently
breaking the selfhost builds, though I can't fathom how.

llvm-svn: 121761
2010-12-14 07:53:03 +00:00
Chris Lattner 9ac168d0ab clean up logic, convert std::set to SmallPtrSet, handle the case
when all 2-entry phis are simplified away.

llvm-svn: 121760
2010-12-14 07:41:39 +00:00
John McCall 5546da68bb Pull out r121752 in case it's causing the selfhost breakage.
llvm-svn: 121759
2010-12-14 07:30:51 +00:00
Chris Lattner 9fd838d31b tidy up a bit, move DEBUG down to when we commit to doing the transform so we
don't print it unless the xform happens.

llvm-svn: 121758
2010-12-14 07:23:10 +00:00
Chris Lattner b42d293faa use SimplifyInstruction instead of reimplementing part of it.
llvm-svn: 121757
2010-12-14 07:20:29 +00:00
Chris Lattner fb73de482c simplify GetIfCondition by using getSinglePredecessor.
llvm-svn: 121756
2010-12-14 07:15:21 +00:00