Dan Gohman
e2ff95e327
Delete the top-down "Latency" scheduler. Top-down scheduling doesn't handle
...
physreg dependencies, and upcoming codegen changes will require proper
physreg dependence handling.
llvm-svn: 142816
2011-10-24 18:01:06 +00:00
Dan Gohman
d78fc160cc
Delete the Latency scheduling preference.
...
llvm-svn: 142815
2011-10-24 17:56:48 +00:00
Peter Collingbourne
ccbcce0219
Simplify parsing ellipsis in Parser::ParseAlignArgument, spotted by Doug.
...
llvm-svn: 142814
2011-10-24 17:56:00 +00:00
Dan Gohman
4ed1afa51d
Change this overloaded use of Sched::Latency to be an overloaded
...
use of Sched::ILP instead, as Sched::Latency is going away.
llvm-svn: 142813
2011-10-24 17:55:11 +00:00
Richard Smith
2790870de0
Constant expression evaluation: factor out VarDecl initializer evaluation and
...
caching.
llvm-svn: 142812
2011-10-24 17:54:18 +00:00
Dan Gohman
2c9bda1512
Remove the explicit request for "Latency" scheduling from MSP430,
...
as the Latency scheduler is going away.
llvm-svn: 142811
2011-10-24 17:53:16 +00:00
Dan Gohman
c32af340fc
Change the default scheduler from Latency to ILP, since Latency
...
is going away.
llvm-svn: 142810
2011-10-24 17:45:02 +00:00
Fariborz Jahanian
28f5fb9843
Minor refactoring of my last patch. Per Doug's suggestion.
...
llvm-svn: 142807
2011-10-24 17:30:45 +00:00
Jim Grosbach
3adec13c3e
Update test for r142801.
...
llvm-svn: 142806
2011-10-24 17:26:26 +00:00
Argyrios Kyrtzidis
067cbfa299
[libclang] Make sure we don't try to erase past the StoredDiagnostics vector.
...
Ted came upon the bug but I couldn't make a test out of it.
llvm-svn: 142805
2011-10-24 17:25:20 +00:00
Benjamin Kramer
d48d52e7b2
XFAIL test on leak checkers.
...
llvm-svn: 142804
2011-10-24 17:24:05 +00:00
Benjamin Kramer
1e93c6a809
Fix mismatched new[]/delete[].
...
llvm-svn: 142803
2011-10-24 17:22:36 +00:00
Enrico Granata
47c6f6d43d
Decoupling of lock-related code from the core of ScriptInterpreterPython. All that concerns locking the Python interpreter is now delegated to the internal ScriptInterpreterPython::Locker class. Several changes in ScriptInterpreterPython to accommodate this new pattern.
...
llvm-svn: 142802
2011-10-24 17:22:21 +00:00
Jim Grosbach
1b5e49a35a
Thumb2 LDM instructions can target PC. Make sure to encode it.
...
PR11220
llvm-svn: 142801
2011-10-24 17:16:24 +00:00
Bill Wendling
38f86c505c
Cleanup. Get rid of the old SjLj EH lowering code. No functionality change.
...
llvm-svn: 142800
2011-10-24 17:12:36 +00:00
Chandler Carruth
30b63c6430
Sink an otherwise unused variable's initializer into the asserts that
...
used it. Fixes an unused variable warning from GCC on release builds.
llvm-svn: 142799
2011-10-24 16:51:55 +00:00
Douglas Gregor
2b4907e73a
Have -fms-no-extensions turn off -fms-compatibility
...
llvm-svn: 142798
2011-10-24 15:49:38 +00:00
Douglas Gregor
9885f6153f
Make -fms-compatibility imply -fms-extensions. Fixes PR11204.
...
llvm-svn: 142797
2011-10-24 15:27:23 +00:00
David Chisnall
d5bcd07e5d
Remove debugging printfs that some idiot left in.
...
llvm-svn: 142796
2011-10-24 14:11:46 +00:00
David Chisnall
8c93cf2a27
Enable experimental support for objc_msgSend with GNUstep ObjC runtime.
...
llvm-svn: 142795
2011-10-24 14:07:03 +00:00
Benjamin Kramer
812da49172
Implement comparison operators for BranchProbability in a way that can't overflow INT64_MAX.
...
Add a test case for the edge case that triggers this. Thanks to Chandler for bringing this to my attention.
llvm-svn: 142794
2011-10-24 13:50:56 +00:00
Chandler Carruth
7111f4564c
Remove return heuristics from the static branch probabilities, and
...
introduce no-return or unreachable heuristics.
The return heuristics from the Ball and Larus paper don't work well in
practice as they pessimize early return paths. The only good hitrate
return heuristics are those for:
- NULL return
- Constant return
- negative integer return
Only the last of these three can possibly require significant code for
the returning block, and even the last is fairly rare and usually also
a constant. As a consequence, even for the cold return paths, there is
little code on that return path, and so little code density to be gained
by sinking it. The places where sinking these blocks is valuable (inner
loops) will already be weighted appropriately as the edge is a loop-exit
branch.
All of this aside, early returns are nearly as common as all three of
these return categories, and should actually be predicted as taken!
Rather than muddy the waters of the static predictions, just remain
silent on returns and let the CFG itself dictate any layout or other
issues.
However, the return heuristic was flagging one very important case:
unreachable. Unfortunately it still gave a 1/4 chance of the
branch-to-unreachable occuring. It also didn't do a rigorous job of
finding those blocks which post-dominate an unreachable block.
This patch builds a more powerful analysis that should flag all branches
to blocks known to then reach unreachable. It also has better worst-case
runtime complexity by not looping through successors for each block. The
previous code would perform an N^2 walk in the event of a single entry
block branching to N successors with a switch where each successor falls
through to the next and they finally fall through to a return.
Test case added for noreturn heuristics. Also doxygen comments improved
along the way.
llvm-svn: 142793
2011-10-24 12:01:08 +00:00
NAKAMURA Takumi
d1175cf79a
Revert "Test commit"
...
llvm-svn: 142792
2011-10-24 10:03:25 +00:00
NAKAMURA Takumi
6ff417a18a
Test commit
...
llvm-svn: 142791
2011-10-24 10:02:59 +00:00
Nick Lewycky
9be7f277e4
Reapply r142781 with fix. Original message:
...
Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
llvm-svn: 142790
2011-10-24 06:57:05 +00:00
Chandler Carruth
f5394bcf5e
Doxygen-ify the comments on the public interface for BPI. Also, move the
...
two more subtle routines to the bottom and expand on their cautionary
comments a bit. No functionality or actual interface change here.
llvm-svn: 142789
2011-10-24 05:55:58 +00:00
Nick Lewycky
8e904dee82
PHI nodes not in the loop header aren't part of the loop iteration initial
...
state. Furthermore, they might not have two operands. This fixes the underlying
issue behind the crashes introduced in r142781.
llvm-svn: 142788
2011-10-24 05:51:01 +00:00
Nick Lewycky
dd1d3df524
A dead malloc, a free(NULL) and a free(undef) are all trivially dead
...
instructions.
This doesn't introduce any optimizations we weren't doing before (except
potentially due to pass ordering issues), now passes will eliminate them sooner
as part of their own cleanups.
llvm-svn: 142787
2011-10-24 04:35:36 +00:00
Nick Lewycky
9d28c26d77
Speculatively revert r142781. Bots are showing
...
Assertion `i_nocapture < OperandTraits<PHINode>::operands(this) && "getOperand() out of range!"' failed.
coming out of indvars.
llvm-svn: 142786
2011-10-24 04:00:25 +00:00
NAKAMURA Takumi
66c9e4ffd5
Windows/Path.inc: [PR8460] Get rid of ScopedNullTerminator. Thanks to Zvi Rackover!
...
llvm-svn: 142785
2011-10-24 03:27:19 +00:00
Chandler Carruth
6f2e6522d9
Actually rename the file AnalysisContext.cpp -> AnalysisDeclContext.cpp
...
to match the CMakeLists.txt change in r142782; this should fix the CMake
build.
llvm-svn: 142784
2011-10-24 01:47:37 +00:00
Chandler Carruth
7a0094a673
Simplify the design of BranchProbabilityInfo by collapsing it into
...
a single class. Previously it was split between two classes, one
internal and one external. The concern seemed to center around exposing
the weights used, but those can remain confined to the implementation
file.
Having a single class to maintain the state and analyses in use will
also simplify several of the enhancements I want to make to our static
heuristics.
llvm-svn: 142783
2011-10-24 01:40:45 +00:00
Ted Kremenek
81ce1c8a99
Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses.
...
llvm-svn: 142782
2011-10-24 01:32:45 +00:00
Nick Lewycky
1700007ecc
Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the
...
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
llvm-svn: 142781
2011-10-23 23:43:14 +00:00
Chandler Carruth
24cee10fb1
Tidy up a loop to be more idiomatic for LLVM's codebase, and remove some
...
extraneous whitespace. Trying to clean-up this pass as much as I can
before I start making functional changes.
llvm-svn: 142780
2011-10-23 22:40:13 +00:00
Craig Topper
b05d9e9bea
Add X86 SARX, SHRX, and SHLX instructions.
...
llvm-svn: 142779
2011-10-23 22:18:24 +00:00
Chandler Carruth
1c8ace0e89
Teach the BranchProbabilityInfo pass to print its results, and use that
...
to bring it under direct test instead of merely indirectly testing it in
the BlockFrequencyInfo pass.
The next step is to start adding tests for the various heuristics
employed, and to start fixing those heuristics once they're under test.
llvm-svn: 142778
2011-10-23 21:21:50 +00:00
Tobias Grosser
3638ef8fe1
PoCC: Fix bugs when executing PoCC
...
These are remainders of the switch to the newer isl version. At the point of
switching I did not test with PoCC support. I should have done. ;-)
llvm-svn: 142777
2011-10-23 20:59:49 +00:00
Tobias Grosser
7bf5999868
Remove pollycc
...
The recommanded and supported way to use Polly is to load it into clang.
Documentation for this is available on the website under
http://polly.grosser.es/example_load_Polly_into_clang.html
llvm-svn: 142776
2011-10-23 20:59:47 +00:00
Tobias Grosser
967239c029
Only have a single option to disable tiling for both isl and Pocc optimzer
...
This also documents the new option on the website.
llvm-svn: 142775
2011-10-23 20:59:44 +00:00
Tobias Grosser
67707b7131
Enable prevectorization with -enable-polly-vector.
...
This removes the separate prevector options for the Pluto and isl scheduler.
llvm-svn: 142774
2011-10-23 20:59:40 +00:00
Tobias Grosser
d5e80c5f9c
Add an option to run the PoCC optimizer
...
llvm-svn: 142773
2011-10-23 20:59:35 +00:00
Tobias Grosser
12dcc646d5
Allow to disable the schedule optimizer
...
The option -polly-no-optimizer disables the scheduling optimizer.
llvm-svn: 142772
2011-10-23 20:59:32 +00:00
Tobias Grosser
22636bf498
Rename -enable-schedule-prevector to -polly-prevector
...
llvm-svn: 142771
2011-10-23 20:59:29 +00:00
Tobias Grosser
353a2684bc
ScheduleOptimizer: Allow to disable tiling
...
llvm-svn: 142770
2011-10-23 20:59:26 +00:00
Tobias Grosser
70c31f9411
ScopLib: Fix memory issues
...
llvm-svn: 142769
2011-10-23 20:59:24 +00:00
Tobias Grosser
048c87943c
ScopInfo: Remove unneeded code
...
llvm-svn: 142768
2011-10-23 20:59:20 +00:00
Tobias Grosser
318955b516
Fix compilation of Polly with scoplib support
...
llvm-svn: 142767
2011-10-23 20:59:17 +00:00
Tobias Grosser
76a42df06e
Rename -enable-polly-viewer to -polly-run-viewer
...
Similar changes for polly-only-viewer, polly-printer and polly-only-printer.
llvm-svn: 142766
2011-10-23 20:59:14 +00:00
Tobias Grosser
f50dbc44ba
RegisterPasses: Allow to disable code generation.
...
llvm-svn: 142765
2011-10-23 20:59:11 +00:00