oota-llvm.git
18 years agoImplement the getRegForInlineAsmConstraint method for PPC. With recent
Chris Lattner [Thu, 2 Nov 2006 01:44:04 +0000 (01:44 +0000)]
Implement the getRegForInlineAsmConstraint method for PPC.  With recent
sdisel changes, this eliminates a ton of copies around common inline asms.
For example:

int test2(int Y, int X) {
  asm("foo %0, %1" : "=r"(X): "r"(X));
  return X;
}

now compiles to:

_test2:
        foo r3, r4
        blr

instead of:

_test2:
        mr r2, r4
        foo r2, r2
        mr r3, r2
        blr

GCC produces:

_test2:
        foo r4, r4
        mr r3,r4
        blr

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

18 years agoAllow the getRegForInlineAsmConstraint method to return a register class with
Chris Lattner [Thu, 2 Nov 2006 01:41:49 +0000 (01:41 +0000)]
Allow the getRegForInlineAsmConstraint method to return a register class with
no fixes physreg.  Treat this as permission to use any register in the register
class.  When this happens and it is safe, allow the llvm register allcoator to
allocate the register instead of doing it at isel time.  This eliminates a ton
of copies around common inline asms.  For example:

int test2(int Y, int X) {
  asm("foo %0, %1" : "=r"(X): "r"(X));
  return X;
}

now compiles to:

_test2:
        foo r3, r4
        blr

instead of:

_test2:
        mr r2, r4
        foo r2, r2
        mr r3, r2
        blr

GCC produces:

_test2:
        foo r4, r4
        mr r3,r4
        blr

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

18 years agogeneralize this api
Chris Lattner [Thu, 2 Nov 2006 01:39:10 +0000 (01:39 +0000)]
generalize this api

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

18 years agoRename
Evan Cheng [Wed, 1 Nov 2006 23:18:32 +0000 (23:18 +0000)]
Rename

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

18 years agoTwo-address instructions no longer have to be A := A op C. Now any pair of dest ...
Evan Cheng [Wed, 1 Nov 2006 23:06:55 +0000 (23:06 +0000)]
Two-address instructions no longer have to be A := A op C. Now any pair of dest / src operands can be tied together.

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

18 years agoThere can be more than one PHINode at the start of the block.
Devang Patel [Wed, 1 Nov 2006 23:04:45 +0000 (23:04 +0000)]
There can be more than one PHINode at the start of the block.

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

18 years agoTied-to constraint must be op_with_larger_idx = op_with_smaller_idx or else throw...
Evan Cheng [Wed, 1 Nov 2006 23:03:11 +0000 (23:03 +0000)]
Tied-to constraint must be op_with_larger_idx = op_with_smaller_idx or else throw an exception.

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

18 years agoAdded getTiedToSrcOperand() to check for two-address'ness.
Evan Cheng [Wed, 1 Nov 2006 23:00:31 +0000 (23:00 +0000)]
Added getTiedToSrcOperand() to check for two-address'ness.

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

18 years agoClean up.
Evan Cheng [Wed, 1 Nov 2006 22:39:30 +0000 (22:39 +0000)]
Clean up.

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

18 years agoHandle PHINode with only one incoming value.
Devang Patel [Wed, 1 Nov 2006 22:26:43 +0000 (22:26 +0000)]
Handle PHINode with only one incoming value.
This fixes http://llvm.org/bugs/show_bug.cgi?id=979

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

18 years agoTestcase from http://llvm.org/bugs/show_bug.cgi?id=979
Devang Patel [Wed, 1 Nov 2006 22:25:48 +0000 (22:25 +0000)]
Testcase from llvm.org/bugs/show_bug.cgi?id=979

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

18 years agoCopyFromReg starts a live range so its use should not be considered a floater.
Evan Cheng [Wed, 1 Nov 2006 22:17:06 +0000 (22:17 +0000)]
CopyFromReg starts a live range so its use should not be considered a floater.

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

18 years agoMake ScalarEvolution actually use a ZeroExtend expression instead of
Reid Spencer [Wed, 1 Nov 2006 21:53:12 +0000 (21:53 +0000)]
Make ScalarEvolution actually use a ZeroExtend expression instead of
having SCZeroExtendExpr be equivalent to SCTruncate

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

18 years agogive branch folding a simple heuristic to decide which block to split so that
Chris Lattner [Wed, 1 Nov 2006 19:36:29 +0000 (19:36 +0000)]
give branch folding a simple heuristic to decide which block to split so that
it inserts an uncond branch where it is less likely to cause a problem.  This
fixes some perf issues on ppc.

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

18 years agoextra pass is required now
Chris Lattner [Wed, 1 Nov 2006 18:30:25 +0000 (18:30 +0000)]
extra pass is required now

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

18 years agoFix GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll and McGill/chomp
Chris Lattner [Wed, 1 Nov 2006 18:03:33 +0000 (18:03 +0000)]
Fix GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll and McGill/chomp

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

18 years agonew testcase that crashes global opt, reduced from chomp
Chris Lattner [Wed, 1 Nov 2006 18:02:53 +0000 (18:02 +0000)]
new testcase that crashes global opt, reduced from chomp

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

18 years agoPartial update for Release 1.9
Reid Spencer [Wed, 1 Nov 2006 16:15:04 +0000 (16:15 +0000)]
Partial update for Release 1.9

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

18 years agoprint null values in bss
Rafael Espindola [Wed, 1 Nov 2006 14:26:44 +0000 (14:26 +0000)]
print null values in bss

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

18 years agoimplement zextload bool and truncstore bool
Rafael Espindola [Wed, 1 Nov 2006 14:13:27 +0000 (14:13 +0000)]
implement  zextload bool and truncstore bool

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

18 years agoAdd a printSetLabel that takes two id's.
Evan Cheng [Wed, 1 Nov 2006 09:23:08 +0000 (09:23 +0000)]
Add a printSetLabel that takes two id's.

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

18 years agoFactor gep instructions through phi nodes.
Chris Lattner [Wed, 1 Nov 2006 07:43:41 +0000 (07:43 +0000)]
Factor gep instructions through phi nodes.

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

18 years agoremove a testcase for a marginal feature
Chris Lattner [Wed, 1 Nov 2006 07:15:44 +0000 (07:15 +0000)]
remove a testcase for a marginal feature

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

18 years agoTurn a phi of many loads into a phi of the address and a single load of the
Chris Lattner [Wed, 1 Nov 2006 07:13:54 +0000 (07:13 +0000)]
Turn a phi of many loads into a phi of the address and a single load of the
result.  This can significantly shrink code and exposes identities more
aggressively.

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

18 years agoFix ldmxcsr JIT encoding.
Evan Cheng [Wed, 1 Nov 2006 06:53:52 +0000 (06:53 +0000)]
Fix ldmxcsr JIT encoding.

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

18 years agoFix a bug in the previous patch
Chris Lattner [Wed, 1 Nov 2006 04:55:47 +0000 (04:55 +0000)]
Fix a bug in the previous patch

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

18 years agoFold things like "phi [add (a,b), add(c,d)]" into two phi's and one add.
Chris Lattner [Wed, 1 Nov 2006 04:51:18 +0000 (04:51 +0000)]
Fold things like "phi [add (a,b), add(c,d)]" into two phi's and one add.

This triggers thousands of times on multisource.

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

18 years agoPrint jumptable index.
Evan Cheng [Wed, 1 Nov 2006 04:48:30 +0000 (04:48 +0000)]
Print jumptable index.

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

18 years agoRemove unnecessary sign conversions made possible by last patch.
Reid Spencer [Wed, 1 Nov 2006 03:45:43 +0000 (03:45 +0000)]
Remove unnecessary sign conversions made possible by last patch.

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

18 years agoFix a bug in the interpreter where divides of unmatched signed operands
Reid Spencer [Wed, 1 Nov 2006 03:41:05 +0000 (03:41 +0000)]
Fix a bug in the interpreter where divides of unmatched signed operands
would fail. E.g. udiv sint X, Y  or sdiv uint X, Y would fail to find a
type match in the switch statement and fail the operation.

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

18 years agomake tail merging more aggressive. If two blocks share a common tail, but the
Chris Lattner [Wed, 1 Nov 2006 01:16:12 +0000 (01:16 +0000)]
make tail merging more aggressive.  If two blocks share a common tail, but the
tail is not an entire block for either of them, pick one, split it, then
merge the common part.

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

18 years agoenable branch folding with an option
Chris Lattner [Wed, 1 Nov 2006 00:38:31 +0000 (00:38 +0000)]
enable branch folding with an option

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

18 years agoNot meant to be checked in.
Evan Cheng [Wed, 1 Nov 2006 00:27:59 +0000 (00:27 +0000)]
Not meant to be checked in.

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

18 years agoAdd operand constraints to TargetInstrInfo.
Evan Cheng [Wed, 1 Nov 2006 00:27:05 +0000 (00:27 +0000)]
Add operand constraints to TargetInstrInfo.

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

18 years agoAdd constraints to Instruction class.
Evan Cheng [Wed, 1 Nov 2006 00:26:27 +0000 (00:26 +0000)]
Add constraints to Instruction class.

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

18 years agomore shotenning
Andrew Lenharth [Tue, 31 Oct 2006 23:46:56 +0000 (23:46 +0000)]
more shotenning

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

18 years agoCompile CodeGen/PowerPC/fp-branch.ll to:
Chris Lattner [Tue, 31 Oct 2006 23:06:00 +0000 (23:06 +0000)]
Compile CodeGen/PowerPC/fp-branch.ll to:

_intcoord_cond_next55:
LBB1_3: ;cond_next55
        lis r2, ha16(LCPI1_0)
        lfs f0, lo16(LCPI1_0)(r2)
        fcmpu cr0, f1, f0
        blt cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
        li r3, 1
        blr
LBB1_2: ;cond_next62.exitStub
        li r3, 0
        blr

instead of:

_intcoord_cond_next55:
LBB1_3: ;cond_next55
        lis r2, ha16(LCPI1_0)
        lfs f0, lo16(LCPI1_0)(r2)
        fcmpu cr0, f1, f0
        bge cr0, LBB1_1 ;bb72.exitStub
LBB1_4: ;cond_next55
        lis r2, ha16(LCPI1_0)
        lfs f0, lo16(LCPI1_0)(r2)
        fcmpu cr0, f1, f0
        bnu cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
        li r3, 1
        blr
LBB1_2: ;cond_next62.exitStub
        li r3, 0
        blr

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

18 years agoThis test should compile down to one comparison, not two.
Chris Lattner [Tue, 31 Oct 2006 23:05:16 +0000 (23:05 +0000)]
This test should compile down to one comparison, not two.

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

18 years agolook through isunordered to inline it into branch blocks.
Chris Lattner [Tue, 31 Oct 2006 22:37:42 +0000 (22:37 +0000)]
look through isunordered to inline it into branch blocks.

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

18 years agoNuke dead code.
Evan Cheng [Tue, 31 Oct 2006 21:53:31 +0000 (21:53 +0000)]
Nuke dead code.

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

18 years agoallow the address of a global to be used with the "i" constraint when in
Chris Lattner [Tue, 31 Oct 2006 20:13:11 +0000 (20:13 +0000)]
allow the address of a global to be used with the "i" constraint when in
-static mode.  This implements PR882.

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

18 years agoimplement the 'c' inline asm modifier character
Chris Lattner [Tue, 31 Oct 2006 20:12:30 +0000 (20:12 +0000)]
implement the 'c' inline asm modifier character

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

18 years agonew testcase for PR882
Chris Lattner [Tue, 31 Oct 2006 20:11:14 +0000 (20:11 +0000)]
new testcase for PR882

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

18 years agohandle global address constant sdnodes
Chris Lattner [Tue, 31 Oct 2006 20:01:56 +0000 (20:01 +0000)]
handle global address constant sdnodes

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

18 years agoLet us play simplify the td file (and fix a few missed sub and mul patterns).
Andrew Lenharth [Tue, 31 Oct 2006 19:52:12 +0000 (19:52 +0000)]
Let us play simplify the td file (and fix a few missed sub and mul patterns).

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

18 years agomake one giant add and sub tester
Andrew Lenharth [Tue, 31 Oct 2006 19:50:55 +0000 (19:50 +0000)]
make one giant add and sub tester

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

18 years agohandle "st" as "st(0)"
Chris Lattner [Tue, 31 Oct 2006 19:42:44 +0000 (19:42 +0000)]
handle "st" as "st(0)"

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

18 years agoTargetLowering::isOperandValidForConstraint
Chris Lattner [Tue, 31 Oct 2006 19:41:18 +0000 (19:41 +0000)]
TargetLowering::isOperandValidForConstraint

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

18 years agoChange the prototype for TargetLowering::isOperandValidForConstraint
Chris Lattner [Tue, 31 Oct 2006 19:40:43 +0000 (19:40 +0000)]
Change the prototype for TargetLowering::isOperandValidForConstraint

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

18 years agogeneralize the fix for PR977 to also fix
Chris Lattner [Tue, 31 Oct 2006 18:56:48 +0000 (18:56 +0000)]
generalize the fix for PR977 to also fix
Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll

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

18 years agoanother testcase for PR977
Chris Lattner [Tue, 31 Oct 2006 18:56:24 +0000 (18:56 +0000)]
another testcase for PR977

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

18 years agoFix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
Chris Lattner [Tue, 31 Oct 2006 17:52:18 +0000 (17:52 +0000)]
Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll

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

18 years agotestcase for PR977
Chris Lattner [Tue, 31 Oct 2006 17:51:36 +0000 (17:51 +0000)]
testcase for PR977

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

18 years agoAdd all that branch mangling niftiness
Andrew Lenharth [Tue, 31 Oct 2006 16:49:55 +0000 (16:49 +0000)]
Add all that branch mangling niftiness

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

18 years agoadd support for calling functions when the caller has variable sized objects
Rafael Espindola [Tue, 31 Oct 2006 13:03:26 +0000 (13:03 +0000)]
add support for calling functions when the caller has variable sized objects

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

18 years ago1. Clean up code due to changes in SwitchTo*Section(2)
Anton Korobeynikov [Tue, 31 Oct 2006 08:31:24 +0000 (08:31 +0000)]
1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

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

18 years agoTurn an assert into an error message. This is commonly triggered when
Chris Lattner [Tue, 31 Oct 2006 07:33:13 +0000 (07:33 +0000)]
Turn an assert into an error message.  This is commonly triggered when
we don't support a specific constraint yet.  When this happens, print the
unsupported constraint.

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

18 years agoadd a note
Chris Lattner [Tue, 31 Oct 2006 06:26:10 +0000 (06:26 +0000)]
add a note

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

18 years agonew testcase
Chris Lattner [Tue, 31 Oct 2006 06:25:13 +0000 (06:25 +0000)]
new testcase

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

18 years agonew testcase
Chris Lattner [Tue, 31 Oct 2006 06:15:14 +0000 (06:15 +0000)]
new testcase

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

18 years agoUnbreaking static ctors patch.
Anton Korobeynikov [Tue, 31 Oct 2006 06:11:06 +0000 (06:11 +0000)]
Unbreaking static ctors patch.
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.

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

18 years agoFix a typo which can break jumptables.
Evan Cheng [Tue, 31 Oct 2006 02:31:00 +0000 (02:31 +0000)]
Fix a typo which can break jumptables.

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

18 years agoMake this compile again.
Reid Spencer [Tue, 31 Oct 2006 01:45:56 +0000 (01:45 +0000)]
Make this compile again.

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

18 years agoApply Aton's LLVM patch for PR973: Linux ctors / dtors support.
Evan Cheng [Tue, 31 Oct 2006 01:26:55 +0000 (01:26 +0000)]
Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.

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

18 years agoFix a problem introduced by a last-minute change (logic negation).
Reid Spencer [Mon, 30 Oct 2006 23:34:32 +0000 (23:34 +0000)]
Fix a problem introduced by a last-minute change (logic negation).

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

18 years agofix miscompilation of llvm.isunordered, where we branched on the opposite
Chris Lattner [Mon, 30 Oct 2006 23:02:25 +0000 (23:02 +0000)]
fix miscompilation of llvm.isunordered, where we branched on the opposite
condition.  This fixes miscompilation of Olden/bh and many others.

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

18 years agoDon't mislead readers by claiming a variable is defaulted to false when
Reid Spencer [Mon, 30 Oct 2006 22:46:49 +0000 (22:46 +0000)]
Don't mislead readers by claiming a variable is defaulted to false when
the default is actually true.

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

18 years agoAdd debug support for X86/ELF targets (Linux). This allows llvm-gcc4
Reid Spencer [Mon, 30 Oct 2006 22:32:30 +0000 (22:32 +0000)]
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.

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

18 years agofix wonky indentation
Chris Lattner [Mon, 30 Oct 2006 22:27:23 +0000 (22:27 +0000)]
fix wonky indentation

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

18 years agoUpdate comment. Valid option is -debug-pass=Structures.
Devang Patel [Mon, 30 Oct 2006 19:25:54 +0000 (19:25 +0000)]
Update comment. Valid option is -debug-pass=Structures.

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

18 years agoSwitch abbreviations to use the folding set.a.
Jim Laskey [Mon, 30 Oct 2006 15:59:54 +0000 (15:59 +0000)]
Switch abbreviations to use the folding set.a.

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

18 years agoSimplify DwarfWriter header.
Jim Laskey [Mon, 30 Oct 2006 13:35:07 +0000 (13:35 +0000)]
Simplify DwarfWriter header.

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

18 years agoAll targets expand BR_JT for now.
Evan Cheng [Mon, 30 Oct 2006 08:02:39 +0000 (08:02 +0000)]
All targets expand BR_JT for now.

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

18 years agoLower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target...
Evan Cheng [Mon, 30 Oct 2006 08:00:44 +0000 (08:00 +0000)]
Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.

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

18 years agoAdded a new SDNode type: BR_JT for jumptable branch.
Evan Cheng [Mon, 30 Oct 2006 07:59:36 +0000 (07:59 +0000)]
Added a new SDNode type: BR_JT for jumptable branch.

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

18 years agofix this regtest
Chris Lattner [Mon, 30 Oct 2006 05:24:03 +0000 (05:24 +0000)]
fix this regtest

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

18 years agoadd a new form of insert.
Chris Lattner [Mon, 30 Oct 2006 05:07:51 +0000 (05:07 +0000)]
add a new form of insert.

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

18 years agoAdd SmallString a (currently) minimal class that adapts SmallVector to be
Chris Lattner [Mon, 30 Oct 2006 03:39:20 +0000 (03:39 +0000)]
Add SmallString a (currently) minimal class that adapts SmallVector to be
more string-like.

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

18 years agoadd a method
Chris Lattner [Mon, 30 Oct 2006 03:14:15 +0000 (03:14 +0000)]
add a method

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

18 years agoadd newline at end of file
Chris Lattner [Sun, 29 Oct 2006 23:47:01 +0000 (23:47 +0000)]
add newline at end of file

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

18 years agoadd a highly efficient hash table that is specialized for mapping C strings
Chris Lattner [Sun, 29 Oct 2006 23:42:03 +0000 (23:42 +0000)]
add a highly efficient hash table that is specialized for mapping C strings
to some other type.

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

18 years agoAdd a new llvm::Allocator abstraction, which will be used by a container
Chris Lattner [Sun, 29 Oct 2006 22:08:03 +0000 (22:08 +0000)]
Add a new llvm::Allocator abstraction, which will be used by a container
I'm about to add.  This is similar to, but necessarily different than, the
STL allocator class.

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

18 years agoFix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.
Chris Lattner [Sun, 29 Oct 2006 21:21:20 +0000 (21:21 +0000)]
Fix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.

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

18 years agonew testcase
Chris Lattner [Sun, 29 Oct 2006 21:20:56 +0000 (21:20 +0000)]
new testcase

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

18 years agoMake CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
Chris Lattner [Sun, 29 Oct 2006 21:05:41 +0000 (21:05 +0000)]
Make CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
successors), and make island block movement more general.

This compiles CodeGen/X86/2006-04-27-ISelFoldingBug.ll to:

_loadAndRLEsource_no_exit_2E_1_label_2E_0:
        subl $8, %esp
        movl %esi, 4(%esp)
        movl %ebx, (%esp)
        movl 16(%esp), %eax
        movl 12(%esp), %ecx
LBB1_3: #label.0
        movl _last, %edx
        movl %edx, %esi
        incl %esi
        movl %esi, _last
        movl %ecx, %ebx
        # TRUNCATE movb %bl, %bl
        movl _block, %esi
        movb %bl, 1(%esi,%edx)
        cmpl %eax, _last
        jge LBB1_2      #codeRepl5.exitStub
LBB1_4: #label.0
        cmpl $257, %ecx
        je LBB1_2       #codeRepl5.exitStub
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
        movl $1, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_2: #codeRepl5.exitStub
        xorl %eax, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret

instead of:

_loadAndRLEsource_no_exit_2E_1_label_2E_0:
        subl $8, %esp
        movl %esi, 4(%esp)
        movl %ebx, (%esp)
        movl 16(%esp), %eax
        movl 12(%esp), %ecx
        jmp LBB1_3      #label.0
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
        movl $1, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_2: #codeRepl5.exitStub
        xorl %eax, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_3: #label.0
        movl _last, %edx
        movl %edx, %esi
        incl %esi
        movl %esi, _last
        movl %ecx, %ebx
        # TRUNCATE movb %bl, %bl
        movl _block, %esi
        movb %bl, 1(%esi,%edx)
        cmpl %eax, _last
        jge LBB1_2      #codeRepl5.exitStub
LBB1_4: #label.0
        cmpl $257, %ecx
        jne LBB1_1      #label.0.no_exit.1_crit_edge.exitStub
        jmp LBB1_2      #codeRepl5.exitStub

... which is much better layout :)

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

18 years agofix Generic/2006-10-29-Crash.ll
Chris Lattner [Sun, 29 Oct 2006 21:01:20 +0000 (21:01 +0000)]
fix Generic/2006-10-29-Crash.ll

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

18 years agonew testcase
Chris Lattner [Sun, 29 Oct 2006 21:00:55 +0000 (21:00 +0000)]
new testcase

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

18 years agoFix a load folding issue that Evan noticed: there is no need to export values
Chris Lattner [Sun, 29 Oct 2006 18:23:37 +0000 (18:23 +0000)]
Fix a load folding issue that Evan noticed: there is no need to export values
used by comparisons in the main block.

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

18 years agoTry again.
Jim Laskey [Sun, 29 Oct 2006 09:19:59 +0000 (09:19 +0000)]
Try again.

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

18 years agoNot handling zero length strings.
Jim Laskey [Sun, 29 Oct 2006 08:27:07 +0000 (08:27 +0000)]
Not handling zero length strings.

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

18 years agoVLOAD is not the LoadSDNode opcode.
Evan Cheng [Sun, 29 Oct 2006 06:14:47 +0000 (06:14 +0000)]
VLOAD is not the LoadSDNode opcode.

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

18 years agoRemove spurious case. EXTLOAD is not one of the node opcodes.
Nick Lewycky [Sun, 29 Oct 2006 02:26:30 +0000 (02:26 +0000)]
Remove spurious case. EXTLOAD is not one of the node opcodes.

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

18 years agosplit critical edges more carefully and intelligently. In particular, critical
Chris Lattner [Sat, 28 Oct 2006 19:22:10 +0000 (19:22 +0000)]
split critical edges more carefully and intelligently.  In particular, critical
edges whose destinations are not phi nodes don't bother us.  Also, share
split edges, since the split edge can't have a phi.  This significantly
reduces the complexity of generated code in some cases.

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

18 years agoTeach branch folding to fold identical jump tables together and to delete
Chris Lattner [Sat, 28 Oct 2006 18:34:47 +0000 (18:34 +0000)]
Teach branch folding to fold identical jump tables together and to delete
jump tables that are dead.

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

18 years agoadd an assertion
Chris Lattner [Sat, 28 Oct 2006 18:21:51 +0000 (18:21 +0000)]
add an assertion

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

18 years agoremove dead method
Chris Lattner [Sat, 28 Oct 2006 18:21:29 +0000 (18:21 +0000)]
remove dead method

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

18 years agoadd a method for hacking on JTIdx's
Chris Lattner [Sat, 28 Oct 2006 18:18:36 +0000 (18:18 +0000)]
add a method for hacking on JTIdx's

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

18 years agoconst'ify jump table stuff
Chris Lattner [Sat, 28 Oct 2006 18:17:09 +0000 (18:17 +0000)]
const'ify jump table stuff

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

18 years agoadd a method for deleting dead jump tables.
Chris Lattner [Sat, 28 Oct 2006 18:12:00 +0000 (18:12 +0000)]
add a method for deleting dead jump tables.

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

18 years agoadd an assert
Chris Lattner [Sat, 28 Oct 2006 18:11:20 +0000 (18:11 +0000)]
add an assert

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