summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a possibility to switch between CFI directives- and table-based frame ↵Anton Korobeynikov2011-01-148-18/+32
| | | | | | description emission. Currently all the backends use table-based stuff. llvm-svn: 123476
* CleanupAnton Korobeynikov2011-01-141-6/+1
| | | | llvm-svn: 123475
* Add CFI directives-based frame information emission. Not hooked yet.Anton Korobeynikov2011-01-144-1/+210
| | | | llvm-svn: 123474
* Split stuff as a preparation for CFI directives-based frame information emissionAnton Korobeynikov2011-01-144-356/+440
| | | | llvm-svn: 123473
* Use common style for .cfi directivesAnton Korobeynikov2011-01-141-7/+7
| | | | llvm-svn: 123472
* Converted to use Makefile.rules.Johnny Chen2011-01-141-122/+3
| | | | llvm-svn: 123471
* Teach PackExpansionExpr to keep track of the number of pack expansionsDouglas Gregor2011-01-1410-21/+86
| | | | | | it will expand to, if known. Propagate this information throughout Sema. llvm-svn: 123470
* Add makefile debugging rule for printing out the value of a variable.Johnny Chen2011-01-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | From http://blog.melski.net/tag/debugging-makefiles/. Example: [13:14:59] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CC CC=gcc origin = file flavor = recursive value = gcc [13:15:09] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-LD LD= g++ origin = file flavor = recursive value = $(call cxx_linker,$(CC)) [13:15:21] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CXX CXX= g++ origin = file flavor = recursive value = $(call cxx_compiler,$(CC)) [13:15:29] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ llvm-svn: 123469
* Support for precise scheduling of the instruction selection DAG,Andrew Trick2011-01-141-537/+663
| | | | | | | | | | | | | | | | | | | | | | | | | disabled in this checkin. Sorry for the large diffs due to refactoring. New functionality is all guarded by EnableSchedCycles. Scheduling the isel DAG is inherently imprecise, but we give it a best effort: - Added MayReduceRegPressure to allow stalled nodes in the queue only if there is a regpressure need. - Added BUHasStall to allow checking for either dependence stalls due to latency or resource stalls due to pipeline hazards. - Added BUCompareLatency to encapsulate and standardize the heuristics for minimizing stall cycles (vs. reducing register pressure). - Modified the bottom-up heuristic (now in BUCompareLatency) to prioritize nodes by their depth rather than height. As long as it doesn't stall, height is irrelevant. Depth represents the critical path to the DAG root. - Added hybrid_ls_rr_sort::isReady to filter stalled nodes before adding them to the available queue. Related Cleanup: most of the register reduction routines do not need to be templates. llvm-svn: 123468
* Recent modifications to the Python script interpreter caused some problemsCaroline Tice2011-01-142-7/+88
| | | | | | | | | | | | when handling one-liner commands that contain escaped characters. In order to deal with the new namespace/dictionary stuff, the command was being embedded within a second string, which messed up the escaping. This fixes the problem by handling one-liners in a different manner, so they no longer need to be embedded within another string, and can still be processed in the proper namespace/dictionary context. llvm-svn: 123467
* Extend the ObjectFile interface to support dynamic loading on ELF platforms.Stephen Wilson2011-01-141-0/+27
| | | | | | | | | | | | | | | | | Debuggers on ELF platforms hook into the runtime linker by monitoring a special "rendezvous" embedded in the address space of the inferior process. The exact location of this structure is filled in by the runtime linker and can be resolved by locating the DT_DEBUG entry in the processes .dynamic section. The new GetImageInfoAddress() method (morally equivalent to Process::GetImageInfoAddress) provides the mechanism to locate this information. GetEntryPoint() simply returns the address of the start symbol in the executable if present. It is useful to the dynamic loader plugin for ELF systems as this is the earliest point where LLDB can break and probe the inferiors .dynamic section and rendezvous structure. Also, this address can be used in the computation of the virtual base address for position independent executables. llvm-svn: 123466
* Do not prematurely invalidate thread handle.Stephen Wilson2011-01-141-1/+0
| | | | | | | Setting m_private_state_thread to an invalid value when the child thread exits results in a race condition between calls to ThreadCancel and ThreadJoin. llvm-svn: 123465
* Do not prefix log messages with ProcessMacOSX from the context of Process.Stephen Wilson2011-01-141-1/+1
| | | | llvm-svn: 123464
* Added comments.Johnny Chen2011-01-141-0/+3
| | | | llvm-svn: 123463
* Properly propagate #pragma diagnostic mappings from PCH but not command-line ↵Argyrios Kyrtzidis2011-01-1410-37/+121
| | | | | | | | warning flags. Addresses rdar://8435969&8852495 llvm-svn: 123462
* Make CC defaults to gcc. The cxx_compiler and cxx_linker functions rely on ↵Johnny Chen2011-01-141-1/+8
| | | | | | | | substituting "g++" for "gcc". llvm-svn: 123461
* Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'Ted Kremenek2011-01-1412-32/+32
| | | | llvm-svn: 123460
* Rename 'EnterStackFrame()' to 'enterStackFrame()'.Ted Kremenek2011-01-146-10/+10
| | | | llvm-svn: 123459
* Teach RegionStore::EnterStackFrame() to handleTed Kremenek2011-01-142-7/+20
| | | | | | | | | | | the case where the called function has fewer formal arguments than actual arguments. This fixes a crash in the analyzer when doing function call inlining. Patch by Zhenbo Xu! llvm-svn: 123458
* switch SRoA to use LoadAndStorePromoter instead of its own copy of the code.Chris Lattner2011-01-141-136/+26
| | | | llvm-svn: 123457
* Add a new LoadAndStorePromoter class, which implements the generalChris Lattner2011-01-142-0/+186
| | | | | | | "promote a bunch of load and stores" logic, allowing the code to be shared and reused. llvm-svn: 123456
* Removed printf statements in code.Greg Clayton2011-01-141-3/+3
| | | | llvm-svn: 123455
* Add an expression command:Johnny Chen2011-01-142-1/+3
| | | | | | | | expression (int)[nil_mutable_array count] within NSArray_expr() function and expect a return of 0. llvm-svn: 123454
* OperandTraits<>::Layout isn't used for anything. Remove it.Jay Foad2011-01-142-14/+0
| | | | llvm-svn: 123452
* The cxx_compiler function should not blindly return clang++ as the C++ ↵Johnny Chen2011-01-141-4/+7
| | | | | | | | | | | | compiler if $(CC) contains "clang". Instead, it should perform a textual replacement of $(CC) from "clang" to "clang++". The same is true for "llvm-gcc" to "llvm-g++" and for "gcc" to "g++". This way, we keep the path component of the $(CC) passed in from the user and do not end up with a mixed toolchains with different paths. Ditto for a newly added function called cxx_linker. llvm-svn: 123451
* When we're instantiating a direct variable initializer that has a packDouglas Gregor2011-01-142-6/+15
| | | | | | | | expansion in it, we may end up instantiating to an empty expression-list. In this case, the variable is uninitialized; tweak the instantiation logic to handle this case. Fixes PR8977. llvm-svn: 123449
* Keep track of the number of expansions to be produced from a type packDouglas Gregor2011-01-1416-66/+153
| | | | | | | | | | | | | | | | | | | | | | | expansion, when it is known due to the substitution of an out parameter pack. This allows us to properly handle substitution into pack expansions that involve multiple parameter packs at different template parameter levels, even when this substitution happens one level at a time (as with partial specializations of member class templates and the signatures of member function templates). Note that the diagnostic we provide when there is an arity mismatch between an outer parameter pack and an inner parameter pack in this case isn't as clear as the normal diagnostic for an arity mismatch. However, this doesn't matter because these cases are very, very rare and (even then) only typically occur in a SFINAE context. The other kinds of pack expansions (expression, template, etc.) still need to support optional tracking of the number of expansions, and we need the moral equivalent of SubstTemplateTypeParmPackType for substituted argument packs of template template and non-type template parameters. llvm-svn: 123448
* Update llvm-gcc's tests.Rafael Espindola2011-01-146-10/+10
| | | | llvm-svn: 123447
* Reorder macros on config.h.cmake to easily compare it againstOscar Fuentes2011-01-141-54/+77
| | | | | | | | config.h.in. Patch by arrowdodger! llvm-svn: 123445
* Disable debug mode.Devang Patel2011-01-141-2/+2
| | | | llvm-svn: 123443
* Turn X-(X-Y) into Y. According to my auto-simplifier this is the most commonDuncan Sands2011-01-142-1/+23
| | | | | | | | | simplification present in fully optimized code (I think instcombine fails to transform some of these when "X-Y" has more than one use). Fires here and there all over the test-suite, for example it eliminates 8 subtractions in the final IR for 445.gobmk, 2 subs in 447.dealII, 2 in paq8p etc. llvm-svn: 123442
* Factorize common code out of the InstructionSimplify shift logic. Add inDuncan Sands2011-01-142-62/+47
| | | | | | | | | | | threading of shifts over selects and phis while there. This fires here and there in the testsuite, to not much effect. For example when compiling spirit it fires 5 times, during early-cse, resulting in 6 more cse simplifications, and 3 more terminators being folded by jump threading, but the final bitcode doesn't change in any interesting way: other optimizations would have caught the opportunity anyway, only later. llvm-svn: 123441
* Rename this test.Duncan Sands2011-01-141-0/+0
| | | | llvm-svn: 123440
* Support the zero-initialization of VLAs when that really means a zeroJohn McCall2011-01-141-8/+20
| | | | | | | bit-pattern. Continue punting on zero-initializing VLAs with a nonzero pattern. llvm-svn: 123439
* When simplifying a cleanup's entry by merging it into a single predecessor,John McCall2011-01-141-0/+4
| | | | | | | | replace all uses of the entry with the predecessor. There are no cleanups relying on this right now, but if we ever want a cleanup with a phi inside it, this will be important. llvm-svn: 123438
* switch the second scalarrepl pass to use SSAUpdater. We run two scalarrepl ↵Chris Lattner2011-01-141-1/+2
| | | | | | | | | | | | | | | | | | | passes: one early in the cleanup code and one late interlaced with the inliner. The second one is important because inlining and other scalar optzns can unpin allocas, allowing them to be split up and promoted. While important for performance, this is also relatively rare, and we would previously force a (non-lazy) computation of DomFrontiers, which happened even if nothing became unpinned. With this patch, the first pass of scalarrepl still promotes the vast bulk of allocas in programs, but hte second pass has changed to use SSAUpdater, which is more "sparse" and lazy. This speeds up opt -O3 time on kimwitu++ (a c++ app) by about 1%. The numbers are interesting: the first pass promotes ~17500 allocas. The second pass promotes about 1600. For non-C++ codes, the compile time win should be greater, because the second pass of scalarrepl does less. llvm-svn: 123437
* split SROA into two passes: one that uses DomFrontiers (-scalarrepl) Chris Lattner2011-01-144-29/+61
| | | | | | and one that uses SSAUpdater (-scalarrepl-ssa) llvm-svn: 123436
* Remove casts between Value** and Constant**, which won't work if aJay Foad2011-01-146-33/+82
| | | | | | | static_cast from Constant* to Value* has to adjust the "this" pointer. This is groundwork for PR889. llvm-svn: 123435
* Implement full support for promoting allocas to registers using SSAUpdaterChris Lattner2011-01-141-5/+162
| | | | | | | | | | | instead of DomTree/DomFrontier. This may be interesting for reducing compile time. This is currently disabled, but seems to work just fine. When this is enabled, we eliminate two runs of dominator frontier, one in the "early per-function" optimizations and one in the "interlaced with inliner" function passes. llvm-svn: 123434
* relax testcase a bit.Chris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123433
* Try for the third time to teach getFirstTerminator() about debug values.Jakob Stoklund Olesen2011-01-142-4/+11
| | | | | | This time let's rephrase to trick gcc-4.3 into not miscompiling. llvm-svn: 123432
* revert my fastisel patch again which apparently still gives theChris Lattner2011-01-142-18/+1
| | | | | | llvm-gcc-i386-linux-selfhost buildbot heartburn... llvm-svn: 123431
* temporarily xfail, this was broken by r123418 Chris Lattner2011-01-141-0/+1
| | | | llvm-svn: 123430
* Fix a few warnings stemming from my inability to properly fill outDouglas Gregor2011-01-142-0/+33
| | | | | | switch() statements. llvm-svn: 123429
* Fixed an error in the type map for "char **" that was a bad memory smasher.Greg Clayton2011-01-148-60/+192
| | | | | | | | | | | | | | | | | | | | | | | | | Anytime we had a valid python list that was trying to go from Python down into our C++ API, it was allocating too little memory and it ended up smashing whatever was next to the allocated memory. Added typemap conversions for "void *, size_t" so we can get SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t" so we can get SBProcess::WriteMemory() to work. Fixed an issue in the DWARF parser where we weren't correctly calculating the DeclContext for all types and classes. We now should be a lot more accurate. Fixes include: enums should now be setting their parent decl context correctly. We saw a lot of examples where enums in classes were not being properly namespace scoped. Also, classes within classes now get properly scoped. Fixed the objective C runtime pointer checkers to let "nil" pointers through since these are accepted by compiled code. We also now don't call "abort()" when a pointer doesn't validate correctly since this was wreaking havoc on the process due to the way abort() works. We now just dereference memory which should give us an exception from which we can easily and reliably recover. llvm-svn: 123428
* reapply r123414 now that the botz are calmed down and the fix is already in.Chris Lattner2011-01-142-1/+18
| | | | llvm-svn: 123427
* indentationChris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123426
* Start implementing support for substitution into pack expansions thatDouglas Gregor2011-01-1418-5/+254
| | | | | | | | | | | | | | | | | involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. llvm-svn: 123425
* Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.Evan Cheng2011-01-148-44/+221
| | | | | | | | - Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first. - Added support for Thumb2 :lower16: and :upper16: fix up. - Added :upper16: and :lower16: relocation support to mach-o object writer. llvm-svn: 123424
* Revert r123419. It still breaks llvm-gcc-i386-linux-selfhost.Jakob Stoklund Olesen2011-01-142-24/+7
| | | | llvm-svn: 123423
OpenPOWER on IntegriCloud