Jakub Staszak
da3df4302a
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
...
llvm-svn: 136278
2011-07-27 22:05:51 +00:00
Jeffrey Yasskin
6381c0100b
Explicitly cast narrowing conversions inside {}s that will become errors in
...
C++0x.
llvm-svn: 136211
2011-07-27 06:22:51 +00:00
Eli Friedman
8b5277c6cf
Minor simplification.
...
llvm-svn: 136202
2011-07-27 01:02:25 +00:00
Eli Friedman
ae8161e774
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
3ca3f98c2c
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
Duncan Sands
c1c92719a4
Add helper function for getting true/false constants in a uniform
...
way for i1 and vector of i1 types. Use these to make some code
more self-documenting.
llvm-svn: 136079
2011-07-26 15:03:53 +00:00
Jakub Staszak
875ebd5f5d
Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to
...
MachineBlockFrequencyInfo.
llvm-svn: 135937
2011-07-25 19:25:40 +00:00
Frits van Bommel
ede0dc6dda
Shorten some expressions by using ArrayRef::slice().
...
llvm-svn: 135910
2011-07-25 15:13:01 +00:00
Jay Foad
d1b7849d49
Convert GetElementPtrInst to use ArrayRef.
...
llvm-svn: 135904
2011-07-25 09:48:08 +00:00
Jay Foad
040dd82f44
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
...
ArrayRef.
llvm-svn: 135761
2011-07-22 08:16:57 +00:00
Jakub Staszak
b82bbf40bb
Allow getBlockFreq to return 0.
...
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Jay Foad
ed8db7d9df
Convert ConstantExpr::getGetElementPtr and
...
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
2011-07-21 14:31:17 +00:00
Devang Patel
8fb9fd6769
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
a59b24b090
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Devang Patel
cfa82a378d
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
da30cf84c3
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
b992a635fb
Convert SimplifyGEPInst to use ArrayRef.
...
llvm-svn: 135482
2011-07-19 15:07:52 +00:00
Jay Foad
bf904773bb
Convert TargetData::getIndexedOffset to use ArrayRef.
...
llvm-svn: 135478
2011-07-19 14:01:37 +00:00
Jay Foad
f4b14a2b0d
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
...
llvm-svn: 135477
2011-07-19 13:32:40 +00:00
Devang Patel
ac532dedf1
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
Frits van Bommel
717d7edd3e
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
...
Mostly mechanical with some manual reformatting.
llvm-svn: 135390
2011-07-18 12:00:32 +00:00
Chris Lattner
229907cd11
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Benjamin Kramer
a7606b993c
Silence compiler warnings.
...
llvm-svn: 135358
2011-07-16 22:26:27 +00:00
Jakub Staszak
623e1971ce
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.
...
llvm-svn: 135353
2011-07-16 20:31:15 +00:00
Andrew Trick
244e2c3e82
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
Jakub Staszak
abb236fe9b
Fix pointer heuristic. Check whether predicator is ICMP_NE instead of if it is
...
not isEquality().
llvm-svn: 135296
2011-07-15 20:51:06 +00:00
Jay Foad
5bd375a6cc
Convert CallInst and InvokeInst APIs to use ArrayRef.
...
llvm-svn: 135265
2011-07-15 08:37:34 +00:00
Jay Foad
57aa636794
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
...
llvm-svn: 135040
2011-07-13 10:26:04 +00:00
Chris Lattner
13879a7091
stop using WriteTypeSymbolic.
...
llvm-svn: 134833
2011-07-09 18:02:13 +00:00
Devang Patel
c3239d3965
Preserve debug loc.
...
llvm-svn: 134441
2011-07-05 21:48:22 +00:00
Dan Gohman
a293f24a0d
Teach IVUsers to stop at non-affine expressions unless they are both
...
outside the loop and reducible.
This more completely hides them from LSR, which isn't usually able to
do anything meaningful with non-affine expressions anyway, and this
consequently hides them from SCEVExpander, which is acutely unprepared
for non-affine expressions.
Replace test/CodeGen/X86/lsr-nonaffine.ll with a new test that tests
the new behavior.
This works around the bug in PR10117 / rdar://problem/9633149, and is
generally an improvement besides.
llvm-svn: 134268
2011-07-01 22:05:19 +00:00
Dan Gohman
54664ed714
Improve constant folding of undef for cmp and select operators.
...
llvm-svn: 134223
2011-07-01 01:03:43 +00:00
Andrew Trick
154d78a661
Cleanup. Fix a stupid variable name.
...
llvm-svn: 133995
2011-06-28 05:41:52 +00:00
Andrew Trick
411daa5e81
SCEVExpander: give new insts a name that identifies the reponsible pass.
...
llvm-svn: 133992
2011-06-28 05:07:32 +00:00
Andrew Trick
56b315a9cf
indvars --disable-iv-rewrite: sever ties with IVUsers.
...
llvm-svn: 133988
2011-06-28 03:01:46 +00:00
Nick Lewycky
3e334a42d7
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
503c3998f3
Fix struct member's scope. Patch by Xi Wang.
...
llvm-svn: 133828
2011-06-24 22:00:39 +00:00
Jakub Staszak
1aae619933
Calculate backedge probability correctly.
...
llvm-svn: 133776
2011-06-23 23:52:11 +00:00
Jakub Staszak
668c6fae76
Missing files for the BlockFrequency analysis added.
...
llvm-svn: 133767
2011-06-23 21:56:59 +00:00
Jakub Staszak
be52acc98a
Introduce BlockFrequency analysis for BasicBlocks.
...
llvm-svn: 133766
2011-06-23 21:45:20 +00:00
Rafael Espindola
e2456536b5
Revert "revert 133714"
...
This reverts commit e8e00f5efb4a22238f2407bf813de4606f30c5aa.
The cmake build on OS X is still broken.
llvm-svn: 133718
2011-06-23 14:19:39 +00:00
Dylan Noblesmith
8a4f22d017
revert 133714
...
It broke the build worse.
llvm-svn: 133716
2011-06-23 13:56:01 +00:00
Rafael Espindola
250360d4bd
133713 broke the build, revert it.
...
llvm-svn: 133714
2011-06-23 13:37:38 +00:00
Dylan Noblesmith
3595357772
Support: make floating-exception header private
...
It has only one user. This eliminates the last include of
config.h from the public headers -- ideally, config.h
shouldn't even be installed by `make install` anymore.
llvm-svn: 133713
2011-06-23 12:45:54 +00:00
Devang Patel
ccf8dbf885
New binops need debug loc.
...
llvm-svn: 133642
2011-06-22 20:56:56 +00:00
Andrew Trick
fc4ccb20c6
IVUsers no longer needs to record the phis.
...
llvm-svn: 133518
2011-06-21 15:43:52 +00:00
Chris Lattner
cc19efaa97
Revamp the "ConstantStruct::get" methods. Previously, these were scattered
...
all over the place in different styles and variants. Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.
In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).
It would be "really really nice" if the ConstantStruct::get and
ConstantVector::get methods didn't make temporary std::vectors.
llvm-svn: 133412
2011-06-20 04:01:31 +00:00
Chris Lattner
67733f6557
simplify some code.
...
llvm-svn: 133362
2011-06-18 21:46:23 +00:00
Benjamin Kramer
9319e9c5d8
Simplify code. No functionality change.
...
llvm-svn: 133351
2011-06-18 14:42:42 +00:00
Jakub Staszak
12a43bdde5
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