Andrew Trick
4b22856b91
whitespace
...
llvm-svn: 136840
2011-08-03 23:43:49 +00:00
Andrew Trick
b20e31e81f
An interface for iterating over a loop's blocks in DFS order.
...
llvm-svn: 136838
2011-08-03 23:27:28 +00:00
Jakub Staszak
7b30ba0db8
Add more constantness in BlockFrequencyInfo.
...
llvm-svn: 136816
2011-08-03 21:30:57 +00:00
Andrew Trick
bbb5c7b0aa
SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forget
...
to notify SCEV of a change. Add forgetLoop in a couple of those places.
llvm-svn: 136797
2011-08-03 18:32:11 +00:00
Andrew Trick
86f6a3c645
Use consistent terminology for loop exit/exiting blocks. Name change only.
...
llvm-svn: 136677
2011-08-02 04:23:35 +00:00
Jakub Staszak
db23d8b195
Add BlockFrequency::getEntryFrequency()
...
llvm-svn: 136618
2011-08-01 15:22:10 +00:00
Jakub Staszak
02fa079dc3
Add more constantness in BranchProbabilityInfo.
...
llvm-svn: 136502
2011-07-29 19:30:00 +00:00
Eli Friedman
6f2419f1a2
Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
...
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)
llvm-svn: 136457
2011-07-29 03:05:32 +00:00
Jakub Staszak
6076fe7cff
If run with -debug give more information about Cyclic Probability.
...
llvm-svn: 136403
2011-07-28 21:46:58 +00:00
Jakub Staszak
22fcf6c40b
Fix stupid mistake from commit 136381.
...
llvm-svn: 136384
2011-07-28 20:17:18 +00:00
Jakub Staszak
534e099ba0
Speed up BlockFrequencyInfo a little bit.
...
llvm-svn: 136381
2011-07-28 20:09:31 +00:00
Jakub Staszak
f5076015fc
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
...
llvm-svn: 136278
2011-07-27 22:05:51 +00:00
Jakub Staszak
d5378ec61f
Edge to itself is backedge as well.
...
llvm-svn: 136219
2011-07-27 15:42:09 +00:00
Eli Friedman
f226974353
Misc mid-level changes for new 'fence' instruction.
...
llvm-svn: 136205
2011-07-27 01:08:30 +00:00
Eli Friedman
2da127e60a
Fix AliasSetTracker so that it doesn't make any assumptions about instructions it doesn't know about (like the atomic instructions I'm adding).
...
llvm-svn: 136198
2011-07-27 00:46:46 +00:00
Andrew Trick
ae93f1bf46
SCEV: Added a data structure for storing not-taken info per loop
...
exit. Added an interfaces for querying either the loop's exact/max
backedge taken count or a specific loop exit's not-taken count.
llvm-svn: 136100
2011-07-26 17:19:55 +00:00
Jakub Staszak
5c309cbead
Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to
...
MachineBlockFrequencyInfo.
llvm-svn: 135937
2011-07-25 19:25:40 +00:00
Jakub Staszak
cf5ebedf56
Allow getBlockFreq to return 0.
...
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Devang Patel
284b502be9
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.
...
llvm-svn: 135629
2011-07-20 22:18:50 +00:00
Devang Patel
65afdd27d0
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Devang Patel
5a4bb57ec5
Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.
...
llvm-svn: 135504
2011-07-19 19:41:54 +00:00
Bob Wilson
7c9092c9aa
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
...
This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.
llvm-svn: 135486
2011-07-19 16:32:50 +00:00
Jay Foad
bbbf29aab7
Convert SimplifyGEPInst to use ArrayRef.
...
llvm-svn: 135482
2011-07-19 15:07:52 +00:00
Jay Foad
ae5894c5cc
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
...
llvm-svn: 135477
2011-07-19 13:32:40 +00:00
Devang Patel
e50d45c876
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
...
llvm-svn: 135457
2011-07-19 01:03:32 +00:00
Chris Lattner
e1fe7061ce
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Jakub Staszak
7bd3be24d8
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.
...
llvm-svn: 135353
2011-07-16 20:31:15 +00:00
Jakub Staszak
a0010953f7
Add MachineBlockFrequency analysis.
...
llvm-svn: 135352
2011-07-16 20:23:20 +00:00
Andrew Trick
b2c2eec80d
Fix SCEVEXpander to handle arbitrary phi expansion. Includes two
...
related bug fixes and corresponding assertions for uninitialized data
and missing NULL check. Test cases will be included with the new LFTR.
llvm-svn: 135333
2011-07-16 00:59:39 +00:00
Jay Foad
88fb4f4597
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
...
llvm-svn: 135040
2011-07-13 10:26:04 +00:00
Andrew Trick
9be3481cbd
Cleanup. Fix a stupid variable name.
...
llvm-svn: 133996
2011-06-28 05:44:06 +00:00
Andrew Trick
4ac5dd5154
SCEVExpander: give new insts a name that identifies the reponsible pass.
...
llvm-svn: 133992
2011-06-28 05:07:32 +00:00
Nick Lewycky
4a0f5218f2
Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by other
...
passes as well.
llvm-svn: 133904
2011-06-27 04:20:45 +00:00
Devang Patel
10271bcdad
Fix struct member's scope. Patch by Xi Wang.
...
llvm-svn: 133828
2011-06-24 22:00:39 +00:00
Jakub Staszak
4cd344d775
Calculate backedge probability correctly.
...
llvm-svn: 133776
2011-06-23 23:52:11 +00:00
Jakub Staszak
d28a800e6b
Missing files for the BlockFrequency analysis added.
...
llvm-svn: 133767
2011-06-23 21:56:59 +00:00
Jakub Staszak
d74cc36bcb
Introduce BlockFrequency analysis for BasicBlocks.
...
llvm-svn: 133766
2011-06-23 21:45:20 +00:00
Andrew Trick
04c3bb47ce
IVUsers no longer needs to record the phis.
...
llvm-svn: 133518
2011-06-21 15:43:52 +00:00
Jakub Staszak
5c7b7d64ba
Introduce MachineBranchProbabilityInfo class, which has similar API to
...
BranchProbabilityInfo (expect setEdgeWeight which is not available here).
Branch Weights are kept in MachineBasicBlocks. To turn off this analysis
set -use-mbpi=false.
llvm-svn: 133184
2011-06-16 20:22:37 +00:00
John McCall
519c63cdeb
The ARC language-specific optimizer. Credit to Dan Gohman.
...
llvm-svn: 133108
2011-06-15 23:37:01 +00:00
Eli Friedman
47b3cd9fff
Add "unknown" results for memdep, which mean "I don't know whether a dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions.
...
llvm-svn: 133031
2011-06-15 00:47:34 +00:00
Andrew Trick
4591f882c2
Branch profiling: floating-point avoidance.
...
Patch by: Jakub Staszak!
Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.
llvm-svn: 132867
2011-06-11 01:05:22 +00:00
John McCall
d31a1b8de1
Teach the CallGraph to ignore calls to intrinsics.
...
llvm-svn: 132797
2011-06-09 19:46:27 +00:00
Andrew Trick
7a9eb604a9
New BranchProbabilityInfo analysis. Patch by Jakub Staszak!
...
BranchProbabilityInfo provides an interface for IR passes to query the
likelihood that control follows a CFG edge. This patch provides an
initial implementation of static branch predication that will populate
BranchProbabilityInfo for branches with no external profile
information using very simple heuristics. It currently isn't hooked up
to any external profile data, so static prediction does all the work.
llvm-svn: 132613
2011-06-04 01:16:30 +00:00
Dan Gohman
edaf7c535a
Fix BasicAA's recursion detection so that it doesn't pessimize
...
queries in the case of a DAG, where a query reaches a node
visited earlier, but it's not on a cycle. This avoids
MayAlias results in cases where BasicAA is expected to
return MustAlias or PartialAlias in order to protect TBAA.
llvm-svn: 132609
2011-06-04 00:31:50 +00:00
Devang Patel
e3190a1377
A typedef's context is not the same as type's context. It is the context of typedef decl itself. Use extra parameter to communicate this to DIBuilder.
...
llvm-svn: 132556
2011-06-03 17:04:51 +00:00
Andrew Trick
3352db291f
indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.
...
No functionality enabled by default. Use -disable-iv-rewrite.
Extended IVUsers to keep track of the phi that represents the users' IV.
Added the WidenIV transform to replace a narrow IV with a wide IV
by doing a one-for-one replacement of IV users instead of expanding the
SCEV expressions. [sz]exts are removed and truncs are inserted.
llvm-svn: 131744
2011-05-20 18:25:42 +00:00
Julien Lerouge
b2c1721752
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
...
set.
rdar://9423996
llvm-svn: 131283
2011-05-13 05:20:42 +00:00
Devang Patel
dd08ae41c6
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Devang Patel
b865dd6a20
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
...
llvm-svn: 131238
2011-05-12 19:06:16 +00:00