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
Dan Gohman
c22ede25c4
Clean up some comments.
...
llvm-svn: 49661
2008-04-14 17:45:20 +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
Chris Lattner
f87e052128
improve diagnostics in call parsing, patch suggested by
...
Matthijs Kooijman
llvm-svn: 49648
2008-04-14 16:44:41 +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
Chris Lattner
0e0bbb626d
Add support for equality comparison of CallSite's.
...
llvm-svn: 49616
2008-04-13 19:40:26 +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
Owen Anderson
b1e8bf2cad
The functionality being tested was removed because it was horribly unsafe.
...
llvm-svn: 49610
2008-04-13 09:51:06 +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
Devang Patel
bde1bbed16
Change llvm tools install location.
...
llvm-svn: 49540
2008-04-11 17:45:39 +00:00
Chris Lattner
0b596c3f5a
improvements for IntrusiveRefCntPtr, patch by Mikhail Glushenkov
...
llvm-svn: 49538
2008-04-11 16:42:06 +00:00
Duncan Sands
21285fc04c
The Ada front-end from the LLVM 2.2 release
...
cannot be build with GNAT GPL 2006, only with
GNAT GPL 2005.
llvm-svn: 49529
2008-04-11 13:24:43 +00:00
Gabor Greif
c422383e08
detabify
...
llvm-svn: 49524
2008-04-11 09:34:57 +00:00
Owen Anderson
90bde997b3
Add testcase for PR2213.
...
llvm-svn: 49517
2008-04-11 05:13:32 +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
b53d560150
New test.
...
llvm-svn: 49514
2008-04-10 23:49:09 +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
Dan Gohman
7603a182cc
Fix a typo in a comment.
...
llvm-svn: 49502
2008-04-10 22:27:06 +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
Chris Lattner
57dd77462b
produce an error on invalid input instead of asserting:
...
def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
^
llvm-svn: 49462
2008-04-10 04:48:34 +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
2025a490d0
Move memcpy / memset optimization pass after GVN.
...
llvm-svn: 49457
2008-04-10 01:33:05 +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
44b3005e86
Fix some minor errors in comments.
...
llvm-svn: 49445
2008-04-09 20:08:06 +00:00
Dan Gohman
3049516bd5
Add const qualifiers.
...
llvm-svn: 49443
2008-04-09 18:31:41 +00:00
Dan Gohman
bb0022b810
Update comments to use 2.0 syntax type names.
...
llvm-svn: 49442
2008-04-09 18:24:25 +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
091afc7714
remove capital letter from test name.
...
llvm-svn: 49436
2008-04-09 17:46:36 +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
Chris Lattner
0704e3acff
ConstantFP::get should be static.
...
llvm-svn: 49434
2008-04-09 17:16:28 +00:00
Nate Begeman
a6063118c6
Fix a bug where an incorrect bit mask would be generated if a target's last asm
...
string began at a power of 2 in the string index. For example, if "ret" started
at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31.
llvm-svn: 49433
2008-04-09 16:24:11 +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
Evan Cheng
0515472470
Unbreak teh build.
...
llvm-svn: 49417
2008-04-09 07:06: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
Chris Lattner
8ca9450885
make ConstantFP::isExactlyValue work for long double as well.
...
llvm-svn: 49410
2008-04-09 00:03:58 +00:00
Devang Patel
0a14b5b649
Add CreateGetResult()
...
llvm-svn: 49398
2008-04-08 20:41:22 +00:00
Duncan Sands
470ab1a04d
Check that bodies and calls but not declarations
...
are marked nounwind when compiling without
-fexceptions.
llvm-svn: 49393
2008-04-08 19:31:52 +00:00
Dale Johannesen
5169fa17b5
Rename -disable-required-unwind-tables to -unwind-tables-optional.
...
llvm-svn: 49391
2008-04-08 18:10:08 +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
Gabor Greif
00fcdeddd3
merge r48768 from branches/ggreif/parallelized-test
...
llvm-svn: 49382
2008-04-08 15:22:41 +00:00
Devang Patel
3d840ded0d
Add multiple value return instruction constructor.
...
llvm-svn: 49374
2008-04-08 07:30:13 +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
Chris Lattner
166c458df4
silence warning when assertions are disabled.
...
llvm-svn: 49371
2008-04-08 05:49:09 +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
399c0e63af
Missed one.
...
llvm-svn: 49365
2008-04-08 00:14:59 +00:00
Dale Johannesen
da298f9107
Add -disable-required-unwind-tables to tests
...
that need it (usually, grepping for some string
found in unwind info)
llvm-svn: 49364
2008-04-08 00:14:17 +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
Sam Bishop
3a13067557
Added support for Create() calls that take an argument besides the
...
deserializer.
llvm-svn: 49350
2008-04-07 21:36:46 +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
Tanya Lattner
18948355e1
Remove llvm-upgrade.
...
llvm-svn: 49347
2008-04-07 18:32:47 +00:00
Tanya Lattner
c7972310bb
Added note to getting started guide to use llvm-gcc4.2.
...
Removed llvm-upgrade from documentations.
llvm-svn: 49346
2008-04-07 18:32:25 +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
Duncan Sands
d6481955db
Testcase for pr2169.
...
llvm-svn: 49344
2008-04-07 17:03:16 +00:00
Evan Cheng
7b93268305
Fix test.
...
llvm-svn: 49343
2008-04-07 17:02:18 +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
Bill Wendling
856d8f5b58
Remove tabs. Patch by Mike Stump!
...
llvm-svn: 49317
2008-04-07 05:47:52 +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
Chris Lattner
5bd2f736e6
fix this testcase to pass and remove a duplicate instance of itself.
...
llvm-svn: 49281
2008-04-06 21:39:17 +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
5ed17b67d2
Fix generation of multi-stage instruction itineraries. Patch by
...
giuma.cordes@gmail.com
llvm-svn: 49276
2008-04-06 17:38:14 +00:00
Torok Edwin
538160b7ff
-fPIC is required on x86-64 when building shared objects.
...
llvm-svn: 49274
2008-04-06 12:42:29 +00:00
Chris Lattner
8519c0ead8
disable this for now.
...
llvm-svn: 49248
2008-04-05 04:12:01 +00:00
Evan Cheng
c975d7b30d
Forgot this.
...
llvm-svn: 49247
2008-04-05 02:17:58 +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
Duncan Sands
4cbca05d4e
If a value is cast to its own type, then the cast
...
is not needed.
llvm-svn: 49210
2008-04-04 08:28:13 +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
Devang Patel
124cce86fc
Reenable running StripSymbols when EH is on.
...
Dale fixed EH.
llvm-svn: 49192
2008-04-03 21:30:06 +00:00
Evan Cheng
4b9a2c0b59
New test case.
...
llvm-svn: 49190
2008-04-03 21:25:03 +00:00
Chuck Rose III
30d27e4e03
Removed a deleted file from the VStudio System project. Also added custom build commands to engage 64 bit assembler for compilation callback on 64 bit configurations only.
...
llvm-svn: 49188
2008-04-03 20:28:40 +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
Ted Kremenek
73ac2048f9
Add member template version of SerializeTrait<T>::Create that also accepts
...
an optional argument for us by T's Create method.
llvm-svn: 49169
2008-04-03 16:44:37 +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
fc4ad7de66
Move instruction flag inference out of InstrInfoEmitter and into
...
CodeGenDAGPatterns, where it can be used in other tablegen backends.
This allows the inference to be done for DAGISelEmitter so that it
gets accurate mayLoad/mayStore/isSimpleLoad flags.
This brings MemOperand functionality back to where it was before
48329. However, it doesn't solve the problem of anonymous patterns
which expand to code that does loads or stores.
llvm-svn: 49123
2008-04-03 00:02:49 +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
5316aebeb6
Testcase for EH with functions whose names are stripped.
...
llvm-svn: 49111
2008-04-02 20:16:41 +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
Torok Edwin
21b8bed571
Add new file Support/DataFlow.h.
...
It allows Use-Def and Def-Use relations to be treated as graphs.
llvm-svn: 49088
2008-04-02 14:57:52 +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
Chris Lattner
1f17cce2eb
more edits from Jon Sargeant
...
llvm-svn: 49065
2008-04-02 00:38:26 +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
Chris Lattner
81f929763c
add a dropped hunk from Jon Sargeant's patch.
...
llvm-svn: 49045
2008-04-01 18:47:32 +00:00
Chris Lattner
1429e6fb29
make langref more precise, wave 1, from Jon Sargeant
...
llvm-svn: 49044
2008-04-01 18:45:27 +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
Chris Lattner
5db870c904
minor typo
...
llvm-svn: 49040
2008-04-01 18:02:36 +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
014dea94b2
prune unneeded #includes
...
llvm-svn: 49028
2008-04-01 04:00:45 +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
5a7d4e4f6d
add an accessor.
...
llvm-svn: 49023
2008-04-01 03:20:31 +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
f5b0b76d28
remove extraneous #include
...
llvm-svn: 49021
2008-04-01 03:01:15 +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
ac17d39469
update comment.
...
llvm-svn: 49010
2008-04-01 00:54:39 +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
Dale Johannesen
0de94a1712
Mark functions in some tests as 'nounwind'. Generating
...
EH info for these functions causes the tests to fail for
random reasons (e.g. looking for 'or' or counting lines
with asm-printer; labels count as lines.)
llvm-svn: 49003
2008-03-31 23:20:09 +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
Gordon Henriksen
765457e28f
Add a unified 'generated documentation' target so the web site script has a consistent target to use.
...
llvm-svn: 48985
2008-03-31 17:27:57 +00:00
Torok Edwin
44a34aa67c
test commit
...
llvm-svn: 48984
2008-03-31 17:09:58 +00:00
Gordon Henriksen
e23ed62b69
Reverting r48974. See PR2183 for details.
...
llvm-svn: 48983
2008-03-31 16:46:23 +00:00
Erick Tryzelaar
4a0da98825
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
...
llvm-svn: 48982
2008-03-31 16:22:09 +00:00
Erick Tryzelaar
eb1242a083
There isn't any c++ code in LangImpl8.html, so use that
...
instead of OCamlLangImpl8.html.
llvm-svn: 48979
2008-03-31 08:50:45 +00:00
Erick Tryzelaar
0039235491
Chapter 5, 6, and 7 of the ocaml/kaleidoscope tutorial
...
and fix some tabs in chapter 3 and 4.
llvm-svn: 48978
2008-03-31 08:44:50 +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
Erick Tryzelaar
5cc6176dca
Quote the ocaml executables
...
realazthat in #llvm was having problems building llvm
because configure was finding an ocaml executable in
a directory with a space in it's name. This patch
puts quotes around the name so that llvm can build for
him.
llvm-svn: 48974
2008-03-31 03:46:43 +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
Erick Tryzelaar
dd0ace574b
Tweak build system to allow for installing the tutorial and uninstalling the docs.
...
llvm-svn: 48968
2008-03-30 20:32:18 +00:00
Duncan Sands
7d6c8ae488
Fix comment typo.
...
llvm-svn: 48967
2008-03-30 19:38:55 +00:00
Erick Tryzelaar
a2eba03db2
Fix some documentation for the tutorial.
...
llvm-svn: 48966
2008-03-30 19:14:31 +00:00
Nick Lewycky
9fb8908457
Moved from PR1570.
...
llvm-svn: 48965
2008-03-30 19:07:11 +00:00
Chris Lattner
e950eee303
stop building llvmc.
...
llvm-svn: 48964
2008-03-30 18:58:05 +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
Chris Lattner
a01203e047
fix typo, PR2181
...
llvm-svn: 48954
2008-03-30 16:59:21 +00:00
Erick Tryzelaar
ca3c28bd58
Add chapter 3 and 4 of the ocaml/kaleidoscope tutorial.
...
llvm-svn: 48949
2008-03-30 09:57:12 +00:00
Evan Cheng
16d72072df
Cosmetic changes.
...
llvm-svn: 48947
2008-03-29 18:34:22 +00:00
Anton Korobeynikov
08bae57469
Honour another bunch of parameter attributes in llvm2cpp
...
llvm-svn: 48942
2008-03-29 11:25:49 +00:00
Anton Korobeynikov
a125be374e
Honour ByVal parameter attribute in llvm2cpp
...
llvm-svn: 48941
2008-03-29 11:15:01 +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
28e7b57605
add a testcase for forming memset from noncontiguous stores.
...
llvm-svn: 48938
2008-03-29 04:51:35 +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
Evan Cheng
1c76b558c4
Cosmetic change.
...
llvm-svn: 48935
2008-03-29 01:04:05 +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
Bill Wendling
a86fd1b214
Simplify the conversion from "0x" numbers to a single digit number.
...
llvm-svn: 48907
2008-03-28 06:22: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
Devang Patel
e2337ecf76
add another testcase
...
llvm-svn: 48881
2008-03-27 17:13:55 +00:00
Mikhail Glushenkov
abb139c3f8
Fix build breakage on Windows with GCC 4.3. References bug #2176 .
...
llvm-svn: 48874
2008-03-27 09:53:47 +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
Erick Tryzelaar
a5e13fab86
Adding the first two chapters of the ocaml/kaleidoscope tutorial.
...
llvm-svn: 48871
2008-03-27 08:18:07 +00:00
Chris Lattner
cb058e41a2
when a node is removed from an ilist, set its next/prev pointers to
...
null. This means that uses of invalidated iterators will explode violently
with:
ilist:143: failed assertion `NodePtr && "++'d off the end of an ilist!"'
instead of happening to work "most of the time".
llvm-svn: 48859
2008-03-27 02:43:03 +00:00
Devang Patel
c9c9e406ad
New test case.
...
llvm-svn: 48858
2008-03-27 01:51:31 +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
Chuck Rose III
f1dcb00266
Updating win32 VStudio project files with new file references and removing dead references.
...
llvm-svn: 48849
2008-03-27 00:02:53 +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
Mikhail Glushenkov
ea7cb37a5c
Another test commit (with git-svn)
...
llvm-svn: 48843
2008-03-26 21:37:43 +00:00
Mikhail Glushenkov
19e24df3a4
Test commit
...
llvm-svn: 48840
2008-03-26 21:18:58 +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
Erick Tryzelaar
05acd73a73
Test commit (removed trailing whitespace)
...
llvm-svn: 48809
2008-03-26 00:38:56 +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
Anton Korobeynikov
4c1559f54e
Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
...
llvm-svn: 48786
2008-03-25 18:53:36 +00:00
Bill Wendling
e9e706a249
De-constify the input to the "operator >>" method as it is modified.
...
Patch by dekruijf@cs.wisc.edu !
llvm-svn: 48782
2008-03-25 18:16:52 +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
Gordon Henriksen
40f061cb66
Tests for the instruction iterator bindings.
...
llvm-svn: 48775
2008-03-25 16:35:08 +00:00
Gordon Henriksen
9859ab7283
Extend the builder interface to use the new instruction positioning code.
...
This adds support for instruction iterators, as well as rewriting the
builder code to use these new functions. This lets us eliminate the C
bindings for moving around the builder.
Patch by Erick Tryzelaar!
llvm-svn: 48774
2008-03-25 16:26:51 +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
Tanya Lattner
ca8eb5d0f5
Disable building llvm-upgrade.
...
llvm-svn: 48764
2008-03-25 05:05:58 +00:00
Sam Bishop
1c077ae1b7
Make a note of the fact that EmitOwnedPtr() has nothing to do with the
...
OwningPtr<> class.
llvm-svn: 48763
2008-03-25 04:41:18 +00:00
Tanya Lattner
8bf97c2324
Byebye llvm-upgrade!
...
llvm-svn: 48762
2008-03-25 04:26:08 +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
Devang Patel
0d48c94e7d
check struct layout
...
llvm-svn: 48758
2008-03-25 00:47:49 +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
Andrew Lenharth
5e0067d982
With debug info, there are nameless constant global values. do not crash when we hit one
...
llvm-svn: 48749
2008-03-24 22:16:14 +00:00
Steve Naroff
48b1a18de4
Add file to project.
...
llvm-svn: 48747
2008-03-24 22:01:58 +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
ce2682184f
Oops. I wanted the compile flags for C++, not the C preprocessor flags.
...
llvm-svn: 48744
2008-03-24 21:38:01 +00:00