Commit Graph

52319 Commits

Author SHA1 Message Date
Dan Gohman 7d3b0be05b Remove a redundant #ifndef and add an assertion string.
llvm-svn: 82991
2009-09-28 14:38:19 +00:00
Dan Gohman 9a7320c711 Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.
llvm-svn: 82990
2009-09-28 14:37:51 +00:00
Bob Wilson 2dd957fff6 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 83e0d481ae 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
Daniel Dunbar 86d4c28932 Don't traverse into .svn directories.
llvm-svn: 82978
2009-09-28 07:32:45 +00:00
Anton Korobeynikov c30d816d7a 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 0261b5d2d2 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 e0c5313493 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
Erick Tryzelaar 16787bda38 Document a bug in the ocaml bindings has wrong linkage values.
llvm-svn: 82966
2009-09-28 04:42:55 +00:00
Erick Tryzelaar c3a9a08e49 Expose the rest of the attribute settings.
llvm-svn: 82965
2009-09-28 04:42:47 +00:00
Erick Tryzelaar b0d17ac4ef Fix a bug in ocaml bindings that has incorrect linkage options.
llvm-svn: 82964
2009-09-28 04:42:36 +00:00
Mikhail Glushenkov 89cbdf0209 Regenerate.
llvm-svn: 82958
2009-09-28 01:28:26 +00:00
Mikhail Glushenkov efc9763468 Add a way to query the number of input files.
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov b7787297f5 Document the 'not' combinator.
llvm-svn: 82956
2009-09-28 01:16:07 +00:00
Mikhail Glushenkov 1766617386 A bit prettier formatting.
llvm-svn: 82955
2009-09-28 01:15:44 +00:00
Dan Gohman 08d86dac71 Remove temporary debugging hack.
llvm-svn: 82953
2009-09-28 00:44:15 +00:00
Dan Gohman 4dbb301f17 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 2963777d0c 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 277e767578 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 7c2b1e71c1 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 b0934cdd1c Fix an old copy+pasto.
llvm-svn: 82947
2009-09-27 23:52:07 +00:00
Dan Gohman adde5dfde2 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 37a99664ff 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 5e8ba5d514 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 93e06a57c9 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 a5fc03562f 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 4425660b1f simplify some code.
llvm-svn: 82936
2009-09-27 21:46:50 +00:00
Chris Lattner b2e88cd01c 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
Nick Lewycky 1f71578e0d New unit test for the cloning module, which so far only covers cloning of
instructions' optimization flags.

llvm-svn: 82934
2009-09-27 21:39:46 +00:00
Chris Lattner 8b4d3dfbbf calls are already unmovable, malloc doesn't need a special case.
llvm-svn: 82933
2009-09-27 21:36:19 +00:00
Chris Lattner f9e0c7f84b 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 5abb1e4cd2 calls are already handled, malloc doesn't need a special case.
llvm-svn: 82931
2009-09-27 21:33:46 +00:00
Nick Lewycky 28a5f25d87 Round out the API for the new optimization flags.
llvm-svn: 82930
2009-09-27 21:33:04 +00:00
Chris Lattner 466d57f6c1 calls are rejected above, no need to special case malloc here.
llvm-svn: 82929
2009-09-27 21:31:39 +00:00
Chris Lattner 43d0db70ac 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 a8627272c1 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 351a7ef01a add a new DirectiveMap stringmap, which allows more efficient dispatching
to directive handlers and allows for easier extensibility.

I only switched a few over for now.

llvm-svn: 82926
2009-09-27 21:16:52 +00:00
Nick Lewycky 199c563cc8 Link order: it matters.
llvm-svn: 82925
2009-09-27 20:58:01 +00:00
Chris Lattner b391e87263 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 ae289632ef 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 facb867af3 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
Chris Lattner 10a1cfd0f9 avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
llvm-svn: 82911
2009-09-27 19:38:39 +00:00
Tilmann Scheller 336e2bd91b 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 cb663d749d Delete a bogus comment.
llvm-svn: 82908
2009-09-27 17:50:44 +00:00
Dan Gohman 2115154d44 Remove a redundant assert.
llvm-svn: 82907
2009-09-27 17:48:37 +00:00
Jeffrey Yasskin c3273dca48 Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
DEBUG_RUNTIME.

llvm-svn: 82906
2009-09-27 17:47:29 +00:00
Dan Gohman 2aab867048 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 bb85dd6f33 Add dominates and releaseMemory member functions to PostDominatorTree.
llvm-svn: 82904
2009-09-27 17:39:12 +00:00
Dan Gohman 0e70af36c0 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 e28bd65aed Clarify a comment.
llvm-svn: 82902
2009-09-27 15:41:19 +00:00