Chris Lattner
735705bc3e
simplify this check, GetConstantStringInfo validates that a
...
global is constant already. No functionality change.
llvm-svn: 52812
2008-06-27 03:18:41 +00:00
Chris Lattner
b32a9ef00f
when linking globals, make sure to preserve the address space of the global.
...
llvm-svn: 52810
2008-06-27 03:10:24 +00:00
Bill Wendling
3d92cbffc6
Cruft left from patch revert...sorry. :-(
...
llvm-svn: 52808
2008-06-27 01:32:08 +00:00
Bill Wendling
fcbb9525d0
Reverting broken patch r52803.
...
llvm-svn: 52806
2008-06-27 01:27:56 +00:00
Owen Anderson
21498f52b2
Don't perform expensive queries checking for super and sub registers when we know that there aren't any.
...
This speed up LiveVariables on instcombine at -O0 -g from 0.3855s to 0.3503s. Look for more improvements in this area soon!
llvm-svn: 52804
2008-06-27 01:22:50 +00:00
Bill Wendling
f96d046d7c
- Remove a use of std::vector.
...
- Make sure that we're not recalculating the size of a vector
that never changes.
llvm-svn: 52803
2008-06-27 00:56:36 +00:00
Bill Wendling
c758698d2c
Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
...
some uses of std::vector, where it's return std::vector by value. Yuck!
llvm-svn: 52800
2008-06-27 00:09:40 +00:00
Chris Lattner
df1cbdd645
duncan points out that isOperationLegal includes a check for
...
type legality. Thanks Duncan!
llvm-svn: 52786
2008-06-26 17:16:00 +00:00
Owen Anderson
7df0d58535
Don't create a whole new string just to copy the elements into it.
...
llvm-svn: 52785
2008-06-26 17:06:02 +00:00
Matthijs Kooijman
f61fd54237
Make LLVM compile on DragonFly BSD (PR2499).
...
Patch by Hasso Tepper!
llvm-svn: 52781
2008-06-26 10:36:58 +00:00
Bill Wendling
3fdca23ee1
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!
...
llvm-svn: 52775
2008-06-26 08:32:05 +00:00
Chris Lattner
d4741e803f
"An improved Mach-O file type detection for sys::IdentifyFileType()
...
This patch add supports for single architecture mach-o files (the current implementation only support Universal Binary), and solve the signature conflict between java class and Universal Binary magics.
Note that this function will always returned dynamic library for Universal Binaries (like the current implementation) because the binary type is not include in the file header."
Patch by Jean-Daniel Dupas!
llvm-svn: 52766
2008-06-26 05:17:18 +00:00
Owen Anderson
db0a48b1a7
Reserve the size we'll need in advance.
...
llvm-svn: 52763
2008-06-26 04:47:41 +00:00
Dale Johannesen
a2de8eab61
Fixes the last x86-64 test failure in compat.exp:
...
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code. The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing. This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)
llvm-svn: 52750
2008-06-26 01:51:13 +00:00
Eric Christopher
3f1c75c4d8
Remove unused function.
...
llvm-svn: 52749
2008-06-26 01:19:35 +00:00
Eric Christopher
d0ab9c47e6
Move GetConstantStringInfo to lib/Analysis. Remove
...
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.
llvm-svn: 52748
2008-06-26 00:31:12 +00:00
Chris Lattner
b1e66ce3bb
when we know the signbit of an input to uint_to_fp is zero,
...
change it to sint_to_fp on targets where that is cheaper (and
visaversa of course). This allows us to compile uint_to_fp to:
_test:
movl 4(%esp), %eax
shrl $23, %eax
cvtsi2ss %eax, %xmm0
movl 8(%esp), %eax
movss %xmm0, (%eax)
ret
instead of:
.align 3
LCPI1_0: ## double
.long 0 ## double least significant word 4.5036e+15
.long 1127219200 ## double most significant word 4.5036e+15
.text
.align 4,0x90
.globl _test
_test:
subl $12, %esp
movl 16(%esp), %eax
shrl $23, %eax
movl %eax, (%esp)
movl $1127219200, 4(%esp)
movsd (%esp), %xmm0
subsd LCPI1_0, %xmm0
cvtsd2ss %xmm0, %xmm0
movl 20(%esp), %eax
movss %xmm0, (%eax)
addl $12, %esp
ret
llvm-svn: 52747
2008-06-26 00:16:49 +00:00
Owen Anderson
b55675e1db
Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
...
This speeds up live intervals from 0.37s to 0.30s on instcombine.
llvm-svn: 52745
2008-06-25 23:39:39 +00:00
Dan Gohman
39b07db75a
Fix the text in an assert string.
...
llvm-svn: 52744
2008-06-25 22:14:43 +00:00
Evan Cheng
3fc2372d3a
- Fix a x86 vector isel bug: illegal transformation of a vector_shuffle into a
...
shift.
- Add a readme entry for a missing vector_shuffle optimization that results in
awful codegen.
llvm-svn: 52740
2008-06-25 20:52:59 +00:00
Duncan Sands
33ff5c8d0d
Add support for expanding PPC 128 bit floats.
...
For this it is convenient to permit floats to
be used with EXTRACT_ELEMENT, so I tweaked
things to allow that. I also added libcalls
for ppcf128 to i32 forms of FP_TO_XINT, since
they exist in libgcc and this case can certainly
occur (and does occur in the testsuite) - before
the i64 libcall was being used. Also, the
XINT_TO_FP result seemed to be wrong when
the argument is an i128: the wrong fudge
factor was added (the i32 and i64 cases were
handled directly, but the i128 code fell
through to some generic softening code which
seemed to think it was i64 to f32!). So I
fixed it by adding a fudge factor that I
found in my breakfast cereal.
llvm-svn: 52739
2008-06-25 20:24:48 +00:00
Chris Lattner
58ecfbdad6
Implement JIT support for global aliases, patch by David Chisnall!
...
llvm-svn: 52738
2008-06-25 20:21:35 +00:00
Evan Cheng
88ca48b09d
Restore DeadArgElim back to 52570. It's breaking 447.dealII.
...
llvm-svn: 52736
2008-06-25 18:10:09 +00:00
Chris Lattner
d3406fc2a7
Switch the PPC backend and target-independent JIT to use the libsystem
...
InvalidateInstructionCache method instead of calling through
a hook on the JIT. This is a host feature, not a target feature.
llvm-svn: 52734
2008-06-25 17:18:44 +00:00
Chris Lattner
b4325a8316
fix compilation errors in my previous patch
...
llvm-svn: 52733
2008-06-25 17:17:53 +00:00
Chris Lattner
881d537d2c
Add a new InvalidateInstructionCache method to sys::Memory.
...
llvm-svn: 52731
2008-06-25 17:14:10 +00:00
Dan Gohman
906b630f83
SimpleInstructionSelector is here no more.
...
llvm-svn: 52725
2008-06-25 16:38:59 +00:00
Duncan Sands
6920b254ad
Add/complete support for integer and float
...
select_cc and friends. This code could be
factorized a bit but I'm not sure that it's
worth it.
llvm-svn: 52724
2008-06-25 16:34:21 +00:00
Duncan Sands
1b03c2ac98
Pacify gcc-4.3.
...
llvm-svn: 52723
2008-06-25 16:31:18 +00:00
Dan Gohman
aa01afd47c
Remove the OrigVT member from AtomicSDNode, as it is redundant with
...
the base SDNode's VTList.
llvm-svn: 52722
2008-06-25 16:07:49 +00:00
Mon P Wang
6a490371c9
Added MemOperands to Atomic operations since Atomics touches memory.
...
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub
llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Matthijs Kooijman
2e2001d8b9
Fix a (false) warning on darwin.
...
llvm-svn: 52705
2008-06-25 08:12:16 +00:00
Matthijs Kooijman
4e1cf1e7d7
Fix some cosmetics in comments.
...
llvm-svn: 52704
2008-06-25 08:10:21 +00:00
Evan Cheng
5fd28b54c7
- Use O(1) check of basic block size limit.
...
- Avoid speculatively execute vector ops.
llvm-svn: 52703
2008-06-25 07:50:12 +00:00
Chris Lattner
c9c81fb0df
Fix PR2488, a case where we deleted stack restores too aggressively.
...
llvm-svn: 52702
2008-06-25 05:59:28 +00:00
Evan Cheng
73db52ebf8
Enable two-address remat by default.
...
llvm-svn: 52701
2008-06-25 01:16:38 +00:00
Owen Anderson
ee9c30d435
Use push_back rather than operator[], which is incorrect in this cases. Unfortunately, this slow the testcase down a little bit,
...
but only marginally.
llvm-svn: 52700
2008-06-25 01:05:05 +00:00
Dan Gohman
5ceb8b676c
Append to the ActiveTimers std::vector before looking at the timer instead
...
of after, so that any reallocation it does doesn't get counted for the pass
being timed. This probably doesn't account for a timing discrepancy I was
looking into, but I'm fixing it anyway.
llvm-svn: 52693
2008-06-24 22:07:07 +00:00
Dale Johannesen
e5f4ffbdf1
Add v2f32 (MMX) type to X86. Support is primitive:
...
load,store,call,return,bitcast. This is enough to
make call and return work.
llvm-svn: 52691
2008-06-24 22:01:44 +00:00
Owen Anderson
79c69bc45f
In ConstantArray::getAsString(), we know the size of the resultant string in advance so we can pre-allocate it and just fill in
...
the entries. This improves the time for the AsmPrinter on InstructionCombining.cpp from 0.4248s to 0.3370s.
llvm-svn: 52690
2008-06-24 21:58:29 +00:00
Owen Anderson
230b3eb80c
Use SmallVector instead of std::vector for a minor compile time improvement.
...
llvm-svn: 52689
2008-06-24 21:44:59 +00:00
Dan Gohman
04c8bd7e11
Revert 52645, the loop unroller changes. It caused a regression in 252.eon.
...
llvm-svn: 52688
2008-06-24 20:44:42 +00:00
Dan Gohman
4be44e62b3
Fix a typo in a comment.
...
llvm-svn: 52687
2008-06-24 18:00:21 +00:00
Dan Gohman
61163850af
Use const_cast instead of a C-style cast.
...
llvm-svn: 52684
2008-06-24 17:47:37 +00:00
Matthijs Kooijman
c702e1d32f
Commit the new DeadArgElim pass again, this time with the gcc bootstrap failures fixed.
...
Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form.
llvm-svn: 52677
2008-06-24 16:30:26 +00:00
Matthijs Kooijman
19a6469e1b
Rename a few variables to be more consistent.
...
llvm-svn: 52672
2008-06-24 09:14:10 +00:00
Evan Cheng
3f2ceac565
If it's determined safe, remat MOV32r0 (i.e. xor r, r) and others as it is instead of using the longer MOV32ri instruction.
...
llvm-svn: 52670
2008-06-24 07:10:51 +00:00
Dan Gohman
4aef821183
Fix some signed vs. unsigned issues in array and vector handling.
...
llvm-svn: 52664
2008-06-24 01:17:52 +00:00
Dan Gohman
02a2aaf2e7
Add a note about a potential PIC optimization.
...
llvm-svn: 52663
2008-06-24 00:53:07 +00:00
Dan Gohman
76600aa35c
Fixes for being compiled PIC on Linux. This isn't the most
...
general solution possible, but it's a fairly simple one.
Based on a patch from the OpenGTL project!
llvm-svn: 52662
2008-06-24 00:50:01 +00:00
Dan Gohman
9cc3f68ab1
A brief survey of priority_queue usage in the tree turned this up
...
as a questionable case, but the code isn't actually needed.
llvm-svn: 52657
2008-06-23 23:51:16 +00:00
Bill Wendling
c44659b92a
This situation can occur:
...
,------.
| |
| v
| t2 = phi ... t1 ...
| |
| v
| t1 = ...
| ... = ... t1 ...
| |
`------'
where there is a use in a PHI node that's a predecessor to the defining
block. We don't want to mark all predecessors as having the value "alive" in
this case. Also, the assert was too restrictive and didn't handle this case.
llvm-svn: 52655
2008-06-23 23:41:14 +00:00
Dan Gohman
0d8a61eb60
Use the new PriorityQueue in ScheduleDAGList too, which also
...
needs arbitrary-element removal.
llvm-svn: 52654
2008-06-23 23:40:09 +00:00
Dan Gohman
abd8f41c81
Use use_empty() instead of getNumUses(), avoiding a use list traversal.
...
llvm-svn: 52651
2008-06-23 23:23:49 +00:00
Owen Anderson
79d2fa52fa
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
...
llvm-svn: 52649
2008-06-23 22:12:23 +00:00
Dan Gohman
ac563833ae
Fix spelling and grammar in a comment.
...
llvm-svn: 52648
2008-06-23 22:11:52 +00:00
Dan Gohman
48c5c7e860
Revamp the loop unroller, extending it to correctly update PHI nodes
...
in the presence of out-of-loop users of in-loop values and the trip
count is not a known multiple of the unroll count, and to be a bit
simpler overall. This fixes PR2253.
llvm-svn: 52645
2008-06-23 21:29:41 +00:00
Evan Cheng
71013f8c78
Remove option used to debug stack coloring bugs. It's no longer needed since stack coloring is now bug free.
...
llvm-svn: 52644
2008-06-23 21:24:32 +00:00
Evan Cheng
403e567043
Disable PRE. It's breaking bootstrapping.
...
llvm-svn: 52643
2008-06-23 21:22:35 +00:00
Dan Gohman
fa63cc4e91
Move a DenseMap's declaration outside of a loop, and just call
...
clear() on each iteration. This avoids allocating and deallocating
all of DenseMap's memory on each iteration.
llvm-svn: 52642
2008-06-23 21:15:00 +00:00
Evan Cheng
c72dcd103c
Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.
...
llvm-svn: 52639
2008-06-23 21:03:19 +00:00
Wojciech Matyjewicz
41b744dc51
First step to fix PR2088. Implement routine to compute the
...
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.
llvm-svn: 52638
2008-06-23 19:39:50 +00:00
Dan Gohman
b936ea7fc4
Update the .cvs files.
...
llvm-svn: 52637
2008-06-23 18:43:26 +00:00
Dan Gohman
a7c3e0e120
Fix the types for NumElements variables, and add a comment
...
explaining why empty array constants use ValID::createUndef().
llvm-svn: 52636
2008-06-23 18:40:28 +00:00
Owen Anderson
54e02194a1
Tighten the conditions under which we do PRE, remove some unneeded code, and correct our preserved analyses list, since we
...
do now change the CFG by splitting critical edges during PRE.
llvm-svn: 52631
2008-06-23 17:49:45 +00:00
Chris Lattner
4d754bc97b
minor tidying of comments.
...
llvm-svn: 52630
2008-06-23 17:11:23 +00:00
Dan Gohman
210e6c1876
Remove two convenience constructors because they're now private, and the
...
private implementation doesn't really need the convenience.
llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
031f0bba15
Use std::copy instead of a loop.
...
llvm-svn: 52628
2008-06-23 16:45:24 +00:00
Dan Gohman
a469bdbcdf
More changes from Chris' review: simplify getIndices and avoid
...
copying its return value.
llvm-svn: 52627
2008-06-23 16:39:44 +00:00
Dan Gohman
b4e2637e9b
Duncan pointed out this code could be tidied.
...
llvm-svn: 52624
2008-06-23 15:29:14 +00:00
Duncan Sands
d803ce29a8
Port some integer multiplication fixes from LegalizeDAG.
...
Bail out with an error if there is no libcall available
for the given size of integer.
llvm-svn: 52622
2008-06-23 15:15:44 +00:00
Duncan Sands
73ceffa3df
Support for expanding the result of EXTRACT_ELEMENT.
...
llvm-svn: 52621
2008-06-23 15:08:15 +00:00
Duncan Sands
bc12dce8bb
Cleanup up LegalizeTypes handling of loads and
...
stores.
llvm-svn: 52620
2008-06-23 14:19:45 +00:00
Owen Anderson
00fdbd01e5
At Chris' suggestion, move the liveness and worklist datastructures into
...
instance variables so they can be allocated just once, and reuse the worklist
as the dead list as well.
llvm-svn: 52618
2008-06-23 06:13:12 +00:00
Dan Gohman
5ca5e02480
Improve LSR's dead-phi detection to handle use-def cycles
...
with more than two nodes.
llvm-svn: 52617
2008-06-22 20:44:02 +00:00
Dan Gohman
90071075e2
Use Loop::block_iterator.
...
llvm-svn: 52616
2008-06-22 20:18:58 +00:00
Dan Gohman
05e8973559
Generalize createSCEV to be able to form SCEV expressions from
...
ConstantExprs.
llvm-svn: 52615
2008-06-22 19:56:46 +00:00
Dan Gohman
6829fffaee
Use SCEVAddRecExpr::isAffine.
...
llvm-svn: 52614
2008-06-22 19:23:09 +00:00
Dan Gohman
1f2b2a4abe
Remove unnecessary #includes.
...
llvm-svn: 52613
2008-06-22 19:21:26 +00:00
Dan Gohman
0e4cf89f1a
Move a few more SCEVExpander methods out-of-line.
...
llvm-svn: 52612
2008-06-22 19:09:18 +00:00
Chris Lattner
6ff85681e4
Fix PR2369 by making scalarrepl more careful about promoting
...
structures. Its default threshold is to promote things that are
smaller than 128 bytes, which is sane. However, it is not sane
to do this for things that turn into 128 *registers*. Add a cap
on the number of registers introduced, defaulting to 128/4=32.
llvm-svn: 52611
2008-06-22 17:46:21 +00:00
Duncan Sands
5fb92e58de
Make custom lowering of ADD work correctly. This
...
fixes PR2476; patch by Richard Osborne. The same
problem exists for a bunch of other operators, but
I'm ignoring this because they will be automagically
fixed when the new LegalizeTypes infrastructure lands,
since it already solves this problem centrally.
llvm-svn: 52610
2008-06-22 09:42:16 +00:00
Eli Friedman
d3449df326
Fix for PR2479: correctly optimize expressions like (a > 13) & (a ==
...
15).
See also PR1800, which is about the signed case.
llvm-svn: 52608
2008-06-21 23:36:13 +00:00
Dan Gohman
158ff2c4a9
Use Instruction::eraseFromParent().
...
llvm-svn: 52606
2008-06-21 22:08:46 +00:00
Dan Gohman
c7076914ac
Use Function's arg_size() and size() methods.
...
llvm-svn: 52605
2008-06-21 22:06:54 +00:00
Dan Gohman
546505e7e1
Simplify some getNode calls.
...
llvm-svn: 52604
2008-06-21 22:06:07 +00:00
Dan Gohman
ea0452016e
canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;
...
check this with an assert.
llvm-svn: 52603
2008-06-21 22:05:24 +00:00
Dan Gohman
33204b7c20
Avoid creating a redundant zero APInt.
...
llvm-svn: 52602
2008-06-21 22:03:12 +00:00
Dan Gohman
38c19aae38
Use clear() to zero an existing APInt.
...
llvm-svn: 52601
2008-06-21 22:02:15 +00:00
Dan Gohman
1ac5813726
Use back() instead of [size()-1].
...
llvm-svn: 52600
2008-06-21 22:00:54 +00:00
Dan Gohman
55083d5dd3
Use MachineBasicBlock::transferSuccessors.
...
llvm-svn: 52594
2008-06-21 20:21:19 +00:00
Dan Gohman
1cf5af9e42
Use static_cast instead of reinterpret_cast for casting void*.
...
llvm-svn: 52592
2008-06-21 20:17:03 +00:00
Chris Lattner
8459e0bc59
Fix warning when assertions disabled.
...
llvm-svn: 52590
2008-06-21 19:49:01 +00:00
Chris Lattner
e635acab67
fix warning when assertions disabled.
...
llvm-svn: 52589
2008-06-21 19:48:22 +00:00
Chris Lattner
18a3284a0a
fix warning when assertion disabled.
...
llvm-svn: 52588
2008-06-21 19:47:44 +00:00
Chris Lattner
106b046d83
fix some warnings when assertions are disabled.
...
llvm-svn: 52587
2008-06-21 19:47:03 +00:00
Dan Gohman
14b911d929
Remove a redundant return.
...
llvm-svn: 52585
2008-06-21 19:34:57 +00:00
Dan Gohman
46520a25a4
Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
...
field, which is otherwise unused after instruction selection, as an index
into the SUnit array.
llvm-svn: 52583
2008-06-21 19:18:17 +00:00
Dan Gohman
a4db3352f9
Add a priority queue class, which is a wrapper around std::priority_queue
...
and provides fairly efficient removal of arbitrary elements. Switch
ScheduleDAGRRList from std::set to this new priority queue.
llvm-svn: 52582
2008-06-21 18:35:25 +00:00
Duncan Sands
3bb8999719
Support for load/store of expanded float types. I
...
don't know if a truncating store is possible here,
but added support for it anyway.
llvm-svn: 52577
2008-06-21 17:00:47 +00:00
Dan Gohman
e6e1348275
Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
...
to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are
handled so that only the original node needs to be in the map.
This speeds up llc on 447.dealII.llvm.bc by about 2%.
llvm-svn: 52576
2008-06-21 15:52:51 +00:00
Evan Cheng
42bbca11cc
Enable PRE.
...
llvm-svn: 52574
2008-06-21 07:26:53 +00:00
Evan Cheng
f593a65497
Undo spill weight tweak. Need to investigate the performance regressions.
...
llvm-svn: 52572
2008-06-21 06:45:54 +00:00
Dan Gohman
4b49be1cbe
Simplify some template parameterization.
...
llvm-svn: 52571
2008-06-21 01:08:22 +00:00
Evan Cheng
33067210d1
Back out Matthijs' DAE patches. It's miscompiling gcc driver.
...
llvm-svn: 52570
2008-06-21 00:31:44 +00:00
Evan Cheng
efc67e78d7
Enhanced heuristic to determine the *best* register to spill. Instead of picking the register with the lowest spill weight. Consider (up to) 2 additional registers with spill weights that are close to the lowest spill weight. The one with fewest defs and uses that conflicts with the current interval (weighted by loop depth) is the spill candidate.
...
This is not always a win, but there are much more wins than loses and wins tend to be more noticeable.
llvm-svn: 52554
2008-06-20 21:45:16 +00:00
Duncan Sands
f362183c24
Share some code that is common between integer and
...
float expansion (and sometimes vector splitting too).
llvm-svn: 52548
2008-06-20 18:40:50 +00:00
Duncan Sands
49295b48eb
Rename the operation of turning a float type into an
...
integer of the same type. Before it was "promotion",
but this is confusing because it is quite different
to promotion of integers. Call it "softening" instead,
inspired by "soft float".
llvm-svn: 52546
2008-06-20 17:49:55 +00:00
Dan Gohman
3792c470d5
Clean up some uses of std::distance, now that we have allnodes_size.
...
llvm-svn: 52545
2008-06-20 17:15:19 +00:00
Dan Gohman
3ada1e118b
Clean up a use of std::distance.
...
llvm-svn: 52544
2008-06-20 17:11:32 +00:00
Dan Gohman
a5dd67f002
Tidy up some commments and use the getAggregateOperand and
...
getInsertedValueOperand accessors. Thanks Matthijs!
llvm-svn: 52543
2008-06-20 16:41:17 +00:00
Dan Gohman
b5210efb31
Fix the conditions under which SCCP should examine insertvalue
...
instructions. Thanks to Matthijs Kooijman for pointing this out!
llvm-svn: 52542
2008-06-20 16:39:44 +00:00
Matthijs Kooijman
c456f9dfc6
80 column and trailing whitespace fixes.
...
llvm-svn: 52539
2008-06-20 15:34:07 +00:00
Matthijs Kooijman
0c50b953c5
Don't let DeadArgumentElimination attempt to update callers when the return
...
type wasn't changed.
llvm-svn: 52538
2008-06-20 15:25:43 +00:00
Matthijs Kooijman
9dc59b7666
Don't let DeadArgElimination change the return type ({} into void and {T}
...
into T) when no return values are actually dead.
llvm-svn: 52537
2008-06-20 15:16:45 +00:00
Matthijs Kooijman
013b6a9a42
Explicitely track if any arguments or return values were removed in
...
DeadArgumentElimination and assert that the function type does not change if
nothing was changed. This should catch subtle changes in function type that are
not intended.
llvm-svn: 52536
2008-06-20 14:28:52 +00:00
Matthijs Kooijman
e91aed6ce1
Remove debug output.
...
llvm-svn: 52535
2008-06-20 14:03:35 +00:00
Matthijs Kooijman
8d32dee428
Recommit r52459, rewriting of the dead argument elimination pass.
...
This is a fixed version that no longer uses multimap::equal_range, which
resulted in a pointer invalidation problem.
Also, DAE::InspectedFunctions was not really necessary, so it got removed.
Lastly, this version no longer applies the extra arg hack on functions who did
not have any arguments to start with.
llvm-svn: 52532
2008-06-20 09:36:16 +00:00
Owen Anderson
78fbcafb53
Really disable PRE.
...
llvm-svn: 52531
2008-06-20 08:59:13 +00:00
Chris Lattner
d53bd2da98
Fix an error handling redefinition of linkonce functions where the
...
types differ. Patch by Nathan Keynes!
llvm-svn: 52527
2008-06-20 05:29:39 +00:00
Chris Lattner
f3ecd2d290
Fix PR2471, which is a bug involving an invalid promotion from a conditional load.
...
llvm-svn: 52525
2008-06-20 05:12:56 +00:00
Gordon Henriksen
9f337549a7
Add C binding for ExecutionEngine::addGlobalMapping.
...
llvm-svn: 52523
2008-06-20 02:16:11 +00:00
Dan Gohman
593a010c56
Teach ReturnInst lowering about aggregate return values.
...
llvm-svn: 52522
2008-06-20 01:29:26 +00:00
Owen Anderson
1b3ea963f7
Change around the data structures used to store availability sets, resulting in a GVN+PRE that is faster that GVN alone was before.
...
llvm-svn: 52521
2008-06-20 01:15:47 +00:00
Dan Gohman
041f9d03ff
Teach SCCP about insertvalue and extractvalue, and about
...
propagating constants across aggregate return values when
insertvalue and extractvalue are used.
llvm-svn: 52520
2008-06-20 01:15:44 +00:00
Dan Gohman
3b18fd7b02
Teach InlineFunction how to differentiate between multiple-value
...
return statements and aggregate returns so that it handles both
correctly.
llvm-svn: 52519
2008-06-20 01:03:44 +00:00
Evan Cheng
9598f930f3
Disable PRE for now. It seems to be breaking llvm-gcc bootstrapping.
...
llvm-svn: 52518
2008-06-20 01:01:07 +00:00
Dan Gohman
44b2c57e2b
Fix the index calculations for the extractvalue lowering code.
...
llvm-svn: 52517
2008-06-20 00:54:19 +00:00
Dan Gohman
c7a32fc8ca
Simplify the ComputeLinearIndex logic and fix a few bugs.
...
llvm-svn: 52516
2008-06-20 00:53:00 +00:00
Dan Gohman
d87e813e41
Simplify this code. Thanks Chris!
...
llvm-svn: 52514
2008-06-20 00:47:44 +00:00
Evan Cheng
be0429c558
ISD::UNDEF should be expanded recursively / iteratively.
...
llvm-svn: 52508
2008-06-19 22:01:11 +00:00
Owen Anderson
e780d66657
Add a hidden -disable-pre flag for testing purposes. This should be removed
...
once benchmarking is completed.
llvm-svn: 52506
2008-06-19 19:57:25 +00:00
Owen Anderson
fdf9f168b5
PRE requires that critical edges be split.
...
llvm-svn: 52505
2008-06-19 19:54:19 +00:00
Bill Wendling
cd6fb1d0a8
Remove dead code causing a warning.
...
llvm-svn: 52502
2008-06-19 18:00:44 +00:00
Dan Gohman
d6530872f3
Use the common API for adding instructions to basic blocks instead of
...
using BasicBlock::getInstList.
llvm-svn: 52500
2008-06-19 17:53:32 +00:00
Owen Anderson
ff21db851d
Be sure to remove values from the value numbering table after we delete them.
...
This fixes a failure on povray.
llvm-svn: 52499
2008-06-19 17:53:26 +00:00
Dan Gohman
ed2250990a
Use Instruction::moveBefore instead of manipulating the instruction list
...
directly.
llvm-svn: 52498
2008-06-19 17:47:47 +00:00
Dan Gohman
9eea470fcf
Avoid using BasicBlock::getInstList directly in a few places.
...
llvm-svn: 52497
2008-06-19 17:37:25 +00:00
Owen Anderson
45d3701fce
Revert support for insertvalue and extractvalue instructions for the moment.
...
GVN expects that all inputs which to an instruction fall somewhere in the value
hierarchy, which isn't true for these.
llvm-svn: 52496
2008-06-19 17:25:39 +00:00
Dan Gohman
6f880690b8
Use the transferSuccessors helper function.
...
llvm-svn: 52495
2008-06-19 17:22:29 +00:00
Dan Gohman
68f539e807
Delete dead code.
...
llvm-svn: 52494
2008-06-19 17:18:39 +00:00
Matthijs Kooijman
0c71732497
Use a CallSite to find the nth argument of a call/invoke instruction instead of
...
using getOperand() directly. This makes things work with invoke instructions as
well.
llvm-svn: 52489
2008-06-19 08:53:24 +00:00
Duncan Sands
db356eea26
Fix some warnings reported by gcc-4.3. Hopefully
...
this still compiles on windows - I can't test!
llvm-svn: 52488
2008-06-19 08:47:31 +00:00
Evan Cheng
849fa11f15
Missed a check.
...
llvm-svn: 52487
2008-06-19 06:17:19 +00:00
Eli Friedman
8d66e98c92
Fix a bug with <8 x i16> shuffle lowering on X86 where parts of the
...
shuffle could be skipped. The check is invalid because the loop index i
doesn't correspond to the element actually inserted. The correct check is
already done a few lines earlier, for whether the element is already in
the right spot, so this shouldn't have any effect on the codegen for
code that was already correct.
llvm-svn: 52486
2008-06-19 06:09:51 +00:00
Owen Anderson
3c4ccc830e
Revert my last patch, which was causing regression test failures.
...
llvm-svn: 52485
2008-06-19 05:29:34 +00:00
Evan Cheng
0c8ef553f5
Coalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.
...
llvm-svn: 52480
2008-06-19 01:39:21 +00:00
Evan Cheng
18e46d455b
Cosmetic changes.
...
llvm-svn: 52479
2008-06-19 01:21:26 +00:00
Evan Cheng
2dbba985d5
Unneeded include's.
...
llvm-svn: 52478
2008-06-19 01:21:02 +00:00
Evan Cheng
55bc848640
Minor spiller tweak to unfavor reload into load/store instructions.
...
llvm-svn: 52477
2008-06-19 01:16:17 +00:00