Dale Johannesen
f8610ebebc
Add a bit to mark operands of asm's that conflict
...
with an earlyclobber operand elsewhere. Propagate
this bit and the earlyclobber bit through SDISel.
Change linear-scan RA not to allocate regs in a way
that conflicts with an earlyclobber. See also comments.
llvm-svn: 56290
2008-09-17 21:13:11 +00:00
Evan Cheng
f3fcd7a464
Unallocatable registers do not have live intervals.
...
llvm-svn: 56287
2008-09-17 18:36:25 +00:00
Devang Patel
7f9671ba37
Do not hoist instruction above branch condition. The instruction may use branch condition.
...
llvm-svn: 56286
2008-09-17 18:21:49 +00:00
Devang Patel
dca8d3b183
Do not ignore iv uses outside the loop.
...
This one slipped through cracks very well.
llvm-svn: 56284
2008-09-17 17:53:47 +00:00
Devang Patel
7293f0f344
Fix comments, help messages.
...
llvm-svn: 56282
2008-09-17 16:01:39 +00:00
Dan Gohman
6ab52a8018
Don't worry about clobbering physical register defs that aren't used.
...
llvm-svn: 56281
2008-09-17 15:25:49 +00:00
Evan Cheng
7848cfcd77
Fix addrmode1 instruction encodings; fix bx_ret encoding.
...
llvm-svn: 56277
2008-09-17 07:53:38 +00:00
Evan Cheng
937569afe3
Specify instruction encoding using range list to avoid endianess issues.
...
llvm-svn: 56276
2008-09-17 07:16:21 +00:00
Evan Cheng
038ca4aa0f
Add instruction names as comments to InstBits entries.
...
llvm-svn: 56275
2008-09-17 06:29:52 +00:00
Dan Gohman
173aa8602d
Simplify and generalize X86DAGToDAGISel::CanBeFoldedBy, and draw
...
up some new ascii art to illustrate what it does. This change
currently has no effect on generated code.
llvm-svn: 56270
2008-09-17 01:39:10 +00:00
Dan Gohman
c24cd015a7
Add a new MachineInstr-level DCE pass. It is very simple, and is intended to
...
be used with fast-isel.
llvm-svn: 56268
2008-09-17 00:43:24 +00:00
Bill Wendling
95e1af217f
Add trampoline support to PPC. GCC simply calls the "__trampoline_setup"
...
function with appropriate parameters. This allows us to support blocks on PPC.
llvm-svn: 56267
2008-09-17 00:30:57 +00:00
Devang Patel
11b862aed5
Fix cut-n-pasto.
...
llvm-svn: 56265
2008-09-17 00:01:04 +00:00
Evan Cheng
a904f466e8
When converting a CopyFromReg to a copy instruction, use the register class of its uses to determine the right destination register class of the copy. This is important for targets where a physical register may belong to multiple register classes.
...
llvm-svn: 56258
2008-09-16 23:12:11 +00:00
Devang Patel
3fccede02a
Remove.
...
llvm-svn: 56256
2008-09-16 22:26:44 +00:00
Devang Patel
9966ccffb4
Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.
...
llvm-svn: 56255
2008-09-16 22:25:14 +00:00
Dan Gohman
64d6c6fe30
Change SelectionDAG::getConstantPool to always set the alignment of the
...
ConstantPoolSDNode, using the target's preferred alignment for the
constant type.
In LegalizeDAG, when performing loads from the constant pool, the
ConstantPoolSDNode's alignment is used in the calls to getLoad and
getExtLoad.
This change prevents SelectionDAG::getLoad/getExtLoad from incorrectly
choosing the ABI alignment for constant pool loads when Alignment == 0.
The incorrect alignment is only a performance issue when ABI alignment
does not equal preferred alignment (i.e., on x86 it was generating
MOVUPS instead of MOVAPS for v4f32 constant loads when the default ABI
alignment for 128bit vectors is forced to 1 byte.)
Patch by Paul Redmond!
llvm-svn: 56253
2008-09-16 22:05:41 +00:00
Bill Wendling
24c79f28b1
Reverting r56249. On further investigation, this functionality isn't needed.
...
Apologies for the thrashing.
llvm-svn: 56251
2008-09-16 21:48:12 +00:00
Dan Gohman
ab26f20d44
Include the alignment value when displaying ConstantPoolSDNodes.
...
llvm-svn: 56250
2008-09-16 21:18:22 +00:00
Bill Wendling
8bc392fb1d
- Change "ExternalSymbolSDNode" to "SymbolSDNode".
...
- Add linkage to SymbolSDNode (default to external).
- Change ISD::ExternalSymbol to ISD::Symbol.
- Change ISD::TargetExternalSymbol to ISD::TargetSymbol
These changes pave the way to allowing SymbolSDNodes with non-external linkage.
llvm-svn: 56249
2008-09-16 21:12:30 +00:00
Dan Gohman
5cf6120a7c
Fix these comments to reflect current reality. Surprisingly,
...
MachineConstantPool::getConstantPoolIndex actually expects
a log2-encoded alignment.
llvm-svn: 56248
2008-09-16 20:45:53 +00:00
Dan Gohman
dc5f5cbe59
Finally re-apply r46959. This is made feasible by the combination
...
of r56230, r56232, and r56246.
llvm-svn: 56247
2008-09-16 18:52:57 +00:00
Dan Gohman
dafa9c6e85
Improve instcombine's handling of integer min and max in two ways:
...
- Recognize expressions like "x > -1 ? x : 0" as min/max and turn them
into expressions like "x < 0 ? 0 : x", which is easily recognizable
as a min/max operation.
- Refrain from folding expression like "y/2 < 1" to "y < 2" when the
comparison is being used as part of a min or max idiom, like
"y/2 < 1 ? 1 : y/2". In that case, the division has another use, so
folding doesn't eliminate it, and obfuscates the min/max, making it
harder to recognize as a min/max operation.
These benefit ScalarEvolution, CodeGen, and anything else that wants to
recognize integer min and max.
llvm-svn: 56246
2008-09-16 18:46:06 +00:00
Evan Cheng
7c5dbd95e2
AllocateRWXMemory -> AllocateRWX.
...
llvm-svn: 56244
2008-09-16 17:28:18 +00:00
Dan Gohman
a9c71ce5dc
FCmpInst predicates UNO, ORD, FALSE, and TRUE are commutative.
...
llvm-svn: 56243
2008-09-16 16:44:00 +00:00
Bill Wendling
3f41b87e8d
Fix test to account for no more whitespace and that one of the matches is the
...
"declare" statement.
llvm-svn: 56241
2008-09-16 06:40:04 +00:00
Bill Wendling
07fe6c8a07
Remove space that was forgotten.`
...
llvm-svn: 56240
2008-09-16 06:30:47 +00:00
Dan Gohman
050d7835c6
Don't take the time to CheckDAGForTailCallsAndFixThem when tail calls
...
are not enabled. Instead just omit the tail call flag when calls are
created.
llvm-svn: 56235
2008-09-16 01:42:28 +00:00
Dan Gohman
162568842e
Fix spacing in the grep line for this test, following the recent
...
SCEV-whitespace changes.
llvm-svn: 56234
2008-09-16 01:37:08 +00:00
Dan Gohman
c5d2892e62
Re-enables the new vector select in the bitcode reader, by modifying the
...
bitcode reader/writer as follows:
- add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm
select opcode using either i1 or [N x i1] as the selector.
- retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to
handle select on i1 for backwards compatibility with existing bitcode
files.
- re-enable the vector-select.ll test program.
Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to
FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle
fcmp/icmp on scalars or vectors. In the bitcode writer, use
FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have
FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards
compatibility with existing bitcode files.
Patch by Preston Gurd!
llvm-svn: 56233
2008-09-16 01:01:33 +00:00
Dan Gohman
f9081a2cd5
Teach ScalarEvolution to consider loop preheaders in the search for
...
an if statement that guards a loop, to allow indvars to avoid smax
operations in more situations.
llvm-svn: 56232
2008-09-15 22:18:04 +00:00
Owen Anderson
82ab1e7280
Live intervals for live-in registers should begin at the beginning of a basic block, not at the first
...
instruction. Also, their valno's should have an unknown def. This has no effect currently, but was
causing issues when StrongPHIElimination was enabled.
llvm-svn: 56231
2008-09-15 22:00:38 +00:00
Dan Gohman
68e7735a38
Teach LSR to optimize away SMAX operations for tripcounts in common
...
cases. See the comment above OptimizeSMax for the full story, and
the testcase for an example. This cancels out a pessimization
commonly attributed to indvars, and will allow us to lift some of
the artificial throttles in indvars, rather than add new ones.
llvm-svn: 56230
2008-09-15 21:22:06 +00:00
Devang Patel
4089ccb0fa
Extract optimization pass selection code from llvm-gcc into a separate routine.
...
This can be used by other stand alone tools, such as 'opt'.
llvm-svn: 56229
2008-09-15 21:13:42 +00:00
Bruno Cardoso Lopes
233785daae
Fixed Bug 2751
...
http://llvm.org/bugs/show_bug.cgi?id=2751
Abicall was enabled even when static code model was provided
in the command line.
The correct behavior is to disable abicall when static is
specified.
llvm-svn: 56228
2008-09-15 21:06:55 +00:00
Dan Gohman
3c7b9ba547
Re-enable SelectionDAG CSE for calls. It matters in the case of
...
libcalls, as in this testcase on ARM.
llvm-svn: 56226
2008-09-15 19:46:03 +00:00
Bruno Cardoso Lopes
595229a15a
Added testcase for bswap allegrexel intrinsic
...
llvm-svn: 56225
2008-09-15 19:38:11 +00:00
Duncan Sands
18da83555f
End of the GlobalsModRef experiment.
...
llvm-svn: 56222
2008-09-15 18:42:38 +00:00
Dan Gohman
46673ad82a
Update the LLVM polygen grammar for recent language changes:
...
x86_ssecallcc, function notes, and some whitespace adjustments.
llvm-svn: 56221
2008-09-15 16:10:51 +00:00
Nick Lewycky
57368a561f
Fix documentation for these functions; they do not only modify users within the
...
block specified by the InstList. Patch by Stefanus Du Toit.
llvm-svn: 56200
2008-09-15 06:31:52 +00:00
Evan Cheng
02acc35abd
Correctly update kill infos after extending a live range and merge 2 val#'s; fix 56165 - do not mark val# copy field if the copy does not define the val#.
...
llvm-svn: 56199
2008-09-15 06:28:41 +00:00
Nick Lewycky
a3784b98ae
Add "sample" documentation to sample project.
...
This fixes part of PR2793.
llvm-svn: 56198
2008-09-15 05:31:29 +00:00
Dan Gohman
81313fd8d1
Fix WriteAsOperand to not emit a leading space character. Adjust
...
its callers to emit a space character before calling it when a
space is needed.
This fixes several spurious whitespace issues in
ScalarEvolution's debug dumps. See the test changes for
examples.
This also fixes odd space-after-tab indentation in the output
for switch statements, and changes calls from being printed like
this:
call void @foo( i32 %x )
to this:
call void @foo(i32 %x)
llvm-svn: 56196
2008-09-14 17:21:12 +00:00
Dale Johannesen
c0d712d9ed
adjust last patch per review feedback
...
llvm-svn: 56194
2008-09-14 01:44:36 +00:00
Gabor Greif
25ac5e3629
minor correction
...
llvm-svn: 56190
2008-09-13 18:51:27 +00:00
Dan Gohman
38453eebdc
Remove isImm(), isReg(), and friends, in favor of
...
isImmediate(), isRegister(), and friends, to avoid confusion
about having two different names with the same meaning. I'm
not attached to the longer names, and would be ok with
changing to the shorter names if others prefer it.
llvm-svn: 56189
2008-09-13 17:58:21 +00:00
Duncan Sands
9ddb3145ae
Fix PR2792: treat volatile loads as writing memory somewhere.
...
Treat stores as reading memory, just to play safe.
llvm-svn: 56188
2008-09-13 12:45:50 +00:00
Evan Cheng
a5804effed
Fix random abort.
...
llvm-svn: 56184
2008-09-13 01:55:59 +00:00
Dan Gohman
d3fe174c53
Define CallSDNode, an SDNode subclass for use with ISD::CALL.
...
Currently it just holds the calling convention and flags
for isVarArgs and isTailCall.
And it has several utility methods, which eliminate magic
5+2*i and similar index computations in several places.
CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle
nodes that are not CSE'd gracefully.
llvm-svn: 56183
2008-09-13 01:54:27 +00:00
Evan Cheng
380482ac46
Typo.
...
llvm-svn: 56182
2008-09-13 01:44:01 +00:00
Evan Cheng
ba28161103
Rely on instruction format to determine so_reg operand for now.
...
llvm-svn: 56181
2008-09-13 01:38:29 +00:00
Evan Cheng
12134701ec
Revert 56176. All those instruction formats are still needed.
...
llvm-svn: 56180
2008-09-13 01:35:33 +00:00
Evan Cheng
db6571a2c7
Accidentially flipped the condition.
...
llvm-svn: 56179
2008-09-13 01:29:57 +00:00
Evan Cheng
25a39094f8
Add debug dumps.
...
llvm-svn: 56178
2008-09-13 01:15:21 +00:00
Evan Cheng
c5c74f36fd
Eliminate unnecessary instruction formats.
...
llvm-svn: 56176
2008-09-12 23:15:39 +00:00
Evan Cheng
d1424c4eca
Addrmode 1 S bit can be dynamically set. Look for CPSR def.
...
llvm-svn: 56172
2008-09-12 22:45:55 +00:00
Evan Cheng
33fa89c6fb
Rewrite address mode 1 code emission routines.
...
llvm-svn: 56171
2008-09-12 22:01:15 +00:00
Duncan Sands
7e99a94c18
The "alias" keyword comes first.
...
llvm-svn: 56170
2008-09-12 20:48:21 +00:00
Evan Cheng
3c12fc4342
On some targets, non-move instructions can become move instructions because of coalescing. e.g.
...
vr2 = OR vr0, vr1
=>
vr2 = OR vr1, vr1 // after coalescing vr0 with vr1
Update the value# of the destination register with the copy instruction if that happens.
llvm-svn: 56165
2008-09-12 18:13:14 +00:00
Dan Gohman
ec270fb640
Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
...
ConstantFP* instead of APInt and APFloat directly.
This reduces the amount of time to create ConstantSDNode
and ConstantFPSDNode nodes when ConstantInt* and ConstantFP*
respectively are already available, as is the case in
SelectionDAGBuild.cpp. Also, it reduces the amount of time
to legalize constants into constant pools, and the amount of
time to add ConstantFP operands to MachineInstrs, due to
eliminating ConstantInt::get and ConstantFP::get calls.
It increases the amount of work needed to create new constants
in cases where the client doesn't already have a ConstantInt*
or ConstantFP*, such as legalize expanding 64-bit integer constants
to 32-bit constants. And it adds a layer of indirection for the
accessor methods. But these appear to be outweight by the benefits
in most cases.
It will also make it easier to make ConstantSDNode and
ConstantFPNode more consistent with ConstantInt and ConstantFP.
llvm-svn: 56162
2008-09-12 18:08:03 +00:00
Dale Johannesen
1f3ab86804
Pass "earlyclobber" bit through to machine
...
representation; coalescer and RA need to know
about it. No functional change.
llvm-svn: 56161
2008-09-12 17:49:03 +00:00
Dan Gohman
effb894453
Rename ConstantSDNode::getValue to getZExtValue, for consistency
...
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.
llvm-svn: 56159
2008-09-12 16:56:44 +00:00
Duncan Sands
fa1472fd55
Give GlobalsModRef a whirl in the nightly testers.
...
I placed it just before GVN because that it is the
pass most likely to benefit from it. Some quick
and dirty testing confirms that this is a decent
place for it.
llvm-svn: 56144
2008-09-12 08:23:37 +00:00
Duncan Sands
06dbb126e6
Rather than marking all internal globals "Ref"
...
when a readonly declaration is called, set a
flag. This is faster and uses less memory.
In theory it is less accurate, because before
only those internal globals that were read
by someone were being marked "Ref", but now
all are. But in practice, thanks to other
passes, all internal globals of the kind
considered here will be both read and stored
to: those only read will have been turned
into constants, and those only stored to will
have been deleted.
llvm-svn: 56143
2008-09-12 07:29:58 +00:00
Dale Johannesen
baf6762e26
The sequence for ppcf128 compares was not IEEE
...
safe in the presence of NaNs.
llvm-svn: 56136
2008-09-12 00:30:56 +00:00
Dan Gohman
eff71f2953
On 64-bit targets, change 32-bit getelementptr indices to be 64-bit
...
getelementptr indices, inserting an explicit cast if necessary.
This helps expose the sign-extension operation to other optimizations.
llvm-svn: 56133
2008-09-11 23:06:38 +00:00
Dan Gohman
7d01c0654c
Fix a vectorshuffle instcombine bug introduced by r55995.
...
Patch by Nicolas Capens!
llvm-svn: 56129
2008-09-11 22:47:57 +00:00
Arnold Schwaighofer
33ad850d93
Add indirect tail call (function pointer) examples.
...
llvm-svn: 56127
2008-09-11 22:24:28 +00:00
Jim Grosbach
a7cd7bc353
udpate header comment: s/VP/VFP/
...
llvm-svn: 56126
2008-09-11 21:41:29 +00:00
Arnold Schwaighofer
dd45bc25ac
When tailcallopt is enabled all fastcc calls must have an aligned argument stack size. Add a test case.
...
llvm-svn: 56119
2008-09-11 20:28:43 +00:00
Evan Cheng
5456a37280
Fix PR2748. Avoid coalescing physical register with virtual register which would create illegal extract_subreg. e.g.
...
vr1024 = extract_subreg vr1025, 1
...
vr1024 = mov8rr AH
If vr1024 is coalesced with AH, the extract_subreg is now illegal since AH does not have a super-reg whose sub-register 1 is AH.
llvm-svn: 56118
2008-09-11 20:07:10 +00:00
Owen Anderson
453564bfba
Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel.
...
llvm-svn: 56117
2008-09-11 19:44:55 +00:00
Duncan Sands
0a6d01770f
Fix comment typo.
...
llvm-svn: 56116
2008-09-11 19:41:10 +00:00
Duncan Sands
d4133ac315
Intrinsics don't touch internal global variables
...
(unless passed one via a parameter), even if they
are IntrWriteMem.
llvm-svn: 56115
2008-09-11 19:35:55 +00:00
Dan Gohman
9b9d547a5c
Fix a copy+paste bug that Duncan spotted. For several
...
cases it was still getting lucky and detecting overflow
but it was clearly incorrect.
llvm-svn: 56113
2008-09-11 18:53:02 +00:00
Evan Cheng
4c9fbbb511
Fix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister check.
...
llvm-svn: 56112
2008-09-11 18:40:32 +00:00
Evan Cheng
fb05965d72
Eliminate some unused methods.
...
llvm-svn: 56108
2008-09-11 17:31:47 +00:00
Evan Cheng
c5af471be5
Indentation.
...
llvm-svn: 56107
2008-09-11 17:31:12 +00:00
Jim Grosbach
56938af9e2
lib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted
...
by its first field, but TableGen doesn't actually enforce creating it that
way. TableGen sorts the records that will be used to create it by the names
of the records, not the Name field of those records.
This patch corrects the sort to use the "Name" field of the record as the
sort key.
llvm-svn: 56106
2008-09-11 17:05:32 +00:00
Duncan Sands
e30b36fe37
Intrinsics don't read these kinds of global
...
variables.
llvm-svn: 56105
2008-09-11 15:43:12 +00:00
Evan Cheng
f66e1120c6
Change getSubReg semantics. It now returns zero if the specified register doesn't have a subreg of the specified index.
...
llvm-svn: 56099
2008-09-11 06:25:25 +00:00
Evan Cheng
783ed9ead1
Fix a 80 column violation.
...
llvm-svn: 56097
2008-09-11 05:58:06 +00:00
Dale Johannesen
58d084c05b
The version of AtomicSDNode::AtomicSDNode used (only) for
...
cmp-and-swap reversed the Cmp and Swap arguments; comments
make it clear this is unintentional. Unfortunately, the
x86 BE had a compensating reversal, which is removed here.
PPC is OK.
From inspection of the Alpha code I think it is OK, but
if somebody has that platform please check it out. I
cannot test on that platform.
llvm-svn: 56091
2008-09-11 03:12:59 +00:00
Owen Anderson
41baf8b22a
If ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before giving up. This fixes 445.gobmk on
...
X86-64 in fast isel.
llvm-svn: 56088
2008-09-11 02:41:37 +00:00
Dale Johannesen
e5ca04e70d
Succumb utterly to compatibility and implement
...
__sync_fetch_and_nand as ANDC, even though that's
not what nand means.
llvm-svn: 56087
2008-09-11 02:15:03 +00:00
Evan Cheng
b401449ceb
Propagate subreg index when promoting a load to a copy.
...
llvm-svn: 56085
2008-09-11 01:02:12 +00:00
Dan Gohman
9d9a4be588
In my analysis for r56076 I missed the case where the original
...
multiplication overflows.
llvm-svn: 56082
2008-09-11 00:25:00 +00:00
Dan Gohman
c1ae01688f
Fix an icmp+sdiv optimization to check for and handle an overflow
...
condition. This fixes PR2740.
llvm-svn: 56076
2008-09-10 23:30:57 +00:00
Dan Gohman
dd51d52c0f
Add more documentation advertising the -view-*-dags options.
...
llvm-svn: 56073
2008-09-10 22:23:41 +00:00
Dan Gohman
bf646f2986
X86FastISel support for double->float and float->double casts.
...
llvm-svn: 56070
2008-09-10 21:02:08 +00:00
Dan Gohman
1dc9b0514f
FastISel support for i1 PHI nodes.
...
llvm-svn: 56069
2008-09-10 21:01:31 +00:00
Dan Gohman
940bafb687
FastISel support for i1 constants.
...
llvm-svn: 56068
2008-09-10 21:01:08 +00:00
Owen Anderson
7591130946
Fix a bug in the coalescer where it didn't check if a live interval existed before trying to manipulate it. This
...
was exposed by fast isel's handling of shifts on X86-64. With this, FreeBench/pcompress2 passes on X86-64 in fast isel.
llvm-svn: 56067
2008-09-10 20:41:13 +00:00
Dan Gohman
39d82f902a
Add X86FastISel support for static allocas, and refences
...
to static allocas. As part of this change, refactor the
address mode code for laods and stores.
llvm-svn: 56066
2008-09-10 20:11:02 +00:00
Evan Cheng
534fe1c405
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands.
...
llvm-svn: 56065
2008-09-10 20:08:45 +00:00
Evan Cheng
710c3cf36a
Fix a fastcc + sret bug. If fastcc and sret, callee doesn't need to pop the hidden struct ptr; Re-enable fastcc.
...
llvm-svn: 56061
2008-09-10 18:25:29 +00:00
Dale Johannesen
4cc893bab6
Handle new intrinsics with vector arguments.
...
Patch by Paul Redmond.
llvm-svn: 56059
2008-09-10 17:31:40 +00:00
Dan Gohman
222018da7b
Add a break statement that I accidentally deleted when
...
I shuffled the fast-isel command-line options around. This fixes
a bunch of fast-isel failures.
llvm-svn: 56057
2008-09-10 15:52:34 +00:00
Devang Patel
728c44ab56
fix white spaces.
...
llvm-svn: 56056
2008-09-10 14:49:55 +00:00
Duncan Sands
6d6a65310b
Fix name.
...
llvm-svn: 56055
2008-09-10 13:22:10 +00:00
Duncan Sands
83e45acc25
Add trampoline support for the new FastCC calling
...
convention (not related to recent Ada testsuite
failures).
llvm-svn: 56054
2008-09-10 13:11:09 +00:00
Duncan Sands
536c399579
Turn off the new FastCC for the moment. It causes
...
a slew of Ada testsuite failures on x86-32 linux.
Seems to be related to the use of float.
llvm-svn: 56053
2008-09-10 13:09:24 +00:00
Bill Wendling
6987fec11c
Remove unnecessary bit-wise AND from the limited precision work.
...
llvm-svn: 56049
2008-09-10 06:26:10 +00:00
Daniel Dunbar
999096065f
Fix 80 col violation.
...
llvm-svn: 56048
2008-09-10 04:16:29 +00:00
Dan Gohman
97f0a0f28d
Fix a warning about comparing signed and unsigned values.
...
llvm-svn: 56040
2008-09-10 01:09:32 +00:00
Evan Cheng
c6db3ad15f
Fix typo.
...
llvm-svn: 56037
2008-09-10 00:30:50 +00:00
Bill Wendling
eb1db169bf
Check that both operands are f32 before attempting to lower.
...
llvm-svn: 56036
2008-09-10 00:24:59 +00:00
Bill Wendling
648930b9ba
Implement "visitPow". This is mainly used to see if we have a pow() call of this
...
form:
powf(10.0f, x);
If this is the case, and also we want limited precision floating-point
calculations, then lower to do the limited-precision stuff.
llvm-svn: 56035
2008-09-10 00:20:20 +00:00
Evan Cheng
0fff397a13
A few more places where FPOW is being ignored.
...
llvm-svn: 56032
2008-09-09 23:35:53 +00:00
Dan Gohman
b4c0295b8e
Change -fast-isel-no-abort to -fast-isel-abort, which now defaults
...
to being off by default. Also, add assertion checks to check that
the various fast-isel-related command-line options are only used
when -fast-isel itself is enabled.
llvm-svn: 56029
2008-09-09 23:05:00 +00:00
Evan Cheng
f4e5de4583
Legalizer was missing code that expand fpow to a libcall.
...
llvm-svn: 56028
2008-09-09 23:02:14 +00:00
Bill Wendling
ab6676a46a
Adding 6-, 12-, and 18-bit limited-precision floating-point support for exp2
...
function.
llvm-svn: 56025
2008-09-09 22:39:21 +00:00
Dale Johannesen
abb1e7770b
Move the uglier parts of deciding not to emit a
...
UsedDirective for some symbols in llvm.used into
Darwin-specific code. I've decided LessPrivateGlobal
is potentially a useful abstraction and left it in
the target-independent area, with improved comment.
llvm-svn: 56024
2008-09-09 22:29:13 +00:00
Bill Wendling
48217d89b4
Add support for 6-, 12-, and 18-bit limited precision calculations of exp for
...
floating-point numbers.
llvm-svn: 56023
2008-09-09 22:13:54 +00:00
Dan Gohman
fb9dbe0f5b
Fix a minor wording ambiguity in the Developer Policy.
...
llvm-svn: 56022
2008-09-09 22:13:09 +00:00
Dan Gohman
91491b51e2
Add a new option, -fast-isel-verbose, that can be used with
...
-fast-isel-no-abort to get a dump of all unhandled instructions,
without an abort.
llvm-svn: 56021
2008-09-09 22:06:46 +00:00
Evan Cheng
93945287b8
Clear preference when it no longer makes sense.
...
llvm-svn: 56019
2008-09-09 21:44:23 +00:00
Devang Patel
b4061e8ce4
Remove.
...
llvm-svn: 56018
2008-09-09 21:41:34 +00:00
Devang Patel
92b032f3e6
if loop induction variable is always sign or zero extended then
...
extend the type of induction variable.
llvm-svn: 56017
2008-09-09 21:41:07 +00:00
Devang Patel
18ff6367f7
Add assertion check.
...
llvm-svn: 56016
2008-09-09 21:38:40 +00:00
Devang Patel
92c5367705
fix overflow check.
...
llvm-svn: 56011
2008-09-09 20:54:34 +00:00
Owen Anderson
4a58bd331b
Clean this up, based on Evan's suggestions.
...
llvm-svn: 56009
2008-09-09 20:47:17 +00:00
Bill Wendling
ed3bb7888d
- Add support for 6-, 12-, and 18-bit limited precision floating-point "log"
...
values.
- Refactored some of the code.
llvm-svn: 56008
2008-09-09 20:39:27 +00:00
Evan Cheng
53b728c27c
Fix PR2757. Ignore liveinterval register allocation preference if the preference register is not in the right register class. This can happen due to sub-register coalescing.
...
llvm-svn: 56006
2008-09-09 20:22:01 +00:00
Anton Korobeynikov
1a1140429e
Make safer variant of alias resolution routine to be default
...
llvm-svn: 56005
2008-09-09 20:05:04 +00:00
Duncan Sands
e5579930db
Simplify this some more. No functionality change.
...
llvm-svn: 56003
2008-09-09 19:56:34 +00:00
Anton Korobeynikov
a9b60ee0fc
Resolve aliases, when possible
...
llvm-svn: 56001
2008-09-09 19:04:59 +00:00
Bill Wendling
faeb4b6755
Add limited precision floating-point conversions of log10 for 6- and 18-bit
...
precisions.
llvm-svn: 56000
2008-09-09 18:42:23 +00:00
Dan Gohman
4fcccd8d66
Mark IMPLICIT_DEF as being rematerializable and cheap-as-a-move.
...
It's already special-cased and treated as rematerializable within
LiveIntervals; this allows it to be handled by other passes
such as TwoAddressInstrctionPass.
llvm-svn: 55999
2008-09-09 18:25:28 +00:00
Anton Korobeynikov
4e518041d3
Fix typo
...
llvm-svn: 55998
2008-09-09 18:24:07 +00:00
Anton Korobeynikov
ac2c655808
Fix incorrect linker behaviour: we shouldn't resolve weak aliases.
...
llvm-svn: 55997
2008-09-09 18:23:48 +00:00
Anton Korobeynikov
6acb2219b6
Replace explicit pointer-size constants to TargetData query.
...
No functionality change.
llvm-svn: 55996
2008-09-09 18:22:57 +00:00
Dan Gohman
86fb5b48de
Make SimplifyDemandedVectorElts simplify vectors with multiple
...
users, and teach it about shufflevector instructions.
Also, fix a subtle bug in SimplifyDemandedVectorElts'
insertelement code.
This is a patch that was originally written by Eli Friedman,
with some fixes and cleanup by me.
llvm-svn: 55995
2008-09-09 18:11:14 +00:00
Devang Patel
a328690ed3
Simplify.
...
Fix outdated comment.
llvm-svn: 55993
2008-09-09 17:56:50 +00:00
Gabor Greif
ea79c3e7a0
fit in 80 cols, minor tweaks
...
llvm-svn: 55992
2008-09-09 17:52:13 +00:00
Duncan Sands
d7ba10c31b
Optimization suggested by Matthijs Kooijman.
...
llvm-svn: 55988
2008-09-09 13:44:24 +00:00
Duncan Sands
c189e79440
Correct callgraph construction. It has two problems:
...
(1) code left over from the days of ConstantPointerRef:
if a use of a function is a GlobalValue then that is
not considered a reason to add an edge from the external
node, even though the use may be as an initializer for
an externally visible global! There might be some point
to this behaviour when the use is by an alias (though the
code predated aliases by some centuries), but I think
PR2782 is a better way of handling that. (2) If function
F calls function G, and also G is a parameter to the
call, then an F->G edge is not added to the callgraph.
While this doesn't seem to matter much, adding such an
edge makes the callgraph more regular.
In addition, the new code should be faster as well as
simpler.
llvm-svn: 55987
2008-09-09 12:40:47 +00:00
Argyrios Kyrtzidis
50ba6cc334
Update VC++ project files.
...
llvm-svn: 55985
2008-09-09 11:38:37 +00:00
Owen Anderson
8529085f4f
Check for type legality before materializing integer constants in fast isel. With this change,
...
all of MultiSource/Applications passes on Darwin/X86 under FastISel.
llvm-svn: 55982
2008-09-09 06:32:02 +00:00
Evan Cheng
7aedcf151c
Allow use of ssh to perform remote execution.
...
llvm-svn: 55979
2008-09-09 06:11:26 +00:00
Dan Gohman
b6aef419b4
Remove the code that protected FastISel from aborting in
...
the case of loads, stores, and conditional branches. It can
handle those now, so any that aren't handled should trigger
the abort.
llvm-svn: 55977
2008-09-09 02:40:04 +00:00
Dan Gohman
7164e9a702
Temporarily disable vector select in the bitcode reader. The
...
way it handles the type of the condition is breaking plain
scalar select in the case that the value is a
forward-reference.
llvm-svn: 55976
2008-09-09 02:08:49 +00:00
Evan Cheng
1e97901388
Fix a constant lowering bug. Now we can do load and store instructions with funky getelementptr embedded in the address operand.
...
llvm-svn: 55975
2008-09-09 01:26:59 +00:00
Dale Johannesen
f080225490
Fix logic for not emitting no-dead-strip for some
...
objects in llvm.used (thanks Anton). Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).
llvm-svn: 55973
2008-09-09 01:21:22 +00:00
Dan Gohman
72eb6e76e4
Update generated files.
...
llvm-svn: 55972
2008-09-09 01:13:24 +00:00
Devang Patel
0f7a3507cf
Fix simplifycfg crash in handing block merge.
...
llvm-svn: 55971
2008-09-09 01:06:56 +00:00
Dan Gohman
c579d978a3
Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
...
and, if so, to return a vector of boolean as a result;
Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and
Update LangRef.html to describe these changes.
This patch was contributed by Preston Gurd!
llvm-svn: 55969
2008-09-09 01:02:47 +00:00
Bill Wendling
484167851a
Add support for floating-point calculations of log2 with limited precisions of 6
...
and 18.
llvm-svn: 55968
2008-09-09 00:28:24 +00:00
Devang Patel
3d56051f70
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
...
llvm-svn: 55965
2008-09-08 22:14:17 +00:00
Dale Johannesen
ea9285e643
Don't suppress no-dead-strip for used static functions.
...
llvm-svn: 55962
2008-09-08 21:21:49 +00:00
Anton Korobeynikov
ab4928a6e5
Reapply 55902: Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets
...
llvm-svn: 55960
2008-09-08 21:14:36 +00:00
Anton Korobeynikov
35883b7eec
Reapply 55903: Testcase for 64-bit lowering of eh_return & unwind_init
...
llvm-svn: 55959
2008-09-08 21:14:19 +00:00
Anton Korobeynikov
45165ed1ac
Reapply 55904: Unbreak and fix indentation
...
llvm-svn: 55958
2008-09-08 21:13:56 +00:00
Anton Korobeynikov
177eda0505
Reapply 55901: Drop unused variable
...
llvm-svn: 55957
2008-09-08 21:13:33 +00:00
Anton Korobeynikov
524820fef7
Reapply 55900: We do support EH on x86-64!
...
llvm-svn: 55956
2008-09-08 21:13:08 +00:00
Anton Korobeynikov
2fd24e7713
Reapply 55899: First draft of EH support on x86/64-linux
...
Now with fix, which prevents subtle codegen bug to trigger on darwin.
No fix for bug though, it's still there.
llvm-svn: 55955
2008-09-08 21:12:47 +00:00
Anton Korobeynikov
4112634ca6
Reapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64
...
llvm-svn: 55954
2008-09-08 21:12:11 +00:00
Dan Gohman
a333f3ccb8
Fix a few I's that were meant to be renamed to BI's.
...
llvm-svn: 55942
2008-09-08 20:37:59 +00:00
Dan Gohman
554e6898ff
Add a target triple; apparently LLVM doesn't use 64-bit
...
data directives on darwin.
llvm-svn: 55941
2008-09-08 20:16:18 +00:00
Bill Wendling
3871441861
Reverting r55898 as well. This wasn't reverted in the original revert...
...
llvm-svn: 55938
2008-09-08 19:42:32 +00:00
Bill Wendling
6fe5fe4209
Accidental commit of partial 'stack canaries' code
...
llvm-svn: 55937
2008-09-08 18:12:00 +00:00
Bill Wendling
6da384d980
Remove these testcases associated with changes between r 55898 and r 55909.
...
llvm-svn: 55931
2008-09-08 18:00:39 +00:00
Dale Johannesen
67f99f1454
Redo the 3 existing low-precision expansions to
...
use float constants. An oversight by the numerics
people who supplied this.
llvm-svn: 55930
2008-09-08 18:00:26 +00:00
Bill Wendling
99b83712f3
Reverting r55898 to r55909. One of these patches was causing an ICE during the full bootstrap on Darwin:
...
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc
-I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include
-I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include
-I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_negdi2 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_negdi2_s.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) &&
TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical
register live information"), function runOnMachineFunction, file
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp,
line 311.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc
-I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include
-I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include
-I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_lshrdi3 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_lshrdi3_s.o
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
{standard input}:unknown:Undefined local symbol LBB21_11
{standard input}:unknown:Undefined local symbol LBB21_12
{standard input}:unknown:Undefined local symbol LBB21_13
{standard input}:unknown:Undefined local symbol LBB21_8
llvm-svn: 55928
2008-09-08 17:59:12 +00:00
Evan Cheng
d172048b59
Handle calls which produce i1 results: promote to i8 but and it with 1 to get the low bit.
...
llvm-svn: 55925
2008-09-08 17:15:42 +00:00
Devang Patel
7518f250b9
Remove unused counter.
...
llvm-svn: 55924
2008-09-08 17:14:54 +00:00
Dan Gohman
1df80f6b1c
In visitUREM, arrange for the temporary UDIV node to be
...
revisited, consistent with the code in visitSREM.
llvm-svn: 55923
2008-09-08 16:59:01 +00:00
Daniel Dunbar
ede2d7d745
Add VISIBILITY_HIDDEN on SDISelAsmOperandInfo
...
llvm-svn: 55922
2008-09-08 16:56:08 +00:00
Dan Gohman
c05dca95a2
Bitcasting two or from aggregate types is not permitted. Update
...
LangRef.html, and teach the verifier to check bitcast instructions.
llvm-svn: 55921
2008-09-08 16:45:59 +00:00
Dan Gohman
fd18d630bc
i128 and f80 are implemented for x86-64 now.
...
llvm-svn: 55920
2008-09-08 16:42:56 +00:00
Dan Gohman
f9b2054df1
Add AsmPrinter support for i128 and larger static initializer data.
...
llvm-svn: 55919
2008-09-08 16:40:13 +00:00
Dan Gohman
8f658bac2f
Fix copy+pastos in comments.
...
llvm-svn: 55918
2008-09-08 16:31:35 +00:00
Dan Gohman
e19bc1844f
Fix the string for ISD::UDIVREM.
...
llvm-svn: 55917
2008-09-08 16:30:29 +00:00
Dan Gohman
f6ac018926
Fix typos in (generated) comments.
...
llvm-svn: 55916
2008-09-08 16:29:36 +00:00
Dan Gohman
4d5b5fe812
Delete an unused variable.
...
llvm-svn: 55915
2008-09-08 16:28:17 +00:00
Devang Patel
d92a8216ec
xfail
...
llvm-svn: 55914
2008-09-08 16:24:30 +00:00
Devang Patel
538a7f479a
Remove OptimizeIVType()
...
llvm-svn: 55913
2008-09-08 16:13:27 +00:00
Duncan Sands
a9de91e066
Didn't mean to commit this change to how the
...
callgraph is printed.
llvm-svn: 55912
2008-09-08 16:04:03 +00:00
Evan Cheng
24776b554d
Avoid redefinition and nnbreak windows build.
...
llvm-svn: 55911
2008-09-08 16:01:27 +00:00
Anton Korobeynikov
6a73698a85
Unbreak and fix indentation
...
llvm-svn: 55904
2008-09-08 14:23:34 +00:00
Anton Korobeynikov
f5e48008a4
Testcase for 64-bit lowering of eh_return & unwind_init
...
llvm-svn: 55903
2008-09-08 14:23:16 +00:00
Anton Korobeynikov
f0d1a0ccf0
Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets
...
llvm-svn: 55902
2008-09-08 14:22:57 +00:00
Anton Korobeynikov
b55688d27d
Drop unused variable
...
llvm-svn: 55901
2008-09-08 14:22:38 +00:00
Anton Korobeynikov
0316b797ea
We do support EH on x86-64!
...
llvm-svn: 55900
2008-09-08 14:22:16 +00:00
Anton Korobeynikov
82b9540046
First draft of EH support on x86/64-linux
...
llvm-svn: 55899
2008-09-08 14:21:53 +00:00
Anton Korobeynikov
cb0655d626
Implement FRAME_TO_ARGS_OFFSET for x86-64
...
llvm-svn: 55898
2008-09-08 14:21:10 +00:00
Rafael Espindola
d3ca8be4a9
Add testcase from bug 2770.
...
llvm-svn: 55897
2008-09-08 11:17:54 +00:00
Duncan Sands
b9a6f861b4
Update the callgraph correctly.
...
llvm-svn: 55896
2008-09-08 11:08:09 +00:00
Duncan Sands
3cf7d86556
Update the callgraph correctly in ArgumentPromotion.
...
llvm-svn: 55895
2008-09-08 11:07:35 +00:00
Duncan Sands
46911f1271
Reapply 55859. This doesn't change anything as
...
long as the callgraph is correct. It checks
for wrong callgraphs more strictly.
llvm-svn: 55894
2008-09-08 11:05:51 +00:00
Evan Cheng
ca14c07175
Correctly handle physical register inputs. They are not explicit input operands in the resulting machine instrs.
...
llvm-svn: 55893
2008-09-08 08:39:33 +00:00
Evan Cheng
e775d3526c
Add fast isel physical register definition support.
...
llvm-svn: 55892
2008-09-08 08:38:20 +00:00
Evan Cheng
6500d1711a
Add support to extend call operands when needed. Enable x86 fastisel call support.
...
llvm-svn: 55891
2008-09-08 06:35:17 +00:00
Bill Wendling
5f7371d7b1
Revert my previous change -- the subtraction of two constants was a no-op
...
before. This is taken care of in the selection DAG pass. In my opinion, this
should be in one place or the other. I.e., it should probably be removed from
the DAG combiner (along with the other arithmetic transformations on constants
that are essentially no-ops).
llvm-svn: 55889
2008-09-08 01:56:32 +00:00
Bill Wendling
df81749886
Convert
...
// fold (sub c1, c2) -> c1-c2
from a no-op into an actual transformation.
llvm-svn: 55886
2008-09-07 11:34:47 +00:00
Bill Wendling
5703c6e8dd
Clean up CSS validator errors: 'Property align doesn't exist : center'
...
llvm-svn: 55885
2008-09-07 10:29:20 +00:00
Bill Wendling
b175fa49ed
Formatting changes. to make the information cleaner.
...
llvm-svn: 55884
2008-09-07 10:26:33 +00:00
Duncan Sands
1ea0d2e6db
Correct a comment and strip trailing whitespace.
...
llvm-svn: 55883
2008-09-07 09:54:09 +00:00
Evan Cheng
6c8f55c841
Initial fastisel call support for C, Fast, and X86_FastCall calling conventions. It's meant to handle "simple" calls, i.e. no byval, structret, etc. It doesn't support multi-result returns either.
...
Not yet turned on, it needs to support sext / zext of arguments and result.
llvm-svn: 55882
2008-09-07 09:09:33 +00:00
Evan Cheng
6f343bd543
Some code clean up.
...
llvm-svn: 55881
2008-09-07 09:07:23 +00:00