Devang Patel
f57b9f4d5d
Fix quotes in debug messages.
...
llvm-svn: 37630
2007-06-18 21:32:29 +00:00
Chris Lattner
5b93ff84b9
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
5db3ad4b32
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
76361958e8
Make BasicAliasAnalysis correctly register itself. Patch by Devang
...
llvm-svn: 37627
2007-06-18 17:13:29 +00:00
Dan Gohman
46f036ccb0
Make chain dependencies blue, in addition to being dashed.
...
llvm-svn: 37626
2007-06-18 15:30:16 +00:00
Dan Gohman
bff1054303
Define the pushq instruction for x86-64.
...
llvm-svn: 37625
2007-06-18 14:12:56 +00:00
Evan Cheng
b3cefc0824
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
58098f3560
Cache the results of dependsOnInvoke()
...
llvm-svn: 37622
2007-06-18 04:42:29 +00:00
Owen Anderson
8956588783
Fix indentation.
...
llvm-svn: 37621
2007-06-18 04:31:21 +00:00
Owen Anderson
c45b435273
Don't perform an expensive check if it's not necessary.
...
llvm-svn: 37620
2007-06-18 04:30:44 +00:00
Bill Wendling
94f3474832
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
Evan Cheng
1732a41371
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
a1f8f0aa97
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
0c8b051523
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
Tanya Lattner
4c078c1ace
Codegen support (stripped out) for the annotate attribute.
...
llvm-svn: 37608
2007-06-15 22:26:58 +00:00
Evan Cheng
759b3cca3c
Not every predicable block can be safely duplicated.
...
llvm-svn: 37607
2007-06-15 21:18:05 +00:00
Evan Cheng
e6d0631c68
Instructions with unique labels or embedded jumptables cannot be duplicated during ifcvt.
...
llvm-svn: 37606
2007-06-15 21:15:00 +00:00
Dan Gohman
1c73ccb4d3
Fold a binary operator with constant operands when expanding code for a SCEV.
...
llvm-svn: 37602
2007-06-15 19:21:55 +00:00
Chris Lattner
c08e8abb53
Fix CodeGen/X86/inline-asm-x-scalar.ll:test4, by retaining regclass info
...
for tied register constraints.
llvm-svn: 37601
2007-06-15 19:11:01 +00:00
Evan Cheng
88c463eb8c
MachineInstr::isPredicable() is no longer needed.
...
llvm-svn: 37599
2007-06-15 19:06:07 +00:00
Duncan Sands
deef6fe78b
Workaround for PR1508.
...
llvm-svn: 37597
2007-06-15 19:04:19 +00:00
Dan Gohman
a3ea76f018
Use SCEVConstant::get instead of SCEVUnknown::get to create an
...
integer constant SCEV.
llvm-svn: 37596
2007-06-15 18:00:55 +00:00
Owen Anderson
5a2d597072
Fix test/Transforms/GVNPRE/2007-06-15-Looping.ll
...
llvm-svn: 37595
2007-06-15 17:55:15 +00:00
Evan Cheng
a6504bc2e0
Extra edges are deleted later if needed.
...
llvm-svn: 37593
2007-06-15 17:34:48 +00:00
Dan Gohman
838ba27094
Add a SCEV class and supporting code for sign-extend expressions.
...
This created an ambiguity for expandInTy to decide when to use
sign-extension or zero-extension, but it turns out that most of its callers
don't actually need a type conversion, now that LLVM types don't have
explicit signedness. Drop expandInTy in favor of plain expand, and change
the few places that actually need a type conversion to do it themselves.
llvm-svn: 37591
2007-06-15 14:38:12 +00:00
Evan Cheng
f4d3d695b2
Allow small blocks to be duplicated to enable if-conversion.
...
llvm-svn: 37590
2007-06-15 07:36:12 +00:00
Chris Lattner
3a979f2fa5
Generalize many transforms to work on ~ of vectors in addition to ~ of
...
integer ops. This implements Transforms/InstCombine/and-or-not.ll
test3/test4, and finishes off PR1510
llvm-svn: 37589
2007-06-15 06:23:19 +00:00
Chris Lattner
145fdc7e2a
add a Constant::getAllOnesValue helper function, which works on integers
...
AND vectors.
llvm-svn: 37586
2007-06-15 06:10:53 +00:00
Chris Lattner
c2985cea59
Enhance BinaryOperator::isNot to support vector not.
...
llvm-svn: 37585
2007-06-15 06:04:24 +00:00
Chris Lattner
6c32b44b4c
Implement two xforms:
...
1. ~(~X | Y) === (X & ~Y)
2. (A|B) & ~(A&B) -> A^B
This allows us to transform ~(~(a|b) | (a&b)) -> a^b.
This implements PR1510 for scalar values.
llvm-svn: 37584
2007-06-15 05:58:24 +00:00
Chris Lattner
96c6cf8b89
delete some obviously dead vector operations, which deletes a few thousand
...
operations from Duraids example.
llvm-svn: 37582
2007-06-15 05:26:55 +00:00
Evan Cheng
6f348e1c75
No really, clear predcessors states.
...
llvm-svn: 37581
2007-06-14 23:34:09 +00:00
Evan Cheng
b1b1914582
If BB is predicated, invalidate its predecessor(s) which would if-convert it. It needs to be re-analyzed.
...
llvm-svn: 37580
2007-06-14 23:13:19 +00:00
Dan Gohman
2fd7d26df8
Rename MVT::getVectorBaseType to MVT::getVectorElementType.
...
llvm-svn: 37579
2007-06-14 22:58:02 +00:00
Dale Johannesen
62f49dd524
Do not treat FP_REG_KILL as terminator in branch analysis (X86).
...
llvm-svn: 37578
2007-06-14 22:03:45 +00:00
Evan Cheng
26d68261ae
Fix typo.
...
llvm-svn: 37577
2007-06-14 21:26:08 +00:00
Dan Gohman
35f2b4d716
Add a target hook to allow loads from constant pools to be rematerialized, and an
...
implementation for x86.
llvm-svn: 37576
2007-06-14 20:50:44 +00:00
Evan Cheng
a2c2479e22
Fix some stupid bugs that have effectively disabled if-conversion.
...
llvm-svn: 37575
2007-06-14 20:28:52 +00:00
Dan Gohman
74c92798d8
Eliminate some redundant newlines in asm output.
...
llvm-svn: 37574
2007-06-14 15:00:27 +00:00
Christopher Lamb
68017d151b
Add support to tablegen for specifying subregister classes on a per register class basis.
...
llvm-svn: 37572
2007-06-13 22:20:15 +00:00
Dale Johannesen
7e3253f115
Handle blocks with 2 unconditional branches in AnalyzeBranch.
...
llvm-svn: 37571
2007-06-13 17:59:52 +00:00
Duncan Sands
51e6294637
Only correctly lower exception handing intrinsics if exception handling is
...
turned on. Likewise for scanning of invokes to mark landing pads.
llvm-svn: 37570
2007-06-13 16:53:21 +00:00
Dan Gohman
6415b2548e
Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and
...
VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.
This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.
llvm-svn: 37569
2007-06-13 15:12:02 +00:00
Dan Gohman
3bc1455d49
When creating CopyFromReg nodes, always use legal types. And use the
...
correct types for the result vector, even though it is currently bitcasted
to a different type immediately.
llvm-svn: 37568
2007-06-13 14:55:16 +00:00
Duncan Sands
32eaa9b30a
The fix that was applied for PR1224 stops the compiler
...
crashing but breaks exception handling. The problem
described in PR1224 is that invoke is a terminator that
can produce a value. The value may be needed in other
blocks. The code that writes to registers values needed
in other blocks runs before terminators are lowered (in
this case invoke) so asserted because the value was not
yet available. The fix that was applied was to do invoke
lowering earlier, before writing values to registers.
The problem this causes is that the code to copy values
to registers can be output after the invoke call. If
an exception is raised and control is passed to the
landing pad then this copy-code will never execute. If
the value is needed in some code path reached via the
landing pad then that code will get something bogus.
So revert the original fix and simply skip invoke values
in the general copying to registers code. Instead copy
the invoke value to a register in the invoke lowering code.
llvm-svn: 37567
2007-06-13 05:51:31 +00:00
Evan Cheng
d4e9443a78
Typo
...
llvm-svn: 37566
2007-06-13 00:04:00 +00:00
Evan Cheng
d5aaab210c
Now if-converting all 4 variants of triangles.
...
llvm-svn: 37565
2007-06-12 23:54:05 +00:00
Owen Anderson
67084c3848
Fix test/Transforms/GVNPRE/2007-06-12-PhiTranslate.ll
...
llvm-svn: 37564
2007-06-12 22:43:57 +00:00
Devang Patel
fbde93ba1f
isReachableFromEntry() is not suitable for post dominator.
...
llvm-svn: 37562
2007-06-12 17:50:25 +00:00
Devang Patel
b4e2a776cb
Remove redundant check.
...
llvm-svn: 37561
2007-06-12 17:35:20 +00:00