Commit Graph

33286 Commits

Author SHA1 Message Date
Dan Gohman 32f53bbd85 Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.

llvm-svn: 37657
2007-06-19 14:28:31 +00:00
Dan Gohman a7644dd9b9 Pass a SelectionDAG into SDNode::dump everywhere it's used, in prepration
for needing the DAG node to print pre-legalize extended value types, and
to get better debug messages with target-specific nodes.

llvm-svn: 37656
2007-06-19 14:13:56 +00:00
Owen Anderson 1370faf889 Handle constants in phi nodes properly. This fixes test/Transforms/GVNPRE/2007-06-18-ConstantInPhi.ll
llvm-svn: 37655
2007-06-19 07:35:36 +00:00
Chris Lattner b4777f087a silence warning when assertions are disabled.
llvm-svn: 37654
2007-06-19 06:40:46 +00:00
Owen Anderson 0b7c12be82 Testcase for instances where a constant only occurs as an operand to a phi node.
llvm-svn: 37653
2007-06-19 05:55:01 +00:00
Chris Lattner 5551482f16 don't use binutils 2.17
llvm-svn: 37652
2007-06-19 05:52:36 +00:00
Chris Lattner 37228f6ce5 document and hide two options.
llvm-svn: 37651
2007-06-19 05:47:49 +00:00
Chris Lattner 7936d91f70 describe an argument, hide it.
llvm-svn: 37650
2007-06-19 05:46:06 +00:00
Chris Lattner 09a33a4f64 silence a bogus warning Duraid ran into.
llvm-svn: 37649
2007-06-19 05:43:49 +00:00
Owen Anderson 3552c9e845 Add a new testcase for memory corruption issues.
llvm-svn: 37648
2007-06-19 05:41:22 +00:00
Owen Anderson 91c54950b3 Be careful to erase values from all of the appropriate sets when they're not needed anymore. This fixes a few more memory-related issues.
llvm-svn: 37647
2007-06-19 05:37:32 +00:00
Owen Anderson b9cbaed623 Remember to clear the maximal sets between functions.
Thanks to Nicholas for valgrinding this.

llvm-svn: 37646
2007-06-19 04:32:55 +00:00
Owen Anderson b56fba0c5a Refactor GVNPRE to use a much smart method of uniquing value sets, and centralize a lot of the value numbering information. No functionality change.
llvm-svn: 37645
2007-06-19 03:31:41 +00:00
Dan Gohman 9e82064924 Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.

llvm-svn: 37644
2007-06-19 01:48:05 +00:00
Evan Cheng a7ca624028 Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
llvm-svn: 37643
2007-06-19 01:26:51 +00:00
Evan Cheng 7d5696860b Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
llvm-svn: 37642
2007-06-19 01:21:41 +00:00
Chris Lattner 944200be45 If a function is vararg, never pass inreg arguments in registers. Thanks to
Anton for half of this patch.

llvm-svn: 37641
2007-06-19 00:13:10 +00:00
Chris Lattner 26be02febf add isVarArg to CCState
llvm-svn: 37640
2007-06-19 00:11:09 +00:00
Chris Lattner f401b2b4c3 add isvararg tracking to CCState
llvm-svn: 37639
2007-06-19 00:10:25 +00:00
Chris Lattner f2b72bf921 testcase for PR1513
llvm-svn: 37638
2007-06-19 00:08:42 +00:00
Evan Cheng 6ba3e8b27d New test case: identity operation of RHS / LHS of a VECTOR_SHUFFLE.
llvm-svn: 37637
2007-06-19 00:06:08 +00:00
Evan Cheng cea02ffd05 Look for VECTOR_SHUFFLE that's identity operation on either LHS or RHS. This can happen before DAGCombiner catches it.
llvm-svn: 37636
2007-06-19 00:02:56 +00:00
Tanya Lattner bed1d4d877 Update docs for llvm.var.annotation intrinsic.
llvm-svn: 37635
2007-06-18 23:42:37 +00:00
Evan Cheng 0598b2d5eb Fix some fragile code wrt CFG edge updating.
llvm-svn: 37634
2007-06-18 22:44:57 +00:00
Evan Cheng 2afd702c20 Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
llvm-svn: 37633
2007-06-18 22:43:58 +00:00
Tanya Lattner aab2200844 Modify annotate intrinsic to take 2 additional args: file and line number.
Fix up Annotate attribute test case.
Fix DebugFilename.c test case to look for right file name.

llvm-svn: 37632
2007-06-18 22:23:39 +00:00
Chris Lattner b4f2d8a056 add helper
llvm-svn: 37631
2007-06-18 21:50:49 +00:00
Devang Patel d56e4919df Fix quotes in debug messages.
llvm-svn: 37630
2007-06-18 21:32:29 +00:00
Chris Lattner e31adc8ab9 make ComputeTopDownOrdering significantly faster and use less stack space
by making it non-recursive

llvm-svn: 37629
2007-06-18 21:28:10 +00:00
Dan Gohman eed125f315 In SCEVAddExpr::get, skip over any cast operands before looking for nested
add operands after constant operands. The recent change to recognize
sign-extend expressions caused this to be exposed more often.

llvm-svn: 37628
2007-06-18 19:30:09 +00:00
Anton Korobeynikov 02b0997b28 Make BasicAliasAnalysis correctly register itself. Patch by Devang
llvm-svn: 37627
2007-06-18 17:13:29 +00:00
Dan Gohman 8c7333266c Make chain dependencies blue, in addition to being dashed.
llvm-svn: 37626
2007-06-18 15:30:16 +00:00
Dan Gohman c98815ba32 Define the pushq instruction for x86-64.
llvm-svn: 37625
2007-06-18 14:12:56 +00:00
Dan Gohman 03a7e5368a Add keyword explicit.
llvm-svn: 37624
2007-06-18 14:11:31 +00:00
Evan Cheng 51eb2c3bbe Properly remove duplicate instructions as result of diamond if-conversion. Other bug fixes.
llvm-svn: 37623
2007-06-18 08:37:25 +00:00
Owen Anderson dd998e1913 Cache the results of dependsOnInvoke()
llvm-svn: 37622
2007-06-18 04:42:29 +00:00
Owen Anderson f1c04e1ddb Fix indentation.
llvm-svn: 37621
2007-06-18 04:31:21 +00:00
Owen Anderson b364b413af Don't perform an expensive check if it's not necessary.
llvm-svn: 37620
2007-06-18 04:30:44 +00:00
Chris Lattner 5f232faf8c ensure we don't regress on these tests. We generate aweful code in x86-32 for
these though.

llvm-svn: 37619
2007-06-17 23:29:57 +00:00
Bill Wendling ec6be07c22 XFAILing until I can fix properly.
llvm-svn: 37618
2007-06-16 23:57:51 +00:00
Bill Wendling 094a4e813a Revert patch. It regresses:
define double @test2(i64 %A) {
   %B = bitcast i64 %A to double
   ret double %B
}

$ llvm-as < t.ll | llc -march=x86-64

before:

         .align  4
         .globl  _test2
_test2:
         movd %rdi, %xmm0
         ret

after:

_test2:
         subq $8, %rsp
         movq %rdi, (%rsp)
         movsd (%rsp), %xmm0
         addq $8, %rsp
         ret

llvm-svn: 37617
2007-06-16 23:57:15 +00:00
Reid Spencer 1aae9e8e12 Fix PR1517:
Use SmallPtrSet instead of std::vector to eliminate duplicate uses in a
function generated with -gen-function. This prevents the output from having
multiple duplicate declarations of constants and gvals.

llvm-svn: 37616
2007-06-16 20:48:27 +00:00
Reid Spencer 83c15f8a1b Fix PR1516:
When printing the uses of a function (-gen-function only), make sure to
include the constants referenced by intializers of global variables.

llvm-svn: 37615
2007-06-16 20:33:24 +00:00
Nick Lewycky 7aa84fe7c5 Call the correct function name. Patch from Stephane Letz.
llvm-svn: 37614
2007-06-16 16:17:35 +00:00
Evan Cheng 3a51c854d0 Really turn if-converter loose:
1. Consider all possible ifcvt cases at once. No longer restricted to bottom
   up iterative approach.
2. Sort all possible cases based on a cost function. Perform the most profitable
   ones first invalidate others that target the same blocks.
3. Fixed a number of bugs related to block duplication.

llvm-svn: 37613
2007-06-16 09:34:52 +00:00
Bill Wendling c8f293b4f9 Testcase for MMX int to MMX register failure.
llvm-svn: 37612
2007-06-16 06:31:47 +00:00
Bill Wendling cd9673e565 Fix a failure to bit_convert from integer GPR to MMX register.
llvm-svn: 37611
2007-06-16 06:17:31 +00:00
Owen Anderson 658f2c4881 Fix test/Transforms/GVNPRE/2007-06-15-InvokeInst.ll by ignoring all instructions that depend on invokes.
llvm-svn: 37610
2007-06-16 00:26:54 +00:00
Owen Anderson d2028a549f Testcase where GVNPRE was getting confused by invoke instructions.
llvm-svn: 37609
2007-06-16 00:25:10 +00:00
Tanya Lattner e199f97fa8 Codegen support (stripped out) for the annotate attribute.
llvm-svn: 37608
2007-06-15 22:26:58 +00:00