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
4ab9414b7c
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
171d7954c3
Link order: it matters.
...
llvm-svn: 82925
2009-09-27 20:58:01 +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
Chris Lattner
80349d5875
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
...
llvm-svn: 82911
2009-09-27 19:38:39 +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
89b2635c5c
Remove a redundant assert.
...
llvm-svn: 82907
2009-09-27 17:48:37 +00:00
Jeffrey Yasskin
195b24c844
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
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
3248b82ffc
Add dominates and releaseMemory member functions to PostDominatorTree.
...
llvm-svn: 82904
2009-09-27 17:39:12 +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
473ca67150
Clarify a comment.
...
llvm-svn: 82902
2009-09-27 15:41:19 +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
Chris Lattner
d66a99e60a
rename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
...
llvm-svn: 82892
2009-09-27 08:01:44 +00:00
Chris Lattner
80d69b5973
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.
llvm-svn: 82891
2009-09-27 07:56:52 +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
Nick Lewycky
d21c325f09
Instruction::clone does not need to take an LLVMContext&. Remove that and
...
update all the callers.
llvm-svn: 82889
2009-09-27 07:38:41 +00:00
Nick Lewycky
6ea218a96b
Filecheckify this one test.
...
llvm-svn: 82888
2009-09-27 06:25:05 +00:00
Nick Lewycky
18d420fde7
Leave a pointer to the documentation so that people don't end up change one but
...
not the other in the future.
llvm-svn: 82887
2009-09-27 04:57:35 +00:00
Nick Lewycky
d77653667a
Correct the version numbers to match those actually tested for by
...
autoconf/AutoRegen.sh.
llvm-svn: 82886
2009-09-27 04:56:27 +00:00
Nick Lewycky
c54e1a5528
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).
llvm-svn: 82884
2009-09-27 00:45:11 +00:00
Chris Lattner
b47463f436
remove support for "NoSub" from regex. It seems like a minor optimization
...
and makes the API more annoying. Add a Regex::getNumMatches() method.
llvm-svn: 82877
2009-09-26 21:27:04 +00:00
Torok Edwin
9d7a492755
Speed up clang-only link, by really linking only clang, and not the unittests
...
too.
llvm-svn: 82873
2009-09-26 20:18:58 +00:00
Evan Cheng
eafd25a098
Remove this test.
...
llvm-svn: 82869
2009-09-26 18:51:37 +00:00
Dan Gohman
0a396aa546
Fix SimplifyLibCalls to transfer attributes from callees rather than
...
calls, since direct calls don't always reflect the attributes of their
callees.
llvm-svn: 82867
2009-09-26 18:10:13 +00:00
Dan Gohman
60964df13d
Fix a case where ScalarEvolution was expanding pointer arithmetic
...
to inttoptr/ptrtoint unnecessarily.
llvm-svn: 82864
2009-09-26 16:11:57 +00:00
Duncan Sands
ec5d64fdd5
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.
llvm-svn: 82862
2009-09-26 15:35:35 +00:00
Dan Gohman
6899a1cd58
Convert comparisons like (x == infinity) to (x >= infinity) on targets
...
where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.
llvm-svn: 82861
2009-09-26 15:24:17 +00:00
Duncan Sands
64511993cb
Add methods for creating NSW subtraction, as already exists
...
for addition.
llvm-svn: 82860
2009-09-26 15:21:48 +00:00
Dan Gohman
2351c2f8b7
Add a comment describing natural loops.
...
llvm-svn: 82859
2009-09-26 15:09:53 +00:00
Daniel Dunbar
923dc62615
"Update" tests for -disable-if-conversion removal. I think branch.ll should just
...
be removed, but I XFAIL'd it for now.
llvm-svn: 82847
2009-09-26 05:29:36 +00:00
Evan Cheng
48479d0c8f
Really remove this option.
...
llvm-svn: 82838
2009-09-26 02:49:49 +00:00
Evan Cheng
1088c37212
Remove a couple of unused command line options.
...
llvm-svn: 82837
2009-09-26 02:45:45 +00:00
Evan Cheng
c4e3168b65
Add comment.
...
llvm-svn: 82836
2009-09-26 02:43:36 +00:00
Evan Cheng
0b55bde4b3
Convert test to filecheck.
...
llvm-svn: 82835
2009-09-26 02:41:17 +00:00
Dan Gohman
7f73a0c1e4
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.
llvm-svn: 82834
2009-09-26 02:34:00 +00:00
Dan Gohman
8e056e8b9b
I put the wrong rdar number in this test.
...
llvm-svn: 82829
2009-09-26 01:11:57 +00:00