oota-llvm.git
14 years agoDocument a bug in the ocaml bindings has wrong linkage values.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:55 +0000 (04:42 +0000)]
Document a bug in the ocaml bindings has wrong linkage values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82966 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpose the rest of the attribute settings.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:47 +0000 (04:42 +0000)]
Expose the rest of the attribute settings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82965 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug in ocaml bindings that has incorrect linkage options.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:36 +0000 (04:42 +0000)]
Fix a bug in ocaml bindings that has incorrect linkage options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82964 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegenerate.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:28:26 +0000 (01:28 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82958 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a way to query the number of input files.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:16:42 +0000 (01:16 +0000)]
Add a way to query the number of input files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82957 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDocument the 'not' combinator.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:16:07 +0000 (01:16 +0000)]
Document the 'not' combinator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82956 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA bit prettier formatting.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:15:44 +0000 (01:15 +0000)]
A bit prettier formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82955 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove temporary debugging hack.
Dan Gohman [Mon, 28 Sep 2009 00:44:15 +0000 (00:44 +0000)]
Remove temporary debugging hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82953 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the dominator verification code out of special code embedded within
Dan Gohman [Mon, 28 Sep 2009 00:27:48 +0000 (00:27 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82952 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove this assert to check the condition as soon as it is known.
Dan Gohman [Mon, 28 Sep 2009 00:10:28 +0000 (00:10 +0000)]
Move this assert to check the condition as soon as it is known.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82951 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtend the StartPassTimer and StopPassTimer functions so that the
Dan Gohman [Mon, 28 Sep 2009 00:07:05 +0000 (00:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82949 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse movt/movw pair to materialize 32 bit constants on ARMv6T2+.
Anton Korobeynikov [Sun, 27 Sep 2009 23:52:58 +0000 (23:52 +0000)]
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
This should be better than single load from constpool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82948 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix an old copy+pasto.
Dan Gohman [Sun, 27 Sep 2009 23:52:07 +0000 (23:52 +0000)]
Fix an old copy+pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82947 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtract the code for inserting a loop into the loop queue into
Dan Gohman [Sun, 27 Sep 2009 23:49:43 +0000 (23:49 +0000)]
Extract the code for inserting a loop into the loop queue into
a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82946 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen a loop is deleted, immediately release all of the active
Dan Gohman [Sun, 27 Sep 2009 23:43:07 +0000 (23:43 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82945 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtract the code for releasing a pass into a separate function, and
Dan Gohman [Sun, 27 Sep 2009 23:38:27 +0000 (23:38 +0000)]
Extract the code for releasing a pass into a separate function, and
tidy it up a little.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82944 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the "metadata*" type and simplify the code it complicated. This was only
Nick Lewycky [Sun, 27 Sep 2009 23:27:42 +0000 (23:27 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82943 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLBRX no longer has an explicit SrcValueSDNode operand, so the type
Dan Gohman [Sun, 27 Sep 2009 23:17:47 +0000 (23:17 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82942 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify some code.
Chris Lattner [Sun, 27 Sep 2009 21:46:50 +0000 (21:46 +0000)]
simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82936 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) ->...
Chris Lattner [Sun, 27 Sep 2009 21:42:46 +0000 (21:42 +0000)]
The bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) -> icmp(x, null) already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82935 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNew unit test for the cloning module, which so far only covers cloning of
Nick Lewycky [Sun, 27 Sep 2009 21:39:46 +0000 (21:39 +0000)]
New unit test for the cloning module, which so far only covers cloning of
instructions' optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82934 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocalls are already unmovable, malloc doesn't need a special case.
Chris Lattner [Sun, 27 Sep 2009 21:36:19 +0000 (21:36 +0000)]
calls are already unmovable, malloc doesn't need a special case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82933 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocalls to external functions are already marked overdefined, special casing
Chris Lattner [Sun, 27 Sep 2009 21:35:11 +0000 (21:35 +0000)]
calls to external functions are already marked overdefined, special casing
malloc isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82932 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocalls are already handled, malloc doesn't need a special case.
Chris Lattner [Sun, 27 Sep 2009 21:33:46 +0000 (21:33 +0000)]
calls are already handled, malloc doesn't need a special case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82931 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRound out the API for the new optimization flags.
Nick Lewycky [Sun, 27 Sep 2009 21:33:04 +0000 (21:33 +0000)]
Round out the API for the new optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82930 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocalls are rejected above, no need to special case malloc here.
Chris Lattner [Sun, 27 Sep 2009 21:31:39 +0000 (21:31 +0000)]
calls are rejected above, no need to special case malloc here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82929 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove special handling of bitcast(malloc), it will be handled
Chris Lattner [Sun, 27 Sep 2009 21:29:28 +0000 (21:29 +0000)]
remove special handling of bitcast(malloc), it will be handled
when the loop inspects the bitcast operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82928 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agounlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.
Chris Lattner [Sun, 27 Sep 2009 21:23:38 +0000 (21:23 +0000)]
unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82927 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a new DirectiveMap stringmap, which allows more efficient dispatching
Chris Lattner [Sun, 27 Sep 2009 21:16:52 +0000 (21:16 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82926 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLink order: it matters.
Nick Lewycky [Sun, 27 Sep 2009 20:58:01 +0000 (20:58 +0000)]
Link order: it matters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82925 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoallow pushing icmps through phis with multiple uses and across critical edges.
Chris Lattner [Sun, 27 Sep 2009 20:46:36 +0000 (20:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82923 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEnhance the previous fix for PR4895 to allow more values than just
Chris Lattner [Sun, 27 Sep 2009 20:18:49 +0000 (20:18 +0000)]
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 :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82917 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement PR4895, by making FoldOpIntoPhi handle select conditions
Chris Lattner [Sun, 27 Sep 2009 19:57:57 +0000 (19:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82913 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoavoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
Chris Lattner [Sun, 27 Sep 2009 19:38:39 +0000 (19:38 +0000)]
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82911 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse explicit structs instead of std::pair to map callee saved regs to spill slots.
Tilmann Scheller [Sun, 27 Sep 2009 17:58:47 +0000 (17:58 +0000)]
Use explicit structs instead of std::pair to map callee saved regs to spill slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82909 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete a bogus comment.
Dan Gohman [Sun, 27 Sep 2009 17:50:44 +0000 (17:50 +0000)]
Delete a bogus comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82908 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a redundant assert.
Dan Gohman [Sun, 27 Sep 2009 17:48:37 +0000 (17:48 +0000)]
Remove a redundant assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82907 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEnable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
Jeffrey Yasskin [Sun, 27 Sep 2009 17:47:29 +0000 (17:47 +0000)]
Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
DEBUG_RUNTIME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82906 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix SCEVExpander's canonical addrec expansion code to work on loops that
Dan Gohman [Sun, 27 Sep 2009 17:46:40 +0000 (17:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82905 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd dominates and releaseMemory member functions to PostDominatorTree.
Dan Gohman [Sun, 27 Sep 2009 17:39:12 +0000 (17:39 +0000)]
Add dominates and releaseMemory member functions to PostDominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82904 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGrab an LLVM Context from an instruction that exists rather than one
Dan Gohman [Sun, 27 Sep 2009 16:10:30 +0000 (16:10 +0000)]
Grab an LLVM Context from an instruction that exists rather than one
that is deleted in some situations. This fixes a use-after-free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82903 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClarify a comment.
Dan Gohman [Sun, 27 Sep 2009 15:41:19 +0000 (15:41 +0000)]
Clarify a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82902 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTell ScalarEvolution to forget everything it knows about a loop before
Dan Gohman [Sun, 27 Sep 2009 15:37:03 +0000 (15:37 +0000)]
Tell ScalarEvolution to forget everything it knows about a loop before
rotating the loop, since loop rotation is a very significant change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82901 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMicro-optimize DerivedType::dropAllTypeUses.
Dan Gohman [Sun, 27 Sep 2009 15:32:21 +0000 (15:32 +0000)]
Micro-optimize DerivedType::dropAllTypeUses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82900 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInstead of testing whether an instruction dominates the loop preheader,
Dan Gohman [Sun, 27 Sep 2009 15:30:00 +0000 (15:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82899 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a properlyDominates member function to ScalarEvolution.
Dan Gohman [Sun, 27 Sep 2009 15:26:03 +0000 (15:26 +0000)]
Add a properlyDominates member function to ScalarEvolution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82898 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a redundant #include.
Dan Gohman [Sun, 27 Sep 2009 15:21:52 +0000 (15:21 +0000)]
Remove a redundant #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82897 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
Torok Edwin [Sun, 27 Sep 2009 11:08:03 +0000 (11:08 +0000)]
Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
in RegisterStatistic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82896 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEnable pre-regalloc load / store multiple pass for Thumb2.
Evan Cheng [Sun, 27 Sep 2009 09:46:04 +0000 (09:46 +0000)]
Enable pre-regalloc load / store multiple pass for Thumb2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82893 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
Chris Lattner [Sun, 27 Sep 2009 08:01:44 +0000 (08:01 +0000)]
rename REG -> REGISTER to make it explicit in the doc.  <tt>ify some stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82892 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement and document support for filecheck variables. This
Chris Lattner [Sun, 27 Sep 2009 07:56:52 +0000 (07:56 +0000)]
implement and document support for filecheck variables.  This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.

Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82891 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead code from this function and optimize. Update its corresponding
Nick Lewycky [Sun, 27 Sep 2009 07:55:32 +0000 (07:55 +0000)]
Remove dead code from this function and optimize. Update its corresponding
LangRef entry too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82890 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInstruction::clone does not need to take an LLVMContext&. Remove that and
Nick Lewycky [Sun, 27 Sep 2009 07:38:41 +0000 (07:38 +0000)]
Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFilecheckify this one test.
Nick Lewycky [Sun, 27 Sep 2009 06:25:05 +0000 (06:25 +0000)]
Filecheckify this one test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82888 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLeave a pointer to the documentation so that people don't end up change one but
Nick Lewycky [Sun, 27 Sep 2009 04:57:35 +0000 (04:57 +0000)]
Leave a pointer to the documentation so that people don't end up change one but
not the other in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82887 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrect the version numbers to match those actually tested for by
Nick Lewycky [Sun, 27 Sep 2009 04:56:27 +0000 (04:56 +0000)]
Correct the version numbers to match those actually tested for by
autoconf/AutoRegen.sh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82886 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the integer type out of 'derived' and into 'primitive'. This permits us
Nick Lewycky [Sun, 27 Sep 2009 00:45:11 +0000 (00:45 +0000)]
Move the integer type out of 'derived' and into 'primitive'. This permits us
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.

Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82884 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove support for "NoSub" from regex. It seems like a minor optimization
Chris Lattner [Sat, 26 Sep 2009 21:27:04 +0000 (21:27 +0000)]
remove support for "NoSub" from regex.  It seems like a minor optimization
and makes the API more annoying.  Add a Regex::getNumMatches() method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSpeed up clang-only link, by really linking only clang, and not the unittests
Torok Edwin [Sat, 26 Sep 2009 20:18:58 +0000 (20:18 +0000)]
Speed up clang-only link, by really linking only clang, and not the unittests
too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82873 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove this test.
Evan Cheng [Sat, 26 Sep 2009 18:51:37 +0000 (18:51 +0000)]
Remove this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82869 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix SimplifyLibCalls to transfer attributes from callees rather than
Dan Gohman [Sat, 26 Sep 2009 18:10:13 +0000 (18:10 +0000)]
Fix SimplifyLibCalls to transfer attributes from callees rather than
calls, since direct calls don't always reflect the attributes of their
callees.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82867 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a case where ScalarEvolution was expanding pointer arithmetic
Dan Gohman [Sat, 26 Sep 2009 16:11:57 +0000 (16:11 +0000)]
Fix a case where ScalarEvolution was expanding pointer arithmetic
to inttoptr/ptrtoint unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82864 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFor the NSWSub support in the builder to actually be useable,
Duncan Sands [Sat, 26 Sep 2009 15:35:35 +0000 (15:35 +0000)]
For the NSWSub support in the builder to actually be useable,
there need to be corresponding changes to the constant folders,
done in this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82862 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert comparisons like (x == infinity) to (x >= infinity) on targets
Dan Gohman [Sat, 26 Sep 2009 15:24:17 +0000 (15:24 +0000)]
Convert comparisons like (x == infinity) to (x >= infinity) on targets
where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82861 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd methods for creating NSW subtraction, as already exists
Duncan Sands [Sat, 26 Sep 2009 15:21:48 +0000 (15:21 +0000)]
Add methods for creating NSW subtraction, as already exists
for addition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82860 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment describing natural loops.
Dan Gohman [Sat, 26 Sep 2009 15:09:53 +0000 (15:09 +0000)]
Add a comment describing natural loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82859 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago"Update" tests for -disable-if-conversion removal. I think branch.ll should just
Daniel Dunbar [Sat, 26 Sep 2009 05:29:36 +0000 (05:29 +0000)]
"Update" tests for -disable-if-conversion removal. I think branch.ll should just
be removed, but I XFAIL'd it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82847 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReally remove this option.
Evan Cheng [Sat, 26 Sep 2009 02:49:49 +0000 (02:49 +0000)]
Really remove this option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82838 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a couple of unused command line options.
Evan Cheng [Sat, 26 Sep 2009 02:45:45 +0000 (02:45 +0000)]
Remove a couple of unused command line options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82837 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment.
Evan Cheng [Sat, 26 Sep 2009 02:43:36 +0000 (02:43 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82836 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert test to filecheck.
Evan Cheng [Sat, 26 Sep 2009 02:41:17 +0000 (02:41 +0000)]
Convert test to filecheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82835 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't hoist or sink instructions with physreg uses if the physreg is
Dan Gohman [Sat, 26 Sep 2009 02:34:00 +0000 (02:34 +0000)]
Don't hoist or sink instructions with physreg uses if the physreg is
allocatable. Even if it doesn't appear to have any defs, it may latter
on after register allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82834 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoI put the wrong rdar number in this test.
Dan Gohman [Sat, 26 Sep 2009 01:11:57 +0000 (01:11 +0000)]
I put the wrong rdar number in this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82829 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnbreak MachineLICM for instructions that reference RIP on x86-64 too.
Dan Gohman [Fri, 25 Sep 2009 23:58:45 +0000 (23:58 +0000)]
Unbreak MachineLICM for instructions that reference RIP on x86-64 too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82825 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename ConstantFP's getInf to getInfinity.
Dan Gohman [Fri, 25 Sep 2009 23:40:21 +0000 (23:40 +0000)]
Rename ConstantFP's getInf to getInfinity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82823 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove MachineMemOperand::getAlignment out of line, to avoid needing
Dan Gohman [Fri, 25 Sep 2009 23:33:20 +0000 (23:33 +0000)]
Move MachineMemOperand::getAlignment out of line, to avoid needing
MathExtras.h in MachineMemOperand.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82822 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused variable.
Daniel Dunbar [Fri, 25 Sep 2009 23:26:56 +0000 (23:26 +0000)]
Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82821 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTransform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is
Dan Gohman [Fri, 25 Sep 2009 23:10:17 +0000 (23:10 +0000)]
Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is
typically faster then doing a general pow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82819 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a ConstantFP::getInf utility function for creating infinity ConstantFPs.
Dan Gohman [Fri, 25 Sep 2009 23:00:48 +0000 (23:00 +0000)]
Add a ConstantFP::getInf utility function for creating infinity ConstantFPs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82818 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix MachineSink to be able to sink instructions that use physical registers
Dan Gohman [Fri, 25 Sep 2009 22:53:29 +0000 (22:53 +0000)]
Fix MachineSink to be able to sink instructions that use physical registers
which have no defs anywhere in the function. In particular, this fixes sinking
of instructions that reference RIP on x86-64, which is currently being modeled
as a register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82815 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegenerate
Anton Korobeynikov [Fri, 25 Sep 2009 22:53:17 +0000 (22:53 +0000)]
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82814 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide proper masks for neon perfect shuffle table.
Anton Korobeynikov [Fri, 25 Sep 2009 22:52:29 +0000 (22:52 +0000)]
Provide proper masks for neon perfect shuffle table.
I definitely need to read documentation better :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82813 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify a few more uses of reg_iterator.
Dan Gohman [Fri, 25 Sep 2009 22:26:13 +0000 (22:26 +0000)]
Simplify a few more uses of reg_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82812 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify this code by using use_iterator instead of reg_iterator
Dan Gohman [Fri, 25 Sep 2009 22:24:52 +0000 (22:24 +0000)]
Simplify this code by using use_iterator instead of reg_iterator
and skipping the defs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82811 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCode clean up and prepare for Thumb2 support. No functionality changes.
Evan Cheng [Fri, 25 Sep 2009 21:44:53 +0000 (21:44 +0000)]
Code clean up and prepare for Thumb2 support. No functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82805 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFlip -disable-post-RA-scheduler to -post-RA-scheduler.
Evan Cheng [Fri, 25 Sep 2009 21:38:11 +0000 (21:38 +0000)]
Flip -disable-post-RA-scheduler to -post-RA-scheduler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82803 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a compile failure introduced by r82675 on MinGW which doesn't have
Jeffrey Yasskin [Fri, 25 Sep 2009 21:07:20 +0000 (21:07 +0000)]
Fix a compile failure introduced by r82675 on MinGW which doesn't have
setenv().  This patch just disables the test rather than getting putenv() to
work.  Thanks to Sandeep Patel for reporting the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82797 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle sqrt in CannotBeNegativeZero. absf and absl
Dale Johannesen [Fri, 25 Sep 2009 20:54:50 +0000 (20:54 +0000)]
Handle sqrt in CannotBeNegativeZero.  absf and absl
appear to be misspellings, removed in favor of fabs*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82796 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove MachineMemOperand handling.
Dan Gohman [Fri, 25 Sep 2009 20:36:54 +0000 (20:36 +0000)]
Improve MachineMemOperand handling.
 - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
   This eliminates MachineInstr's std::list member and allows the data to be
   created by isel and live for the remainder of codegen, avoiding a lot of
   copying and unnecessary translation. This also shrinks MemSDNode.
 - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
   fields for MachineMemOperands.
 - Change MemSDNode to have a MachineMemOperand member instead of its own
   fields with the same information. This introduces some redundancy, but
   it's more consistent with what MachineInstr will eventually want.
 - Ignore alignment when searching for redundant loads for CSE, but remember
   the greatest alignment.

Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82794 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename getTargetNode to getMachineNode, for consistency with the
Dan Gohman [Fri, 25 Sep 2009 18:54:59 +0000 (18:54 +0000)]
Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82790 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFinish scheduling itineraries for NEON.
David Goodwin [Fri, 25 Sep 2009 18:38:29 +0000 (18:38 +0000)]
Finish scheduling itineraries for NEON.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82788 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd readonly to some sin and cos calls; transformations
Dale Johannesen [Fri, 25 Sep 2009 18:15:29 +0000 (18:15 +0000)]
Add readonly to some sin and cos calls; transformations
being checked aren't valid without it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82786 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes...
Victor Hernandez [Fri, 25 Sep 2009 18:11:52 +0000 (18:11 +0000)]
Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake sure sin, cos, sqrt calls are marked readonly
Dale Johannesen [Fri, 25 Sep 2009 18:00:35 +0000 (18:00 +0000)]
Make sure sin, cos, sqrt calls are marked readonly
before producing FSIN, FCOS, FSQRT.  If they aren't
so marked we have to assume they might set errno.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82781 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreject attempts to use ()'s in patterns, these are reserved for filecheck.
Chris Lattner [Fri, 25 Sep 2009 17:29:36 +0000 (17:29 +0000)]
reject attempts to use ()'s in patterns, these are reserved for filecheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82780 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreimplement the regex matching strategy by building a single
Chris Lattner [Fri, 25 Sep 2009 17:23:43 +0000 (17:23 +0000)]
reimplement the regex matching strategy by building a single
regex and matching it instead of trying to match chunks at a time.
Matching chunks at a time broke with check lines like
  CHECK: foo {{.*}}bar
because the .* would eat the entire rest of the line and bar would
never match.

Now we just escape the fixed strings for the user, so that something
like:
  CHECK: a() {{.*}}???
is matched as:
  CHECK: {{a\(\) .*\?\?\?}}
transparently "under the covers".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82779 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGenerate FSQRT from calls to the sqrt function, which
Dale Johannesen [Fri, 25 Sep 2009 17:23:22 +0000 (17:23 +0000)]
Generate FSQRT from calls to the sqrt function, which
allows appropriate backends to generate a sqrt instruction.

On x86, this isn't done at -O0 because we go through
FastISel instead.  This is a behavior change from before
this series of sqrt patches started.  I think this is OK
considering that compile speed is most important at -O0, but
could be convinced otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82778 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agospecial case Patterns that are a single fixed string. This is a microscopic
Chris Lattner [Fri, 25 Sep 2009 17:09:12 +0000 (17:09 +0000)]
special case Patterns that are a single fixed string.  This is a microscopic
perf win and is needed for future changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82777 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevise C library functions description to be vaguer, per Chris.
Dale Johannesen [Fri, 25 Sep 2009 17:04:42 +0000 (17:04 +0000)]
Revise C library functions description to be vaguer, per Chris.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82776 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThis patch causes the --enable-debug-runtime configure flag and the
Jeffrey Yasskin [Fri, 25 Sep 2009 16:46:09 +0000 (16:46 +0000)]
This patch causes the --enable-debug-runtime configure flag and the
DEBUG_RUNTIME Makefile variable to pass -g to gcc when building LLVM's objects.
Without this, it's very hard to debug crashes that happen in Release-Asserts
mode but not Debug mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82775 91177308-0d34-0410-b5e6-96231b3b80d8