Devang Patel
f405b5e532
80 cols
...
llvm-svn: 56521
2008-09-23 23:32:15 +00:00
Devang Patel
a987d3e3fb
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56520
2008-09-23 23:25:44 +00:00
Devang Patel
21d4e4e783
Remove tabs.
...
llvm-svn: 56515
2008-09-23 23:18:26 +00:00
Devang Patel
ba3fa6c6e1
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Devang Patel
82fed6702b
Use parameter attribute store (soon to be renamed) for
...
Function Notes also. Function notes are stored at index ~0.
llvm-svn: 56511
2008-09-23 22:35:17 +00:00
Dan Gohman
676145f02d
Now that DeadMachineInstructionElim is basically working
...
correctly, it's not necessary to explicitly remove registers
from their use-def lists.
llvm-svn: 56509
2008-09-23 22:04:18 +00:00
Dan Gohman
918fe08a56
Arrange for FastISel code to have access to the MachineModuleInfo
...
object. This will be needed to support debug info.
llvm-svn: 56508
2008-09-23 21:53:34 +00:00
Dan Gohman
269999cb03
Track local physical register liveness. This is not the most
...
efficient implementation possible, but it's pretty simple and
good enough for the time being.
llvm-svn: 56504
2008-09-23 21:40:44 +00:00
Chris Lattner
4f6646780e
regenerate
...
llvm-svn: 56502
2008-09-23 21:18:31 +00:00
Chris Lattner
7f0a77f11d
allow inreg on the result of a function
...
llvm-svn: 56501
2008-09-23 21:18:08 +00:00
Dan Gohman
c07f686665
Replace the LiveRegs SmallSet with a simple counter that keeps
...
track of the number of live registers, which is all the set was
being used for.
llvm-svn: 56498
2008-09-23 18:50:48 +00:00
Dan Gohman
ed1cf1a8f1
Fix these enums' starting values to reflect the way that
...
instruction opcodes are now numbered. No functionality change.
llvm-svn: 56497
2008-09-23 18:42:32 +00:00
Dan Gohman
4eb9956940
Update the comment to reflect the new name.
...
llvm-svn: 56496
2008-09-23 18:27:53 +00:00
Dan Gohman
e64c9944f6
Delete an unused function.
...
llvm-svn: 56495
2008-09-23 18:26:47 +00:00
Dan Gohman
2430073657
Move the code for initializing the global base reg out of
...
X86ISelDAGToDAG.cpp and into X86InstrInfo.cpp. This will allow
it to be reused by FastISel.
llvm-svn: 56494
2008-09-23 18:22:58 +00:00
Duncan Sands
9c40c28926
Rationalize the names of passes that print information:
...
-callgraph => print-callgraph
-callscc => print-callgraph-sccs
-cfgscc => print-cfg-sccs
-externalfnconstants => print-externalfnconstants
-print => print-function
-print-alias-sets (no change)
-print-callgraph => dot-callgraph
-print-cfg => dot-cfg
-print-cfg-only => dot-cfg-only
-print-dom-info (no change)
-printm => print-module
-printusedtypes => print-used-types
llvm-svn: 56487
2008-09-23 12:47:39 +00:00
Matthijs Kooijman
bdb215d338
Fix indendation.
...
llvm-svn: 56486
2008-09-23 08:54:41 +00:00
Owen Anderson
4cdc18ad80
Add initial support for inserting last minute copies.
...
llvm-svn: 56485
2008-09-23 04:37:10 +00:00
Evan Cheng
9e9426cb82
Support x86 specific inline asm modifier 'J'.
...
llvm-svn: 56483
2008-09-22 23:57:37 +00:00
Dale Johannesen
a0e1876584
Remove silly semicolon.
...
llvm-svn: 56481
2008-09-22 23:28:18 +00:00
Dan Gohman
e2947e1e07
Fix the alignment of loads from constant pool entries when the
...
load address has an offset from the base of the constant pool
entry.
llvm-svn: 56479
2008-09-22 22:40:08 +00:00
Dale Johannesen
8f8466dc42
Remove a compiler warning.
...
llvm-svn: 56478
2008-09-22 22:33:34 +00:00
Devang Patel
329fe728b5
Add hasNote() to check note associated with a function.
...
llvm-svn: 56477
2008-09-22 22:32:29 +00:00
Evan Cheng
bab5988017
Livestacks really does preserve everything.
...
llvm-svn: 56476
2008-09-22 22:26:15 +00:00
Evan Cheng
962c2cf17a
Instead of setPreservesAll, just mark them preseving machine loop info and machine dominators.
...
llvm-svn: 56475
2008-09-22 22:21:38 +00:00
Evan Cheng
3276416fa4
Test case for fp logical instructions.
...
llvm-svn: 56474
2008-09-22 22:19:34 +00:00
Owen Anderson
97364655dc
Significant improvements to the logic for merging live intervals. This code can't
...
just use LI::MergeValueAsValue, as its behavior in the presence of overlapping ranges
isn't what StrongPHIElimination wants.
llvm-svn: 56472
2008-09-22 21:58:58 +00:00
Dale Johannesen
7a74e71489
Make log, log2, log10, exp, exp2 use Expand by
...
default.
llvm-svn: 56471
2008-09-22 21:57:32 +00:00
Evan Cheng
168f8f3916
Mark several codegen passes as preserving all analysis.
...
llvm-svn: 56469
2008-09-22 20:58:04 +00:00
Dale Johannesen
f1acc4d610
More refactoring. Yawn.
...
llvm-svn: 56468
2008-09-22 20:51:30 +00:00
Mikhail Glushenkov
446c5dcf57
Convert llvmc2 plugins to use llvm/Support/Registry.h machinery.
...
llvm-svn: 56467
2008-09-22 20:51:19 +00:00
Mikhail Glushenkov
53aa586844
Move llvmc2 header files under include/llvm/CompilerDriver
...
llvm-svn: 56466
2008-09-22 20:50:40 +00:00
Mikhail Glushenkov
47afe73081
Plugin support for llvmc2 (a-la opt).
...
llvm-svn: 56465
2008-09-22 20:49:34 +00:00
Mikhail Glushenkov
6f1db3df74
Add a 'Debugging' section to the documentation.
...
llvm-svn: 56464
2008-09-22 20:48:48 +00:00
Mikhail Glushenkov
4825a0bb2f
Make comments a little bit more clear.
...
llvm-svn: 56463
2008-09-22 20:48:22 +00:00
Mikhail Glushenkov
8a2bdc74b2
Get rid of GlobalLanguageMap. Global state is evil.
...
llvm-svn: 56462
2008-09-22 20:47:46 +00:00
Mikhail Glushenkov
632d982a7f
Rename our version of ccc to ccc2
...
llvm-svn: 56461
2008-09-22 20:47:09 +00:00
Mikhail Glushenkov
1c4e084bd2
Fix some comments
...
llvm-svn: 56460
2008-09-22 20:46:44 +00:00
Mikhail Glushenkov
9c13f724fc
Add a (forward_as) option property
...
llvm-svn: 56459
2008-09-22 20:46:19 +00:00
Mikhail Glushenkov
b50080e6cb
Delete the file llvmc2/doc/LLVMC-Enhancements.rst + some minor language/spelling fixes.
...
llvm-svn: 56458
2008-09-22 20:45:17 +00:00
Dale Johannesen
7beddb8680
Refactor FP intrinisic setup. Per review feedback.
...
llvm-svn: 56456
2008-09-22 19:51:58 +00:00
Oscar Fuentes
8807bddf08
CMake build system: support for parallel builds.
...
llvm-svn: 56453
2008-09-22 18:21:51 +00:00
Evan Cheng
13beeeb128
Per review feedback: Only perform
...
(srl x, (trunc (and y, c))) -> (srl x, (and (trunc y), c))
etc. when both "trunc" and "and" have single uses.
llvm-svn: 56452
2008-09-22 18:19:24 +00:00
Arnold Schwaighofer
796a271c5f
Change the calling convention used when tail call optimization is enabled from CC_X86_32_TailCall to CC_X86_32_FastCC.
...
llvm-svn: 56436
2008-09-22 14:50:07 +00:00
Rafael Espindola
73a5406d24
Add bound checks in SmallVector
...
llvm-svn: 56432
2008-09-22 10:06:26 +00:00
Oscar Fuentes
f3d3a0dfca
add_partially_linked_object: Replaced nonexistent MESSAGE option in
...
add_custom_command with COMMENT. It was forcing unconditional command
execution.
llvm-svn: 56425
2008-09-22 02:33:43 +00:00
Oscar Fuentes
a229b3c9a7
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Bill Wendling
91ef8fcd29
Add helper function to get a 32-bit floating point constant. No functionality change.
...
llvm-svn: 56418
2008-09-22 00:44:35 +00:00
Chris Lattner
4d7445b3a4
explain what earlyclobber actually is.
...
llvm-svn: 56415
2008-09-21 23:30:17 +00:00
Chris Lattner
f1280cf744
Fold immediates into X86 shifts with fast isel. This generates:
...
sarl $3, %ecx
instead of:
movl $3, %ecx
sarl %cl, %edx
This shrinks fast isel 176.gcc by about 2000 instructions (.3%)
llvm-svn: 56413
2008-09-21 21:44:29 +00:00
Dan Gohman
ae9d9f4d3f
Factor out code into HandleVirtRegDef, for consistency with
...
Handle{Virt,Phys}Reg{Def,Use}. Remove a redundant check
for register zero, and redundant checks for isPhysicalRegister.
llvm-svn: 56412
2008-09-21 21:11:41 +00:00
Dan Gohman
dfc19e6c01
Instead of building a list and sorting it just to find a maximum element,
...
compute the maximum element directly.
llvm-svn: 56411
2008-09-21 21:01:49 +00:00
Owen Anderson
df8f1cb995
Fetch the starting index of the block when assigning intervals. This gets live-in indices
...
correct in the presence of things like EH labels.
llvm-svn: 56410
2008-09-21 20:43:24 +00:00
Chris Lattner
43f5449c48
don't print GlobalAddressSDNode's with an offset of zero as "foo0".
...
llvm-svn: 56399
2008-09-21 18:38:31 +00:00
Chris Lattner
9a8eb0d534
add a note
...
llvm-svn: 56391
2008-09-20 19:17:53 +00:00
Cedric Venet
b0f876d55d
Update VS projects.
...
Change some class to struct for coherency.
llvm-svn: 56389
2008-09-20 18:02:18 +00:00
Dale Johannesen
c16067c3df
Shorten and rearrange data fields to save a word of memory.
...
Per review feedback.
llvm-svn: 56388
2008-09-20 17:45:21 +00:00
Duncan Sands
e1dc84be64
Implement review feedback from Devang: make use
...
of mayReadFromMemory and mayWriteToMemory.
llvm-svn: 56387
2008-09-20 16:45:58 +00:00
Dale Johannesen
9af7b3daec
Teach coalescer about earlyclobber bits.
...
Check bits for preferred register.
llvm-svn: 56384
2008-09-20 02:03:04 +00:00
Evan Cheng
c042000649
Fix PR2808. When regalloc runs out of register, it spill a physical register around the live interval being allocated. Do not continue to try to spill another register, just grab the physical register and move on.
...
llvm-svn: 56381
2008-09-20 01:28:05 +00:00
Evan Cheng
65502487b7
Clean up the test.
...
llvm-svn: 56380
2008-09-20 01:26:27 +00:00
Evan Cheng
4730522235
No need to print function stubs for Mac OS X 10.5 and up. Linker will handle it.
...
llvm-svn: 56378
2008-09-20 00:13:45 +00:00
Evan Cheng
9d917beba6
80 column violation.
...
llvm-svn: 56377
2008-09-20 00:13:08 +00:00
Dan Gohman
098786e9f7
Fix a FastISel GlobalVariable CSE bug.
...
llvm-svn: 56376
2008-09-19 23:42:04 +00:00
Evan Cheng
29e4c9192d
Continue after removing the current MI.
...
llvm-svn: 56372
2008-09-19 22:49:39 +00:00
Dan Gohman
9801ba451a
Refactor X86SelectConstAddr, folding it into X86SelectAddress. This
...
results in better code for globals. Also, unbreak the local CSE for
GlobalValue stub loads.
llvm-svn: 56371
2008-09-19 22:16:54 +00:00
Dale Johannesen
436aae627d
Make earlyclobber stuff work when virtual regs
...
have previously been assigned conflicting physreg.
llvm-svn: 56364
2008-09-19 18:52:31 +00:00
Bill Wendling
0e2119213b
Prevent warning about conversion from 64-bit to 32-bit by (yuck) casting...
...
llvm-svn: 56359
2008-09-19 18:34:40 +00:00
Dan Gohman
83ee17cdb1
Now that ConstantSDNode doesn't hold an APInt,
...
use ARG_FLAGSSDNode as the most aligned node type,
as it contains an int64_t, which is 8-byte
aligned on mingw.
llvm-svn: 56358
2008-09-19 18:09:19 +00:00
Ted Kremenek
36d4cbc382
Added static methods to APSInt: getMinValue and getMaxValue.
...
llvm-svn: 56355
2008-09-19 18:01:14 +00:00
Evan Cheng
4c0197043c
Re-materalized definition instructions may be dead. Whack them.
...
llvm-svn: 56352
2008-09-19 17:38:47 +00:00
Gabor Greif
715b9d2403
backing out my last commit, it was not intended to go on the trunk
...
llvm-svn: 56349
2008-09-19 15:13:20 +00:00
Gabor Greif
92f17070e7
first shot at removing Use::Val
...
untested, Use::swap() is definitely not done yet
llvm-svn: 56348
2008-09-19 15:03:57 +00:00
Duncan Sands
5408dfd3b8
Turn on the AddReadAttrs pass.
...
llvm-svn: 56345
2008-09-19 14:34:36 +00:00
Duncan Sands
5a896a9858
Add test for improvement of readonly to readnone,
...
and non-demotion of readnone to readonly.
llvm-svn: 56344
2008-09-19 09:20:05 +00:00
Duncan Sands
310dbffdc0
Turn on these tests!
...
llvm-svn: 56343
2008-09-19 09:16:32 +00:00
Duncan Sands
310077034a
Remove the MarkModRef pass (use AddReadAttrs instead).
...
Unfortunately this means removing one regression test
of GlobalsModRef because I couldn't work out how to
perform it without MarkModRef.
llvm-svn: 56342
2008-09-19 08:23:44 +00:00
Duncan Sands
af25ee7ffc
Add a new pass AddReadAttrs which works out which functions
...
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.
llvm-svn: 56341
2008-09-19 08:17:05 +00:00
Duncan Sands
a75815ebb0
Test the callgraph directly for the missing edge.
...
llvm-svn: 56338
2008-09-19 08:01:57 +00:00
Duncan Sands
938e8f60d6
Teach -callgraph to always print the callgraph (as the
...
description says it does), not just when -analyze is
used as well. This means printing to stderr, so adjust
some tests.
llvm-svn: 56337
2008-09-19 07:57:09 +00:00
Dale Johannesen
e519bd4183
Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis
...
and redo as linked list walk. Logic moved into RA.
Per review feedback.
llvm-svn: 56326
2008-09-19 01:02:35 +00:00
Devang Patel
c25be3b2de
splitLoop does not handle split condition EQ.
...
Fixes PR 2805
llvm-svn: 56321
2008-09-18 23:45:14 +00:00
Dan Gohman
6e005fdc8d
Address-mode folding for X86FastISel. It's pretty basic, but it
...
catches a fair number of common cases. Note that this currently
causes Fast-ISel to leave behind lots of dead instructions.
Those will be dealt with in subsequent commits.
llvm-svn: 56320
2008-09-18 23:23:44 +00:00
Bill Wendling
a00fa322b1
Decrementing the iterator here could be wrong if the worklist is empty after the "erase".
...
Thanks to Ji Young Park for the patch!
llvm-svn: 56316
2008-09-18 23:04:18 +00:00
Devang Patel
76b22c1420
Try to place hoisted instructions befoe icmp instruction.
...
llvm-svn: 56315
2008-09-18 22:50:42 +00:00
Evan Cheng
3d9416cf24
Somehow RegAllocLinearScan is keeping two pointers to MachineRegisterInfo.
...
llvm-svn: 56314
2008-09-18 22:38:47 +00:00
Dan Gohman
e91edeb61c
Simplify this code. The FastISel class has its own TD member.
...
llvm-svn: 56311
2008-09-18 18:26:43 +00:00
Dan Gohman
f3d647e00b
Don't consider instructions with implicit physical register
...
defs to be necessarily live.
llvm-svn: 56310
2008-09-18 18:22:32 +00:00
Tanya Lattner
1fd58f738b
Upgrade doxygen.
...
llvm-svn: 56308
2008-09-18 16:32:28 +00:00
Dan Gohman
95be7d7b85
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.
llvm-svn: 56307
2008-09-18 16:26:26 +00:00
Evan Cheng
5cc53c34c3
Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
...
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Evan Cheng
933b392f65
Duh. Default to ARMCC::AL (always).
...
llvm-svn: 56301
2008-09-18 07:28:19 +00:00
Evan Cheng
5e3ac187d9
Clean up.
...
llvm-svn: 56300
2008-09-18 07:27:23 +00:00
Evan Cheng
bc0d0eccf3
Cosmetic.
...
llvm-svn: 56299
2008-09-18 07:24:33 +00:00
Dan Gohman
af13bf1ebd
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.
llvm-svn: 56292
2008-09-17 21:18:49 +00:00
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