| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
edge is hot.
llvm-svn: 142751
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
able to constant fold load instructions where the argument is a constant.
Second, we should be able to watch multiple PHI nodes through the loop; this
patch only supports PHIs in loop headers, more can be done here.
With this patch, we now constant evaluate:
static const int arr[] = {1, 2, 3, 4, 5};
int test() {
int sum = 0;
for (int i = 0; i < 5; ++i) sum += arr[i];
return sum;
}
llvm-svn: 142731
|
|
|
|
| |
llvm-svn: 142687
|
|
|
|
|
|
| |
This is from the same paper from Ball and Larus as the rest of the currently implemented heuristics.
llvm-svn: 142677
|
|
|
|
| |
llvm-svn: 142569
|
|
|
|
| |
llvm-svn: 142567
|
|
|
|
|
|
| |
correctly in GetStringLength, fixing PR11181!
llvm-svn: 142558
|
|
|
|
|
|
|
|
|
| |
and switches, with arbitrary numbers of successors. Still optimized for
the common case of 2 successors for a conditional branch.
Add a test case for switch metadata showing up in the BlockFrequencyInfo pass.
llvm-svn: 142493
|
|
|
|
|
|
|
|
|
|
|
| |
encoding of probabilities. In the absense of metadata, it continues to
fall back on static heuristics.
This allows __builtin_expect, after lowering through llvm.expect
a branch instruction's metadata, to actually enter the branch
probability model. This is one component of resolving PR2577.
llvm-svn: 142492
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
layer already had support for printing the results of this analysis, but
the wiring was missing.
Now that printing the analysis works, actually bring some of this
analysis, and the BranchProbabilityInfo analysis that it wraps, under
test! I'm planning on fixing some bugs and doing other work here, so
having a nice place to add regression tests and a way to observe the
results is really useful.
llvm-svn: 142491
|
|
|
|
| |
llvm-svn: 142295
|
|
|
|
|
|
|
| |
Some code want to check that *any* call within a function has the 'returns
twice' attribute, not just that the current function has one.
llvm-svn: 142221
|
|
|
|
|
|
|
| |
obsolete. Check the attribute instead.
<rdar://problem/8031714>
llvm-svn: 142212
|
|
|
|
|
|
|
| |
directly manipulates the weights inside of the BranchProbabilityInfo
that is passed in.
llvm-svn: 142163
|
|
|
|
|
|
|
|
|
| |
Just because we're dealing with a GEP doesn't mean we can assert the
SCEV has a pointer type. The fix is simply to ignore the SCEV pointer
type, which we really didn't need.
Fixes PR11138 webkit crash.
llvm-svn: 142058
|
|
|
|
|
|
|
|
| |
could be arguments, for example.
No testcase because this is a bug-fix broken out of a larger optimization patch.
llvm-svn: 141951
|
|
|
|
|
|
|
|
| |
dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.
Patch by Xiaoyi Guo.
llvm-svn: 141896
|
|
|
|
|
|
|
| |
Speculatively reapply to see if this test case still crashes on
linux. I may have fixed it in my last checkin.
llvm-svn: 141895
|
|
|
|
|
|
| |
Self-review easily caught this obvious bug.
llvm-svn: 141880
|
|
|
|
|
|
| |
deeper issue was exposed.
llvm-svn: 141873
|
|
|
|
|
|
|
|
| |
This avoids unnecessary expansion of expressions and allows the SCEV
expander to work on expression DAGs, not just trees.
Fixes PR11090.
llvm-svn: 141870
|
|
|
|
|
|
|
|
| |
just expression trees.
Partially fixes PR11090. Test case will be with the full fix.
llvm-svn: 141868
|
|
|
|
| |
llvm-svn: 141867
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.
This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.
Part of rdar://10246360
llvm-svn: 141729
|
|
|
|
|
|
|
|
|
|
|
| |
IVs.
Indvars previously chose randomly between congruent IVs. Now it will
bias the decision toward IVs that SCEVExpander likes to create. This
was not done to fix any problem, it's just a welcome side effect of
factoring code.
llvm-svn: 141633
|
|
|
|
| |
llvm-svn: 141470
|
|
|
|
|
|
| |
Fixes rdar://problem/5064068
llvm-svn: 141442
|
|
|
|
|
|
| |
with this patch.
llvm-svn: 141333
|
|
|
|
| |
llvm-svn: 141219
|
|
|
|
| |
llvm-svn: 141188
|
|
|
|
| |
llvm-svn: 141168
|
|
|
|
|
|
|
|
| |
I noticed during self-review that my previous checkin disabled some
analysis. Even with the reenabled analysis the test case runs in about
5ms. Without the fix, it will take several minutes at least.
llvm-svn: 141164
|
|
|
|
|
|
|
|
|
|
| |
EvaluateExpression.
Note to compiler writers: never recurse on multiple instruction
operands without memoization.
Fixes rdar://10187945. Was taking 45s, now taking 5ms.
llvm-svn: 141161
|
|
|
|
| |
llvm-svn: 141066
|
|
|
|
|
|
| |
logic by David Meyer revealed this bug.
llvm-svn: 140992
|
|
|
|
| |
llvm-svn: 140980
|
|
|
|
| |
llvm-svn: 140979
|
|
|
|
|
|
|
|
|
|
| |
We want heuristics to be based on accurate data, but more importantly
we don't want llvm to behave randomly. A benign trunc inserted by an
upstream pass should not cause a wild swings in optimization
level. See PR11034. It's a general problem with threshold-based
heuristics, but we can make it less bad.
llvm-svn: 140919
|
|
|
|
| |
llvm-svn: 140916
|
|
|
|
|
|
|
| |
Handle general Add expressions to avoid leaving around redundant
32-bit IVs.
llvm-svn: 140701
|
|
|
|
|
|
| |
implementation correctly while checking nocapture calls.
llvm-svn: 140666
|
|
|
|
|
|
|
|
| |
to be uniqued, without any benefit.
If someone prefers %tmp42 to %42, run instnamer.
llvm-svn: 140634
|
|
|
|
|
|
| |
alias-analysis tests to the new atomic instructions.
llvm-svn: 140557
|
|
|
|
|
|
| |
uninitialized in this function.
llvm-svn: 140281
|
|
|
|
| |
llvm-svn: 139751
|
|
|
|
| |
llvm-svn: 139530
|
|
|
|
|
|
| |
using DIBuilder.
llvm-svn: 139515
|
|
|
|
|
|
|
|
|
|
| |
such.
I'm doing this now for completeness because I can't think of/remember
any reason that it was left out. I'm not sure it will help anything,
but if we don't do it we need to explain why in comments.
llvm-svn: 139450
|
|
|
|
| |
llvm-svn: 139277
|
|
|
|
|
|
| |
variable differences so that it actually does something sane. Fixes PR10881.
llvm-svn: 139276
|