Kenneth Uildriks
0545afa8fd
Start separating out code metrics into code size metrics and code performance metrics. Partial Specialization will apply the former to function specializations, and the latter to all callsites that can use a specialization, in order to decide whether to create a specialization
...
llvm-svn: 116057
2010-10-08 13:57:31 +00:00
Owen Anderson
69cbf2e8b7
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Owen Anderson
0dd283aa50
Add an implementation of the initialization routine for IPA.
...
llvm-svn: 115947
2010-10-07 18:31:27 +00:00
Owen Anderson
704998fa6f
Add initialization routines for Analysis and IPA.
...
llvm-svn: 115946
2010-10-07 18:31:00 +00:00
Owen Anderson
ab71dcd0ad
Fix a warning when building with clang++.
...
llvm-svn: 115924
2010-10-07 17:04:18 +00:00
Owen Anderson
a8a7bf484f
Move the pass initialization helper functions into the llvm namespace, and add
...
a header declaring them all. This is also where we will declare per-library pass-set
initializer functions down the road.
llvm-svn: 115900
2010-10-07 04:13:08 +00:00
Owen Anderson
65684877c5
Appease the clang self-host buildbot by providing a correct instantiation.
...
llvm-svn: 115857
2010-10-06 22:23:20 +00:00
Owen Anderson
2a670815f6
Hide analysis group registration behind a macro, just like pass registration.
...
llvm-svn: 115835
2010-10-06 21:02:27 +00:00
Devang Patel
eeb0b64560
Add support for DW_TAG_unspecified_parameters.
...
llvm-svn: 115833
2010-10-06 20:50:40 +00:00
Dan Gohman
ff478951be
Don't add the operand count to SCEV uniquing data; FoldingSetNodeID
...
already knows its own length, so this is redundant.
llvm-svn: 115521
2010-10-04 17:24:08 +00:00
Devang Patel
41e2a94595
Let FE mark a variable as artificial variable.
...
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Devang Patel
bbd003ab48
Generalize DISubprogram element to encode various flags instead of just one boolean for isArtificial.
...
This is a backword compatible change.
llvm-svn: 115084
2010-09-29 21:04:46 +00:00
Benjamin Kramer
963980649e
Remove PointerTracking from cmakelists …
...
llvm-svn: 115076
2010-09-29 19:39:50 +00:00
Chris Lattner
b7bfd3de07
remove PointerTracking from mainline, Edwin is going to move it out to ClamAV
...
for LLVM 2.9
llvm-svn: 115062
2010-09-29 18:43:27 +00:00
Oscar Fuentes
eb27a44982
Removed a bunch of unnecessary target_link_libraries.
...
llvm-svn: 114999
2010-09-28 22:39:14 +00:00
Devang Patel
e1f502ee26
Provide an interface to let FEs anchor debug info for types.
...
llvm-svn: 114969
2010-09-28 18:08:20 +00:00
Jakob Stoklund Olesen
c9755c5213
Don't try to constant fold libm functions with non-finite arguments.
...
Usually we wouldn't do this anyway because llvm_fenv_testexcept would return an
exception, but we have seen some cases where neither errno nor fenv detect an
exception on arm-linux.
llvm-svn: 114893
2010-09-27 21:29:20 +00:00
Dan Gohman
d69790d841
Teach memdep about TBAA tags.
...
llvm-svn: 114588
2010-09-22 21:41:02 +00:00
Benjamin Kramer
98e1aab5a8
Simplify code.
...
llvm-svn: 114444
2010-09-21 16:41:29 +00:00
Benjamin Kramer
a81f2ba27e
Make CreateComplexVariable independent of SmallVector.
...
llvm-svn: 114439
2010-09-21 16:00:03 +00:00
Jakob Stoklund Olesen
37131971c3
Don't include <fenv.h> now that we have llvm/System/FEnv.h.
...
llvm-svn: 114219
2010-09-17 21:47:03 +00:00
Dan Gohman
8058e1b851
Attempt to support platforms which don't have fenv.h.
...
llvm-svn: 114196
2010-09-17 20:06:27 +00:00
Dan Gohman
9dc559bdef
Fix the folding of floating-point math library calls, like sin(infinity),
...
so that it detects errors on platforms where libm doesn't set errno.
It's still subject to host libm details though.
llvm-svn: 114148
2010-09-17 01:38:06 +00:00
Dan Gohman
2f0d88bcbe
Add an #include of raw_ostream.h. Previously, this only compiled
...
because it was using Twine.h's declaration of operator<<(const Twine &).
llvm-svn: 114141
2010-09-17 00:33:43 +00:00
Benjamin Kramer
c8808012f9
Update CMake build.
...
llvm-svn: 114128
2010-09-16 23:06:18 +00:00
Dan Gohman
54fa09d403
Rename a variable to avoid a declaration conflict.
...
llvm-svn: 114126
2010-09-16 22:50:09 +00:00
Dan Gohman
836ce09592
Add a pass which prints out all the memdep dependencies.
...
llvm-svn: 114121
2010-09-16 22:08:32 +00:00
Owen Anderson
3d4644bad9
Revert r114097, adding back in the assertion against replacing an Instruction by itself. Now that CorrelatedValuePropagation is
...
more careful not to call SimplifyInstructionsInBlock() on an unreachable block, the issue has been fixed at a higher level. Add
a big warning to SimplifyInstructionsInBlock() to hopefully prevent this in the future.
llvm-svn: 114117
2010-09-16 20:51:41 +00:00
Owen Anderson
6f3516065f
It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for LVI to end up trying to merge
...
a Constant into a ConstantRange. Handle this conservatively for now, rather than asserting. The testcase is
more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the
LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases.
Fixes PR8162.
llvm-svn: 114103
2010-09-16 18:28:33 +00:00
Owen Anderson
521e8dfef8
Fix PR8161, in which an unreachable loop causes recursive instruction simplification to try
...
to replace an instruction with itself. Add a predicate to the simplifier to prevent this case.
llvm-svn: 114097
2010-09-16 17:42:36 +00:00
Eli Friedman
b5aea103fc
PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
...
targets.
llvm-svn: 114015
2010-09-15 20:08:03 +00:00
Dan Gohman
a2e5bf005e
Convert TBAA to use the new TBAATag field of AliasAnalysis::Location.
...
llvm-svn: 113892
2010-09-14 23:28:12 +00:00
Dan Gohman
ebbc4df924
Remove the experimental AliasAnalysis::getDependency interface, which
...
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.
Also, introduce a fixed MD_tbaa metadata tag kind.
llvm-svn: 113858
2010-09-14 21:25:10 +00:00
Michael J. Spencer
90f807fda5
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
...
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Benjamin Kramer
6110efbf8c
Teach InstructionSimplify to fold (A & B) & A -> A & B and (A | B) | A -> A | B.
...
Reassociate does this but it doesn't catch all cases (e.g. if the operands are i1).
llvm-svn: 113651
2010-09-10 22:39:55 +00:00
Michael J. Spencer
98ad3f2ea7
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
...
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Owen Anderson
f7276d42d3
What the loop unroller cares about, rather than just not unrolling loops with calls, is
...
not unrolling loops that contain calls that would be better off getting inlined. This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass. Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.
llvm-svn: 113535
2010-09-09 20:32:23 +00:00
Dan Gohman
7fbaed00bf
Extend the getDependence query with support for PHI translation.
...
llvm-svn: 113521
2010-09-09 18:37:31 +00:00
Owen Anderson
9a194c80c4
Refactor code-size reduction estimation methods out of InlineCostAnalyzer and into CodeMetrics. They
...
don't use any InlineCostAnalyzer state, and are useful for other clients who don't necessarily want to use
all of InlineCostAnalyzer's logic, some of which is fairly inlining-specific.
No intended functionality change.
llvm-svn: 113499
2010-09-09 16:56:42 +00:00
Dan Gohman
de56ae353b
Add a new experimental generalized dependence query interface to
...
AliasAnalysis, and some code for implementing the new query on top of
existing implementations by making standard alias and getModRefInfo
queries.
llvm-svn: 113329
2010-09-08 01:32:20 +00:00
Owen Anderson
e15120e561
Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
...
and exposing internal details.
llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Nick Lewycky
9698dae1df
Add completely hokey binary-and and binary-or operations to ConstantRange and
...
teach LazyValueInfo to use them.
llvm-svn: 113196
2010-09-07 05:39:02 +00:00
Chris Lattner
cec733bec6
cleanup some of the lifetime/invariant marker stuff, add a big fixme.
...
llvm-svn: 113144
2010-09-06 03:58:04 +00:00
Chris Lattner
7576ffb974
speed up -gvn 3.4% on the testcase in PR7023
...
llvm-svn: 113135
2010-09-06 01:26:29 +00:00
Chris Lattner
818045f208
pull a simple method out of LICM into a new
...
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.
No functionality change.
llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Chris Lattner
4dccd368f3
fix PR8063, a crash in globalopt in the malloc analysis code.
...
llvm-svn: 113109
2010-09-05 17:20:46 +00:00
Chris Lattner
238e7c2fbe
dead method.
...
llvm-svn: 113077
2010-09-04 18:19:16 +00:00
Chris Lattner
8df3ffd7ac
zap dead code.
...
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Dan Gohman
96e1af24f6
Disable the asserts that check that normalization is perfectly
...
invertible. ScalarEvolution's folding routines don't always succeed
in canonicalizing equal expressions to a single canonical form, and
this can cause these asserts to fail, even though there's no actual
correctness problem. This fixes PR8066.
llvm-svn: 113021
2010-09-03 22:12:56 +00:00
Owen Anderson
9161c79ffe
Add support for simplifying a load from a computed value to a load from a global when it
...
is provable that they're equivalent. This fixes PR4855.
llvm-svn: 112994
2010-09-03 19:08:37 +00:00