Evan Cheng
c15ba1de94
Fix Thumb2 IT block pass bug. t2MOVi32imm may not be the start of a IT block.
...
llvm-svn: 83008
2009-09-28 20:47:15 +00:00
Jakob Stoklund Olesen
5be0f6cfb4
Use KILL instead of IMPLICIT_DEF in LowerSubregs pass.
...
llvm-svn: 83007
2009-09-28 20:32:46 +00:00
Jakob Stoklund Olesen
31fcbdefbb
Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
...
unused DECLARE instruction.
KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.
llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Dan Gohman
bfa2d75c49
Create a README.txt for lib/Analysis, and add an entry.
...
llvm-svn: 83001
2009-09-28 18:38:53 +00:00
Devang Patel
5a52b71500
Remove dead code.
...
llvm-svn: 82999
2009-09-28 18:31:56 +00:00
Dan Gohman
ffa11ade11
Use VerifySchedule instead of doing the work manually.
...
llvm-svn: 82995
2009-09-28 16:09:41 +00:00
Dan Gohman
7a5cb984e6
Fix this debug output to handle the case where the loop has been deleted.
...
llvm-svn: 82994
2009-09-28 15:40:01 +00:00
Dan Gohman
aade5fefdb
Include the name of the loop header in debug messages.
...
llvm-svn: 82993
2009-09-28 15:07:18 +00:00
Dan Gohman
9776ad2192
Remove a redundant #ifndef and add an assertion string.
...
llvm-svn: 82991
2009-09-28 14:38:19 +00:00
Dan Gohman
f31dae3931
Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.
...
llvm-svn: 82990
2009-09-28 14:37:51 +00:00
Bob Wilson
bbcf30c05c
Pass the optimization level when constructing the ARM instruction selector.
...
Otherwise, it is always set to "default", which prevents debug info from
even being generated during isel. Radar 7250345.
llvm-svn: 82988
2009-09-28 14:30:20 +00:00
Evan Cheng
54a1a87862
Make ARM and Thumb2 32-bit immediate materialization into a single 32-bit pseudo
...
instruction. This makes it re-materializable.
Thumb2 will split it back out into two instructions so IT pass will generate the
right mask. Also, this expose opportunies to optimize the movw to a 16-bit move.
llvm-svn: 82982
2009-09-28 09:14:39 +00:00
Anton Korobeynikov
2e54b03741
Fix thinko in my recent movt commit: it's not safe to remat movt, since it has input reg argument.
...
Disable rematting of it for now.
llvm-svn: 82975
2009-09-28 07:26:46 +00:00
Chris Lattner
d77fb17b28
The select instruction is not neccesarily in the same block as the
...
phi nodes. Make sure to phi translate from the right block.
This fixes a llvm-building-llvm failure on GVN-PRE.cpp
llvm-svn: 82970
2009-09-28 06:49:44 +00:00
Evan Cheng
ddc8678b00
Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
...
physical registers. This is especially critical for the later two since they
start the live interval of a super-register. e.g.
%DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
If this instruction is eliminated, the register scavenger will not be happy as
D0 is not defined previously.
This fixes PR5055.
llvm-svn: 82968
2009-09-28 05:28:43 +00:00
Dan Gohman
584645dfe8
Remove temporary debugging hack.
...
llvm-svn: 82953
2009-09-28 00:44:15 +00:00
Dan Gohman
bd50ec69e4
Move the dominator verification code out of special code embedded within
...
the PassManager code into a regular verifyAnalysis method.
Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.
llvm-svn: 82952
2009-09-28 00:27:48 +00:00
Dan Gohman
195c5bdf41
Move this assert to check the condition as soon as it is known.
...
llvm-svn: 82951
2009-09-28 00:10:28 +00:00
Dan Gohman
09f5f7f190
Extend the StartPassTimer and StopPassTimer functions so that the
...
code that stops the timer doesn't have to search to find the timer
object before it stops the timer. This avoids a lock acquisition
and a few other things done with the timer running.
llvm-svn: 82949
2009-09-28 00:07:05 +00:00
Anton Korobeynikov
189ce11684
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
...
This should be better than single load from constpool.
llvm-svn: 82948
2009-09-27 23:52:58 +00:00
Dan Gohman
000a17774e
Fix an old copy+pasto.
...
llvm-svn: 82947
2009-09-27 23:52:07 +00:00
Dan Gohman
db89691ec4
Extract the code for inserting a loop into the loop queue into
...
a separate function.
llvm-svn: 82946
2009-09-27 23:49:43 +00:00
Dan Gohman
0ea6efde4e
When a loop is deleted, immediately release all of the active
...
LoopPasses for that loop. This avoids trouble with the PassManager
trying to call verifyAnalysis on them, and frees up some memory
sooner rather than later.
llvm-svn: 82945
2009-09-27 23:43:07 +00:00
Dan Gohman
fdd9a2ee96
Extract the code for releasing a pass into a separate function, and
...
tidy it up a little.
llvm-svn: 82944
2009-09-27 23:38:27 +00:00
Nick Lewycky
04cea17209
Remove the "metadata*" type and simplify the code it complicated. This was only
...
used to support GlobalVariables storing MDNodes, back when they were derived
from Constant before the introduction of NamedMDNode, but never removed.
llvm-svn: 82943
2009-09-27 23:27:42 +00:00
Dan Gohman
cd2dd6b7e6
LBRX no longer has an explicit SrcValueSDNode operand, so the type
...
operand is now at index 2, rather than 3. This fixes the
"Invalid child # of SDNode!" failures on PowerPC.
llvm-svn: 82942
2009-09-27 23:17:47 +00:00
Chris Lattner
2a85cfd972
simplify some code.
...
llvm-svn: 82936
2009-09-27 21:46:50 +00:00
Chris Lattner
75a5d76294
The bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) -> icmp(x, null) already.
...
llvm-svn: 82935
2009-09-27 21:42:46 +00:00
Chris Lattner
e024fd6b47
calls are already unmovable, malloc doesn't need a special case.
...
llvm-svn: 82933
2009-09-27 21:36:19 +00:00
Chris Lattner
8a77e8b353
calls to external functions are already marked overdefined, special casing
...
malloc isn't needed.
llvm-svn: 82932
2009-09-27 21:35:11 +00:00
Chris Lattner
bb29bb4e16
calls are already handled, malloc doesn't need a special case.
...
llvm-svn: 82931
2009-09-27 21:33:46 +00:00
Nick Lewycky
81504d2150
Round out the API for the new optimization flags.
...
llvm-svn: 82930
2009-09-27 21:33:04 +00:00
Chris Lattner
24af6de20a
calls are rejected above, no need to special case malloc here.
...
llvm-svn: 82929
2009-09-27 21:31:39 +00:00
Chris Lattner
0cfb82cf8c
remove special handling of bitcast(malloc), it will be handled
...
when the loop inspects the bitcast operand.
llvm-svn: 82928
2009-09-27 21:29:28 +00:00
Chris Lattner
3f320467b5
unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.
...
llvm-svn: 82927
2009-09-27 21:23:38 +00:00
Chris Lattner
7a9e470ddc
allow pushing icmps through phis with multiple uses and across critical edges.
...
These are important to push up to encourage jump threading. This shrinks 176.gcc a bit.
llvm-svn: 82923
2009-09-27 20:46:36 +00:00
Chris Lattner
f7db1f1a3a
Enhance the previous fix for PR4895 to allow more values than just
...
simple constants for the true/false value of the select. We now
do phi translation etc. This really fixes PR4895 :)
llvm-svn: 82917
2009-09-27 20:18:49 +00:00
Chris Lattner
0af7f0ceaf
implement PR4895, by making FoldOpIntoPhi handle select conditions
...
that are phi nodes. Also tighten up FoldOpIntoPhi to treat constantexpr
operands to phis just like other variables, avoiding moving constantexpr
computations around.
Patch by Daniel Dunbar.
llvm-svn: 82913
2009-09-27 19:57:57 +00:00
Tilmann Scheller
a23802520a
Use explicit structs instead of std::pair to map callee saved regs to spill slots.
...
llvm-svn: 82909
2009-09-27 17:58:47 +00:00
Dan Gohman
2d607af763
Delete a bogus comment.
...
llvm-svn: 82908
2009-09-27 17:50:44 +00:00
Dan Gohman
8b4c141d97
Fix SCEVExpander's canonical addrec expansion code to work on loops that
...
aren't in canonical loop-simplify form, since it doesn't itself depend
on LoopSimplify. This means handling loops without preheaders and loops
with multiple backedges.
llvm-svn: 82905
2009-09-27 17:46:40 +00:00
Dan Gohman
641ab5a61e
Grab an LLVM Context from an instruction that exists rather than one
...
that is deleted in some situations. This fixes a use-after-free.
llvm-svn: 82903
2009-09-27 16:10:30 +00:00
Dan Gohman
fa43cefae4
Tell ScalarEvolution to forget everything it knows about a loop before
...
rotating the loop, since loop rotation is a very significant change.
llvm-svn: 82901
2009-09-27 15:37:03 +00:00
Dan Gohman
eb9dbb2bd2
Micro-optimize DerivedType::dropAllTypeUses.
...
llvm-svn: 82900
2009-09-27 15:32:21 +00:00
Dan Gohman
16398e3bc0
Instead of testing whether an instruction dominates the loop preheader,
...
test whether it properly dominates the loop header. This is equivalent
when the loop has a preheader, and has the advantage of working when
the loop doesn't have a preheader. Since IVUsers doesn't Require
LoopSimplify, the loop isn't guaranteed to have a preheader.
llvm-svn: 82899
2009-09-27 15:30:00 +00:00
Dan Gohman
b84f5a3421
Add a properlyDominates member function to ScalarEvolution.
...
llvm-svn: 82898
2009-09-27 15:26:03 +00:00
Dan Gohman
9cc0852f45
Remove a redundant #include.
...
llvm-svn: 82897
2009-09-27 15:21:52 +00:00
Torok Edwin
dd5b0b7cda
Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
...
in RegisterStatistic.
llvm-svn: 82896
2009-09-27 11:08:03 +00:00
Evan Cheng
ffe6da0734
Enable pre-regalloc load / store multiple pass for Thumb2.
...
llvm-svn: 82893
2009-09-27 09:46:04 +00:00
Nick Lewycky
676778014b
Remove dead code from this function and optimize. Update its corresponding
...
LangRef entry too.
llvm-svn: 82890
2009-09-27 07:55:32 +00:00