summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Completely re-write the algorithm behind MachineBlockPlacement based onChandler Carruth2011-10-232-401/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reduce dependencies.Benjamin Kramer2011-10-231-3/+2
| | | | llvm-svn: 142742
* Add X86 RORX instructionCraig Topper2011-10-239-14/+109
| | | | llvm-svn: 142741
* The element insertion code in scalar replacement doesn't handle incorrectCameron Zwarich2011-10-232-2/+23
| | | | | | | 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
* [analyzer] Remove LocationContext creation methods from AnalysisManager, and ↵Ted Kremenek2011-10-239-75/+130
| | | | | | | | change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. llvm-svn: 142739
* Add X86 MULX instruction for disassembler.Craig Topper2011-10-233-0/+48
| | | | llvm-svn: 142738
* Remove some duplicate specifying of neverHasSideEffects and mayLoad from X86 ↵Craig Topper2011-10-221-5/+5
| | | | | | multiply instructions. llvm-svn: 142737
* Oops! Fix test I forgot to submit as part of r142735.Nick Lewycky2011-10-221-2/+2
| | | | llvm-svn: 142736
* A non-escaping malloc in the entry block is not unlike an alloca. Do dead-storeNick Lewycky2011-10-222-2/+33
| | | | | | elimination on them too. llvm-svn: 142735
* Fix a typo that completely broke the expansion of complex arguments.Bob Wilson2011-10-221-1/+1
| | | | llvm-svn: 142734
* Refactor vector constant expression evaluation to return bool like all the otherRichard Smith2011-10-221-47/+56
| | | | | | | const expression evaluation subclasses, and remove some APValue copying and malloc traffic in the process. llvm-svn: 142733
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-2216-121/+233
| | | | llvm-svn: 142732
* Make SCEV's brute force analysis stronger in two ways. Firstly, we should beNick Lewycky2011-10-222-26/+178
| | | | | | | | | | | | | | | | 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
* Remove obsolete debugging macro, make helper static.Benjamin Kramer2011-10-221-7/+5
| | | | llvm-svn: 142730
* Fix a typo.wNadav Rotem2011-10-221-1/+1
| | | | llvm-svn: 142729
* Minor updates.Jim Grosbach2011-10-221-0/+2
| | | | llvm-svn: 142728
* Added my name to CREDITS.TXTNadav Rotem2011-10-221-0/+4
| | | | llvm-svn: 142727
* Move various generated tables into read-only memory, fixing up const ↵Benjamin Kramer2011-10-226-34/+40
| | | | | | correctness along the way. llvm-svn: 142726
* Pack struct better.Benjamin Kramer2011-10-224-4/+4
| | | | llvm-svn: 142725
* Fix pr11193.Nadav Rotem2011-10-222-3/+15
| | | | | | | 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
* test/Driver/debug.c: Mark this as "REQUIRES: shell".NAKAMURA Takumi2011-10-221-1/+2
| | | | | | | | | | | | | 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
* lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add ↵NAKAMURA Takumi2011-10-221-1/+1
| | | | | | -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts. llvm-svn: 142720
* Bumped versions for lldb-81 and debugserver-146.Greg Clayton2011-10-223-22/+22
| | | | llvm-svn: 142718
* Added template support when parsing DWARF into types. We can now use STLGreg Clayton2011-10-227-31/+404
| | | | | | classes in the expression parser. llvm-svn: 142717
* Only emit implicit constant conversion truncation warnings in reachable ↵Ted Kremenek2011-10-223-3/+84
| | | | | | code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. llvm-svn: 142716
* Document nexti, show some shorter versions of long lldbJason Molenda2011-10-221-664/+667
| | | | | | commands. llvm-svn: 142715
* Refactor ThreadSafety to use PostOrderCFGView instead of its own copy (of ↵Ted Kremenek2011-10-222-83/+15
| | | | | | TopologicallySortedCFG). llvm-svn: 142714
* Pull TopologicallySortedCFG out of LiveVariables into its own analysis: ↵Ted Kremenek2011-10-224-105/+157
| | | | | | PostOrderCFGView. llvm-svn: 142713
* Made the expression parser handle persistent variablesSean Callanan2011-10-221-2/+4
| | | | | | correctly even after the process has quit. llvm-svn: 142712
* Fixes a minor hick up to my last patch.Fariborz Jahanian2011-10-222-3/+7
| | | | llvm-svn: 142711
* Add "display" and "undisplay" aliases for target stop-hook add/delete.Jason Molenda2011-10-221-1/+37
| | | | | | | | 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
* objc: private methods can have their attributes, no diagnostic is required.Fariborz Jahanian2011-10-223-9/+35
| | | | | | | None private methods if their implementation have attribute, they must exactly match those in their declarations. // rdar://10271563 llvm-svn: 142709
* Add bench.py as a driver script to run some benchmarks on lldb.Johnny Chen2011-10-225-5/+196
| | | | | | | | | | | | | | | 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
* Add "stepi" as an alias for thread step-inst in addition to "si".Jason Molenda2011-10-221-0/+10
| | | | | | Add "nexti" an "ni" as aliases for thread step-inst-over. llvm-svn: 142707
* The different flavors of ARM have different valid subsets of registers. CheckBill Wendling2011-10-221-3/+13
| | | | | | | 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
* Make changes necessary for N32/64 ABI conformance.Akira Hatanaka2011-10-221-9/+25
| | | | | | | - 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
* Assembly parsing for 4-register sequential variant of VLD2.Jim Grosbach2011-10-214-42/+24
| | | | llvm-svn: 142704
* XFAIL test on WindowsDouglas Gregor2011-10-211-0/+2
| | | | llvm-svn: 142703
* Enabled dedicated debugger support in Clang, meaningSean Callanan2011-10-211-1/+1
| | | | | | | that Objective-C methods returning types incompatible with "id" can be properly cast. llvm-svn: 142702
* More speculative test tweakingDouglas Gregor2011-10-211-4/+1
| | | | llvm-svn: 142701
* Fix PR11073 by adding the argument type information to the decl we constructEric Christopher2011-10-213-4/+20
| | | | | | | | for the function type. Update a testcase accordingly. Patch initially by Anders Waldenborg! llvm-svn: 142700
* Switch tests from grep to FileCheckDouglas Gregor2011-10-212-5/+10
| | | | llvm-svn: 142699
* Fixed a missing quote.Greg Clayton2011-10-211-1/+1
| | | | llvm-svn: 142698
* Add tests for CodeGen types in MS ABI. Based on patch by r4start.Eli Friedman2011-10-211-1/+19
| | | | llvm-svn: 142697
* [PCH] When serializing Stmts, keep track of when sub statements are ↵Argyrios Kyrtzidis2011-10-216-5/+113
| | | | | | | | | | | | referenced again and in such a case just write out a reference of a previously serialized Stmt, instead of serializing it all over again. This saves memory + space + [de]serializing time, and avoids blowing up memory with pathological cases. rdar://10293911 llvm-svn: 142696
* Don't try to set the "array filler" in a InitListExpr twice.Argyrios Kyrtzidis2011-10-213-2/+8
| | | | llvm-svn: 142695
* More ASTRecordLayout changes for MS ABI; based on patch by r4start.Eli Friedman2011-10-214-47/+86
| | | | llvm-svn: 142694
* c++: support gcc's application of weak attribute onFariborz Jahanian2011-10-214-0/+57
| | | | | | | | | | | | | class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp llvm-svn: 142693
* Doug reports that this test is still failing. Try applying Benjamin Kramer'sNick Lewycky2011-10-211-2/+1
| | | | | | suggestion! llvm-svn: 142692
* Assembly parsing for 2-register sequential variant of VLD2.Jim Grosbach2011-10-216-37/+54
| | | | llvm-svn: 142691
OpenPOWER on IntegriCloud