Commit Graph

25025 Commits

Author SHA1 Message Date
Devang Patel
3d0a9a371c Try to place hoisted instructions befoe icmp instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 22:50:42 +00:00
Evan Cheng
841ee1a12b Somehow RegAllocLinearScan is keeping two pointers to MachineRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56314 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 22:38:47 +00:00
Dan Gohman
1fbc3cd674 Simplify this code. The FastISel class has its own TD member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56311 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 18:26:43 +00:00
Dan Gohman
e251b1529f Don't consider instructions with implicit physical register
defs to be necessarily live.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 18:22:32 +00:00
Dan Gohman
ee2e403545 Add a new "fast" scheduler. This is currently basically just a
copy of the BURRList scheduler, but with several parts ripped
out, such as backtracking, online topological sort maintenance
(needed by backtracking), the priority queue, and Sethi-Ullman
number computation and maintenance (needed by the priority
queue). As a result of all this, it generates somewhat lower
quality code, but that's its tradeoff for running about 30%
faster than list-burr in -fast mode in many cases.

This is somewhat experimental. Moving forward, major pieces of
this can be refactored with pieces in common with
ScheduleDAGRRList.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56307 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 16:26:26 +00:00
Evan Cheng
bc4707a255 Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56303 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 07:54:21 +00:00
Evan Cheng
057d0c3535 Duh. Default to ARMCC::AL (always).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56301 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 07:28:19 +00:00
Evan Cheng
6d63a72858 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56300 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 07:27:23 +00:00
Evan Cheng
3f7eb8eba0 Cosmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56299 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18 07:24:33 +00:00
Dan Gohman
b5b6ec6488 FastISel: For calls, prefer using the callee's address as a constant
over having it in a register. And wait until after checking type
legality before requesting that the callee address be placed in a
register. Also, fix support for calls with void return type.

This speeds up fast-isel isel time by about 15% and reduces
instruction counts by about 3% overall on certain testcases. It also
changes many indirect calls to direct calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56292 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 21:18:49 +00:00
Dale Johannesen
91aac1015e 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56290 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 21:13:11 +00:00
Evan Cheng
870e4bef41 Unallocatable registers do not have live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 18:36:25 +00:00
Devang Patel
48fbc2d39b Do not hoist instruction above branch condition. The instruction may use branch condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 18:21:49 +00:00
Devang Patel
00622952ce Do not ignore iv uses outside the loop.
This one slipped through cracks very well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56284 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 17:53:47 +00:00
Dan Gohman
59932584a8 Don't worry about clobbering physical register defs that aren't used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56281 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 15:25:49 +00:00
Evan Cheng
7fd7ca4e7f Fix addrmode1 instruction encodings; fix bx_ret encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 07:53:38 +00:00
Evan Cheng
29c57c34ef Specify instruction encoding using range list to avoid endianess issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56276 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 07:16:21 +00:00
Dan Gohman
682d5a8834 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56270 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 01:39:10 +00:00
Dan Gohman
d3ead4329e Add a new MachineInstr-level DCE pass. It is very simple, and is intended to
be used with fast-isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56268 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 00:43:24 +00:00
Bill Wendling
7795932d41 Add trampoline support to PPC. GCC simply calls the "__trampoline_setup"
function with appropriate parameters. This allows us to support blocks on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56267 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 00:30:57 +00:00
Evan Cheng
1cd332725f 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56258 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 23:12:11 +00:00
Dan Gohman
50284d81f8 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56253 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 22:05:41 +00:00
Bill Wendling
056292fd73 Reverting r56249. On further investigation, this functionality isn't needed.
Apologies for the thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56251 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 21:48:12 +00:00
Dan Gohman
aed48bfee8 Include the alignment value when displaying ConstantPoolSDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56250 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 21:18:22 +00:00
Bill Wendling
9468a9b6be - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 21:12:30 +00:00
Dan Gohman
05ae98346a Fix these comments to reflect current reality. Surprisingly,
MachineConstantPool::getConstantPoolIndex actually expects
a log2-encoded alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 20:45:53 +00:00
Dan Gohman
70ff4cf1ba Finally re-apply r46959. This is made feasible by the combination
of r56230, r56232, and r56246.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 18:52:57 +00:00
Dan Gohman
81b28ceab6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56246 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 18:46:06 +00:00
Evan Cheng
19a341acb8 AllocateRWXMemory -> AllocateRWX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56244 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 17:28:18 +00:00
Dan Gohman
1937e2f6ca Don't take the time to CheckDAGForTailCallsAndFixThem when tail calls
are not enabled. Instead just omit the tail call flag when calls are
created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56235 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 01:42:28 +00:00
Dan Gohman
fb2bbbe786 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56233 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 01:01:33 +00:00
Dan Gohman
fd6edef87b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56232 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 22:18:04 +00:00
Owen Anderson
99500aeb7c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56231 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 22:00:38 +00:00
Dan Gohman
ad7321f58a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56230 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 21:22:06 +00:00
Bruno Cardoso Lopes
b3d7299694 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56228 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 21:06:55 +00:00
Dan Gohman
5eb0cecbc5 Re-enable SelectionDAG CSE for calls. It matters in the case of
libcalls, as in this testcase on ARM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 19:46:03 +00:00
Evan Cheng
25f34a30d6 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#.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56199 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 06:28:41 +00:00
Dan Gohman
8dae138d06 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56196 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-14 17:21:12 +00:00
Dale Johannesen
e009180f2b adjust last patch per review feedback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56194 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-14 01:44:36 +00:00
Dan Gohman
014278e6a1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 17:58:21 +00:00
Duncan Sands
b8ca4ff643 Fix PR2792: treat volatile loads as writing memory somewhere.
Treat stores as reading memory, just to play safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56188 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 12:45:50 +00:00
Evan Cheng
2aa0e649bf Fix random abort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:55:59 +00:00
Dan Gohman
095cc29f32 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:54:27 +00:00
Evan Cheng
e7de7e3574 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56182 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:44:01 +00:00
Evan Cheng
be3034c288 Rely on instruction format to determine so_reg operand for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56181 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:38:29 +00:00
Evan Cheng
05fc966401 Revert 56176. All those instruction formats are still needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:35:33 +00:00
Evan Cheng
55375a44f9 Accidentially flipped the condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:29:57 +00:00
Evan Cheng
42d5ee062a Add debug dumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56178 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-13 01:15:21 +00:00
Evan Cheng
a964b7dffe Eliminate unnecessary instruction formats.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 23:15:39 +00:00
Evan Cheng
49a9f2958d Addrmode 1 S bit can be dynamically set. Look for CPSR def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56172 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 22:45:55 +00:00
Evan Cheng
5f1db7bf31 Rewrite address mode 1 code emission routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56171 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 22:01:15 +00:00
Evan Cheng
ee9e1b0a85 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56165 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 18:13:14 +00:00
Dan Gohman
4fbd796a12 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56162 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 18:08:03 +00:00
Dale Johannesen
913d3dfac4 Pass "earlyclobber" bit through to machine
representation; coalescer and RA need to know
about it.  No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56161 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 17:49:03 +00:00
Dan Gohman
f5aeb1a8e4 Rename ConstantSDNode::getValue to getZExtValue, for consistency
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56159 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 16:56:44 +00:00
Duncan Sands
2bb4a4d315 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 07:29:58 +00:00
Dale Johannesen
e2f2083f9c The sequence for ppcf128 compares was not IEEE
safe in the presence of NaNs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 00:30:56 +00:00
Dan Gohman
4f833d4351 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 23:06:38 +00:00
Dan Gohman
3139ff8f7b Fix a vectorshuffle instcombine bug introduced by r55995.
Patch by Nicolas Capens!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56129 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 22:47:57 +00:00
Jim Grosbach
e5d20f947a udpate header comment: s/VP/VFP/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 21:41:29 +00:00
Arnold Schwaighofer
1fdc40f062 When tailcallopt is enabled all fastcc calls must have an aligned argument stack size. Add a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 20:28:43 +00:00
Evan Cheng
8db866808c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56118 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 20:07:10 +00:00
Owen Anderson
ac34a00fe0 Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 19:44:55 +00:00
Duncan Sands
af8bc26449 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56116 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 19:41:10 +00:00
Duncan Sands
892b84007c Intrinsics don't touch internal global variables
(unless passed one via a parameter), even if they
are IntrWriteMem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56115 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 19:35:55 +00:00
Dan Gohman
bcb37fd22f Fix a copy+paste bug that Duncan spotted. For several
cases it was still getting lucky and detecting overflow
but it was clearly incorrect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 18:53:02 +00:00
Evan Cheng
4086906a0f Fix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56112 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 18:40:32 +00:00
Duncan Sands
1abe60b9be Intrinsics don't read these kinds of global
variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 15:43:12 +00:00
Evan Cheng
3885578a36 Fix a 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 05:58:06 +00:00
Dale Johannesen
d18a462bdd 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 03:12:59 +00:00
Owen Anderson
b63691350d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 02:41:37 +00:00
Dale Johannesen
209a4099f9 Succumb utterly to compatibility and implement
__sync_fetch_and_nand as ANDC, even though that's
not what nand means.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 02:15:03 +00:00
Evan Cheng
d9c553f262 Propagate subreg index when promoting a load to a copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56085 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 01:02:12 +00:00
Dan Gohman
7f85fbd9de In my analysis for r56076 I missed the case where the original
multiplication overflows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56082 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11 00:25:00 +00:00
Dan Gohman
1df3fd6683 Fix an icmp+sdiv optimization to check for and handle an overflow
condition. This fixes PR2740.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 23:30:57 +00:00
Dan Gohman
78efce6155 X86FastISel support for double->float and float->double casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56070 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 21:02:08 +00:00
Dan Gohman
74321abb4f FastISel support for i1 PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 21:01:31 +00:00
Dan Gohman
8211648757 FastISel support for i1 constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 21:01:08 +00:00
Owen Anderson
369e98760b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56067 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 20:41:13 +00:00
Dan Gohman
0586d91bb3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56066 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 20:11:02 +00:00
Evan Cheng
014264b70f Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56065 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 20:08:45 +00:00
Evan Cheng
b188dd9c5b Fix a fastcc + sret bug. If fastcc and sret, callee doesn't need to pop the hidden struct ptr; Re-enable fastcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56061 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 18:25:29 +00:00
Dale Johannesen
fb0e1323e2 Handle new intrinsics with vector arguments.
Patch by Paul Redmond.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56059 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 17:31:40 +00:00
Dan Gohman
3ee25dca5b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56057 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 15:52:34 +00:00
Devang Patel
36a5bf8fd8 fix white spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56056 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 14:49:55 +00:00
Duncan Sands
bf53c2952d Fix name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56055 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 13:22:10 +00:00
Duncan Sands
3ed7d37cbf Add trampoline support for the new FastCC calling
convention (not related to recent Ada testsuite
failures).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56054 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 13:11:09 +00:00
Duncan Sands
06d77dd945 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56053 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 13:09:24 +00:00
Bill Wendling
fc2508eb78 Remove unnecessary bit-wise AND from the limited precision work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 06:26:10 +00:00
Daniel Dunbar
c0c3b9a3d0 Fix 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 04:16:29 +00:00
Dan Gohman
cb89309399 Fix a warning about comparing signed and unsigned values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 01:09:32 +00:00
Evan Cheng
8ec3389aaf Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 00:30:50 +00:00
Bill Wendling
277fc24a7c Check that both operands are f32 before attempting to lower.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 00:24:59 +00:00
Bill Wendling
aeb5c7b353 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-10 00:20:20 +00:00
Evan Cheng
9d24ac56e1 A few more places where FPOW is being ignored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56032 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 23:35:53 +00:00
Dan Gohman
4344a5d0d7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 23:05:00 +00:00
Evan Cheng
4b88702ac3 Legalizer was missing code that expand fpow to a libcall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 23:02:14 +00:00
Bill Wendling
e10c814c52 Adding 6-, 12-, and 18-bit limited-precision floating-point support for exp2
function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 22:39:21 +00:00
Dale Johannesen
d2e51af035 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56024 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 22:29:13 +00:00
Bill Wendling
b4ec283049 Add support for 6-, 12-, and 18-bit limited precision calculations of exp for
floating-point numbers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 22:13:54 +00:00
Dan Gohman
293d5f8bc0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 22:06:46 +00:00
Evan Cheng
3ef2d60e95 Clear preference when it no longer makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56019 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 21:44:23 +00:00
Devang Patel
d22a849282 if loop induction variable is always sign or zero extended then
extend the type of induction variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 21:41:07 +00:00
Devang Patel
bd6dc7a086 Add assertion check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56016 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 21:38:40 +00:00
Devang Patel
4b3f08bac7 fix overflow check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:54:34 +00:00
Owen Anderson
0d95267e49 Clean this up, based on Evan's suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:47:17 +00:00
Bill Wendling
3915025a4f - Add support for 6-, 12-, and 18-bit limited precision floating-point "log"
values.
- Refactored some of the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:39:27 +00:00
Evan Cheng
5530216989 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:22:01 +00:00
Anton Korobeynikov
19e861a4ff Make safer variant of alias resolution routine to be default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:05:04 +00:00
Duncan Sands
7ca9d81bce Simplify this some more. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56003 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 19:56:34 +00:00
Anton Korobeynikov
e4c6b61ebd Resolve aliases, when possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 19:04:59 +00:00
Bill Wendling
bd297bcd4a Add limited precision floating-point conversions of log10 for 6- and 18-bit
precisions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:42:23 +00:00
Dan Gohman
e3b4c0e176 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:25:28 +00:00
Anton Korobeynikov
820c83bf6c Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:24:07 +00:00
Anton Korobeynikov
832b2a9cd8 Fix incorrect linker behaviour: we shouldn't resolve weak aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:23:48 +00:00
Anton Korobeynikov
bff66b0c6c Replace explicit pointer-size constants to TargetData query.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:22:57 +00:00
Dan Gohman
488fbfc69e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 18:11:14 +00:00
Devang Patel
0938f74242 Simplify.
Fix outdated comment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 17:56:50 +00:00
Duncan Sands
24a052124b Optimization suggested by Matthijs Kooijman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 13:44:24 +00:00
Duncan Sands
99c1a7c9e1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55987 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 12:40:47 +00:00
Owen Anderson
baf37cd556 Check for type legality before materializing integer constants in fast isel. With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55982 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 06:32:02 +00:00
Dan Gohman
cf01f7a78c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 02:40:04 +00:00
Dan Gohman
be919409cc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 02:08:49 +00:00
Evan Cheng
59fbc80f6b Fix a constant lowering bug. Now we can do load and store instructions with funky getelementptr embedded in the address operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55975 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 01:26:59 +00:00
Dale Johannesen
b2dfb89e0e 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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 01:21:22 +00:00
Dan Gohman
d8ee59b0ca Update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 01:13:24 +00:00
Devang Patel
e435a5d937 Fix simplifycfg crash in handing block merge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 01:06:56 +00:00
Dan Gohman
f72fb679ef 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55969 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 01:02:47 +00:00
Bill Wendling
3eb594013f Add support for floating-point calculations of log2 with limited precisions of 6
and 18.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55968 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 00:28:24 +00:00
Devang Patel
2379089a6e s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 22:14:17 +00:00
Dale Johannesen
14b0a2b137 Don't suppress no-dead-strip for used static functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55962 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:21:49 +00:00
Anton Korobeynikov
a0e8a1e5d3 Reapply 55904: Unbreak and fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55958 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:13:56 +00:00
Anton Korobeynikov
a177871c8a Reapply 55901: Drop unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55957 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:13:33 +00:00
Anton Korobeynikov
c4da15a5e6 Reapply 55900: We do support EH on x86-64!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:13:08 +00:00
Anton Korobeynikov
b84c1676f1 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:12:47 +00:00
Anton Korobeynikov
260a6b8f85 Reapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 21:12:11 +00:00
Dan Gohman
a8657e3587 Fix a few I's that were meant to be renamed to BI's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 20:37:59 +00:00
Bill Wendling
1b0123c3cd Reverting r55898 as well. This wasn't reverted in the original revert...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55938 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 19:42:32 +00:00
Bill Wendling
1ed49fb74b Accidental commit of partial 'stack canaries' code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55937 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 18:12:00 +00:00
Dale Johannesen
07cabb9432 Redo the 3 existing low-precision expansions to
use float constants.  An oversight by the numerics
people who supplied this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 18:00:26 +00:00
Bill Wendling
a425e0073d 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55928 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 17:59:12 +00:00
Evan Cheng
debdea0a66 Handle calls which produce i1 results: promote to i8 but and it with 1 to get the low bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 17:15:42 +00:00
Devang Patel
245d0ab166 Remove unused counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 17:14:54 +00:00
Dan Gohman
942ca7f808 In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:59:01 +00:00
Daniel Dunbar
1e0e04caac Add VISIBILITY_HIDDEN on SDISelAsmOperandInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:56:08 +00:00
Dan Gohman
500233aef9 Bitcasting two or from aggregate types is not permitted. Update
LangRef.html, and teach the verifier to check bitcast instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:45:59 +00:00
Dan Gohman
f91570c264 i128 and f80 are implemented for x86-64 now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55920 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:42:56 +00:00
Dan Gohman
82f94f1ad9 Add AsmPrinter support for i128 and larger static initializer data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55919 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:40:13 +00:00
Dan Gohman
863890e2fa Fix copy+pastos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55918 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:31:35 +00:00
Dan Gohman
a47916d379 Fix the string for ISD::UDIVREM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55917 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 16:30:29 +00:00