oota-llvm.git
14 years agoMention an API change.
Duncan Sands [Wed, 17 Feb 2010 17:20:17 +0000 (17:20 +0000)]
Mention an API change.

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

14 years agoPacify gcc-4.5, which warns (correctly) that these switches have
Duncan Sands [Wed, 17 Feb 2010 14:52:22 +0000 (14:52 +0000)]
Pacify gcc-4.5, which warns (correctly) that these switches have
cases that are not part of the enum.

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

14 years agoRevert:
Eric Christopher [Wed, 17 Feb 2010 08:53:27 +0000 (08:53 +0000)]
Revert:
r95605 | dpatel | 2010-02-08 15:27:46 -0800 (Mon, 08 Feb 2010) | 2 lines

test case for r95604.

Which was the testcase for the patch reverted from llvm-gcc.

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

14 years agoreduce nesting.
Chris Lattner [Wed, 17 Feb 2010 06:53:36 +0000 (06:53 +0000)]
reduce nesting.

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

14 years agoAdded a function to clone locals of a function.( which for pic16 are globals
Sanjiv Gupta [Wed, 17 Feb 2010 06:48:50 +0000 (06:48 +0000)]
Added a function to clone locals of a function.( which for pic16 are globals
with mangled names).

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

14 years agoimprove comments, the matcher is now feature complete, on to codegen.
Chris Lattner [Wed, 17 Feb 2010 06:47:35 +0000 (06:47 +0000)]
improve comments, the matcher is now feature complete, on to codegen.

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

14 years agoRemoved header files from .h by adding forward decls.
Sanjiv Gupta [Wed, 17 Feb 2010 06:46:23 +0000 (06:46 +0000)]
Removed header files from .h by adding forward decls.
Renamed PIC16FrameOverlay namespace to PIC16OVERLAY.
Renamed PIC16FrameOverlay class to PIC16Overlay.

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

14 years agoAdded BFI for disassembly only.
Johnny Chen [Wed, 17 Feb 2010 06:31:48 +0000 (06:31 +0000)]
Added BFI for disassembly only.

A8.6.18  BFI - Bitfield insert (Encoding A1)

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

14 years agosink special case "cannotyetselect" for intrinsics out of the
Chris Lattner [Wed, 17 Feb 2010 06:28:22 +0000 (06:28 +0000)]
sink special case "cannotyetselect" for intrinsics out of the
tblgen splatted code into the implementation.

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

14 years agoEmulate the current isel's "IsChainCompatible" logic for now.
Chris Lattner [Wed, 17 Feb 2010 06:23:39 +0000 (06:23 +0000)]
Emulate the current isel's "IsChainCompatible" logic for now.
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.

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

14 years agoproperly record chain inputs to complex patterns,
Chris Lattner [Wed, 17 Feb 2010 06:08:25 +0000 (06:08 +0000)]
properly record chain inputs to complex patterns,
resolving a fixme.

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

14 years agorename and document some arguments so I don't have to keep
Chris Lattner [Wed, 17 Feb 2010 06:07:47 +0000 (06:07 +0000)]
rename and document some arguments so I don't have to keep
reverse engineering what they are.

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

14 years agoUse pointer-wide encoding for LSDA and FDE on Darwin.
Anton Korobeynikov [Wed, 17 Feb 2010 05:53:11 +0000 (05:53 +0000)]
Use pointer-wide encoding for LSDA and FDE on Darwin.
Hopefully, this will fix the remaining issues seen there.

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

14 years agosimplify IsChainCompatible codegen, add comments. no
Chris Lattner [Wed, 17 Feb 2010 05:35:28 +0000 (05:35 +0000)]
simplify IsChainCompatible codegen, add comments.  no
functionality change.

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

14 years agoRemoved an early out which was causing the PBQP allocator to not compute live-in...
Lang Hames [Wed, 17 Feb 2010 03:42:51 +0000 (03:42 +0000)]
Removed an early out which was causing the PBQP allocator to not compute live-in sets or run the rewriter.

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

14 years agoFix SCEVExpander's existing PHI reuse checking to recognize the
Dan Gohman [Wed, 17 Feb 2010 02:39:31 +0000 (02:39 +0000)]
Fix SCEVExpander's existing PHI reuse checking to recognize the
case where there are loop-invariant instructions somehow left
inside the loop, and in a position where they won't dominate
the IV increment position.

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

14 years agoBefore setting scope end marker, pay attention to scope begin marker and existing...
Devang Patel [Wed, 17 Feb 2010 02:20:34 +0000 (02:20 +0000)]
Before setting scope end marker, pay attention to scope begin marker and existing scope end marker, if any. Scope must begin before it ends and nested inlined scope do not truncate surrounding scope.

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

14 years agoPrep work to handle input chains of matched patterns and checking for
Chris Lattner [Wed, 17 Feb 2010 02:16:19 +0000 (02:16 +0000)]
Prep work to handle input chains of matched patterns and checking for
'ischaincompatible' when a pattern has more than one input chain.  Need
to do some commenting and cleanup now that I understand how this works.

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

14 years agodaniel remembered why this was needed.
Chris Lattner [Wed, 17 Feb 2010 01:55:54 +0000 (01:55 +0000)]
daniel remembered why this was needed.

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

14 years agoadd a comment explaining why darwin/i386 uses ## as a comment.
Chris Lattner [Wed, 17 Feb 2010 01:38:01 +0000 (01:38 +0000)]
add a comment explaining why darwin/i386 uses ## as a comment.
It's not clear why this is really required, but it was explicitly
added in r48808 with no real explanation or rdar #.

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

14 years agorecord input chains.
Chris Lattner [Wed, 17 Feb 2010 01:34:15 +0000 (01:34 +0000)]
record input chains.

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

14 years agoprefix captured value names with $ so they look like
Chris Lattner [Wed, 17 Feb 2010 01:27:29 +0000 (01:27 +0000)]
prefix captured value names with $ so they look like
variables.  Use the fancy OpNo variable instead of i,
which has the right index including chains.

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

14 years agoInitial implementation of PIC16 Cloner pass.
Sanjiv Gupta [Wed, 17 Feb 2010 01:11:53 +0000 (01:11 +0000)]
Initial implementation of PIC16 Cloner pass.

This pass is supposed to be run on the linked .bc module.
It traveses the module call graph twice. Once starting from the main function
and marking each reached function as "ML". Again, starting from the ISR
and cloning any reachable function that was marked as "ML". After cloning
the function, it remaps all the call sites in IL functions to call the
cloned functions.

Currently only marking is being done.

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

14 years agoDon't check for comments, which vary between subtargets.
Dan Gohman [Wed, 17 Feb 2010 01:08:57 +0000 (01:08 +0000)]
Don't check for comments, which vary between subtargets.

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

14 years agoimprove comments on OPC_Record to say what we're recording a node.
Chris Lattner [Wed, 17 Feb 2010 01:03:09 +0000 (01:03 +0000)]
improve comments on OPC_Record to say what we're recording a node.

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

14 years agoFold bswap(undef) to undef.
Dan Gohman [Wed, 17 Feb 2010 00:54:58 +0000 (00:54 +0000)]
Fold bswap(undef) to undef.

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

14 years agoDelete some unneeded casts.
Dan Gohman [Wed, 17 Feb 2010 00:42:19 +0000 (00:42 +0000)]
Delete some unneeded casts.

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

14 years agoDon't attempt to divide INT_MIN by -1; consider such cases to
Dan Gohman [Wed, 17 Feb 2010 00:41:53 +0000 (00:41 +0000)]
Don't attempt to divide INT_MIN by -1; consider such cases to
have overflowed.

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

14 years agomake the new isel's interpreter loop call the generated
Chris Lattner [Wed, 17 Feb 2010 00:41:34 +0000 (00:41 +0000)]
make the new isel's interpreter loop call the generated
CheckComplexPattern function.  Though it is logically const,
I don't have the fortitude to clean up all the targets now,
and it not being const doesn't block anything.

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

14 years agoimprove comments in generated matcher a bit.
Chris Lattner [Wed, 17 Feb 2010 00:39:26 +0000 (00:39 +0000)]
improve comments in generated matcher a bit.

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

14 years agoMake the operand and format specifier match, and print all
Dan Gohman [Wed, 17 Feb 2010 00:37:20 +0000 (00:37 +0000)]
Make the operand and format specifier match, and print all
64 bits, fixing a variety of problems.

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

14 years agomake the new isel generator plop out a CheckComplexPattern function
Chris Lattner [Wed, 17 Feb 2010 00:31:50 +0000 (00:31 +0000)]
make the new isel generator plop out a CheckComplexPattern function
for evaluating complex patterns.  Some cleanup has to happen before
this can be used though.

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

14 years agoWrap lines to 80 columns and generally try to clean up whitespace and
Bob Wilson [Wed, 17 Feb 2010 00:31:29 +0000 (00:31 +0000)]
Wrap lines to 80 columns and generally try to clean up whitespace and
indentation.  No functional changes.

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

14 years agoroundss is an sse 4 thing, fix the test on non-sse41 builders
Chris Lattner [Wed, 17 Feb 2010 00:29:06 +0000 (00:29 +0000)]
roundss is an sse 4 thing, fix the test on non-sse41 builders
like llvm-gcc-x86_64-darwin10-selfhost

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

14 years agofix inverted condition.
Chris Lattner [Wed, 17 Feb 2010 00:11:30 +0000 (00:11 +0000)]
fix inverted condition.

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

14 years agoMake g5 target explicit; scheduling affects register choice.
Dale Johannesen [Tue, 16 Feb 2010 23:25:23 +0000 (23:25 +0000)]
Make g5 target explicit; scheduling affects register choice.

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

14 years agocomplex patterns don't get 'record' nodes, they implicitly
Chris Lattner [Tue, 16 Feb 2010 23:16:25 +0000 (23:16 +0000)]
complex patterns don't get 'record' nodes, they implicitly
record all their results.

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

14 years agoclean up some code, eliminate NodeIsComplexPattern, which
Chris Lattner [Tue, 16 Feb 2010 23:13:59 +0000 (23:13 +0000)]
clean up some code, eliminate NodeIsComplexPattern, which
does the same thing as getComplexPatternInfo.

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

14 years agoMake error statement more personal.
Bill Wendling [Tue, 16 Feb 2010 22:47:14 +0000 (22:47 +0000)]
Make error statement more personal.

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

14 years agofix indentation
Chris Lattner [Tue, 16 Feb 2010 22:38:31 +0000 (22:38 +0000)]
fix indentation

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

14 years agofix rdar://7653908, a crash on a case where we would fold a load
Chris Lattner [Tue, 16 Feb 2010 22:35:06 +0000 (22:35 +0000)]
fix rdar://7653908, a crash on a case where we would fold a load
into a roundss intrinsic, producing a cyclic dag.  The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection.  Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.

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

14 years agoAdjust register numbers in tests to compensate for the
Dale Johannesen [Tue, 16 Feb 2010 22:31:31 +0000 (22:31 +0000)]
Adjust register numbers in tests to compensate for the
new lack of R2.

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

14 years agofilecheckize
Chris Lattner [Tue, 16 Feb 2010 22:13:43 +0000 (22:13 +0000)]
filecheckize

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

14 years agoHandle tGPR register class in a few more places. This fixes some llvm-gcc
Bob Wilson [Tue, 16 Feb 2010 22:01:59 +0000 (22:01 +0000)]
Handle tGPR register class in a few more places.  This fixes some llvm-gcc
build failures due to my fix for pr6111.

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

14 years agoAdd SMC (Secure Monitor Call) system instruction for disassembly only.
Johnny Chen [Tue, 16 Feb 2010 21:59:54 +0000 (21:59 +0000)]
Add SMC (Secure Monitor Call) system instruction for disassembly only.

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

14 years agoReally reserve R2 on PPC Darwin. PR 6314.
Dale Johannesen [Tue, 16 Feb 2010 21:53:27 +0000 (21:53 +0000)]
Really reserve R2 on PPC Darwin.  PR 6314.

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

14 years agoUse line and column number to distinguish two lexical blocks at the same level.
Devang Patel [Tue, 16 Feb 2010 21:39:34 +0000 (21:39 +0000)]
Use line and column number to distinguish two lexical blocks at the same level.

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

14 years ago80 column cleanup
Jim Grosbach [Tue, 16 Feb 2010 21:23:02 +0000 (21:23 +0000)]
80 column cleanup

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

14 years agoNew testcase.
Devang Patel [Tue, 16 Feb 2010 21:16:08 +0000 (21:16 +0000)]
New testcase.

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

14 years agoLook for SSE and instructions of this form: (and x, (build_vector c1,c2,c3,c4)).
Evan Cheng [Tue, 16 Feb 2010 21:09:44 +0000 (21:09 +0000)]
Look for SSE and instructions of this form: (and x, (build_vector c1,c2,c3,c4)).
If there exists a use of a build_vector that's the bitwise complement of the mask,
then transform the node to
(and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~c1,~c2,~c3,~c4)).

Since this transformation is only useful when 1) the given build_vector will
become a load from constpool, and 2) (and (xor x -1), y) matches to a single
instruction, I decided this is appropriate as a x86 specific transformation.
rdar://7323335

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

14 years agoRemove trailing whitespace
Jim Grosbach [Tue, 16 Feb 2010 21:07:46 +0000 (21:07 +0000)]
Remove trailing whitespace

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

14 years agoRename SuccessorNumber to GetSuccessorNumber.
Bob Wilson [Tue, 16 Feb 2010 21:06:42 +0000 (21:06 +0000)]
Rename SuccessorNumber to GetSuccessorNumber.

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

14 years agoAdd support for emitting non-temporal stores for DAGs marked
David Greene [Tue, 16 Feb 2010 20:50:18 +0000 (20:50 +0000)]
Add support for emitting non-temporal stores for DAGs marked
non-temporal.  Fix from r96241 for botched encoding of MOVNTDQ.

Add documentation for !nontemporal metadata.

Add a simpler movnt testcase.

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

14 years agoTestcase for critical edge splitting with load PRE.
Bob Wilson [Tue, 16 Feb 2010 20:48:55 +0000 (20:48 +0000)]
Testcase for critical edge splitting with load PRE.

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

14 years agoUpdate Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
Jim Grosbach [Tue, 16 Feb 2010 20:42:29 +0000 (20:42 +0000)]
Update Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
to have the predicate on the pattern itself instead. Support for the new
ISel. Remove definitions of CarryDefIsUnused and CarryDefIsUsed since they are
no longer used anywhere.

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

14 years agoRemove redundant setting of Defs. CPSR is already marked by the block level set of...
Jim Grosbach [Tue, 16 Feb 2010 20:35:59 +0000 (20:35 +0000)]
Remove redundant setting of Defs. CPSR is already marked by the block level set of Defs.

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

14 years agoRefactor rewriting for PHI nodes into a separate function.
Dan Gohman [Tue, 16 Feb 2010 20:25:07 +0000 (20:25 +0000)]
Refactor rewriting for PHI nodes into a separate function.

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

14 years agoFirst step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
Jim Grosbach [Tue, 16 Feb 2010 20:17:57 +0000 (20:17 +0000)]
First step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
They won't work with the new ISel mechanism, as Requires predicates are no
longer allowed to reference the node being selected. Moving the predicate to
the patterns instead solves the problem.

This patch handles ARM mode. Thumb2 will follow.

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

14 years agoAdded for disassembly the following instructions:
Johnny Chen [Tue, 16 Feb 2010 20:04:27 +0000 (20:04 +0000)]
Added for disassembly the following instructions:

o Store Return State (SRSW, SRS)
o Load/Store Coprocessor (LDC/STC and friends)
o MSR (immediate)

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

14 years agoSplit critical edges as needed for load PRE.
Bob Wilson [Tue, 16 Feb 2010 19:51:59 +0000 (19:51 +0000)]
Split critical edges as needed for load PRE.

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

14 years agoRefactor to share code to find the position of a basic block successor in the
Bob Wilson [Tue, 16 Feb 2010 19:49:17 +0000 (19:49 +0000)]
Refactor to share code to find the position of a basic block successor in the
terminator's list of successors.

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

14 years agoFix whitespace.
Dan Gohman [Tue, 16 Feb 2010 19:42:34 +0000 (19:42 +0000)]
Fix whitespace.

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

14 years agoFunction attributes have index ~0, not 0
Kenneth Uildriks [Tue, 16 Feb 2010 19:28:02 +0000 (19:28 +0000)]
Function attributes have index ~0, not 0

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

14 years agosimplify this code. In the new world order there is no
Chris Lattner [Tue, 16 Feb 2010 19:19:58 +0000 (19:19 +0000)]
simplify this code.  In the new world order there is no
need to scan the entire subtree of the pattern anymore.

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

14 years agoconvert the new matcher to check intermediate nodes for a single
Chris Lattner [Tue, 16 Feb 2010 19:15:55 +0000 (19:15 +0000)]
convert the new matcher to check intermediate nodes for a single
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does.  This
substantially simplifies the code and improves opportunities for
sharing.

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

14 years agochange dag isel emitter to only call 'IsProfitableToFold' on nodes
Chris Lattner [Tue, 16 Feb 2010 19:03:34 +0000 (19:03 +0000)]
change dag isel emitter to only call 'IsProfitableToFold' on nodes
with chains.  On interior nodes that lead up to them, we just directly
check that there is a single use.  This generates slightly more
efficient code.

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

14 years agoFix pr6111: Avoid using the LR register for the target address of an indirect
Bob Wilson [Tue, 16 Feb 2010 17:24:15 +0000 (17:24 +0000)]
Fix pr6111: Avoid using the LR register for the target address of an indirect
branch in ARM v4 code, since it gets clobbered by the return address before
it is used.  Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.

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

14 years agoIntroduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
Duncan Sands [Tue, 16 Feb 2010 14:50:09 +0000 (14:50 +0000)]
Introduce isOpaqueTy and use it rather than isa<OpaqueType>.  Also, move some
methods to try to have the type predicates be more logically positioned.

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

14 years agoThere are two ways of checking for a given type, for example isa<PointerType>(T)
Duncan Sands [Tue, 16 Feb 2010 11:11:14 +0000 (11:11 +0000)]
There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.

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

14 years agoMinor warning fixes (semicolons, newline at EOF).
Benjamin Kramer [Tue, 16 Feb 2010 10:25:04 +0000 (10:25 +0000)]
Minor warning fixes (semicolons, newline at EOF).

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

14 years agomark all the generated node predicates 'const'.
Chris Lattner [Tue, 16 Feb 2010 07:26:36 +0000 (07:26 +0000)]
mark all the generated node predicates 'const'.

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

14 years agogenerate code for node and pattern predicates. Note that this won't
Chris Lattner [Tue, 16 Feb 2010 07:21:10 +0000 (07:21 +0000)]
generate code for node and pattern predicates.  Note that this won't
build if enabled, it will fail with constness issues. I'll resolve
these next.

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

14 years agorefactor some code into a local class.
Chris Lattner [Tue, 16 Feb 2010 06:52:01 +0000 (06:52 +0000)]
refactor some code into a local class.

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

14 years agoremove now dead code and fixme.
Chris Lattner [Tue, 16 Feb 2010 06:15:00 +0000 (06:15 +0000)]
remove now dead code and fixme.

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

14 years agoremove dead code. This is never generated for any targets in mainline.
Chris Lattner [Tue, 16 Feb 2010 06:14:22 +0000 (06:14 +0000)]
remove dead code.  This is never generated for any targets in mainline.

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

14 years agoadd support for the new isel matcher to generate
Chris Lattner [Tue, 16 Feb 2010 06:10:58 +0000 (06:10 +0000)]
add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.

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

14 years agomake pcrel immediate values relative to the start of the field,
Chris Lattner [Tue, 16 Feb 2010 05:03:17 +0000 (05:03 +0000)]
make pcrel immediate values relative to the start of the field,
not the end of the field, fixing rdar://7651978

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

14 years agoFix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.
Erick Tryzelaar [Tue, 16 Feb 2010 03:45:23 +0000 (03:45 +0000)]
Fix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.

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

14 years agoFix some ocaml documentation
Erick Tryzelaar [Tue, 16 Feb 2010 03:45:17 +0000 (03:45 +0000)]
Fix some ocaml documentation

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

14 years agoThe code section for an ISR has a specific address.
Sanjiv Gupta [Tue, 16 Feb 2010 03:41:07 +0000 (03:41 +0000)]
The code section for an ISR has a specific address.
Currently, whether a function is ISR or not is encoded in the section attribute for that function.

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

14 years agoHandle DBG_VALUE mixed with labels when doing PHI
Dale Johannesen [Tue, 16 Feb 2010 01:57:28 +0000 (01:57 +0000)]
Handle DBG_VALUE mixed with labels when doing PHI
elimination.  Before a DBG_VALUE could affect codegen.
The solution here is imperfect and not final.

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

14 years agoDrop support for the InReg attribute on the ppc backend. This was used by
Rafael Espindola [Tue, 16 Feb 2010 01:50:18 +0000 (01:50 +0000)]
Drop support for the InReg attribute on the ppc backend. This was used by
llvm-gcc but has been replaced with pad argument which don't need any
special backend support.

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

14 years agoSplit the main for-each-use loop again, this time for GenerateTruncates,
Dan Gohman [Tue, 16 Feb 2010 01:42:53 +0000 (01:42 +0000)]
Split the main for-each-use loop again, this time for GenerateTruncates,
as it also peeks at which registers are being used by other uses. This
makes LSR less sensitive to use-list order.

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

14 years agoReapply 96294; now that I've gotten around to looking
Dale Johannesen [Tue, 16 Feb 2010 01:27:47 +0000 (01:27 +0000)]
Reapply 96294; now that I've gotten around to looking
at older buildbot messages, I see the failure predates
this patch.

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

14 years agoApply patch from http://llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 is
Bill Wendling [Tue, 16 Feb 2010 00:58:02 +0000 (00:58 +0000)]
Apply patch from llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 is
finished.

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

14 years agoSomething broke. Hard to believe it was this patch
Dale Johannesen [Tue, 16 Feb 2010 00:43:58 +0000 (00:43 +0000)]
Something broke.  Hard to believe it was this patch
but it's harder to believe it's the other candidate,
so reverting.  Temporarily I hope.

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

14 years agoWhen reusing an existing PHI node in a loop, be even more
Dan Gohman [Tue, 16 Feb 2010 00:20:08 +0000 (00:20 +0000)]
When reusing an existing PHI node in a loop, be even more
strict about the requirements.

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

14 years agoPut repeated empty pattern into the AQI instruction class.
Bob Wilson [Mon, 15 Feb 2010 23:43:47 +0000 (23:43 +0000)]
Put repeated empty pattern into the AQI instruction class.
We could almost use a multiclass for the signed/unsigned instructions, but
there are only 6 of them so I guess it's not worth it.

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

14 years agoFix a memory leak. Patch by Nicolas Geoffray.
Evan Cheng [Mon, 15 Feb 2010 23:16:53 +0000 (23:16 +0000)]
Fix a memory leak. Patch by Nicolas Geoffray.

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

14 years agoMore handling of DBG_VALUE.
Dale Johannesen [Mon, 15 Feb 2010 23:05:03 +0000 (23:05 +0000)]
More handling of DBG_VALUE.

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

14 years agoAdd missed entry to cmake build list file
Anton Korobeynikov [Mon, 15 Feb 2010 22:55:13 +0000 (22:55 +0000)]
Add missed entry to cmake build list file

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

14 years agoUse ttype encoding consistently
Anton Korobeynikov [Mon, 15 Feb 2010 22:38:25 +0000 (22:38 +0000)]
Use ttype encoding consistently

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

14 years agoFix a silly darwin-only typo introduced during merge.
Anton Korobeynikov [Mon, 15 Feb 2010 22:38:10 +0000 (22:38 +0000)]
Fix a silly darwin-only typo introduced during merge.

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

14 years agoMove TLOF implementations to libCodegen to resolve layering violation.
Anton Korobeynikov [Mon, 15 Feb 2010 22:37:53 +0000 (22:37 +0000)]
Move TLOF implementations to libCodegen to resolve layering violation.

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

14 years agoIt turns out that we emitted completely wrong common EH frame since the early beginni...
Anton Korobeynikov [Mon, 15 Feb 2010 22:36:41 +0000 (22:36 +0000)]
It turns out that we emitted completely wrong common EH frame since the early beginning! The "z" CIE augmentation mark indicates that there is an extra word containing the size of augmentation section. However, even for frames w/o any augmentation data we emitted size uleb! (this is the case of "unwinding through C code"). Thus frame moves information was emitterd completely wrong.

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

14 years agoAdd suffix for stubs, so we won't have name clashes with private symbols.
Anton Korobeynikov [Mon, 15 Feb 2010 22:36:26 +0000 (22:36 +0000)]
Add suffix for stubs, so we won't have name clashes with private symbols.

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

14 years agoPreliminary patch to improve dwarf EH generation - Hooks to return Personality /...
Anton Korobeynikov [Mon, 15 Feb 2010 22:35:59 +0000 (22:35 +0000)]
Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there

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

14 years agoTeach the verifier to check the condition on a branch and ensure that it has
Nick Lewycky [Mon, 15 Feb 2010 22:09:09 +0000 (22:09 +0000)]
Teach the verifier to check the condition on a branch and ensure that it has
'i1' type.

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

14 years agoFix PR6300.
Jakob Stoklund Olesen [Mon, 15 Feb 2010 22:03:29 +0000 (22:03 +0000)]
Fix PR6300.

A virtual register can be used before it is defined in the same MBB if the MBB
is part of a loop. Teach the implicit-def pass about this case.

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

14 years agoLast week we were generating code with duplicate induction variables in this
Bob Wilson [Mon, 15 Feb 2010 21:56:40 +0000 (21:56 +0000)]
Last week we were generating code with duplicate induction variables in this
test, but the problem seems to have gone away today.  Add a check to make sure
it doesn't come back.

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