Chris Lattner
6fbe704932
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
2034d9f2da
- 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
4398308fa7
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
11740305f9
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
4b2ef56ad2
Rewrite machine cse to avoid recursion.
...
llvm-svn: 101964
2010-04-21 00:21:07 +00:00
Dan Gohman
ad33d33719
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
84776786a7
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
0522b90cdb
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
2176643241
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
382b969647
There is no need to install ValueMapper.h header.
...
llvm-svn: 101949
2010-04-20 22:18:31 +00:00
Johnny Chen
8bcc00b43e
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
4dd125e278
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
011207a0ae
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
d7209d2d56
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
a8ae1783b4
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
7be315c414
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
4019d571d9
Typo.
...
llvm-svn: 101914
2010-04-20 17:27:38 +00:00
Devang Patel
db6f71b02f
Add RUN:
...
llvm-svn: 101913
2010-04-20 17:20:10 +00:00
Dan Gohman
950fe784be
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
f41ad478ca
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
7a6b0dfbe7
Document that TargetRegisterInfo::contains does not cover virtual registers.
...
llvm-svn: 101903
2010-04-20 14:51:20 +00:00
Dan Gohman
7c845e4ea4
Sink this use_empty() check into isUsedOutsideOfDefiningBlock.
...
llvm-svn: 101902
2010-04-20 14:50:13 +00:00
Dan Gohman
7b7f0883fe
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
0f055d3f56
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
27b3d55194
use abstract accessors to CallInst
...
llvm-svn: 101899
2010-04-20 13:13:04 +00:00
Benjamin Kramer
395857705f
PR6880: Don't dereference CallsExternalNode if it's NULL.
...
llvm-svn: 101897
2010-04-20 12:16:50 +00:00
Benjamin Kramer
80178eea6a
Fix -Wcast-qual warning.
...
llvm-svn: 101894
2010-04-20 11:50:37 +00:00
Chris Lattner
5debc33168
stop computing InstImpInputs, it is dead
...
llvm-svn: 101881
2010-04-20 06:30:25 +00:00
Chris Lattner
9dc68d31fd
DAGInstruction::ImpOperands is dead after my recent tblgen work, zap it.
...
llvm-svn: 101880
2010-04-20 06:28:43 +00:00
Chris Lattner
5100367ff3
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
38c1a1a247
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
66e809acc0
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
c707fa9651
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
5814d9d9da
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
c239eb79bd
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
0c862a86fa
Delete a redundant return statement.
...
llvm-svn: 101860
2010-04-20 01:58:20 +00:00
Bill Wendling
467e6c2deb
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
4025306a91
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
2161e9f03b
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
64831c6a4c
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
eadc04badc
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
Dan Gohman
e450d7444d
Sink DebugLoc handling out of SelectionDAGISel into FastISel and
...
SelectionDAGBuilder, where it doesn't have to be as complicated.
llvm-svn: 101848
2010-04-20 00:48:35 +00:00
Chris Lattner
aedb8a3535
make CallGraphNode dtor abort if a node is deleted when there are still
...
references to it.
llvm-svn: 101847
2010-04-20 00:47:34 +00:00
Chris Lattner
a5cdd5e6a2
make the inliner do less work for leaf functions.
...
llvm-svn: 101846
2010-04-20 00:47:08 +00:00
Chris Lattner
e93846762a
Fix rdar://7879828 - crash in CallGraph, a self host issue.
...
Arg promotion was deleting call graph nodes that still had references
from the 'indirect' CGN. Like the inliner, it should only delete the
function if all references are gone.
llvm-svn: 101845
2010-04-20 00:46:50 +00:00
Dan Gohman
3df671a81c
Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
...
responsible for figuring out what that's supposed to be on its own.
llvm-svn: 101844
2010-04-20 00:37:27 +00:00
Dan Gohman
ca35aa1122
Reapply the removal of SelectionDAGISel's BB, with a fix for the case
...
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.
llvm-svn: 101843
2010-04-20 00:29:35 +00:00
Bob Wilson
92a4685dd2
Fix tests for Neon load/store intrinsics to match the i8* types expected by
...
the intrinsics. The reason for those i8* types is that the intrinsics are
overloaded on the vector type and we don't have a way to declare an intrinsic
where one argument is an overloaded vector type and another argument is a
pointer to the vector element type. The bitcasts added here will match what
the frontend will typically generate when these intrinsics are used.
llvm-svn: 101840
2010-04-20 00:17:16 +00:00
Johnny Chen
f3dd8b9487
More IT instruction error-handling improvements from fuzzing.
...
llvm-svn: 101839
2010-04-20 00:15:41 +00:00
Dan Gohman
be2e727a38
Revert 101825, which is causing trouble.
...
llvm-svn: 101832
2010-04-19 23:34:15 +00:00
Dan Gohman
35bc4d46cb
Make BreakAntiDependencies' SUnits argument const, and make the Begin
...
and End arguments by-value rather than by-reference.
llvm-svn: 101830
2010-04-19 23:11:58 +00:00
Johnny Chen
e62b680965
Better error handling of invalid IT mask '0000', instead of just asserting.
...
llvm-svn: 101827
2010-04-19 23:02:58 +00:00
Dan Gohman
8cccc542f6
Eliminate SelectionDAGISel's "current block" member. Just pass it as
...
an argument to things that need it.
llvm-svn: 101825
2010-04-19 22:51:14 +00:00
Dan Gohman
5ccd0b3686
Delete an unnecessary reference to SelectionDAGISel::BB.
...
llvm-svn: 101824
2010-04-19 22:48:45 +00:00
Dan Gohman
7c0303a059
Eliminate the CurMBB member from SelectionDAGBuilder. For places that
...
need it, just pass around the parent block of the current instruction
explicitly.
llvm-svn: 101822
2010-04-19 22:41:47 +00:00
Dan Gohman
e637ff5e9a
Remove the Expr member from IVUsers. Instead of remembering the expression,
...
just ask ScalarEvolution for it on demand. This helps IVUsers be more robust
in the case of expressions changing underneath it. This fixes PR6862.
llvm-svn: 101819
2010-04-19 21:48:58 +00:00
Johnny Chen
777346e749
According to A8.6.16 B (Encoding T3) and A8.3 Conditional execution -- A8.3.1
...
Pseudocode details of conditional, Condition bits '111x' indicate the
instruction is always executed. That is, '1111' is a leagl condition field
value, which is now mapped to ARMCC::AL.
Also add a test case for condition field '1111'.
llvm-svn: 101817
2010-04-19 21:19:52 +00:00
Devang Patel
561fa8490e
Fix typo. add a test case.
...
llvm-svn: 101812
2010-04-19 20:31:39 +00:00
Evan Cheng
e19aa5cc52
More progress on promoting i16 operations to i32 for x86. Work in progress.
...
llvm-svn: 101808
2010-04-19 19:29:22 +00:00
Dan Gohman
1e95790fd4
Give SelectionDAG a TargetMachine too, rather than having it
...
fetch one from the MachineFunction.
llvm-svn: 101807
2010-04-19 19:22:07 +00:00
Evan Cheng
e7c21a4242
More 80 col violation.
...
llvm-svn: 101806
2010-04-19 19:17:44 +00:00
Devang Patel
6188093cca
Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
...
llvm-svn: 101805
2010-04-19 19:14:02 +00:00
Dan Gohman
c334960f16
Code that needs a TargetMachine should have access to one directly, rather
...
than just getting one through a TargetLowering.
llvm-svn: 101802
2010-04-19 19:05:59 +00:00
Dan Gohman
a91754da67
Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
...
SelectionDAG-specific.
llvm-svn: 101801
2010-04-19 18:41:46 +00:00
Dan Gohman
0557cd7d89
Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
...
be done with const_cast.
llvm-svn: 101798
2010-04-19 18:33:28 +00:00
Dan Gohman
e6a9912a76
Remove -module, which appears to be a leftover from prior libtool usage.
...
llvm-svn: 101793
2010-04-19 18:11:02 +00:00
Dan Gohman
b0071d041f
This doesn't need SmallVector.h anymore.
...
llvm-svn: 101790
2010-04-19 17:51:31 +00:00
Mikhail Glushenkov
9cfb7051b6
Support .a files directly (without -l).
...
llvm-svn: 101789
2010-04-19 17:25:38 +00:00
Johnny Chen
25df2a75bd
Better error-handling for DisassembleThumb2DPSoReg() where the 3-reg operand
...
instructions should have Rd (Inst{11-8}) != 0b1111.
Ref: A6.3 32-bit Thumb instruction encoding
A6.3.11 Data-processing (shifted register)
llvm-svn: 101788
2010-04-19 17:16:40 +00:00
Dan Gohman
3457061a66
Fix this for std::vectors which don't have .data().
...
llvm-svn: 101785
2010-04-19 16:33:28 +00:00
Johnny Chen
cbe3e1a3df
ARM disassembler did not react to recent changes to the NEON instruction table.
...
VLD1q*_UPD and VST1q*_UPD have the ${dst:dregpair} operand now.
llvm-svn: 101784
2010-04-19 16:20:34 +00:00
Benjamin Kramer
3576b74bb9
Don't write into MemoryBuffers.
...
llvm-svn: 101783
2010-04-19 16:15:31 +00:00
Dan Gohman
f656397cc0
Fix -Wcast-qual warnings.
...
llvm-svn: 101782
2010-04-19 15:55:10 +00:00
Dan Gohman
a84dc0cc6e
Revert 91528 and use a std::vector instead, fixing an abuse of std::string.
...
llvm-svn: 101781
2010-04-19 15:54:44 +00:00
Dan Gohman
60a52c5fcf
Fix -Wcast-qual warnings.
...
llvm-svn: 101779
2010-04-19 15:42:05 +00:00
Dan Gohman
3bb1bcbe6d
Add a few more ELF bits.
...
llvm-svn: 101778
2010-04-19 15:40:15 +00:00
Dan Gohman
b204fd4308
Add a const.
...
llvm-svn: 101777
2010-04-19 15:39:27 +00:00
Dan Gohman
26e7d81df8
These functions don't need to access this.
...
llvm-svn: 101776
2010-04-19 15:38:38 +00:00
Anton Korobeynikov
7b056bfed0
Add missed part of prev. commit
...
llvm-svn: 101755
2010-04-18 20:41:42 +00:00
Anton Korobeynikov
7d62e33291
Make processor FUs unique for given itinerary. This extends the limit of 32
...
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.
llvm-svn: 101754
2010-04-18 20:31:01 +00:00
Chris Lattner
d3db453d15
avoid temporary std::string in non posix_spawn path.
...
llvm-svn: 101723
2010-04-18 17:34:10 +00:00
Benjamin Kramer
5b4be748cb
Eliminate temporary string.
...
llvm-svn: 101711
2010-04-18 09:19:41 +00:00
Benjamin Kramer
1360e9e270
Properly inherit the environment on darwin where environ is not available for shared libraries.
...
llvm-svn: 101710
2010-04-18 09:16:04 +00:00
Nick Lewycky
554a39889b
This is horrible. Split the difference, and declare 'environ' on all non-Darwin
...
platforms to unbreak the darwin and linux builds. The BSD folks should feel
free to change the #if, if this breaks them.
llvm-svn: 101703
2010-04-18 07:07:48 +00:00
Nick Lewycky
320aa4a493
Revert r101701, Darwin doesn't have 'environ'. Go figure.
...
llvm-svn: 101702
2010-04-18 06:44:21 +00:00
Nick Lewycky
3fdf58800a
Fix linux build. posix_spawn doesn't inherit the environment by default.
...
llvm-svn: 101701
2010-04-18 06:22:26 +00:00
Chris Lattner
a50738abba
make Program::Execute use posix_spawn on systems that support it,
...
as it is more efficient than fork/exec.
Thanks to Eric for adding the autoconf check. It would be nice if
a cmake guru could add a cmake check for posix_spawn as well.
llvm-svn: 101693
2010-04-18 04:14:37 +00:00
Chris Lattner
1049e1ce1f
reduce indentation
...
llvm-svn: 101692
2010-04-18 03:35:23 +00:00
Chris Lattner
d9e22a8a61
unnest from namespace.
...
llvm-svn: 101691
2010-04-18 03:33:55 +00:00
Chris Lattner
3448f4e448
silence some -Wmissing-field-initializers warnings.
...
llvm-svn: 101690
2010-04-18 03:30:32 +00:00
Chris Lattner
f58e8c0846
silence some unused-value warnings.
...
llvm-svn: 101689
2010-04-18 03:28:20 +00:00
Bill Wendling
268195e1d4
Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
...
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.
llvm-svn: 101686
2010-04-18 00:56:05 +00:00
Bill Wendling
47d742000b
Formatting changes. No functionality change.
...
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Bill Wendling
c4adfa3467
Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
...
indicated number of bytes.
llvm-svn: 101684
2010-04-18 00:51:49 +00:00
Nick Lewycky
fbe8d2803d
Fix declarations in a few more tests.
...
llvm-svn: 101676
2010-04-17 21:29:25 +00:00
Daniel Dunbar
c459a0ff81
Revert "reject forward references to functions whose type don't match", because DJG told me to!
...
llvm-svn: 101675
2010-04-17 21:24:55 +00:00
Nick Lewycky
d4c0f86a5e
Fix intrinsic signature in this test.
...
llvm-svn: 101674
2010-04-17 21:12:55 +00:00
Chris Lattner
5a44950aae
reject forward references to functions whose type don't match
...
up with the definition (and fix a broken testcase). PR6491.
llvm-svn: 101670
2010-04-17 20:45:56 +00:00
Dale Johannesen
0b685eb778
Add comment (lost when reverting and reapplying 101503).
...
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Chris Lattner
2b3a32f7a0
doh, didn't mean to check in my hackaround lit sucking. :)
...
llvm-svn: 101663
2010-04-17 19:04:03 +00:00
Chris Lattner
0a8d91a816
fix PR6332, allowing an index of zero into a zero sized array
...
even if the element of the array has no size.
llvm-svn: 101662
2010-04-17 19:02:33 +00:00
Chris Lattner
b927073f2e
teach the x86 asm parser how to handle segment prefixes
...
in memory operands. rdar://7874844
llvm-svn: 101661
2010-04-17 18:56:34 +00:00
Chris Lattner
926885c090
refactor .if handling code a bit.
...
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Chris Lattner
67e70971cc
fix PR6858: a dangling pointer use bug which was caused
...
by switching CachedFunctionInfo from a std::map to a
ValueMap (which is implemented in terms of a DenseMap).
DenseMap has different iterator invalidation semantics
than std::map.
This should hopefully fix the dragonegg builder.
llvm-svn: 101658
2010-04-17 17:57:56 +00:00
Chris Lattner
cea19a475b
a bunch of cleanups and tweaks, no functionality changes.
...
llvm-svn: 101657
2010-04-17 17:55:00 +00:00
Dan Gohman
7a0fde90f5
Fix more -Wcast-qual warnings.
...
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman
1f0f2142cc
Fix -Wcast-qual warnings.
...
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Chris Lattner
05f34394d9
remove a dead variable, PR6856
...
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Chris Lattner
5495c8e415
testcase for r101538, patch by Nico Schmidt!
...
llvm-svn: 101642
2010-04-17 17:22:06 +00:00
Dan Gohman
53d4a08d2b
Add const qualifiers to TargetLoweringObjectFile usage.
...
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman
88f7f6aeda
Use const_cast instead of a C-style cast to cast away const.
...
llvm-svn: 101639
2010-04-17 16:43:55 +00:00
Dan Gohman
4fee6f3bdd
Start function numbering at 0.
...
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dan Gohman
8422e57baa
Delete now-unnecessary const_casts.
...
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman
20e094c711
Use cast instead of dyn_cast when assuming success.
...
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman
21cea8ac2e
Use const qualifiers with TargetLowering. This eliminates several
...
const_casts, and it reinforces the design of the Target classes being
immutable.
SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.
And PIC16's AsmPrinter no longer uses TargetLowering.
llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman
31ae586c74
Move per-function state out of TargetLowering subclasses and into
...
MachineFunctionInfo subclasses.
llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Chandler Carruth
ca0a53ac52
Name these stub files consistently with the SPU and PPC targets' conventions.
...
Also rename the classes appropriately. The CMake build already used these
names.
llvm-svn: 101631
2010-04-17 08:50:29 +00:00
Chris Lattner
7f5088e6de
a bunch of ssse3 instructions are misencoded to think they have an
...
i8 field when they really do not. This fixes rdar://7840289
llvm-svn: 101629
2010-04-17 07:38:24 +00:00
Chris Lattner
7c4f14bf90
reenable r101565, removing a problematic assertion.
...
CGSCC can delete nodes in regions of the callgraph that
have already been visited. If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number. This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.
llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng
5fdb57cc10
Postra machine licm must add registers defined by loop invariants to *all* of
...
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.
llvm-svn: 101626
2010-04-17 07:07:11 +00:00
Nick Lewycky
04b8eec241
Refresh this documentation. Things have changed a bit in the mean time:
...
- LLVMgold.so --> libLLVMgold.so
- the GCC LTO project is no longer 'upcoming'
- document the plugin support for 'ar' and 'nm'
llvm-svn: 101624
2010-04-17 07:00:24 +00:00
Evan Cheng
4f3aba431e
Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
...
llvm-svn: 101622
2010-04-17 06:47:47 +00:00
Evan Cheng
f1bd5fcdb4
More work to allow dag combiner to promote 16-bit ops to 32-bit.
...
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Evan Cheng
829c300ce0
Another 80 col violation.
...
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Bob Wilson
59b70eacad
Revise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
...
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.
llvm-svn: 101615
2010-04-17 05:30:19 +00:00
Evan Cheng
3af19e80c9
Add nounwind.
...
llvm-svn: 101613
2010-04-17 03:43:36 +00:00
Bob Wilson
ca51425d94
Re-commit my previous SSAUpdater changes. The previous version naively tried
...
to determine where to place PHIs by iteratively comparing reaching definitions
at each block. That was just plain wrong. This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.
llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Bob Wilson
4e5eb5ae1b
As a temporary workaround for post-RA not handling DebugValue instructions,
...
just remove them all. Radar 7873207 (working around the root problem of
Radar 7759363).
llvm-svn: 101604
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen
71336f213b
Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
...
This reverts commit 101392. It broke a buildbot.
llvm-svn: 101595
2010-04-17 00:38:36 +00:00
Dale Johannesen
2543e303e1
Reapply 101503+101520. These are "obviously correct" [Chris]
...
and don't cause any problems on Darwin.
llvm-svn: 101584
2010-04-17 00:08:21 +00:00
Chris Lattner
dddbcba270
disable r101565: an assert is getting triggered. More lurking badness no doubt.
...
llvm-svn: 101583
2010-04-17 00:05:36 +00:00
Chris Lattner
cfc921cd2a
add a note
...
llvm-svn: 101581
2010-04-16 23:52:30 +00:00
Eric Christopher
7258dcd77f
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Devang Patel
12563b3495
Add support to emit dwarf ranges.
...
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Jakob Stoklund Olesen
ae372e2ce0
Use a simpler data structure to calculate the least recently used register in RegAllocLocal.
...
This makes the local register allocator about 20% faster.
llvm-svn: 101574
2010-04-16 23:32:37 +00:00
Johnny Chen
c275414575
Cast to (uint64_t) instead of relying on the "ul" suffix.
...
llvm-svn: 101573
2010-04-16 23:30:28 +00:00
Dan Gohman
37df662b1c
Add a getSelectionDAGInfo member to TargetMachine.
...
llvm-svn: 101567
2010-04-16 23:09:10 +00:00
Chris Lattner
434c053439
update docs for api change.
...
llvm-svn: 101566
2010-04-16 23:07:44 +00:00
Chris Lattner
de023a3c1d
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
...
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.
This is a really terrible problem which was causing -g to affect codegen
because it would permute the memory image of the compiler process.
Thanks to Dale for expertly hunting it down.
llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Dan Gohman
9becdddc49
Add skeleton target-specific SelectionDAGInfo files.
...
llvm-svn: 101564
2010-04-16 23:04:22 +00:00
Johnny Chen
ed9bee150b
Fixed logic error. Should check Builder for validity before calling SetSession
...
on it.
llvm-svn: 101563
2010-04-16 23:02:25 +00:00
Chris Lattner
5518b81a98
move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
...
No functionality change.
llvm-svn: 101562
2010-04-16 22:59:24 +00:00
Dan Gohman
fe051a525f
Regenerate configure script.
...
llvm-svn: 101561
2010-04-16 22:59:06 +00:00
Dan Gohman
91f8ad7bd3
Add an autoconf check for -retain-symbols-file and conditionalize
...
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.
llvm-svn: 101560
2010-04-16 22:58:15 +00:00
Johnny Chen
034e0b1e68
Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.
...
llvm-svn: 101559
2010-04-16 22:48:31 +00:00
Chris Lattner
4422d31b84
introduce a new CallGraphSCC class, and pass it around
...
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>. No functionality change,
but now we have a much tidier interface.
llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Johnny Chen
b90b6f1a35
Fixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
...
case. Also, the 0xFF hex literal involved in the shift for ESize64 should be
suffixed "ul" to preserve the shift result.
Implemented printHex*ImmOperand() by copying from ARMAsmPrinter.cpp and added a
test case for DisassembleN1RegModImmFrm()/printHex64ImmOperand().
llvm-svn: 101557
2010-04-16 22:40:20 +00:00
Evan Cheng
f037f87bde
(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.
...
llvm-svn: 101551
2010-04-16 22:26:19 +00:00
Chris Lattner
d43a12df56
tidy up
...
llvm-svn: 101548
2010-04-16 21:57:10 +00:00
Chris Lattner
6d1208fd2b
move PrintCallGraphPass out of the middle of CGPassManager.
...
llvm-svn: 101543
2010-04-16 21:43:55 +00:00