Owen Anderson
ed3e63a203
Fix a bug introduced in my last commit.
...
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Owen Anderson
f2b10d3de3
Fix a couple more bugs in the phi construction by pulling in code that does
...
almost the same things from LCSSA.
llvm-svn: 40540
2007-07-26 18:26:51 +00:00
Evan Cheng
ffa8cbd22b
Make sure epilogue esp adjustment is placed before any terminator and pop instructions.
...
llvm-svn: 40538
2007-07-26 17:45:41 +00:00
Evan Cheng
ea037bffd2
Don't pollute the meaning of isUnpredicatedTerminator.
...
llvm-svn: 40537
2007-07-26 17:32:14 +00:00
Evan Cheng
9802b13b38
Minor bug.
...
llvm-svn: 40535
2007-07-26 17:02:45 +00:00
Dan Gohman
249090568d
Fix the alias analysis query in DAGCombiner to not add in two
...
offsets. The SrcValueOffset values are the real offsets from the
SrcValue base pointers.
llvm-svn: 40534
2007-07-26 16:14:06 +00:00
Dan Gohman
298f3fd9b7
Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead
...
to Instruction::mayWriteToMemory, fixing a FIXME, and helping
various places that call mayWriteToMemory directly.
llvm-svn: 40533
2007-07-26 16:06:08 +00:00
Dan Gohman
fd392a7a51
Remove a bogus return statement, what appears to have been a pasto
...
from Relation::contradicts in Relation::incorporate.
llvm-svn: 40531
2007-07-26 15:29:35 +00:00
Dan Gohman
c63ddf2f57
DummyInst's member functions don't need to be virtual.
...
llvm-svn: 40530
2007-07-26 15:25:08 +00:00
Dan Gohman
d3a062f01b
In the .loc directive, print the fields as "debug" fields, so they
...
don't get decorated as if for immediate fields for instructions.
llvm-svn: 40529
2007-07-26 15:24:15 +00:00
Dan Gohman
1bfc3f0d09
Fix a whitespace difference between CMPSSrr and CMPSDrr.
...
llvm-svn: 40528
2007-07-26 15:11:50 +00:00
Christopher Lamb
258dab5389
Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions.
...
llvm-svn: 40521
2007-07-26 08:18:32 +00:00
Christopher Lamb
08bcd5c0f8
Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350
...
llvm-svn: 40520
2007-07-26 08:12:07 +00:00
Christopher Lamb
9a0d88efde
Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
...
llvm-svn: 40518
2007-07-26 07:48:21 +00:00
Evan Cheng
413d222576
Same goes for constantpool, etc.
...
llvm-svn: 40517
2007-07-26 07:35:15 +00:00
Christopher Lamb
73c3cd47cc
Add selection DAG nodes for subreg insert/extract. PR1350
...
llvm-svn: 40516
2007-07-26 07:34:40 +00:00
Christopher Lamb
cb63a77a51
Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands.
...
llvm-svn: 40514
2007-07-26 07:00:46 +00:00
Christopher Lamb
b178ecbbc0
Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test.
...
llvm-svn: 40510
2007-07-26 03:33:13 +00:00
Christopher Lamb
f3881994a7
Add support for 3 element 32-bit vector ValueTypes.
...
llvm-svn: 40506
2007-07-26 01:46:52 +00:00
Dan Gohman
513dcba4f8
Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the
...
x86 target, replacing them with the new alignment attributes on memory
references.
llvm-svn: 40504
2007-07-26 00:31:09 +00:00
Owen Anderson
ed75133924
Fix what is _hopefully_ the last corner case for loops.
...
llvm-svn: 40503
2007-07-25 23:54:42 +00:00
Evan Cheng
9588231d34
Mac OS X x86-64 lower 4G address is not available.
...
llvm-svn: 40502
2007-07-25 23:41:36 +00:00
Evan Cheng
75b396c3c9
Mac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements.
...
llvm-svn: 40501
2007-07-25 23:36:05 +00:00
Evan Cheng
4b747bb6a0
EmitAlignment() also emits optional fill value.
...
llvm-svn: 40500
2007-07-25 23:35:07 +00:00
Evan Cheng
f34a0509c2
Functions with LinkOnce and weak linkage still need to be aligned. Doh.
...
llvm-svn: 40499
2007-07-25 22:28:16 +00:00
Owen Anderson
1e53615073
My last commit was not correct for nested loops. Fix it, and add a testcase for it.
...
llvm-svn: 40498
2007-07-25 22:19:40 +00:00
Owen Anderson
ce9d73dbe7
Fix an infinite loop on 300.twolf.
...
llvm-svn: 40497
2007-07-25 22:03:06 +00:00
Owen Anderson
b215074820
Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
...
llvm-svn: 40495
2007-07-25 21:26:36 +00:00
Owen Anderson
522f7a7608
Fix a bug that was causing GVN to crash on 252.eon.
...
llvm-svn: 40494
2007-07-25 21:13:41 +00:00
Owen Anderson
6a1a8d05b8
Add basic support for performing whole-function RLE.
...
Note: This has not yet been thoroughly tested. Use at your own risk.
llvm-svn: 40489
2007-07-25 19:57:03 +00:00
Dan Gohman
0fc4e0cf47
Don't ignore the return value of AsmPrinter::doInitialization and
...
AsmPrinter::doFinalization.
llvm-svn: 40487
2007-07-25 19:33:14 +00:00
Devang Patel
d7b401bafd
Add BasicInliner interface.
...
This interface allows clients to inline bunch of functions with module
level call graph information.:wq
llvm-svn: 40486
2007-07-25 18:00:25 +00:00
Nick Lewycky
608fe6cf68
Fix debug info and globals filled with zeros.
...
llvm-svn: 40483
2007-07-25 03:48:45 +00:00
Anton Korobeynikov
e0344393bb
Minor cleanup:
...
- Split EH and debug infiormation
- Make DwarfWriter more verbose in some cases
llvm-svn: 40481
2007-07-25 00:06:28 +00:00
Dan Gohman
1444c5840b
Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask.
...
llvm-svn: 40480
2007-07-24 23:00:27 +00:00
Dan Gohman
a2e07a38bc
Use movaps to load a v4f32 build_vector of all-constant values into a
...
register instead of loading each element individually.
llvm-svn: 40478
2007-07-24 22:55:08 +00:00
Owen Anderson
b9ad251288
Add initial support for non-local memory dependence analysis.
...
NOTE: This has only been cursorily tested. Expected improvements soon.
llvm-svn: 40476
2007-07-24 21:52:37 +00:00
Owen Anderson
f22326ad3d
Make the copy constructor of SmallPtrSet much faster.
...
llvm-svn: 40474
2007-07-24 21:31:23 +00:00
Anton Korobeynikov
e8170a07f8
Heal EH handling stuff by emitting correct offsets to callee-saved registers.
...
Pretty hackish, but code itself is dirty mess, so we won't make anything worse. :)
llvm-svn: 40472
2007-07-24 21:07:39 +00:00
Owen Anderson
eb9f1b612c
Add a GVN pass, using the value numbering code I developed for GVNPRE and the
...
load elimination code from RedundantLoadElimination.
llvm-svn: 40469
2007-07-24 17:55:58 +00:00
Reid Spencer
4e179b88aa
Make output match actual condition tested. Thanks, Duncan.
...
llvm-svn: 40464
2007-07-24 14:35:44 +00:00
Devang Patel
aa2a753350
Unreachable block is not a root node in post dominator tree.
...
llvm-svn: 40458
2007-07-24 01:02:25 +00:00
Owen Anderson
5969a3cb91
Rename a lot of things to change FastDLE to RedundantLoadElimination.
...
llvm-svn: 40457
2007-07-24 00:17:04 +00:00
Owen Anderson
2aab0eafe9
Rename FastDLE as RedundantLoadElimination.
...
llvm-svn: 40456
2007-07-24 00:08:38 +00:00
Reid Spencer
b9f23cc28b
1. Make sure we print the Function Value for parameter attribute errors
...
2. Fold an if statement into the Assert1 macro call.
llvm-svn: 40455
2007-07-23 23:46:43 +00:00
Reid Spencer
6286ca1d69
Add better verification of attributes on function types. It is not permitted
...
to use sret or inreg on the function. It is equally illegal to use noreturn
or nounwind on a parameter; they only go with the function. This patch
enforces these rules.
llvm-svn: 40453
2007-07-23 23:09:55 +00:00
Owen Anderson
0a79ada820
Don't delete volatile loads. Doing so is not safe.
...
llvm-svn: 40448
2007-07-23 22:05:54 +00:00
Owen Anderson
bd3360e856
Add FastDLE, the load-elimination counterpart of FastDSE.
...
llvm-svn: 40445
2007-07-23 21:48:08 +00:00
Dan Gohman
54b8032d64
Fix some uses of dyn_cast to be uses of cast.
...
llvm-svn: 40443
2007-07-23 20:24:29 +00:00
Dan Gohman
e2dcfd1516
Delete the svn:executable property on these files, which aren't executable.
...
llvm-svn: 40441
2007-07-23 19:26:08 +00:00
Owen Anderson
d3a8c81c04
Fix file header.
...
llvm-svn: 40440
2007-07-23 18:30:37 +00:00
Chris Lattner
914de64a0a
completely remove a transformation that is unsafe in the face of
...
undefs.
llvm-svn: 40439
2007-07-23 17:10:17 +00:00
Bill Wendling
97342a9b0c
Add missing SSE builtins:
...
__builtin_ia32_cvtss2si64
__builtin_ia32_cvttss2si64
__builtin_ia32_cvtsi642ss
__builtin_ia32_cvtsd2si64
__builtin_ia32_cvttsd2si64
__builtin_ia32_cvtsi642sd
llvm-svn: 40411
2007-07-23 03:07:27 +00:00
Reid Spencer
dd93d5abaa
Report an error if one occurs in releaseModule.
...
llvm-svn: 40405
2007-07-22 21:39:37 +00:00
Devang Patel
f45fc256e1
Apply temporary work around to fix llvm mis-compilation
...
reported in PR 1556.
llvm-svn: 40133
2007-07-21 00:34:29 +00:00
Evan Cheng
53cb03b583
No more noResults.
...
llvm-svn: 40132
2007-07-21 00:34:19 +00:00
Dan Gohman
ac8ccab48f
Don't assume that only Uses can be kills. Defs are marked as kills initially
...
when there are no uses. This fixes a dangling-pointer bug, where pointers to
deleted instructions were not removed from kills lists. More info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-July/009749.html
llvm-svn: 40131
2007-07-20 23:17:34 +00:00
Chris Lattner
c157b172c1
zext(undef) = 0 and sext(undef) = 0, not undef.
...
This hopefully fixes a miscompilation of TargetData.cpp when self hosting.
llvm-svn: 40125
2007-07-20 22:09:02 +00:00
Chris Lattner
9663eb4a5b
this xform is already done by the constant folder.
...
llvm-svn: 40124
2007-07-20 22:06:41 +00:00
Evan Cheng
cdb4e7949f
Added -print-emitted-asm to print out JIT generated asm to cerr.
...
llvm-svn: 40123
2007-07-20 21:56:13 +00:00
Devang Patel
133b5cb6b6
Use SmallVector instead of std::vector.
...
llvm-svn: 40109
2007-07-20 18:04:54 +00:00
Dan Gohman
87107326f6
Optimize alignment of loads and stores.
...
llvm-svn: 40102
2007-07-20 16:34:21 +00:00
Duncan Sands
4b390d541e
Place SCCPSolver also in the anonymous namespace. This
...
pacifies g++-4.2.
llvm-svn: 40089
2007-07-20 08:56:21 +00:00
Owen Anderson
89afa507b1
Fix a bug where we were marking GEP expressions with the wrong opcode.
...
llvm-svn: 40085
2007-07-20 08:19:20 +00:00
Owen Anderson
3a92d35e62
When removing instructions from the analysis, be sure to check the confirmed
...
flag when determining what to do with dependencies.
llvm-svn: 40079
2007-07-20 06:16:07 +00:00
Evan Cheng
ac92a8149e
Because we promote SSE logical ops and loads to v2i64, we often end up generate
...
code that cross integer / floating point domains (e.g. generate pxor / pand for
logical ops on floating point value, movdqa to load / store floating point SSE
values). Given that, it's better to use movaps instead of movdqa and movups
instead of movdqu. They have the same latency but the "aps" variants are one
byte shorter.
If the domain crossing problem is a real performance issue, then we will have to
fix it with dynamic programming based isel.
llvm-svn: 40076
2007-07-20 00:27:43 +00:00
Evan Cheng
f8d66a1eec
Oops. These stores actually produce results.
...
llvm-svn: 40074
2007-07-20 00:20:46 +00:00
Evan Cheng
ba990bbc3f
Fix custom lowering of SSE FXOR.
...
llvm-svn: 40071
2007-07-19 23:36:01 +00:00
Evan Cheng
f11cf2cad8
Fix patterns so we isel the xorps, etc. for floating pt logical SSE ops. DAG combiner may fold away the (bit_convert (load)).
...
llvm-svn: 40070
2007-07-19 23:34:10 +00:00
Reid Spencer
44d34e9b61
For PR1553:
...
Change the keywords for the zext and sext parameter attributes to be
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.
llvm-svn: 40069
2007-07-19 23:13:04 +00:00
Reid Spencer
bcbcea4547
Hush a noisy warning from GCC 4.2 about overflow during conversion by using
...
the type "unsigned" instead of uintptr_t for a 1-bit structure field.
llvm-svn: 40066
2007-07-19 21:05:30 +00:00
Owen Anderson
3b1129af78
Make val_replace fail early, which reduces the time to optimize 403.gcc to 14.8s.
...
llvm-svn: 40064
2007-07-19 19:57:13 +00:00
Devang Patel
45675e56ad
Verify loop info.
...
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Duncan Sands
8c6657894f
Replace mysterious code causing a g++-4.2 warning
...
with hopefully correct code that pleases g++-4.2.
llvm-svn: 40051
2007-07-19 09:42:01 +00:00
Duncan Sands
840594467f
As pointed out by g++-4.2, the original code didn't do
...
what it thought it was doing.
llvm-svn: 40044
2007-07-19 07:31:58 +00:00
Owen Anderson
21e3bd1cdc
Remember to free the heap allocated array if we're not going to use it.
...
llvm-svn: 40043
2007-07-19 06:45:33 +00:00
Owen Anderson
57d33add2c
Use SmallVector and DenseMap in even more places.
...
With this, the time to optimize 403.gcc is down to 15.1s.
llvm-svn: 40042
2007-07-19 06:37:56 +00:00
Owen Anderson
7a4b965739
Change ValueTable to use a DenseMap for mapping expressions to value numbers.
...
This results in a slight speedup for 403.gcc.
llvm-svn: 40040
2007-07-19 06:13:15 +00:00
Devang Patel
9c100bc7e9
Set up ground work to verify preserved analysis info.
...
llvm-svn: 40039
2007-07-19 05:36:09 +00:00
Owen Anderson
c32df0bc73
Move some sets and maps to SmallPtrSet and DenseMap respectively. This
...
reduces the time to optimize 403.gcc from 17.6s to 16.4s.
llvm-svn: 40036
2007-07-19 03:32:44 +00:00
Devang Patel
fe0ef94227
After a basic block is split into two parts,
...
second part dominates all the blocks dominated
by original basic block. And first part dominates
second part.
llvm-svn: 40035
2007-07-19 02:29:24 +00:00
Devang Patel
4020116257
Now this temp. fix is not required.
...
llvm-svn: 40034
2007-07-19 02:22:21 +00:00
Evan Cheng
8312ed6f77
Change instruction description to split OperandList into OutOperandList and
...
InOperandList. This gives one piece of important information: # of results
produced by an instruction.
An example of the change:
def ADD32rr : I<0x01, MRMDestReg, (ops GR32:$dst, GR32:$src1, GR32:$src2),
"add{l} {$src2, $dst|$dst, $src2}",
[(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
=>
def ADD32rr : I<0x01, MRMDestReg, (outs GR32:$dst), (ins GR32:$src1, GR32:$src2),
"add{l} {$src2, $dst|$dst, $src2}",
[(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
llvm-svn: 40033
2007-07-19 01:14:50 +00:00
Evan Cheng
45eb268032
Only adjust esp around calls in presence of alloca.
...
llvm-svn: 40030
2007-07-19 00:42:58 +00:00
Evan Cheng
30e121adf6
Only adjust esp around calls in presence of alloca.
...
llvm-svn: 40028
2007-07-19 00:42:05 +00:00
Devang Patel
ef7c515e9a
Fix typo.
...
llvm-svn: 40025
2007-07-18 23:50:19 +00:00
Devang Patel
b5482a65c9
Fix dominator info update to accommodate CFG changes.
...
This fixes PR1559.
llvm-svn: 40024
2007-07-18 23:48:20 +00:00
Evan Cheng
5dd17373c5
Add comment.
...
llvm-svn: 40022
2007-07-18 23:34:48 +00:00
Evan Cheng
6a4fb5d62b
Use MOV instead of LEA to restore ESP if callee-saved frame size is 0; if previous instruction updates esp, fold it in.
...
llvm-svn: 40018
2007-07-18 21:26:06 +00:00
Dan Gohman
4d64f82ab5
Add constructor overloads for LoadInst and StoreInst that insert at the
...
end of a BasicBlock and have an alignment parameter.
llvm-svn: 40016
2007-07-18 20:51:11 +00:00
Dan Gohman
2fc9d5171e
Implement initial memory alignment awareness for SSE instructions. Vector loads
...
and stores that have a specified alignment of less than 16 bytes now use
instructions that support misaligned memory references.
llvm-svn: 40015
2007-07-18 20:23:34 +00:00
Owen Anderson
03b56ad400
Fix an issue where assignments that caused a SmallPtrSet to become non-small
...
would result in calling realloc() on a null pointer. Instead, if we encounter
this situation, make a normal call to malloc().
llvm-svn: 40014
2007-07-18 19:54:15 +00:00
Dan Gohman
4c140b7128
It's not necessary to do rounding for alloca operations when the requested
...
alignment is equal to the stack alignment.
llvm-svn: 40004
2007-07-18 16:29:46 +00:00
Evan Cheng
cee32b53a4
New entry.
...
llvm-svn: 39998
2007-07-18 08:21:49 +00:00
Evan Cheng
cf0fdbc249
Fold prologue esp update when possible.
...
llvm-svn: 39984
2007-07-17 21:26:42 +00:00
Evan Cheng
6ad7064bdf
Dead code.
...
llvm-svn: 39979
2007-07-17 20:01:19 +00:00
Evan Cheng
26f6d71d26
Make sure not to break eh_return.
...
llvm-svn: 39978
2007-07-17 18:40:47 +00:00
Evan Cheng
70b79bfa0e
Update.
...
llvm-svn: 39977
2007-07-17 18:39:45 +00:00
Evan Cheng
46a48c5c3e
Missed the case where alloca is used but the stack size (not including callee-saved portion) is zero. Thanks Dan.
...
llvm-svn: 39974
2007-07-17 18:03:34 +00:00
Rafael Espindola
d70763bb0e
detect invalid combination of sret and byval
...
llvm-svn: 39971
2007-07-17 13:34:23 +00:00
Evan Cheng
532b73311e
Use push / pop for prologues and epilogues.
...
llvm-svn: 39967
2007-07-17 07:59:08 +00:00
Chris Lattner
71e2481181
no email addrs in file headers
...
llvm-svn: 39962
2007-07-17 05:56:43 +00:00
Reid Spencer
3dd7b1699b
Unbreak the build by putting calls to free into the implementation file and
...
having that implementation file #include <cstdlib>.
llvm-svn: 39952
2007-07-17 02:16:12 +00:00
Owen Anderson
55b794723f
Take advantage of undefined behavior if the source program tries to GEP
...
beyond the end of an alloca to make FastDSE faster and more aggressive.
llvm-svn: 39945
2007-07-16 23:34:39 +00:00
Owen Anderson
efc00e35cf
Add support for walking up memory def chains, which enables finding many more
...
dead stores on 400.perlbench.
llvm-svn: 39929
2007-07-16 21:52:50 +00:00
Owen Anderson
f01c29815d
Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
...
llvm-svn: 39926
2007-07-16 21:27:44 +00:00
Reid Spencer
9496d63260
Return Undef if the block has no dominator. This was required to allow
...
llvm-gcc build to succeed. Without this change it fails in libstdc++
compilation. This causes no regressions in dejagnu tests. However,
someone who knows this code better might want to review it.
llvm-svn: 39924
2007-07-16 21:03:44 +00:00
Dan Gohman
ef7c87f4d8
Use ConstantFoldFP for folding all unary floating-point operations which may
...
have an error, and refector out the code for binary operators into
ConstantFoldBinaryFP and use it for all binary floating-point operations
which may have an error. These functions still rely exclusively on errno
to detect errors though.
llvm-svn: 39923
2007-07-16 15:26:22 +00:00
Dan Gohman
0ba554c0c8
Fix comments about vectors to use the current wording.
...
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Chris Lattner
66b7f0c956
Repair a regression in Transforms/InstCombine/mul.ll that Reid noticed.
...
llvm-svn: 39896
2007-07-16 04:15:34 +00:00
Nick Lewycky
6cdd641e1d
Start adding and cleaning up comments.
...
llvm-svn: 39894
2007-07-16 02:58:37 +00:00
Nick Lewycky
43e5fd5be7
Handle decrementing loops properly. Fixes PR1533.
...
Always pass the constant as the second parameter to HowManyLessThans.
Remove obsolete "isSigned" parameter.
llvm-svn: 39893
2007-07-16 02:08:00 +00:00
Chris Lattner
f6a91d74e0
Implement shift-simplify.ll:test[45].
...
First teach instcombine that sign bit checks only demand the
sign bit, this allows simplify demanded bits to hack on
expressions better.
Second, teach instcombine that ashr is useless if only the
sign bit is demanded.
llvm-svn: 39880
2007-07-15 20:54:51 +00:00
Chris Lattner
9cb8da1cb8
Implement shift-simplify.ll:test3, turning:
...
(X << 31) <s 0 --> (X&1) != 0
This happens dozens of times in the CFE.
llvm-svn: 39879
2007-07-15 20:42:37 +00:00
Nick Lewycky
701e227136
Clarify the language. Pointed out by Duncan Sands.
...
llvm-svn: 39857
2007-07-14 17:41:03 +00:00
Nick Lewycky
05e4170839
Fix the build. Patch from Holger Schurig.
...
llvm-svn: 39856
2007-07-14 15:11:14 +00:00
Anton Korobeynikov
5635277c36
Long live the exception handling!
...
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.
llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Nick Lewycky
93d39c53b6
Use maximal intersection algorithm exclusively. Fixes miscompile bug.
...
llvm-svn: 39852
2007-07-14 04:28:04 +00:00
Nick Lewycky
42e8a060a0
Add alternate ConstantRange intersection algorithm.
...
llvm-svn: 39851
2007-07-14 02:51:34 +00:00
Devang Patel
9166ad7658
Make LCSSA a loop pass.
...
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Evan Cheng
260a390840
Fix for PR1540: Specify F0, F1 are sub-registers of D0, etc.
...
llvm-svn: 39843
2007-07-13 23:55:50 +00:00
Owen Anderson
9ade055c0f
Handle GEPs with all-zero indices in the same way we handle pointer-pointer bitcasts. Also, fix a potentia infinite loop.
...
This brings FastDSE to parity with old DSE on 175.vpr.
llvm-svn: 39839
2007-07-13 22:50:48 +00:00
Devang Patel
cfdf3b6eff
Disable claims to preserve analysis until open issues are resolved.
...
llvm-svn: 39834
2007-07-13 21:53:42 +00:00
Dan Gohman
44771cf8e8
Fix the comment for LegalizeOp to more accurately reflect what it does.
...
llvm-svn: 39827
2007-07-13 20:14:11 +00:00
Dan Gohman
1f4580ceb4
Don't call SimplifyVBinOp for non-vector operations, following earlier review
...
feedback. This theoretically makes the common (scalar) case more efficient.
llvm-svn: 39823
2007-07-13 20:03:40 +00:00
Owen Anderson
275a5ef481
Be more aggressive in removing dead stores, and in removing instructions trivially dead after DSE.
...
This drastically improves the effect of FastDSE on kimwitu++.
llvm-svn: 39819
2007-07-13 18:26:26 +00:00
Dale Johannesen
1a9d304c35
Modify previous patch per review comments.
...
llvm-svn: 39817
2007-07-13 17:31:29 +00:00
Dale Johannesen
469ed8e17e
Skeleton of post-RA scheduler; doesn't do anything yet.
...
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.
llvm-svn: 39816
2007-07-13 17:13:54 +00:00
Chris Lattner
7cba3578aa
Fix CodeGen/Generic/print-arith-fp.ll on sparc (PR1551)
...
llvm-svn: 39813
2007-07-13 16:24:10 +00:00
Owen Anderson
0ad3e0795b
Reimplement removing stores to allocas at the end of a function. This should be safe now.
...
llvm-svn: 39790
2007-07-12 21:41:30 +00:00
Owen Anderson
999d27d563
Make the condition-checking for free with non-trivial dependencies more correct.
...
llvm-svn: 39789
2007-07-12 18:08:51 +00:00
Owen Anderson
6edb47d8be
Remove the end-block handling code. It was unsafe, and making it safe would have resulted in falling back to the slow DSE case. I need to think some more about the right way to handle this.
...
llvm-svn: 39788
2007-07-12 17:52:20 +00:00
Dale Johannesen
eb2c2823e3
ARM: make branch folder remove unconditional branches
...
following jump tables that it earlier inserted. This
would be OK on other targets but is needed for correctness
only on ARM (constant islands needs to find jump tables).
llvm-svn: 39782
2007-07-12 16:45:35 +00:00
Duncan Sands
b2a18dc10b
The type ids making up a filter are unsigned, and
...
should be output as unsigned values. Checked against
gcc.
llvm-svn: 39775
2007-07-12 13:51:39 +00:00
Gabor Greif
33f07df616
checked in as obvious,
...
thanks Benoit Boissinot!
llvm-svn: 39774
2007-07-12 13:31:38 +00:00
Chris Lattner
7eea439048
another missed SSE optimization
...
llvm-svn: 39772
2007-07-12 06:31:38 +00:00
Owen Anderson
b6211f5b50
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
...
llvm-svn: 39769
2007-07-12 00:06:21 +00:00
Devang Patel
f26f0ea111
Preserve analysis info.
...
llvm-svn: 39767
2007-07-11 23:47:28 +00:00
Bruno Cardoso Lopes
27f5beafb2
Added support for Mips specific GAS directives
...
Fixed print immediate
Fixed Identation on MipsISelDAGToDAG.cpp
llvm-svn: 39764
2007-07-11 23:24:41 +00:00
Bruno Cardoso Lopes
e21704313d
Added support for framepointer
...
Prologue/Epilogue support fp,ra save/restore and use the stack frame the right
way!
llvm-svn: 39763
2007-07-11 23:21:31 +00:00
Owen Anderson
733ff7bbc0
Handle the case where an entire structure is freed, and its dependency is a store to a field within
...
that structure.
Also, refactor the runOnBasicBlock() function, splitting some of the special cases into separate functions.
llvm-svn: 39762
2007-07-11 23:19:17 +00:00
Bruno Cardoso Lopes
0ba66ea1dc
Now that stack is represented the right way, LOA starts at 0
...
llvm-svn: 39761
2007-07-11 23:17:41 +00:00
Bruno Cardoso Lopes
be14b3c16c
Fixed AddLiveOut issues
...
FI's created the write way to represent Mips stack
llvm-svn: 39760
2007-07-11 23:16:16 +00:00
Bruno Cardoso Lopes
bc1b534410
Removed unused immediate PatLeaf, fixed lui instruction
...
llvm-svn: 39759
2007-07-11 22:47:02 +00:00
Bruno Cardoso Lopes
a851ed6989
Added MipsMachineFunction class, to hold Mips dinamic stack info when inserting Prologue/Epilog
...
llvm-svn: 39758
2007-07-11 22:44:21 +00:00
Owen Anderson
fb23f70dbf
Add support for eliminate stores to stack-allocated memory locations at the end
...
of a function.
llvm-svn: 39754
2007-07-11 21:06:56 +00:00
Owen Anderson
2388e80b0a
Handle eliminating stores that occur right before a free.
...
llvm-svn: 39753
2007-07-11 20:38:34 +00:00
Lauro Ramos Venancio
0ad4cde600
Handle packed structs in the CBackend.
...
llvm-svn: 39752
2007-07-11 19:56:53 +00:00
Evan Cheng
c7216b3a86
Missed a couple of places where new instructions are added due to spill / restore.
...
llvm-svn: 39748
2007-07-11 19:17:18 +00:00
Owen Anderson
28789d81c5
Clean up a few things based on Chris' feedback.
...
llvm-svn: 39747
2007-07-11 19:03:09 +00:00
Tanya Lattner
a715bbe152
Adding ability to demote phi to stack.
...
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Dale Johannesen
cacc6dbeb6
Fix hang compiling TimberWolf (allow for islands
...
of size other than 4).
llvm-svn: 39743
2007-07-11 18:32:38 +00:00
Lauro Ramos Venancio
18fc770fd0
Assert when TLS is not implemented.
...
llvm-svn: 39737
2007-07-11 17:19:51 +00:00
Duncan Sands
bfbe683782
Exception handling has been implemented.
...
llvm-svn: 39732
2007-07-11 16:59:20 +00:00
Chris Lattner
ef484ab964
Fix an oversight: for modules with no other identifying target info,
...
the sparc backend should be preferred when running on sparcs.
llvm-svn: 39142
2007-07-11 16:32:10 +00:00
Duncan Sands
aa83dc9037
If assertions are not enabled, we should return False here.
...
llvm-svn: 38535
2007-07-11 08:47:55 +00:00
Evan Cheng
2791a7ea6d
No longer need to track last def / use.
...
llvm-svn: 38534
2007-07-11 08:47:44 +00:00
Evan Cheng
c42a2e03f1
Fix for PR1545: Revamp code that update kill information due to register reuse.
...
llvm-svn: 38525
2007-07-11 05:28:39 +00:00
Owen Anderson
1eaba31f12
Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
...
as the current DSE, but it only a linear scan over each block, rather than quadratic. Eventually
(once it has been improved somewhat), this will replace the current DSE.
NOTE: This has not yet been extensively tested.
llvm-svn: 38517
2007-07-11 00:46:18 +00:00
David Greene
8d77dcca00
Make this work with GLIBCXX_DEBUG.
...
llvm-svn: 38516
2007-07-10 22:00:30 +00:00
Evan Cheng
f6d010e93d
Didn't mean the last commit. Revert.
...
llvm-svn: 38515
2007-07-10 22:00:16 +00:00
Dale Johannesen
ecef839eaa
Fix fp_constant_op failure.
...
llvm-svn: 38514
2007-07-10 21:53:30 +00:00
Evan Cheng
05c784cc30
Update.
...
llvm-svn: 38513
2007-07-10 21:49:47 +00:00
Dale Johannesen
7325a82196
fix 80 columnn violations, increasing the world's
...
pedantic satisfaction level.
llvm-svn: 38512
2007-07-10 20:53:41 +00:00
Owen Anderson
bb0f7c00ab
Calculate the size of a array allocation correctly.
...
llvm-svn: 38511
2007-07-10 20:48:38 +00:00
Owen Anderson
04b3497eb7
Fix a crasher when finding the dependency of a call.
...
llvm-svn: 38510
2007-07-10 20:39:07 +00:00
Owen Anderson
b11a2f3a32
Make this pass registration static as well.
...
llvm-svn: 38509
2007-07-10 20:21:08 +00:00
Owen Anderson
7d38ac8a37
Make the pass registration static.
...
llvm-svn: 38508
2007-07-10 20:20:19 +00:00
Chris Lattner
abcdeef610
add a note
...
llvm-svn: 38507
2007-07-10 20:03:50 +00:00
Rafael Espindola
c0d9376230
check for correct usage of the byval attribute
...
llvm-svn: 38506
2007-07-10 19:28:12 +00:00
Anton Korobeynikov
7971c2c9b7
During module cloning copy aliases too. This fixes PR1544
...
llvm-svn: 38505
2007-07-10 19:07:35 +00:00
Owen Anderson
6c92149ce5
Handle vaarg instructions correctly.
...
llvm-svn: 38504
2007-07-10 18:43:15 +00:00
Dan Gohman
629311ca52
Change the peep for EXTRACT_VECTOR_ELT of BUILD_PAIR to look for
...
the new CONCAT_VECTORS node type instead, as that's what legalize
uses now. And add a peep for EXTRACT_VECTOR_ELT of INSERT_VECTOR_ELT.
llvm-svn: 38503
2007-07-10 18:20:44 +00:00
Owen Anderson
f4bea94dbd
Volatile loads and stores depend on each other.
...
llvm-svn: 38502
2007-07-10 18:11:42 +00:00
Evan Cheng
abcf3842bb
Remove clobbersPred. Add an OptionalDefOperand to instructions which have the 's' bit.
...
llvm-svn: 38501
2007-07-10 18:08:01 +00:00
Evan Cheng
0ab209fa54
Remove clobbersPred.
...
llvm-svn: 38500
2007-07-10 18:07:08 +00:00
Owen Anderson
1f5fb875b6
Add support for finding the dependencies of call and invoke instructions.
...
llvm-svn: 38497
2007-07-10 17:59:22 +00:00
Evan Cheng
d80c2821af
If the operand is marked M_OPTIONAL_DEF_OPERAND, then it's a def.
...
llvm-svn: 38496
2007-07-10 17:52:20 +00:00
Evan Cheng
87e735c4be
Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.
...
llvm-svn: 38495
2007-07-10 17:50:43 +00:00
Owen Anderson
1bd416b823
Fix the build, and fix the handling of pointer sizes.
...
llvm-svn: 38494
2007-07-10 17:25:03 +00:00
Owen Anderson
1fabbda503
Fix a bunch of things from Chris' feedback
...
llvm-svn: 38493
2007-07-10 17:08:11 +00:00
Dan Gohman
bd0ff28e1c
Fix a bug in the folding of binary operators to undef.
...
Thanks to Lauro for spotting this!
llvm-svn: 38491
2007-07-10 15:19:29 +00:00
Dan Gohman
6b21e11f1c
Fix the folding of undef in several binary operators to recognize
...
undef in either the left or right operand.
llvm-svn: 38489
2007-07-10 14:20:37 +00:00
Evan Cheng
cf3b1c89a9
When a node value is only used by a CopyToReg, use the user's dest. This should not be restricted to nodes that produce only a single value.
...
llvm-svn: 38485
2007-07-10 07:08:32 +00:00
Evan Cheng
23dc96f640
Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h
...
llvm-svn: 38484
2007-07-10 06:59:55 +00:00
Nick Lewycky
ea767d42e8
Update the ValueRanges interface to use value numbers instead of Value*s.
...
llvm-svn: 38483
2007-07-10 03:28:21 +00:00
Owen Anderson
4ce919d799
Move some key maps from std::map to DenseMap. This improves the time to optimize Anton's testcase from 17.5s
...
to 15.7s.
llvm-svn: 38480
2007-07-10 00:27:22 +00:00
Owen Anderson
65f9dd6973
Use a cheaper test, delaying calling find_leader() until we know that it's necessary. This improves
...
the time to optimize Anton's testcase from 21.1s to 17.6s.
llvm-svn: 38479
2007-07-10 00:09:25 +00:00
Dan Gohman
928144b051
Define non-intrinsic instructions for vector min, max, sqrt, rsqrt, and rcp,
...
in addition to the intrinsic forms. Add spill-folding entries for these new
instructions, and for the scalar min and max instrinsic instructions which
were missing. And add some preliminary ISelLowering code for using the new
non-intrinsic vector sqrt instruction, and fneg and fabs.
llvm-svn: 38478
2007-07-10 00:05:58 +00:00
Owen Anderson
2106613ce6
Add an assertion if find_leader fails.
...
llvm-svn: 38477
2007-07-09 23:57:18 +00:00
Owen Anderson
8d4339f8db
Take advantage of the new fast SmallPtrSet assignment operator when propagating AVAIL_OUT sets.
...
This reduces the time to optimize Anton's testcase from 31.2s to 21.s!
llvm-svn: 38475
2007-07-09 22:29:50 +00:00
Owen Anderson
31bda05073
Make the assignment operator for SmallPtrSet much faster for normal cases.
...
llvm-svn: 38474
2007-07-09 22:27:20 +00:00
Dan Gohman
150487b166
Preserve volatililty and alignment information when lowering or
...
simplifying loads and stores.
llvm-svn: 38473
2007-07-09 22:18:38 +00:00
Devang Patel
65f3717db9
Expose struct size threhold to allow users to tweak their own setting.
...
llvm-svn: 38472
2007-07-09 21:19:23 +00:00
Dan Gohman
81cfdc2f19
Change getCopyToParts and getCopyFromParts to always use target-endian
...
register ordering, for both physical and virtual registers. Update the PPC
target lowering for calls to expect registers for the call result to
already be in target order.
llvm-svn: 38471
2007-07-09 20:59:04 +00:00
Owen Anderson
e48ed4f7a8
Make the assignment operator for SmallPtrSet return a reference, and fix a long-standing bug in the copy
...
ctor while I'm at it.
Thanks to Chris Lattner for help with this patch.
llvm-svn: 38470
2007-07-09 20:59:01 +00:00
Devang Patel
f1b6294e80
Fix memory leak.
...
llvm-svn: 38469
2007-07-09 20:52:39 +00:00
Dan Gohman
be352027e6
Initialize the IndexedModeActions array with memset before
...
updating it with calls to setIndexedLoadAction/setIndexedStoreAction,
which only update a few bits at a time. This avoids ostensible
undefined behavior of operationg on values which may be
trap-representations, and as a practical matter fixes errors from
valgrind, which doesn't track uninitialized memory with bit
granularity.
llvm-svn: 38468
2007-07-09 20:49:44 +00:00
Owen Anderson
e12cbdb0be
Fix an error in the assignment operator that was causing an infinite loop in GVNPRE.cpp.
...
Patch by Chis Lattner.
llvm-svn: 38467
2007-07-09 18:51:15 +00:00
Chris Lattner
4810c53b05
The various "getModuleMatchQuality" implementations should return
...
zero if they see a target triple they don't understand.
llvm-svn: 38463
2007-07-09 17:25:29 +00:00