summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Update the description of MachineFrameInfo's OffsetAdjustment. The value ofBob Wilson2009-09-25
| | | | | | | | | | this adjustment does not change the direction or the signs of the object offsets, and the details of the offset calculations can be target-specific. Also mention that for most targets this value is only used to generate debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82750 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a version of dumpr() that has a SelectionDAG* argument.Dan Gohman2009-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82742 91177308-0d34-0410-b5e6-96231b3b80d8
* add and document regex support for FileCheck. You can now do stuff like:Chris Lattner2009-09-24
| | | | | | | | | | ; CHECK: movl {{%e[a-z][xi]}}, %eax or whatever. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the end-of-itinerary mark explicit. Some cleanup.David Goodwin2009-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82709 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy up, fix a memory leak in Regex::isValidChris Lattner2009-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82707 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade malloc instructions to malloc calls.Victor Hernandez2009-09-24
| | | | | | | | Reviewed by Devang Patel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up LiveVariables and change how it deals with partial updates and ↵Evan Cheng2009-09-24
| | | | | | kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82676 91177308-0d34-0410-b5e6-96231b3b80d8
* Spruce up some comments.Dan Gohman2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82655 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename several variables from EVT to more descriptive names, now that EVTDan Gohman2009-09-23
| | | | | | | | is also the name of their type, as declarations like "EVT EVT" look really odd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82654 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.Dan Gohman2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82653 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct a comment.Dan Gohman2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82648 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not leave behind metadata while cloning an instruction.Devang Patel2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82638 91177308-0d34-0410-b5e6-96231b3b80d8
* s/*Location/*DebugLocation/gDevang Patel2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82635 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the type traits for a const pointer defer to those for a unqualifiedJohn McCall2009-09-23
| | | | | | | | | pointer, instead of providing independent values modelled on the default implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82620 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5024. LiveVariables physical register defs should *commit* only after allEvan Cheng2009-09-23
| | | | | | | | | of the defs are processed. Also fix a implicit_def propagation bug: a implicit_def of a physical register should be applied to uses of the sub-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82616 91177308-0d34-0410-b5e6-96231b3b80d8
* Give MachineMemOperand an operator<<, factoring out code fromDan Gohman2009-09-23
| | | | | | | | | | | | | two different places for printing MachineMemOperands. Drop the virtual from Value::dump and instead give Value a protected virtual hook that can be overridden by subclasses to implement custom printing. This lets printing be more consistent, and simplifies printing of PseudoSourceValue values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82599 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SetLocation() to allow IRBuilder user to set location info for an ↵Devang Patel2009-09-22
| | | | | | instruction already created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82570 91177308-0d34-0410-b5e6-96231b3b80d8
* Check exisiting dbg MDKind first. Devang Patel2009-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82568 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Don't allow formatted_ostream to be unbuffered, even if its underlyingDaniel Dunbar2009-09-22
| | | | | | | | | buffer", while we work out a solution. Dan convinced me that making debugging annoying for him is worse than 10x being slower for me. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82553 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot this.Evan Cheng2009-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82536 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaksDaniel Dunbar2009-09-22
| | | | | | ExecuteAndWait. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82522 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch FoldingSet::AddString to StringRef based API.Daniel Dunbar2009-09-22
| | | | | | - This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82517 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work ↵Daniel Dunbar2009-09-22
| | | | | | with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82507 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a TrackingVH value handle.Daniel Dunbar2009-09-22
| | | | | | | | | | This is designed for tracking a value even when it might move (like WeakVH), but it is an error to delete the referenced value (unlike WeakVH0. TrackingVH is templated like AssertingVH on the tracked Value subclass, it is an error to RAUW a tracked value to an incompatible type. For implementation reasons the latter error is only diagnosed on accesses to a mis-RAUWed TrackingVH, because we don't want a virtual interface in a templated class. The former error is also only diagnosed on access, so that clients are allowed to delete a tracked value, as long as they don't use it. This makes it easier for the client to reason about destruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82506 91177308-0d34-0410-b5e6-96231b3b80d8
* move DominatorTree::dominates for instructions out of line,Chris Lattner2009-09-21
| | | | | | | no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82490 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineMemOperand's alignment value to be the alignment ofDan Gohman2009-09-21
| | | | | | | | the base pointer, without the offset. This matches MemSDNode's new alignment behavior, and holds more interesting information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82473 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2009-09-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82438 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow formatted_ostream to be unbuffered, even if its underlying bufferDaniel Dunbar2009-09-21
| | | | | | | | | | | | is. - The problem is that formatted_ostream forces its underlying buffer to be unbuffered, so if some client happens to wrap a formatted_ostream around something, but still use the underlying stream, then we can end up writing on a fully unbuffered output (which was never intended to be unbuffered). - This makes clang (and presumably llvm-gcc) -emit-llvm -S a mere 10x faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82434 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the JIT side of the GDB JIT debugging interface. To enable thisReid Kleckner2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature, either build the JIT in debug mode to enable it by default or pass -jit-emit-debug to lli. Right now, the only debug information that this communicates to GDB is call frame information, since it's already being generated to support exceptions in the JIT. Eventually, when DWARF generation isn't tied so tightly to AsmPrinter, it will be easy to push that information to GDB through this interface. Here's a step-by-step breakdown of how the feature works: - The JIT generates the machine code and DWARF call frame info (.eh_frame/.debug_frame) for a function into memory. - The JIT copies that info into an in-memory ELF file with a symbol for the function. - The JIT creates a code entry pointing to the ELF buffer and adds it to a linked list hanging off of a global descriptor at a special symbol that GDB knows about. - The JIT calls a function marked noinline that GDB knows about and has put an internal breakpoint in. - GDB catches the breakpoint and reads the global descriptor to look for new code. - When sees there is new code, it reads the ELF from the inferior's memory and adds it to itself as an object file. - The JIT continues, and the next time we stop the program, we are able to produce a proper backtrace. Consider running the following program through the JIT: #include <stdio.h> void baz(short z) { long w = z + 1; printf("%d, %x\n", w, *((int*)NULL)); // SEGFAULT here } void bar(short y) { int z = y + 1; baz(z); } void foo(char x) { short y = x + 1; bar(y); } int main(int argc, char** argv) { char x = 1; foo(x); } Here is a backtrace before this patch: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2aaaabdfbd10 (LWP 25476)] 0x00002aaaabe7d1a8 in ?? () (gdb) bt #0 0x00002aaaabe7d1a8 in ?? () #1 0x0000000000000003 in ?? () #2 0x0000000000000004 in ?? () #3 0x00032aaaabe7cfd0 in ?? () #4 0x00002aaaabe7d12c in ?? () #5 0x00022aaa00000003 in ?? () #6 0x00002aaaabe7d0aa in ?? () #7 0x01000002abe7cff0 in ?? () #8 0x00002aaaabe7d02c in ?? () #9 0x0100000000000001 in ?? () #10 0x00000000014388e0 in ?? () #11 0x00007fff00000001 in ?? () #12 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70, F=0x14024e0, ArgValues=@0x7fffffffe050) at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395 #13 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain (this=0x1405b70, Fn=0x14024e0, argv=@0x13f06f8, envp=0x7fffffffe3b0) at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377 #14 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe398, envp=0x7fffffffe3b0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208 And a backtrace after this patch: Program received signal SIGSEGV, Segmentation fault. 0x00002aaaabe7d1a8 in baz () (gdb) bt #0 0x00002aaaabe7d1a8 in baz () #1 0x00002aaaabe7d12c in bar () #2 0x00002aaaabe7d0aa in foo () #3 0x00002aaaabe7d02c in main () #4 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70, F=0x14024e0, ArgValues=...) at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395 #5 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain (this=0x1405b70, Fn=0x14024e0, argv=..., envp=0x7fffffffe3c0) at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377 #6 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe3a8, envp=0x7fffffffe3c0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82418 91177308-0d34-0410-b5e6-96231b3b80d8
* write rfind in terms of npos as daniel requestedChris Lattner2009-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82414 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a dead method.Chris Lattner2009-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82413 91177308-0d34-0410-b5e6-96231b3b80d8
* smallvectorize getExtraOptionNamesChris Lattner2009-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82377 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2009-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82376 91177308-0d34-0410-b5e6-96231b3b80d8
* A few more tabs -> spaces.Daniel Dunbar2009-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82358 91177308-0d34-0410-b5e6-96231b3b80d8
* move a couple non-trivial methods out of line, add new Chris Lattner2009-09-20
| | | | | | | find_first_of/find_first_of methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82347 91177308-0d34-0410-b5e6-96231b3b80d8
* convert a bunch more stuff to use StringRef. The ArgName arguments are nowChris Lattner2009-09-20
| | | | | | | | | | stringref because they may not be nul terminated. For options like -Lfoo this now avoids a O(n) temporary std::strings where N is the length of the string after -L. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82345 91177308-0d34-0410-b5e6-96231b3b80d8
* add size_t and a version of rfind that allows specification of whereChris Lattner2009-09-20
| | | | | | | to scan from. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82343 91177308-0d34-0410-b5e6-96231b3b80d8
* add some more overloads of StringRef::getAsInteger forChris Lattner2009-09-19
| | | | | | | common and useful integer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82338 91177308-0d34-0410-b5e6-96231b3b80d8
* add a simple c_str() method to SmallString.Chris Lattner2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82337 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefer super class constructor to explicit initialization.Daniel Dunbar2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82335 91177308-0d34-0410-b5e6-96231b3b80d8
* Tabs -> spaces (really?)Daniel Dunbar2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82334 91177308-0d34-0410-b5e6-96231b3b80d8
* Strip trailing whitespace.Daniel Dunbar2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82332 91177308-0d34-0410-b5e6-96231b3b80d8
* RHS of assignment should be const reference.Daniel Dunbar2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82331 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the default value for ConstantStruct::get's isPacked parameter andNick Lewycky2009-09-19
| | | | | | | update the code which was broken by this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82327 91177308-0d34-0410-b5e6-96231b3b80d8
* provide a "strtoull" operation that works on StringRef's.Chris Lattner2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82322 91177308-0d34-0410-b5e6-96231b3b80d8
* convert a bunch of std::strings to use StringRef. This should eliminateChris Lattner2009-09-19
| | | | | | | | a massive number of temporary strings created when parsing a command line. More still left to eliminate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82318 91177308-0d34-0410-b5e6-96231b3b80d8
* Lett users of sparse propagation do their own thing with phi nodes if they wantNick Lewycky2009-09-19
| | | | | | | | to. This can be combined with LCSSA or SSI form to store more information on a PHINode than can be computed by looking at its incoming values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82317 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments.Evan Cheng2009-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82313 91177308-0d34-0410-b5e6-96231b3b80d8
* remove an extraneous mem2reg pass early in the pipe. SinceChris Lattner2009-09-18
| | | | | | | | | this is run after the 'standard function passes', SRoA was recently run. This saves a domfrontier construction. Thanks to Eli for noticing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82291 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce indentation by using an early exit, and add a comment,Chris Lattner2009-09-18
| | | | | | | no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82290 91177308-0d34-0410-b5e6-96231b3b80d8