- Oct 23, 2011
-
-
Chandler Carruth authored
discussions with Andy. Fundamentally, the previous algorithm is both counter productive on several fronts and prioritizing things which aren't necessarily the most important: static branch prediction. The new algorithm uses the existing loop CFG structure information to walk through the CFG itself to layout blocks. It coalesces adjacent blocks within the loop where the CFG allows based on the most likely path taken. Finally, it topologically orders the block chains that have been formed. This allows it to choose a (mostly) topologically valid ordering which still priorizes fallthrough within the structural constraints. As a final twist in the algorithm, it does violate the CFG when it discovers a "hot" edge, that is an edge that is more than 4x hotter than the competing edges in the CFG. These are forcibly merged into a fallthrough chain. Future transformations that need te be added are rotation of loop exit conditions to be fallthrough, and better isolation of cold block chains. I'm also planning on adding statistics to model how well the algorithm does at laying out blocks based on the probabilities it receives. The old tests mostly still pass, and I have some new tests to add, but the nested loops are still behaving very strangely. This almost seems like working-as-intended as it rotated the exit branch to be fallthrough, but I'm not convinced this is actually the best layout. It is well supported by the probabilities for loops we currently get, but those are pretty broken for nested loops, so this may change later. llvm-svn: 142743
-
Benjamin Kramer authored
llvm-svn: 142742
-
Craig Topper authored
llvm-svn: 142741
-
Cameron Zwarich authored
element types, even though the element extraction code does. It is surprising that this bug has been here for so long. Fixes <rdar://problem/10318778>. llvm-svn: 142740
-
Ted Kremenek authored
[analyzer] Remove LocationContext creation methods from AnalysisManager, and change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. llvm-svn: 142739
-
Craig Topper authored
llvm-svn: 142738
-
Craig Topper authored
llvm-svn: 142737
-
Nick Lewycky authored
llvm-svn: 142736
-
- Oct 22, 2011
-
-
Nick Lewycky authored
elimination on them too. llvm-svn: 142735
-
Bob Wilson authored
llvm-svn: 142734
-
Richard Smith authored
const expression evaluation subclasses, and remove some APValue copying and malloc traffic in the process. llvm-svn: 142733
-
Howard Hinnant authored
llvm-svn: 142732
-
Nick Lewycky authored
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
-
Benjamin Kramer authored
llvm-svn: 142730
-
Nadav Rotem authored
llvm-svn: 142729
-
Jim Grosbach authored
llvm-svn: 142728
-
Nadav Rotem authored
llvm-svn: 142727
-
Benjamin Kramer authored
llvm-svn: 142726
-
Benjamin Kramer authored
llvm-svn: 142725
-
Nadav Rotem authored
SHL inserts zeros from the right, thus even when the original sign_extend_inreg value was of 1-bit, we need to sra. llvm-svn: 142724
-
NAKAMURA Takumi authored
Former RUN line does not make sense on Win32 hosts. Win32 hosts would not be expected to set appropriate $PWD. Latter RUN line might be made valid if PathV2::is_absolute("/foo") would be true. Unfortunately, "/foo" should not be treated as absolute path on Win32. FYI, on mingw32 with MSYS bash (it has 'shell' feature); Former) $PWD is set as "X:/hogehoge/test/Driver" Latter) PWD=/foo sets "X:/root/to/msys/foo" to $PWD. llvm-svn: 142721
-
NAKAMURA Takumi authored
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. llvm-svn: 142720
-
Greg Clayton authored
llvm-svn: 142718
-
Greg Clayton authored
classes in the expression parser. llvm-svn: 142717
-
Ted Kremenek authored
Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. llvm-svn: 142716
-
Jason Molenda authored
commands. llvm-svn: 142715
-
Ted Kremenek authored
llvm-svn: 142714
-
Ted Kremenek authored
llvm-svn: 142713
-
Sean Callanan authored
correctly even after the process has quit. llvm-svn: 142712
-
Fariborz Jahanian authored
llvm-svn: 142711
-
Jason Molenda authored
A patina of gdb's "display" command, intended mostly for simply monitoring a variable as you step through source code. Formatters do not work, e.g. display/x $pc does not work. llvm-svn: 142710
-
Fariborz Jahanian authored
None private methods if their implementation have attribute, they must exactly match those in their declarations. // rdar://10271563 llvm-svn: 142709
-
Johnny Chen authored
Add benchmarks for expression evaluations (TestExpressionCmd.py) and disassembly (TestDoAttachThenDisassembly.py). An example: [17:45:55] johnny:/Volumes/data/lldb/svn/trunk/test $ ./bench.py 2>&1 | grep -P '^lldb.*benchmark:' lldb startup delay (create fresh target) benchmark: Avg: 0.104274 (Laps: 30, Total Elapsed Time: 3.128214) lldb startup delay (set first breakpoint) benchmark: Avg: 0.102216 (Laps: 30, Total Elapsed Time: 3.066470) lldb frame variable benchmark: Avg: 1.649162 (Laps: 20, Total Elapsed Time: 32.983245) lldb stepping benchmark: Avg: 0.104409 (Laps: 50, Total Elapsed Time: 5.220461) lldb expr cmd benchmark: Avg: 0.206774 (Laps: 25, Total Elapsed Time: 5.169350) lldb disassembly benchmark: Avg: 0.089086 (Laps: 10, Total Elapsed Time: 0.890859) llvm-svn: 142708
-
Jason Molenda authored
Add "nexti" an "ni" as aliases for thread step-inst-over. llvm-svn: 142707
-
Bill Wendling authored
that the set of callee-saved registers is correct for the specific platform. <rdar://problem/10313708> & ctor_dtor_count & ctor_dtor_count-2 llvm-svn: 142706
-
Akira Hatanaka authored
- Size of long double is 16 bytes for both N32 and N64. - Size of pointers and long is 8 bytes for N64. llvm-svn: 142705
-
Jim Grosbach authored
llvm-svn: 142704
-
Douglas Gregor authored
llvm-svn: 142703
-
Sean Callanan authored
that Objective-C methods returning types incompatible with "id" can be properly cast. llvm-svn: 142702
-
Douglas Gregor authored
llvm-svn: 142701
-