Dan Gohman
53d3241b52
Use gv's --spartan option, which trades away an extra row of UI buttons
...
for more space for displaying the graph.
llvm-svn: 49730
2008-04-15 17:27:05 +00:00
Nicolas Geoffray
7000c8f1aa
Change Divided flag to Split, as suggested by Evan
...
llvm-svn: 49715
2008-04-15 08:08:50 +00:00
Dan Gohman
4370f26750
Treat EntryToken nodes as "passive" so that they aren't added to the
...
ScheduleDAG; they don't correspond to any actual instructions so they
don't need to be scheduled.
This fixes a bug where the EntryToken was being scheduled multiple
times in some cases, though it ended up not causing any trouble because
EntryToken doesn't expand into anything. With this fixed the schedulers
reliably schedule the expected number of units, so we can check this
with an assertion.
This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it
ends up getting scheduled differently in a trivial way, though it was
enough to fool the prcontext+grep that the test does.
llvm-svn: 49701
2008-04-15 01:22:18 +00:00
Dan Gohman
e5f21cea3e
In -view-sunit-dags, display "special" chain dependencies as cyan
...
instead of blue to distinguish them from regular dependencies.
llvm-svn: 49696
2008-04-14 23:15:07 +00:00
Dan Gohman
4fff979a43
Remove unnecessary <sstream> includes.
...
llvm-svn: 49681
2008-04-14 20:40:47 +00:00
Dan Gohman
5b61a288a7
Avoid creating MERGE_VALUES nodes for single values.
...
llvm-svn: 49676
2008-04-14 18:43:25 +00:00
Dan Gohman
2cd8e38ab9
Teach AliasSetTracker about VAArgInst.
...
llvm-svn: 49674
2008-04-14 18:34:50 +00:00
Dan Gohman
e36714c0b4
Minor whitespace and comment cleanups.
...
llvm-svn: 49671
2008-04-14 18:26:16 +00:00
Dan Gohman
5e6ce7bb33
In the special case, call the comparison function instead of
...
manually performing the comparison. This allows the special
case to work correctly even in the case where someone is
experimenting with a different comparison function :-).
llvm-svn: 49670
2008-04-14 18:23:56 +00:00
Dan Gohman
2505d86783
Fix const-correctness issues with the SrcValue handling in the
...
memory intrinsic expansion code.
llvm-svn: 49666
2008-04-14 17:55:48 +00:00
Dale Johannesen
876224b1e8
Reverse sense of unwind-tables option. This means
...
stack tracebacks on Darwin x86-64 won't work by default;
nevertheless, everybody but me thinks this is a good idea.
llvm-svn: 49663
2008-04-14 17:54:17 +00:00
Owen Anderson
7629b71dd4
Revert r49614. As Dan pointed out, some of these aren't correct.
...
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Nicolas Geoffray
db0ea1ff4e
Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32
...
llvm-svn: 49652
2008-04-14 17:17:14 +00:00
Dan Gohman
19bce7f18c
VAArg may trap.
...
llvm-svn: 49646
2008-04-14 15:07:08 +00:00
Duncan Sands
6c503f9a65
Initial libcall support for LegalizeTypes. This is
...
much simpler than in LegalizeDAG because calls are
not yet expanded into call sequences: that happens
after type legalization has finished.
llvm-svn: 49634
2008-04-14 06:48:48 +00:00
Chris Lattner
cc9709cff4
add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
...
llvm-svn: 49617
2008-04-13 19:41:25 +00:00
Owen Anderson
1f6fbc4bc3
Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
...
which is significantly more efficient.
llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Duncan Sands
0a8a4c4a0c
LegalizeTypes can sometimes have deleted nodes
...
in its maps. Add some sanity checks that catch
this kind of thing. Hopefully these can be
removed one day (once all problems are fixed!)
but for the moment it seems wise to have them in.
llvm-svn: 49612
2008-04-13 16:04:03 +00:00
Nicolas Geoffray
dcc2eda5fc
Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
...
llvm-svn: 49611
2008-04-13 13:40:22 +00:00
Chris Lattner
4d232bccca
Fix some serious logic errors that broke the jit on darwin/x86-64.
...
llvm-svn: 49606
2008-04-13 07:04:56 +00:00
Duncan Sands
a07136ee2d
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Chris Lattner
a0a58b63f7
Gabor points out that reserveOperandSpace takes # of values,
...
not # of operands as an input.
llvm-svn: 49599
2008-04-13 00:14:42 +00:00
Anton Korobeynikov
b9f38f38fa
Provide option for stack alignment override
...
llvm-svn: 49593
2008-04-12 22:12:22 +00:00
Arnold Schwaighofer
634fc9a33a
This patch corrects the handling of byval arguments for tailcall
...
optimized x86-64 (and x86) calls so that they work (... at least for
my test cases).
Should fix the following problems:
Problem 1: When i introduced the optimized handling of arguments for
tail called functions (using a sequence of copyto/copyfrom virtual
registers instead of always lowering to top of the stack) i did not
handle byval arguments correctly e.g they did not work at all :).
Problem 2: On x86-64 after the arguments of the tail called function
are moved to their registers (which include ESI/RSI etc), tail call
optimization performs byval lowering which causes xSI,xDI, xCX
registers to be overwritten. This is handled in this patch by moving
the arguments to virtual registers first and after the byval lowering
the arguments are moved from those virtual registers back to
RSI/RDI/RCX.
llvm-svn: 49584
2008-04-12 18:11:06 +00:00
Duncan Sands
844d55a42a
Factor some libcall code.
...
llvm-svn: 49583
2008-04-12 17:14:18 +00:00
Dan Gohman
544ab2c50b
Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
...
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.
Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.
This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.
Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.
This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.
llvm-svn: 49572
2008-04-12 04:36:06 +00:00
Dan Gohman
8c7cf88f7e
Fix a bug that prevented x86-64 from using rep.movsq for
...
8-byte-aligned data.
llvm-svn: 49571
2008-04-12 02:35:39 +00:00
Nate Begeman
7417348a7e
80 col fix
...
llvm-svn: 49569
2008-04-12 00:47:57 +00:00
Nate Begeman
4840515dff
Restore code to disable crash catcher on older OS X systems
...
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Evan Cheng
213ea6b276
Add debugging code.
...
llvm-svn: 49566
2008-04-12 00:22:01 +00:00
Chris Lattner
ad281e8e19
Reenable JIT symbol table.
...
llvm-svn: 49548
2008-04-11 18:11:56 +00:00
Evan Cheng
305d268ac3
Do not add empty live intervals to handled_. They should never be undone for backtracking.
...
llvm-svn: 49544
2008-04-11 17:55:47 +00:00
Evan Cheng
33281864c1
If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy.
...
llvm-svn: 49543
2008-04-11 17:54:45 +00:00
Evan Cheng
499ffa9055
Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
...
llvm-svn: 49542
2008-04-11 17:53:36 +00:00
Gabor Greif
c422383e08
detabify
...
llvm-svn: 49524
2008-04-11 09:34:57 +00:00
Owen Anderson
1e73f29a7f
Fix PR2213 by simultaneously making GVN more aggressive with the return values
...
of calls and less aggressive with non-readnone calls.
llvm-svn: 49516
2008-04-11 05:11:49 +00:00
Evan Cheng
c6864b6652
Remove implicit_def instructions that become dead as result of coalescing.
...
llvm-svn: 49513
2008-04-10 23:48:35 +00:00
Evan Cheng
2cb98eb4bb
Allow registers defined by implicit_def to be clobbered.
...
llvm-svn: 49512
2008-04-10 23:47:53 +00:00
Dan Gohman
9b5ffc8408
Fix a typo in a comment.
...
llvm-svn: 49504
2008-04-10 23:02:38 +00:00
Owen Anderson
53336d8055
Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in the
...
wrong order.
llvm-svn: 49499
2008-04-10 22:13:32 +00:00
Dan Gohman
f4bc782495
Make several symbols static.
...
llvm-svn: 49496
2008-04-10 21:11:47 +00:00
Dan Gohman
99b7b3f03b
Teach InstCombine's ComputeMaskedBits to handle pointer expressions
...
in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment
as a ComputeMaskedBits problem, moving all of its special alignment
knowledge to ComputeMaskedBits as low-zero-bits knowledge.
Also, teach ComputeMaskedBits a few basic things about Mul and PHI
instructions.
This improves ComputeMaskedBits-based simplifications in a few cases,
but more noticeably it significantly improves instcombine's alignment
detection for loads, stores, and memory intrinsics.
llvm-svn: 49492
2008-04-10 18:43:06 +00:00
Evan Cheng
16ea87d6ee
A copy instruction may use a register multiple times on some targets. Change them all.
...
llvm-svn: 49491
2008-04-10 18:38:47 +00:00
Evan Cheng
5e1971c894
Add comment.
...
llvm-svn: 49469
2008-04-10 08:03:14 +00:00
Chris Lattner
aeb23a8a34
add a note, this is actually not too bad to implement.
...
llvm-svn: 49466
2008-04-10 05:54:50 +00:00
Chris Lattner
c692188075
move the x86-32 part of PR2108 here.
...
llvm-svn: 49465
2008-04-10 05:37:47 +00:00
Chris Lattner
ad75302497
Fix the x86-64 side of PR2108 by adding a v2f64 version of
...
MOVZQI2PQIrr. This would be better handled as a dag combine
(with the goal of eliminating the bitconvert) but I don't know
how to do that safely. Thoughts welcome.
llvm-svn: 49463
2008-04-10 05:13:43 +00:00
Evan Cheng
9d339849ee
Teach branch folding pass about implicit_def instructions. Unfortunately we can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away.
...
llvm-svn: 49461
2008-04-10 02:32:10 +00:00
Chris Lattner
a29d2536aa
Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.
...
This is not safe for all inputs.
llvm-svn: 49458
2008-04-10 02:07:51 +00:00
Evan Cheng
c8eeb752a3
- More aggressively coalescing away copies whose source is defined by an implicit_def.
...
- Added insert_subreg coalescing support.
llvm-svn: 49448
2008-04-09 20:57:25 +00:00
Dan Gohman
33b3300178
Make isVectorClearMaskLegal's operand list const.
...
llvm-svn: 49446
2008-04-09 20:09:42 +00:00
Dan Gohman
3d074a3125
Add XMM1 as a second return value register for f32 and f64 on x86-64. This
...
is needed for the x86-64-ABI handling of structs that contain floating-point
members that are returned by value.
llvm-svn: 49441
2008-04-09 17:54:37 +00:00
Dan Gohman
cbf87313a2
Add DX as a second return value register for i16 on x86.
...
llvm-svn: 49440
2008-04-09 17:53:38 +00:00
Chris Lattner
802134fc02
Generalize getUnaryFloatFunction to handle any FP unary function, automatically
...
figuring out the suffix to use. implement pow(2,x) -> exp2(x).
llvm-svn: 49437
2008-04-09 17:48:11 +00:00
Chris Lattner
cca74e5ab9
use the new ConstantFP::get method to make this work with
...
long double and simplify the code.
llvm-svn: 49435
2008-04-09 17:17:35 +00:00
Devang Patel
a7dfbc0366
Be conservative if getresult operand is neither call nor invoke.
...
llvm-svn: 49430
2008-04-09 15:58:24 +00:00
Owen Anderson
ef9a6fd5c2
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Owen Anderson
8ee792d1b6
Remove accidentally duplicated code.
...
llvm-svn: 49418
2008-04-09 07:55:01 +00:00
Chris Lattner
98bd939af8
add a simplified accessor for creating an fp constant of a
...
particular value but variable type.
llvm-svn: 49416
2008-04-09 06:38:30 +00:00
Evan Cheng
aa3b55f842
Missed a hasInterval check.
...
llvm-svn: 49415
2008-04-09 01:30:15 +00:00
Chris Lattner
b5b3e3136b
add a version of ConstantFP::get that doesn't take a redundant Type* value,
...
start migrating code over to use it.
llvm-svn: 49413
2008-04-09 00:45:01 +00:00
Chris Lattner
b859fb49ed
many cleanups to the pow optimizer. Allow it to handle powf,
...
add support for pow(x, 2.0) -> x*x.
llvm-svn: 49411
2008-04-09 00:07:45 +00:00
Dale Johannesen
4c0c018bc5
Rename -disable-required-unwind-tables to unwind-tables-optional.
...
llvm-svn: 49389
2008-04-08 18:07:49 +00:00
Duncan Sands
57d3a36386
Convenience method for setting the nounwind
...
attribute for a function.
llvm-svn: 49373
2008-04-08 07:23:58 +00:00
Devang Patel
8cd2a3ae2a
Fix insert point handling for multiple return values.
...
llvm-svn: 49367
2008-04-08 02:24:08 +00:00
Dale Johannesen
fe767621ca
Handle the situation in 2008-01-25-EmptyFunction.ll
...
correctly when unwind info is being generated.
llvm-svn: 49366
2008-04-08 00:37:56 +00:00
Dale Johannesen
344aec2952
Implement new llc flag -disable-required-unwind-tables.
...
Corresponds to -fno-unwind-tables (usually default in gcc).
llvm-svn: 49361
2008-04-08 00:10:24 +00:00
Ted Kremenek
a518bb79b1
Make getDirnameSep a static method (not part of Path's interface).
...
llvm-svn: 49354
2008-04-07 22:01:32 +00:00
Ted Kremenek
c042bf1db5
Added method Path::getDirname().
...
llvm-svn: 49352
2008-04-07 21:53:57 +00:00
Dan Gohman
3bc3ddd638
Rename MemOperand to MachineMemOperand. This was suggested by
...
review feedback from Chris quite a while ago. No functionality
change.
llvm-svn: 49348
2008-04-07 19:35:22 +00:00
Owen Anderson
ed92b41a39
Add operator= implementations to SparseBitVector, allowing it to be used in GVN. This results
...
in both time and memory savings for GVN. For example, one testcase went from 10.5s to 6s with
this patch.
llvm-svn: 49345
2008-04-07 17:38:23 +00:00
Daniel Berlin
b646062ad5
Fix PR 2169.
...
llvm-svn: 49339
2008-04-07 14:20:50 +00:00
Duncan Sands
813384951e
Use Intrinsic::getDeclaration in more places.
...
llvm-svn: 49338
2008-04-07 13:45:04 +00:00
Duncan Sands
1416ebf1fe
The "stacksave is not nounwind problem" no longer
...
needs to be fixed here - a previous commit made sure
that intrinsics always get the right attributes.
So remove no-longer needed code, and while there use
Intrinsic::getDeclaration rather than getOrInsertFunction.
llvm-svn: 49337
2008-04-07 13:43:58 +00:00
Duncan Sands
fbc6adcc59
Use Intrinsic::getDeclaration to get hold of
...
intrinsics. Fix up the argument type (should
be i8*, was an array*).
llvm-svn: 49336
2008-04-07 13:41:19 +00:00
Duncan Sands
a8ff6ca2e3
Make sure that intrinsics automagically get the
...
right parameter attributes no matter how they
are obtained.
llvm-svn: 49335
2008-04-07 13:39:11 +00:00
Roman Levenstein
51f532f92d
Re-commit of the r48822, where the infinite looping problem discovered
...
by Dan Gohman is fixed.
llvm-svn: 49330
2008-04-07 10:06:32 +00:00
Owen Anderson
0c1e634cbb
Make GVN more memory efficient, particularly on code that contains a large number of
...
allocations, which GVN can't optimize anyways.
llvm-svn: 49329
2008-04-07 09:59:07 +00:00
Dale Johannesen
87e484f08b
Mark calls to llvm.stacksave, llvm.stackrestore as
...
nounwind. When such calls are inlined into something
else that is invoked, they were getting changed to invokes,
which is badness.
llvm-svn: 49299
2008-04-07 00:08:48 +00:00
Gabor Greif
92f493dc72
regenerate
...
llvm-svn: 49293
2008-04-06 23:07:54 +00:00
Chris Lattner
982e8502c9
fix warnings with assertions disabled.
...
llvm-svn: 49285
2008-04-06 21:50:58 +00:00
Chris Lattner
4db1f62d84
Silence warning when no assertions.
...
llvm-svn: 49284
2008-04-06 21:46:45 +00:00
Chris Lattner
a39cfc5c5b
silence a warning when assertions are disabled.
...
llvm-svn: 49283
2008-04-06 21:44:08 +00:00
Gabor Greif
dd8b7a0a47
fix a warning
...
llvm-svn: 49282
2008-04-06 21:42:13 +00:00
Torok Edwin
613d7afe64
Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.
...
If it cannot be expanded, it will keep the old behaviour and try to shrink the constant.
Part of enhancement for PR2191.
llvm-svn: 49280
2008-04-06 21:23:02 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner
8519c0ead8
disable this for now.
...
llvm-svn: 49248
2008-04-05 04:12:01 +00:00
Evan Cheng
b5fdc923d3
1. IMPLICIT_DEF can *re-define* any register.
...
2. Coalescer can now create an interesting situation where a register def can
reaches itself without being killed.
llvm-svn: 49246
2008-04-05 01:27:09 +00:00
Evan Cheng
f77b5ef3d0
Favors pshufd over shufps when shuffling elements from one vector. pshufd is faster than shufps.
...
llvm-svn: 49244
2008-04-05 00:30:36 +00:00
Dale Johannesen
0ce4a7cc44
Make sure both PendingLoads and PendingExports are flushed
...
before an invoke. Failure to do this causes references in
the landing pad to variables that were not set. Fixes
g++.dg/eh/delayslot1.C
g++.dg/eh/fp-regs.C
g++.old-deja/g++.brendan/eh1.C
llvm-svn: 49243
2008-04-04 23:48:31 +00:00
Torok Edwin
b20e659770
strdup needs <cstring>. This fixes a build error with g++-4.3.
...
llvm-svn: 49218
2008-04-04 16:08:00 +00:00
Chris Lattner
318d3ef88e
Provide an initial cut at exposing JIT compiled symbols to performance
...
tools. This is currently only enabled on the mac, but could easily be
supported by other hosts that are interested.
llvm-svn: 49207
2008-04-04 05:51:42 +00:00
Chris Lattner
ee1817300a
Make ExecutionEngine::updateGlobalMapping return the old mapping.
...
llvm-svn: 49206
2008-04-04 04:47:41 +00:00
Evan Cheng
14bee50e06
Undo PHI elimination copy placement patch. This causes coalescing (performace) issues.
...
llvm-svn: 49198
2008-04-04 01:20:05 +00:00
Evan Cheng
823017fdd1
This is done.
...
llvm-svn: 49197
2008-04-04 01:19:03 +00:00
Andrew Lenharth
bfb7246fb6
if some functions don't have debug info, we were outputing the same label at the start of each of those functions. This makes assemblers unhappy
...
llvm-svn: 49176
2008-04-03 17:37:43 +00:00
Evan Cheng
58936a48ee
- Turn copies of implicit_def into implicit_def instructions.
...
- Be smarter about coalescing copies from implicit_def.
llvm-svn: 49168
2008-04-03 16:41:54 +00:00
Evan Cheng
6d07b625aa
Special handling of zero-sized live intervals.
...
llvm-svn: 49167
2008-04-03 16:40:27 +00:00
Evan Cheng
20aed56504
- Treat a live range defined by an implicit_def as a zero-sized one.
...
- Eliminate an implicit_def when it's being spilled.
llvm-svn: 49166
2008-04-03 16:39:43 +00:00
Evan Cheng
aacf4f15b3
- PHI elimination also eliminates implicit_def that fits into a PHI node rather than copying it.
...
- Be (slightly) smarter about where to place the copies.
llvm-svn: 49165
2008-04-03 16:38:20 +00:00
Evan Cheng
916802a78e
Start of a series of patches related to implicit_def.
...
There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier.
llvm-svn: 49164
2008-04-03 16:36:07 +00:00
Ted Kremenek
1d0436cdb0
Re-implemented Path::createDirectoryOnDisk (for Unix).
...
This method allows one to create a directory, and optionally create all parent
directories that do not exist.
The original implementation would require that *all* directories along a path
are writable by the user, including directories that already exist. For example,
suppose we wanted to create the directory "/tmp/foo/bar", and the directory
"/tmp" already exists, but not "/tmp/foo". Since "/tmp" is writable by all
users, the original implementation would work, and create "/tmp/foo", followed
by "/tmp/bar".
A problem occurred, however if one wanted to created the directory
"/Users/myuser/bar" (or equivalently "/home/myuser/bar"), and "/Users/myuser"
already existed and is writable by the current user. The directory
"/User/myuser" is writable by the user, but "/User" is not. The original
implementation of createDirectoryOnDisk would return with failure since "/User"
is not writable, even though "/User/mysuser" is writable.
The new implementation works by recursively creating parents as needed, and thus
doesn't need to check the permissions on every directory in a path.
llvm-svn: 49162
2008-04-03 16:11:31 +00:00
Evan Cheng
6c66bd368e
Re-enable SSE4.
...
llvm-svn: 49158
2008-04-03 08:53:29 +00:00
Evan Cheng
6db4b4cc65
Fix x86-64 encoding bug. REX prefix must always follow 0x0F prefix. For example, extractps in 64bit mode: 66 REX 0F 3A 17, not 66 0F 3A REX 17.
...
llvm-svn: 49157
2008-04-03 08:53:17 +00:00
Evan Cheng
d9129d1de3
Cosmetic
...
llvm-svn: 49156
2008-04-03 07:45:18 +00:00
Evan Cheng
3063c5546e
Temporarily disabling SSE4 until we fix the encoding issues.
...
llvm-svn: 49129
2008-04-03 04:49:54 +00:00
Evan Cheng
025cea1126
Backing out 48222 temporarily.
...
llvm-svn: 49124
2008-04-03 03:13:16 +00:00
Dan Gohman
bd72cea737
Suppress the 128-bit integer typedef on 32-bit targets, because
...
it causes compile errors.
llvm-svn: 49122
2008-04-02 23:52:49 +00:00
Dale Johannesen
491557712a
Make EH work with unnamed functions. Reenable running
...
StripSymbols when EH is on.
llvm-svn: 49110
2008-04-02 20:10:52 +00:00
Dan Gohman
39d8b26322
Partial CBackend support for 128-bit integers. This is needed
...
now that llvm-gcc is lowering appropriately-sized struct returns
to i128 on x86-64.
llvm-svn: 49109
2008-04-02 19:40:14 +00:00
David Greene
586740f401
Iterators folloring a SmallVector erased element are invalidated so
...
don't access cached iterators from after the erased element.
Re-apply 49056 with SmallVector support.
llvm-svn: 49106
2008-04-02 18:24:46 +00:00
Evan Cheng
d8616064d8
Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
...
llvm-svn: 49105
2008-04-02 18:04:08 +00:00
Evan Cheng
be3d44c3cb
Remove #include<map> from LiveVariables.h. Not referenced.
...
llvm-svn: 49099
2008-04-02 17:23:50 +00:00
Dale Johannesen
8780ecbbac
Cosmetic changes per EH patch review feedback.
...
llvm-svn: 49096
2008-04-02 17:04:45 +00:00
Anton Korobeynikov
20c9e4cbee
Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
...
when some another register is used for argument passing.
Currently is used on Win64.
llvm-svn: 49079
2008-04-02 05:23:57 +00:00
Owen Anderson
2412158111
In some situations, we need to check for local interferences between the PHI
...
node and its inputs.
llvm-svn: 49070
2008-04-02 03:00:13 +00:00
Owen Anderson
edfc2eb558
Correctly mark a valno that was previous defined by a PHI node as having an
...
unknown defining inst after PHI elimination.
llvm-svn: 49069
2008-04-02 02:12:45 +00:00
Dale Johannesen
fd967cf3fa
Recommitting EH patch; this should answer most of the
...
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.
llvm-svn: 49064
2008-04-02 00:25:04 +00:00
Evan Cheng
ac38d444e2
1. Drop default inline threshold back down to 200.
...
2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size.
3. More aggressively inline function with vector code.
llvm-svn: 49061
2008-04-01 23:59:29 +00:00
Tanya Lattner
052838c55d
Reverting 49056 due to the build being broken.
...
llvm-svn: 49060
2008-04-01 23:41:44 +00:00
Evan Cheng
b86595fb0a
ReMat of load from stub in pic mode extends the life of pic base. Currently spiller doesn't do a good job of estimating the impact. Disable for now.
...
llvm-svn: 49059
2008-04-01 23:26:12 +00:00
David Greene
7f7edc3824
Iterators folloring a SmallVector erased element are invalidated so
...
don't access cached iterators from after the erased element.
llvm-svn: 49056
2008-04-01 22:14:23 +00:00
Bill Wendling
fc9f25dab0
Fix compilation errors on MSVC. Patch by Argiris Kirtzidis!
...
llvm-svn: 49055
2008-04-01 22:09:20 +00:00
Evan Cheng
19a6dd9f2a
Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
...
llvm-svn: 49054
2008-04-01 21:38:20 +00:00
Evan Cheng
985a0b51d7
Re-materialization is for uses only.
...
llvm-svn: 49053
2008-04-01 21:37:32 +00:00
Dan Gohman
cb9f8f6e4e
Don't use __bzero for memset if the second argument isn't zero.
...
llvm-svn: 49050
2008-04-01 20:56:18 +00:00
Dan Gohman
980d7200c1
Speculatively micro-optimize memory-zeroing calls on Darwin 10.
...
llvm-svn: 49048
2008-04-01 20:38:36 +00:00
Dale Johannesen
5e4e051c2a
Revert 49006 for the moment.
...
llvm-svn: 49046
2008-04-01 20:00:57 +00:00
Owen Anderson
49dd9f16a9
Don't dereference MBB->end().
...
llvm-svn: 49043
2008-04-01 18:05:08 +00:00
Chris Lattner
6f2ffdb73f
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Evan Cheng
306e3dcff4
Disabling remat of load from gv stub (temporarily) again to fix llvmgcc bootstrap miscompare.
...
llvm-svn: 49037
2008-04-01 07:33:13 +00:00
Chris Lattner
ba98fca5e5
add some #includes.
...
llvm-svn: 49036
2008-04-01 06:25:23 +00:00
Chris Lattner
18356d8857
MappedFile is dead, remove it.
...
llvm-svn: 49035
2008-04-01 06:20:44 +00:00
Chris Lattner
4c5e15f7da
Implement Path::MapInFilePages/UnMapFilePages on unix, which
...
provides fast MappedFile::getFile for large files.
llvm-svn: 49034
2008-04-01 06:16:24 +00:00
Chris Lattner
a542518315
Reimplement MemoryBuffer::getFile with three enhancements:
...
1) stop using MappedFile.
2) if profitable use the sys::path::MapInFilePages api to
read the file.
3) otherwise fallback to read.
When sys::path::MapInFilePages is implemented, this provides
several benefits:
#1 : this avoids fragmenting memory for small files.
#2 : this avoids extraneous stat calls when the file size is known.
#3 : this only keeps the file descriptor open while reading the
file, not for the duration of the lifetime of the memory
buffer. This fixes a serious clang FD 'leak' problem.
I believe that this will work on a win32 machine, but I don't have
one to test on. I'd appreciate it if someone could check.
llvm-svn: 49031
2008-04-01 06:05:21 +00:00
Chris Lattner
3089e1d82e
Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
...
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner
d4310a27aa
change the archive stuff to use MemoryBuffer instead of mappedfile.
...
MemoryBuffer is higher level and more closely matches the model
needed.
llvm-svn: 49029
2008-04-01 04:26:46 +00:00
Chris Lattner
4ac7bb0294
rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.
...
llvm-svn: 49027
2008-04-01 03:59:34 +00:00
Chris Lattner
64959dcf03
Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
...
llvm-svn: 49026
2008-04-01 03:49:38 +00:00
Chris Lattner
bcfa564759
Remove the MappedFile::charBase member, rename base -> getBase() and
...
make getBase() return a const-correct pointer.
llvm-svn: 49025
2008-04-01 03:40:53 +00:00
Chris Lattner
314a1414d0
Change DiffFilesWithTolerance to be written in terms of MemoryBuffer,
...
not an mmapped file. This more closely matches its requirements and
provides an implicitly null terminated buffer, something this
routine had to emulate itself before.
llvm-svn: 49024
2008-04-01 03:39:49 +00:00
Chris Lattner
62385ba3a0
Remove MappedFile support for mapping files for write and exec
...
and shared. This complicates the design, is not used, and probably
doesn't even work.
llvm-svn: 49022
2008-04-01 03:10:22 +00:00
Chris Lattner
3d7127b3e3
add missing #includes
...
llvm-svn: 49020
2008-04-01 02:58:05 +00:00
Evan Cheng
0bd72c5ccd
More soft fp fixes.
...
llvm-svn: 49016
2008-04-01 02:18:22 +00:00
Evan Cheng
4cabe4b452
Pasto.
...
llvm-svn: 49014
2008-04-01 02:00:09 +00:00
Evan Cheng
611abc03ed
Add comment.
...
llvm-svn: 49013
2008-04-01 01:51:26 +00:00
Evan Cheng
86e476b7cb
Unbreak ARM / Thumb soft FP support.
...
llvm-svn: 49012
2008-04-01 01:50:16 +00:00
Dale Johannesen
efa81a6979
Accept 'y' constraint (MMX) in inline asm.
...
llvm-svn: 49011
2008-04-01 00:57:48 +00:00
Chris Lattner
efecfbc113
cleanup the MappedFile API and comments. This removes and updates
...
tons of out of date comments (really nothing throws here!) and fixes
some other fairly glaring issues: "size" used to return the size of
the file *and* change it, depending on how you called it.
llvm-svn: 49009
2008-04-01 00:53:25 +00:00
Chris Lattner
1fa4dca692
remove DEFINING_FILE_FOR for MappedFile.h
...
llvm-svn: 49008
2008-04-01 00:35:55 +00:00
Dale Johannesen
7d02cf3c9c
Emit exception handling info for functions which are
...
not marked nounwind, or for all functions when -enable-eh
is set, provided the target supports Dwarf EH.
llvm-gcc generates nounwind in the right places; other FEs
will need to do so also. Given such a FE, -enable-eh should
no longer be needed.
llvm-svn: 49006
2008-03-31 23:40:23 +00:00
Evan Cheng
e4f77c69ac
It's not safe to fold a load from GV stub or constantpool into a two-address use.
...
llvm-svn: 49002
2008-03-31 23:19:51 +00:00
Nate Begeman
f8be3836e3
Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
...
crash miscompilations.
llvm-svn: 49000
2008-03-31 22:19:25 +00:00
Dan Gohman
3717cdaf22
Set blockBegin to point to the beginning of the block,
...
not the end.
llvm-svn: 48999
2008-03-31 22:08:00 +00:00
Evan Cheng
ed6e34fe41
Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.
...
llvm-svn: 48995
2008-03-31 20:40:39 +00:00
Dan Gohman
f549b26254
Fix a DAGCombiner optimization to respect volatile qualification.
...
llvm-svn: 48994
2008-03-31 20:32:52 +00:00
Erick Tryzelaar
4a0da98825
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
...
llvm-svn: 48982
2008-03-31 16:22:09 +00:00
Evan Cheng
1973a46cd3
Re-apply 48911.
...
llvm-svn: 48977
2008-03-31 07:54:19 +00:00
Evan Cheng
73d7c3bfba
The support for remat of instructions with a register operand is hackish, to say the least. Since the register operand guaranteed to be PIC base and that it is already live at all uses, we are making sure it will not be spilled after its uses are rematerialized for both performance and correctness reasons.
...
llvm-svn: 48976
2008-03-31 07:53:30 +00:00
Owen Anderson
f28fc71c93
Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for pointing this out.
...
llvm-svn: 48973
2008-03-31 01:39:20 +00:00
Nate Begeman
f2b0b0eb17
Don't eliminate bitcast instructions that change the type of a pointer
...
llvm-svn: 48971
2008-03-31 00:22:16 +00:00
Duncan Sands
7d6c8ae488
Fix comment typo.
...
llvm-svn: 48967
2008-03-30 19:38:55 +00:00
Nick Lewycky
9fb8908457
Moved from PR1570.
...
llvm-svn: 48965
2008-03-30 19:07:11 +00:00
Chris Lattner
0f760dfe09
Fix "Control reaches the end of non-void function" warnings,
...
patch by David Chisnall.
llvm-svn: 48963
2008-03-30 18:22:13 +00:00
Chris Lattner
519a51a76f
minor code cleanups, allow constant folding sinf/cosf.
...
llvm-svn: 48961
2008-03-30 18:02:00 +00:00
Evan Cheng
16d72072df
Cosmetic changes.
...
llvm-svn: 48947
2008-03-29 18:34:22 +00:00
Chris Lattner
4311ad2dae
change iterator invalidation avoidance to just move the iterator backward
...
when something changes, instead of moving forward. This allows us to
simplify memset lowering, inserting the memset at the end of the range of
stuff we're touching instead of at the start.
This, in turn, allows us to make use of the addressing instructions already
used in the function instead of inserting our own. For example, we now
codegen:
%tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2]
call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 )
instead of:
%tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1]
%ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1]
call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 )
llvm-svn: 48940
2008-03-29 05:15:47 +00:00
Chris Lattner
ac95515741
make the common case of a single store (which clearly shouldn't be turned
...
into a memset!) faster by avoiding an allocation of an std::list node.
llvm-svn: 48939
2008-03-29 04:52:12 +00:00
Chris Lattner
d528b21a65
give form-memset a significantly more sane heuristic, enable it by default.
...
llvm-svn: 48937
2008-03-29 04:36:18 +00:00
Owen Anderson
8b22873bdd
Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi elimination algorithm where we were accidentally reasoning about
...
the source rather than the destination.
llvm-svn: 48936
2008-03-29 01:58:47 +00:00
Dan Gohman
fd2eb00cc2
Fix a tokenfactor node to use the load chain rather than the
...
load value. This fixes PR2177.
llvm-svn: 48932
2008-03-28 23:45:16 +00:00
Evan Cheng
b8654202dd
Backing out 48911 for now. It's breaking stuff.
...
llvm-svn: 48922
2008-03-28 17:49:06 +00:00
Chris Lattner
a148acdc82
ifdef out a dead function. Should this be removed?
...
llvm-svn: 48916
2008-03-28 15:36:27 +00:00
Duncan Sands
35c7cdac07
Rename getAnyLoad to getLoad is suggested by Evan.
...
llvm-svn: 48914
2008-03-28 09:45:24 +00:00
Evan Cheng
81e0c9a32c
New entry.
...
llvm-svn: 48912
2008-03-28 07:07:06 +00:00
Evan Cheng
9ae4d7b719
Load from stub is already re-materializable.
...
llvm-svn: 48911
2008-03-28 06:49:25 +00:00
Nick Lewycky
f88c84f690
Update example to new syntax.
...
llvm-svn: 48910
2008-03-28 06:46:51 +00:00
Chris Lattner
d62964a7d8
make memset inference significantly more powerful: it can now handle
...
memsets that initialize "structs of arrays" and other store sequences
that are not sequential. This is still only enabled if you pass
-form-memset-from-stores. The flag is not heavily tested and I haven't
analyzed the perf regressions when -form-memset-from-stores is passed
either, but this causes no make check regressions.
llvm-svn: 48909
2008-03-28 06:45:13 +00:00
Evan Cheng
87bac50d7b
New entry.
...
llvm-svn: 48908
2008-03-28 06:34:23 +00:00
Duncan Sands
f740509e58
Implement LegalizeTypes support for softfloat LOAD.
...
In order to handle indexed nodes I had to introduce
a new constructor, and since I was there I factorized
the code in the various load constructors.
llvm-svn: 48894
2008-03-27 20:23:40 +00:00
Dan Gohman
cad51cb671
Avoid creating chain dependencies from CopyToReg nodes to load and store
...
nodes. This doesn't currently have much impact the generated code, but it
does produce simpler-looking SelectionDAGs, and consequently
simpler-looking ScheduleDAGs, because there are fewer spurious
dependencies.
In particular, CopyValueToVirtualRegister now uses the entry node as the
input chain dependency for new CopyToReg nodes instead of calling getRoot
and depending on the most recent memory reference.
Also, rename UnorderedChains to PendingExports and pull it up from being
a local variable in SelectionDAGISel::BuildSelectionDAG to being a
member variable of SelectionDAGISel, so that it doesn't have to be
passed around to all the places that need it.
llvm-svn: 48893
2008-03-27 19:56:19 +00:00
Devang Patel
eb1e3fcbe0
PHI->removeIncomingValue may remove PHInode.
...
Increment iterator in advance.
llvm-svn: 48890
2008-03-27 17:32:46 +00:00
Roman Levenstein
30d09518b5
Fix spelling. Thanks, Duncan! :-)
...
llvm-svn: 48873
2008-03-27 09:44:37 +00:00
Roman Levenstein
bc674501ba
Speed-up the SumOfUnscheduledPredsOfSuccs by introducing a new function
...
called LimitedSumOfUnscheduledPredsOfSuccs. It terminates the computation
after a given treshold is reached. This new function is always faster, but
brings real wins only on bigger test-cases.
The old function SumOfUnscheduledPredsOfSuccs is left in-place for now and therefore a warning about an unused static function is produced.
llvm-svn: 48872
2008-03-27 09:14:57 +00:00
Evan Cheng
308e564693
Code clean up.
...
llvm-svn: 48856
2008-03-27 01:45:11 +00:00
Evan Cheng
29e62a59f3
Allow certain lea instructions to be rematerialized.
...
llvm-svn: 48855
2008-03-27 01:41:09 +00:00
Evan Cheng
4fb07c6500
Remove an unused command line option.
...
llvm-svn: 48854
2008-03-27 01:30:24 +00:00
Evan Cheng
5832410d77
Fix a memory bug: increment an iterator of a deleted machine instr.
...
llvm-svn: 48853
2008-03-27 01:27:25 +00:00
Erick Tryzelaar
8ac07c2834
Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
...
llvm-svn: 48851
2008-03-27 00:27:14 +00:00
Dale Johannesen
87c6ada5de
Fix a bug in Darwin EH: FDE->CIE pointer must
...
be relocatable. Describe why .set is needed better.
llvm-svn: 48848
2008-03-26 23:31:39 +00:00
Evan Cheng
db390694ff
One more coalescer fix wrt deadness propagation.
...
llvm-svn: 48837
2008-03-26 20:15:49 +00:00
Evan Cheng
289ba4f335
Avoid commuting a def MI in order to coalesce a copy instruction away if any use of the same val# is a copy instruction that has already been coalesced.
...
llvm-svn: 48833
2008-03-26 19:03:01 +00:00
Roman Levenstein
358e04a185
Use a linked data structure for the uses lists of an SDNode, just like
...
LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
This allows constant time for all uses list maintenance operations.
The idea was suggested by Chris. Reviewed by Evan and Dan.
Patch is tested and approved by Dan.
On normal use-cases compilation speed is not affected. On very big basic
blocks there are compilation speedups in the range of 15-20% or even better.
llvm-svn: 48822
2008-03-26 12:39:26 +00:00
Roman Levenstein
733a4d6e85
Fixed some spelling errors. Thanks, Duncan!
...
llvm-svn: 48819
2008-03-26 11:23:38 +00:00
Roman Levenstein
7e71b4baaf
Some improvements related to the computation of isReachable.
...
This fixes Bugzilla #1835 (http://llvm.org/bugs/show_bug.cgi?id=1835 ).
This patched is reviewed by Tanya and Dan. Dan tested and approved it.
The reason for the bad performance of the old algorithm is that it is very naive and scans every
time all nodes of the DAG in the worst case.
This patch introduces a new algorithm based on the paper "Online algorithms
for maintaining the topological order of a directed acyclic graph" by
David J.Pearce and Paul H.J.Kelly. This is the MNR algorithm. It has a
linear time worst-case and performs much better in most situations.
The paper can be found here:
http://fano.ics.uci.edu/cites/Document/Online-algorithms-for-maintaining-the-topological-order-of-a-directed-acyclic-graph.html
The main idea of the new algorithm is to compute the topological ordering of the SNodes in the
DAG and to maintain it even after DAG modifications. The topological ordering allows for very fast
node reachability checks.
Tests on very big input files with tens of thousands of instructions in a BB indicate huge
speed-ups (up to 10x compilation time improvement) compared to the old version.
llvm-svn: 48817
2008-03-26 09:18:09 +00:00
Evan Cheng
292063603e
Fix some SSE4.1 instruction encoding bugs.
...
llvm-svn: 48815
2008-03-26 08:11:49 +00:00
Owen Anderson
5d2d1776e0
Dead PHI instructions need to be handled specially.
...
llvm-svn: 48811
2008-03-26 03:03:23 +00:00
Dale Johannesen
ad6c23d5e9
Use ## for comment delimiter on darwin x86-32, so
...
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors. Approach
suggested by Daveed Vandevoorde.
llvm-svn: 48808
2008-03-25 23:29:30 +00:00
Evan Cheng
ddc58ff92a
Smaller function alignment when optimizing for size.
...
llvm-svn: 48805
2008-03-25 22:29:46 +00:00
Evan Cheng
88c44ef91f
Rename option -optimizefor-size to -optimize-size.
...
llvm-svn: 48804
2008-03-25 22:28:39 +00:00
Owen Anderson
9f129318dc
Remove some debugging code.
...
llvm-svn: 48803
2008-03-25 22:26:43 +00:00
Owen Anderson
1d46d45e35
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
...
llvm-svn: 48802
2008-03-25 22:25:27 +00:00
Dan Gohman
c60c67fc37
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman
bdc24adaaf
A quick nm audit turned up several fixed tables and objects that were
...
marked read-write. Use const so that they can be allocated in a
read-only segment.
llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Dan Gohman
a7ba51f6ec
Avoid outputing spaces at the ends of lines.
...
llvm-svn: 48797
2008-03-25 21:38:12 +00:00
Devang Patel
72cfe84f05
Do not align loops if optimizing for size.
...
llvm-svn: 48794
2008-03-25 21:03:02 +00:00
Devang Patel
246a52740b
Add optimize-for-size knob.
...
llvm-svn: 48793
2008-03-25 21:02:35 +00:00
Evan Cheng
df1690dc7c
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
...
llvm-svn: 48792
2008-03-25 20:08:07 +00:00
Evan Cheng
2b72c05992
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
...
llvm-svn: 48791
2008-03-25 20:07:13 +00:00
Dan Gohman
fd227e9c3a
Fix typos.
...
llvm-svn: 48779
2008-03-25 17:10:29 +00:00
Dan Gohman
883cbfd0ba
Add CMP32mr and friends to the load-unfolding table. Among
...
other things, this allows the scheduler to unfold a load operand
in the 2008-01-08-SchedulerCrash.ll testcase, so it now successfully
clones the comparison to avoid a pushf+popf.
llvm-svn: 48777
2008-03-25 16:53:19 +00:00
Bill Wendling
0ee1bd9588
Fix PR2062: Don't build Intrinsics.gen in the source directory. Do it in the
...
object directory.
llvm-svn: 48766
2008-03-25 09:12:48 +00:00
Evan Cheng
7d564c3b4a
lastRegisterUse() should ignore identity copies. Those will be erased.
...
llvm-svn: 48759
2008-03-25 02:02:19 +00:00
Evan Cheng
fe7610f37f
Remove an unneeded test.
...
llvm-svn: 48755
2008-03-24 23:55:16 +00:00
Evan Cheng
50b536eef9
Add \t after .set. Fix by Jay Freeman.
...
llvm-svn: 48753
2008-03-24 23:36:49 +00:00
Evan Cheng
69a3f9c417
If the coalescer commuted a def MI to allow coalescing, it can changed a previously coalesced copy into an non-identity copy.
...
llvm-svn: 48752
2008-03-24 23:31:21 +00:00
Evan Cheng
6e225173c5
Add an assertion to catch register of illegal class.
...
llvm-svn: 48751
2008-03-24 23:28:21 +00:00
Bill Wendling
6306183df3
Use the bit size of the operand instead of the hard-coded 32 to generate the
...
mask.
llvm-svn: 48750
2008-03-24 23:16:37 +00:00
Evan Cheng
615488ab45
- SSE4.1 extractfps extracts a f32 into a gr32 register. Very useful! Not. Fix the instruction specification and teaches lowering code to use it only when the only use is a store instruction.
...
llvm-svn: 48746
2008-03-24 21:52:23 +00:00
Owen Anderson
c905fe9407
Revert r48676. I had plans for using it, but now it's just dead code.
...
llvm-svn: 48743
2008-03-24 21:29:58 +00:00
Owen Anderson
e2707768a4
Remove #include<iostream>, which I was using for debugging.
...
llvm-svn: 48739
2008-03-24 20:36:47 +00:00
Devang Patel
a38f58aa5c
Add incoming value from header only if phi node has any use inside the loop.
...
llvm-svn: 48738
2008-03-24 20:16:14 +00:00
Dan Gohman
aa583d75b1
Shrink the size of AllocationInst by using its SubclassData
...
field to store the alignment value instead of haing a
separate field.
llvm-svn: 48727
2008-03-24 16:55:58 +00:00
Dan Gohman
d8ea040c31
APIntify SelectionDAG's EXTRACT_ELEMENT code.
...
llvm-svn: 48726
2008-03-24 16:38:05 +00:00
Evan Cheng
3471ae8c5d
Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it).
...
Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining.
llvm-svn: 48725
2008-03-24 06:37:48 +00:00
Evan Cheng
21a8e3d260
Temporarily disabling memset forming optimization. Add an option.
...
llvm-svn: 48720
2008-03-24 05:28:38 +00:00
Owen Anderson
200e57840e
Be sure to remove intervals after we've joined them. Also, remove some duplicated code.
...
With this pass, StrongPHIElim can compile very simple testcases correctly. There's still a ways
to go before it's ready for prime time, though.
llvm-svn: 48719
2008-03-24 04:11:27 +00:00
Evan Cheng
c3cf9f872a
Transform (zext (or (icmp), (icmp))) to (or (zext (cimp), (zext icmp))) if at least one of the (zext icmp) can be transformed to eliminate an icmp.
...
llvm-svn: 48715
2008-03-24 00:21:34 +00:00
Evan Cheng
58db865d6e
Remove duplicated entries.
...
llvm-svn: 48714
2008-03-23 22:56:07 +00:00
Gordon Henriksen
07a45f4edb
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Anton Korobeynikov
1fdd5e9133
Minor typo fixes. Also add another FIXME.
...
llvm-svn: 48710
2008-03-23 20:32:06 +00:00
Anton Korobeynikov
d38b3fb127
Preserve calling convention during function cloning
...
llvm-svn: 48708
2008-03-23 16:03:00 +00:00
Anton Korobeynikov
17fb491469
Add license header
...
llvm-svn: 48707
2008-03-23 14:53:18 +00:00
Anton Korobeynikov
9f0e820fa3
Add Win64 compilation callback. This allows easy examples to be JITed on Win64!
...
llvm-svn: 48706
2008-03-23 14:44:32 +00:00
Anton Korobeynikov
a347663762
Provide a JIT selector on win64
...
llvm-svn: 48704
2008-03-23 13:43:47 +00:00
Anton Korobeynikov
7574ead985
Hack out the PIC mode on Win64 targets. This needs to be investigated later.
...
llvm-svn: 48703
2008-03-23 13:41:18 +00:00
Anton Korobeynikov
4733e72a25
Code cleanup. Provide generic way of selecting JIT pointer bitwidth regardless
...
of compiler used.
llvm-svn: 48702
2008-03-23 13:40:45 +00:00
Anton Korobeynikov
bd47269f13
Remove old-standing obsolete code.
...
llvm-svn: 48701
2008-03-23 12:32:54 +00:00
Anton Korobeynikov
cec773d8e7
Honour built-in defines on win64 targets for automatically subtarget recognize.
...
Force stack alignment to 16 bytes on win targets.
llvm-svn: 48695
2008-03-22 21:18:22 +00:00
Anton Korobeynikov
07a789d2b5
Recognize "windows" in target triple, not only "win32"
...
llvm-svn: 48694
2008-03-22 21:12:53 +00:00
Anton Korobeynikov
b86e0936f1
Add information about callee-saved registers on Win64
...
llvm-svn: 48692
2008-03-22 21:04:01 +00:00
Anton Korobeynikov
7f125b2ba5
Add convenient helper for win64 check. Simplify things slightly.
...
llvm-svn: 48691
2008-03-22 20:57:27 +00:00
Anton Korobeynikov
7b4f4e1a86
Initial support for Win64 calling conventions. Still in early state.
...
llvm-svn: 48690
2008-03-22 20:37:30 +00:00
Anton Korobeynikov
7ebdd255b5
Register EH frames emitted in JIT when using gcc unwinding runtime
...
llvm-svn: 48688
2008-03-22 08:53:09 +00:00
Anton Korobeynikov
dd8c695746
Fix merge error
...
llvm-svn: 48687
2008-03-22 08:50:08 +00:00
Anton Korobeynikov
3f7fab913d
Add testcase for prev. commit. Minor fixes
...
llvm-svn: 48686
2008-03-22 08:37:05 +00:00
Anton Korobeynikov
25b2e8203a
Aliasing chains cleanups: update langref, add check into verifier
...
llvm-svn: 48685
2008-03-22 08:36:14 +00:00
Anton Korobeynikov
72d5d42dbc
Support chained aliases for LLVM IR printing. This fixes PR2145
...
llvm-svn: 48684
2008-03-22 08:17:17 +00:00
Anton Korobeynikov
2fa75184f3
Another comments fixing
...
llvm-svn: 48683
2008-03-22 07:53:40 +00:00
Anton Korobeynikov
2fb3897f1b
Slightly increase default set size. It's cheap and won't hurt.
...
llvm-svn: 48682
2008-03-22 07:48:40 +00:00