Chris Lattner
53633d42d1
rough pass moving stuff into relevant sections, still much
...
editing to do.
llvm-svn: 101987
2010-04-21 05:17:40 +00:00
Chris Lattner
02810a9a52
remove ldc, rubinious, macruby, icedtea, llvm-lua, which
...
don't have updates for 2.7.
llvm-svn: 101985
2010-04-21 04:28:21 +00:00
Evan Cheng
dbfb7dc438
Implement -disable-non-leaf-fp-elim which disable frame pointer elimination
...
optimization for non-leaf functions. This will be hooked up to gcc's
-momit-leaf-frame-pointer option. rdar://7886181
llvm-svn: 101984
2010-04-21 03:18:23 +00:00
Evan Cheng
0f4671b0dd
isel (i32 anyext i16) as insert_subreg when 16-bit ops are being promoted.
...
llvm-svn: 101979
2010-04-21 01:47:12 +00:00
Evan Cheng
e67a37c4ce
Trim include.
...
llvm-svn: 101978
2010-04-21 01:39:06 +00:00
Dan Gohman
4ff2d817a3
Add more const qualifiers on TargetMachine and friends.
...
llvm-svn: 101977
2010-04-21 01:34:56 +00:00
Dan Gohman
6bde42d9f5
Update CMakeLists.txt.
...
llvm-svn: 101976
2010-04-21 01:32:29 +00:00
Dan Gohman
1d3532d925
Move several SelectionDAG-independent utility functions out of the
...
SelectionDAG directory and into a new Analysis.cpp file.
llvm-svn: 101975
2010-04-21 01:22:34 +00:00
Johnny Chen
6e4b1607ee
Thumb instructions which have reglist operands at the end and predicate operands
...
before reglist were not properly handled with respect to IT Block. Fix that by
creating a new method ARMBasicMCBuilder::DoPredicateOperands() used by those
instructions for disassembly. Add a test case.
llvm-svn: 101974
2010-04-21 01:01:19 +00:00
Chris Lattner
c840cfe5c9
Implement (but don't enable) PR6724 and rdar://6295824. In short,
...
we have RefreshCallGraph detect when a function pass devirtualizes
a call, and have CGSCCPassMgr iterate (up to a count) when this
happens. This allows (in the example) GVN to devirtualize the
call in foo, then the inliner to inline it away.
This is not currently enabled because I haven't done any analysis
on the (potentially substantial) code size or performance impact of
doing this, and guess what, it exposes callgraph updating bugs in
various passes. This is progress though, and you can play with it
by passing -max-cg-scc-iterations=5 to opt.
llvm-svn: 101973
2010-04-21 00:47:40 +00:00
Evan Cheng
a0c4b2952f
- Clean up some crappy code which deals with coalescing of copies which look at
...
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.
llvm-svn: 101971
2010-04-21 00:44:22 +00:00
Dan Gohman
4d1724c3e8
Revert r101471. For tight recursive functions which have multiple
...
recursive callsites, inlining can reduce the number of calls by
exponential factors, as it does in
MultiSource/Benchmarks/Olden/treeadd. More involved heuristics
will be needed.
llvm-svn: 101969
2010-04-21 00:43:30 +00:00
Bill Wendling
9bf4b878e0
Handle a displacement location in 64-bit as an RIP-relative displacement. It
...
fixes a bug (<rdar://problem/7880900>) in the JIT. This code wouldn't work:
target triple = "x86_64-apple-darwin"
define double @func(double %a) {
%tmp1 = fmul double %a, 5.000000e-01 ; <double> [#uses=1]
ret double %tmp1
}
define i32 @main() nounwind {
%1 = call double @func(double 4.770000e-04) ; <i64> [#uses=0]
ret i32 0
}
llvm-svn: 101965
2010-04-21 00:34:04 +00:00
Evan Cheng
69142a2a6a
Rewrite machine cse to avoid recursion.
...
llvm-svn: 101964
2010-04-21 00:21:07 +00:00
Dan Gohman
570b621976
Add another variant of this test which found a place where
...
CodeGen's ComputeMaskedBits was being over-conservative when computing
bits for an ADD.
llvm-svn: 101963
2010-04-21 00:19:28 +00:00
Chris Lattner
6db0f451a7
teach the x86 address matching stuff to handle
...
(shl (or x,c), 3) the same as (shl (add x, c), 3)
when x doesn't have any bits from c set.
This finishes off PR1135. Before we compiled the block to:
to:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
leaq 2(%rdx), %r9
movl %esi, (%rdi,%r9,4)
leaq 1(%rdx), %r9
movl %esi, (%rdi,%r9,4)
addq $3, %rdx
movl %esi, (%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
Now we produce:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
movl %esi, 8(%rdi,%rdx,4)
movl %esi, 4(%rdi,%rdx,4)
movl %esi, 12(%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
llvm-svn: 101958
2010-04-20 23:18:40 +00:00
Dale Johannesen
510282d54b
Because of the EMMS problem, right now we have to support
...
user-defined operations that use MMX register types, but
the compiler shouldn't generate them on its own. This adds
a Synthesizable abstraction to represent this, and changes
the vector widening computation so it won't produce MMX types.
(The motivation is to remove noise from the ABI compatibility
part of the gcc test suite, which has some breakage right now.)
llvm-svn: 101951
2010-04-20 22:34:09 +00:00
Devang Patel
ef601352ff
Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap.
...
llvm-svn: 101950
2010-04-20 22:24:18 +00:00
Devang Patel
788913a131
There is no need to install ValueMapper.h header.
...
llvm-svn: 101949
2010-04-20 22:18:31 +00:00
Johnny Chen
d7ffae797f
Better error-handling of getBitFieldInvMask() where msb < lsb (encoding error),
...
instead of just asserting.
llvm-svn: 101942
2010-04-20 21:29:28 +00:00
Duncan Sands
8c2c90c3f9
I plan to release a version of dragonegg based on llvm-2.7 shortly
...
after the llvm-2.7 release.
llvm-svn: 101934
2010-04-20 19:40:58 +00:00
Jakob Stoklund Olesen
1ba4c9d2c2
When MachineLICM is hoisting a physical register after regalloc, make sure the
...
register is not killed in the loop.
This fixes 188.ammp on ARM where the post-ra scheduler would grab a register
that looked available but wasn't.
A testcase would be huge and fragile, sorry.
llvm-svn: 101930
2010-04-20 18:45:47 +00:00
Johnny Chen
9998480f92
When doing Thumb disassembly, there's no need to consider t2ADDrSPi12/t2SUBrSPi12,
...
as their generic counterparts t2ADDri12/t2SUBri12 should suffice.
llvm-svn: 101929
2010-04-20 18:45:24 +00:00
Bill Wendling
a87efb5d0f
Move CodeGen/X86/2010-04-19-DAGCombineCrash.ll into CodeGen/X86/crash.ll. Also
...
reduce.
llvm-svn: 101925
2010-04-20 18:14:47 +00:00
Johnny Chen
bd5bf58029
For t2LDRT, t2LDRBT, t2LDRHT, t2LDRSBT, and t2LDRSHT, if Rn(Inst{19-16})=='1111',
...
transform the Opcode to the corresponding t2LDR*pci counterpart.
Ref: A8.6.86 LDRT, A8.6.65 LDRBT, A8.6.77 LDRHT, A8.6.81 LDRSBT, A8.6.85 LDRSHT
llvm-svn: 101915
2010-04-20 17:28:50 +00:00
Evan Cheng
ebe1fbf676
Typo.
...
llvm-svn: 101914
2010-04-20 17:27:38 +00:00
Devang Patel
def402649b
Add RUN:
...
llvm-svn: 101913
2010-04-20 17:20:10 +00:00
Dan Gohman
44ab9ed9b8
Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
...
into SelectionDAGBuilder. This avoids a separate pass over the
instructions, and has the side effect of providing debug location
information to the copy.
llvm-svn: 101906
2010-04-20 15:03:56 +00:00
Dan Gohman
3915c2cc7c
Don't send PHI nodes down to SelectionDAGBuilder of FastISel, since
...
they end up doing nothing.
llvm-svn: 101904
2010-04-20 15:00:41 +00:00
Dan Gohman
f0490a0b8e
Document that TargetRegisterInfo::contains does not cover virtual registers.
...
llvm-svn: 101903
2010-04-20 14:51:20 +00:00
Dan Gohman
0c1f92afe1
Sink this use_empty() check into isUsedOutsideOfDefiningBlock.
...
llvm-svn: 101902
2010-04-20 14:50:13 +00:00
Dan Gohman
c276def9e9
If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.
...
llvm-svn: 101901
2010-04-20 14:48:02 +00:00
Dan Gohman
47859e6848
Don't iterate through the whole block just to find the PHI nodes.
...
llvm-svn: 101900
2010-04-20 14:46:25 +00:00
Gabor Greif
2eaf8afcff
use abstract accessors to CallInst
...
llvm-svn: 101899
2010-04-20 13:13:04 +00:00
Benjamin Kramer
b61f85894f
PR6880: Don't dereference CallsExternalNode if it's NULL.
...
llvm-svn: 101897
2010-04-20 12:16:50 +00:00
Benjamin Kramer
9127eadfce
Fix -Wcast-qual warning.
...
llvm-svn: 101894
2010-04-20 11:50:37 +00:00
Chris Lattner
6a517dbbd6
stop computing InstImpInputs, it is dead
...
llvm-svn: 101881
2010-04-20 06:30:25 +00:00
Chris Lattner
8b5bae8c3c
DAGInstruction::ImpOperands is dead after my recent tblgen work, zap it.
...
llvm-svn: 101880
2010-04-20 06:28:43 +00:00
Chris Lattner
b66b0c36cd
Bill's change in r95336 broke empty aggregates embedded
...
in other types. fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.
This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.
llvm-svn: 101879
2010-04-20 06:20:21 +00:00
Chris Lattner
04fb51984f
teach cellspu how to return i8 and i16 from calls,
...
patch by Kalle Raiskila!
llvm-svn: 101875
2010-04-20 05:36:09 +00:00
Chris Lattner
5041463692
remove a bunch of ad-hoc code to simplify instructions from
...
loop unswitch, and use inst simplify instead. It is more
powerful and less duplication.
llvm-svn: 101874
2010-04-20 05:33:18 +00:00
Chris Lattner
b6b95141ec
move some select simplifications out out instcombine into
...
inst simplify. No functionality change.
llvm-svn: 101873
2010-04-20 05:32:14 +00:00
Chris Lattner
e5a995a834
RewriteLoopBodyWithConditionConstant can end up rewriting the
...
condition we're unswitching on. In this case, don't try to
simplify the second copy of the loop which may be dead or not,
but is probably a constant now. This fixes PR6879
llvm-svn: 101870
2010-04-20 05:09:16 +00:00
Chris Lattner
7a2ce4afd8
reapply 'reject forward references to functions whose type don't match'
...
now that the testsuite has been updated.
llvm-svn: 101866
2010-04-20 04:49:11 +00:00
Dan Gohman
5f8489396e
Delete a redundant return statement.
...
llvm-svn: 101860
2010-04-20 01:58:20 +00:00
Bill Wendling
887dac2aa6
The visitXOR method can return the same SDNode. If so, we don't want to delete
...
it as it's not dead.
llvm-svn: 101855
2010-04-20 01:25:01 +00:00
Chris Lattner
339a3cd59b
disable optimizations in this directory for MSVC9. This avoids
...
an optimizer infinite loop on the file, PR6866.
llvm-svn: 101854
2010-04-20 01:11:32 +00:00
Johnny Chen
4f388a02d6
Better error-handling for DisassembleThumb2DPModImm() with 2-reg operands where
...
d==15 is considered illegal. Return false instead of assert().
llvm-svn: 101852
2010-04-20 01:01:57 +00:00
Eric Christopher
53e7e0fcfb
Remove the palignr intrinsics now that we lower them to vector shuffles,
...
shifts and null vectors. Autoupgrade these to what we'd lower them to.
Add a testcase to exercise this.
llvm-svn: 101851
2010-04-20 00:59:54 +00:00
Dan Gohman
5d47f180a2
Remove this debug output; it isn't that useful, and it's incomplete
...
in the case where a basic block is split.
llvm-svn: 101850
2010-04-20 00:56:44 +00:00