Dan Gohman
85557399a1
Make ScalarEvolution::forgetLoop forget all contained loops too, because
...
they may have ValuesAtScopes map entries referencing their outer loops.
This fixes a user-after-free reported in PR8471.
llvm-svn: 117698
2010-10-29 20:16:10 +00:00
Dan Gohman
753c9ce807
Teach memdep to use pointsToConstantMemory to determine that loads
...
from constant memory don't alias any stores.
llvm-svn: 117636
2010-10-29 01:14:04 +00:00
Dan Gohman
ef977ab6b6
Support TBAA attachments on calls. This is somewhat experimental.
...
llvm-svn: 117317
2010-10-25 21:38:20 +00:00
Dan Gohman
20a3dd4ee1
Fix chaining in TBAA's pointsToConstantMemory.
...
llvm-svn: 117314
2010-10-25 21:24:55 +00:00
Dan Gohman
cdc30324f1
Only read one bit for testing for a readonly type, leaving the other
...
bits open for future uses.
llvm-svn: 117301
2010-10-25 20:22:29 +00:00
Dan Gohman
3bce49a02a
Add a comment.
...
llvm-svn: 117288
2010-10-25 19:47:25 +00:00
Dan Gohman
9d63075905
Update comments; BasicAA is no longer necessarily the end of the chain.
...
llvm-svn: 117268
2010-10-25 16:29:52 +00:00
Dan Gohman
67e229bec7
Reintroduce these asserts, now that BasicAA is a normal AliasAnalysis pass.
...
llvm-svn: 117266
2010-10-25 16:28:57 +00:00
Benjamin Kramer
9e988fe81e
Make some symbols static, move classes into anonymous namespaces.
...
llvm-svn: 117111
2010-10-22 17:35:07 +00:00
Dan Gohman
fe5489a0ac
Add some more documentation.
...
llvm-svn: 117070
2010-10-21 21:55:35 +00:00
Dan Gohman
6fb125afc8
Explain what "constant" means here.
...
llvm-svn: 117053
2010-10-21 19:45:09 +00:00
Dan Gohman
8cb659e892
Update comments.
...
llvm-svn: 117048
2010-10-21 19:01:22 +00:00
Dan Gohman
369ce9c96c
Memdep says that an instruction clobbers itself
...
when it means there is no specific clobber instruction.
llvm-svn: 116960
2010-10-20 22:37:41 +00:00
Dan Gohman
3376c4f08d
Factor out the main aliasing check into a separate function.
...
llvm-svn: 116958
2010-10-20 22:11:14 +00:00
Dan Gohman
599a664758
Fix comments; the type graph is currently a tree, not a DAG.
...
llvm-svn: 116954
2010-10-20 22:02:58 +00:00
Tobias Grosser
88ce93b0eb
Add RegionPass support.
...
A RegionPass is executed like a LoopPass but on the regions detected by the
RegionInfo pass instead of the loops detected by the LoopInfo pass.
llvm-svn: 116905
2010-10-20 01:54:44 +00:00
Douglas Gregor
1e64599cb3
Fix CMake build
...
llvm-svn: 116903
2010-10-20 01:36:56 +00:00
Dan Gohman
399ef0b44a
Move NoAA out of BasicAliasAnalysis.cpp into its own file, now that
...
it doesn't have a special relationship with BasicAliasAnalysis
anymore.
llvm-svn: 116876
2010-10-19 23:09:08 +00:00
Dan Gohman
befe1767ff
Reapply r116831 and r116839, converting AliasAnalysis to use
...
uint64_t, plus fixes for places I missed before.
llvm-svn: 116875
2010-10-19 22:54:46 +00:00
Dan Gohman
de3c49438f
Revert r116831 and r116839, which are breaking selfhost builds.
...
llvm-svn: 116858
2010-10-19 21:06:16 +00:00
Dan Gohman
03f86df2e5
Change AliasAnalysis and its clients to use uint64_t instead of unsigned
...
for representing object sizes, for consistency with other parts of LLVM.
llvm-svn: 116831
2010-10-19 18:00:02 +00:00
Owen Anderson
46990c17f7
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
...
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Dan Gohman
6e3755905e
Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.
...
llvm-svn: 116815
2010-10-19 17:06:23 +00:00
Dan Gohman
8b332ffb8c
Make the representation of AliasSets explicitly differentiate
...
between "not known yet" and "known no tbaa info" so that it
can merge them properly.
llvm-svn: 116767
2010-10-18 23:31:47 +00:00
Dan Gohman
6efd04961b
Don't pass the raw invalid pointer used to represent conflicting
...
TBAA information to AliasAnalysis.
llvm-svn: 116751
2010-10-18 21:28:00 +00:00
Dan Gohman
64affb7be2
Make AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.
...
llvm-svn: 116743
2010-10-18 20:44:50 +00:00
Dan Gohman
35def103f7
Fix BasicAA to pass TBAAInfo through to the chained analysis.
...
llvm-svn: 116730
2010-10-18 18:45:11 +00:00
Dan Gohman
7820328076
Make TypeBasedAliasAnalysis default to doing nothing, with a command-line
...
option to enable it.
llvm-svn: 116722
2010-10-18 18:17:47 +00:00
Dan Gohman
97f3b0cac1
Use chaining in TypeBasedAliasAnalysis::pointsToConstantMemory.
...
llvm-svn: 116721
2010-10-18 18:10:31 +00:00
Dan Gohman
6aff5b94ff
Make BasicAliasAnalysis a normal AliasAnalysis implementation which
...
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.
Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.
Update tests to explicitly request -basicaa.
llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Benjamin Kramer
a0e156fe6d
Eliminate some calls to Value::getNameStr.
...
llvm-svn: 116670
2010-10-16 11:28:23 +00:00
Dan Gohman
d93278f6b6
Tolerate a null parent pointer.
...
llvm-svn: 116533
2010-10-14 22:55:57 +00:00
Chris Lattner
451a0accb5
add uadd_ov/usub_ov to apint, consolidate constant folding
...
logic to use the new APInt methods. Among other things this
implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold
which comes from "clang -ftrapv", originally brought to my attention from PR8221.
llvm-svn: 116457
2010-10-14 00:05:07 +00:00
Owen Anderson
c65395a991
Analysis groups need to initialize their default implementations.
...
llvm-svn: 116441
2010-10-13 21:49:58 +00:00
Tobias Grosser
70507511ae
Add Region::isTopLevelRegion().
...
llvm-svn: 116402
2010-10-13 11:02:44 +00:00
Tobias Grosser
1eba2917fa
RegionInfo: Fix trivial error that slipped in last minute.
...
llvm-svn: 116400
2010-10-13 08:00:53 +00:00
Tobias Grosser
85dce73ab5
RegionInfo: Update RegionInfo after a BB was split.
...
llvm-svn: 116398
2010-10-13 05:54:13 +00:00
Tobias Grosser
6aac855519
RegioInfo: Add getExpandedRegion().
...
getExpandedRegion() enables us to create non canonical regions. Those regions
can be used to define the largerst region, that fullfills a certain property.
llvm-svn: 116397
2010-10-13 05:54:11 +00:00
Tobias Grosser
ecfaf92c1a
RegionInfo: Allow to update exit and entry of a region.
...
llvm-svn: 116396
2010-10-13 05:54:10 +00:00
Tobias Grosser
84dd4b54fc
RegionInfo: Enhance addSubregion.
...
llvm-svn: 116395
2010-10-13 05:54:09 +00:00
Tobias Grosser
a2b5df5a6d
RegionInfo: Allow to set the parent region of a basic block.
...
llvm-svn: 116394
2010-10-13 05:54:07 +00:00
Tobias Grosser
e5d4a07ab3
RegionInfo: Free the RegionNodes in cache.
...
Contributed by: ether
llvm-svn: 116380
2010-10-13 00:07:59 +00:00
Owen Anderson
63f757463c
Begin adding static dependence information to passes, which will allow us to
...
perform initialization without static constructors AND without explicit initialization
by the client. For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve. I hope to be able to relax
the latter requirement in the future.
llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Dan Gohman
4231230501
Support AA chaining.
...
llvm-svn: 116264
2010-10-11 23:39:34 +00:00
Kenneth Uildriks
e9771f15f7
Now using a variant of the existing inlining heuristics to decide whether to create a given specialization of a function in PartialSpecialization. If the total performance bonus across all callsites passing the same constant exceeds the specialization cost, we create the specialization.
...
llvm-svn: 116158
2010-10-09 22:06:36 +00:00
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