aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Write the section table and the section data in the same order thatRafael Espindola2011-03-2032-346/+462
| | | | | | | gun as does. This makes it a lot easier to compare the output of both as the addresses are now a lot closer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127972 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if ↵Anders Carlsson2011-03-202-0/+132
| | | | | | the function passed is empty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127970 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid initializing posix_spawn_file_actions_t if not used.Benjamin Kramer2011-03-201-7/+11
| | | | | | | - glibc falls back to fork+exec if a file actions object is present. - On BSDs this saves a malloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127969 91177308-0d34-0410-b5e6-96231b3b80d8
* If a class inherits from RefCountedBaseVPTR allow all its subclasses to be ↵Argyrios Kyrtzidis2011-03-203-4/+4
| | | | | | used with IntrusiveRefCntPtr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127966 91177308-0d34-0410-b5e6-96231b3b80d8
* Also eliminate redundant spills downstream of inserted reloads.Jakob Stoklund Olesen2011-03-201-9/+17
| | | | | | | This can happen when multiple sibling registers are spilled after live range splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127965 91177308-0d34-0410-b5e6-96231b3b80d8
* Change an argument to a LiveInterval instead of a register number to save ↵Jakob Stoklund Olesen2011-03-201-13/+13
| | | | | | some redundant lookups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127964 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable test in a way that keeps lit happy.Daniel Dunbar2011-03-201-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127962 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace a broken LiveInterval::MergeValueInAsValue() with something simpler.Jakob Stoklund Olesen2011-03-191-46/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127960 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debug output.Jakob Stoklund Olesen2011-03-192-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127959 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm-config.in configuration more MSYS-friendly.Oscar Fuentes2011-03-191-9/+10
| | | | | | | Some of those POSIX <-> Windows command line conversions ended on failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127958 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: store TARGET_TRIPLE on llvm-config.in.Oscar Fuentes2011-03-191-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127957 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake library dependencies.Oscar Fuentes2011-03-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127956 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r127953, "SimplifyCFG has stopped duplicating returns into predecessorsDaniel Dunbar2011-03-197-197/+4
| | | | | | to canonicalize IR", it broke a lot of things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127954 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyCFG has stopped duplicating returns into predecessors to canonicalize IREvan Cheng2011-03-197-4/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to have single return block (at least getting there) for optimizations. This is general goodness but it would prevent some tailcall optimizations. One specific case is code like this: int f1(void); int f2(void); int f3(void); int f4(void); int f5(void); int f6(void); int foo(int x) { switch(x) { case 1: return f1(); case 2: return f2(); case 3: return f3(); case 4: return f4(); case 5: return f5(); case 6: return f6(); } } => LBB0_2: ## %sw.bb callq _f1 popq %rbp ret LBB0_3: ## %sw.bb1 callq _f2 popq %rbp ret LBB0_4: ## %sw.bb3 callq _f3 popq %rbp ret This patch teaches codegenprep to duplicate returns when the return value is a phi and where the phi operands are produced by tail calls followed by an unconditional branch: sw.bb7: ; preds = %entry %call8 = tail call i32 @f5() nounwind br label %return sw.bb9: ; preds = %entry %call10 = tail call i32 @f6() nounwind br label %return return: %retval.0 = phi i32 [ %call10, %sw.bb9 ], [ %call8, %sw.bb7 ], ... [ 0, %entry ] ret i32 %retval.0 This allows codegen to generate better code like this: LBB0_2: ## %sw.bb jmp _f1 ## TAILCALL LBB0_3: ## %sw.bb1 jmp _f2 ## TAILCALL LBB0_4: ## %sw.bb3 jmp _f3 ## TAILCALL rdar://9147433 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127953 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code re-structuring.Evan Cheng2011-03-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127952 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for legalizing UINT_TO_FP of vectors on platforms which doNadav Rotem2011-03-193-1/+60
| | | | | | | | | | not have native support for this operation (such as X86). The legalized code uses two vector INT_TO_FP operations and is faster than scalarizing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127951 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Passes.html, part 3: alphabetize descriptions.Eli Friedman2011-03-191-102/+99
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127948 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Passes.html, part 2: cleanup a bit more dead docs, a few moreEli Friedman2011-03-191-70/+8
| | | | | | | | description updates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127947 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Passes.html, part 1: remove passes which were removed from the tree,Eli Friedman2011-03-191-144/+35
| | | | | | | | | update short descriptions to match those from the options, alphabetize table of contents. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127946 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable test to unbreak Linux. Radar 9156771.Stuart Hastings2011-03-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127945 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>Stuart Hastings2011-03-194-9/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127944 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 127939. <rdar://problem/9012638>Stuart Hastings2011-03-194-13/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127943 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for r127940.Devang Patel2011-03-191-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127941 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise r126127 to address Daniel's comments. <rdar://problem/9012638>Stuart Hastings2011-03-194-9/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127939 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed an assert by the ARM disassembler for LDRD_PRE/POST.Johnny Chen2011-03-192-3/+7
| | | | | | | | | The relevant instruction table entries were changed sometime ago to no longer take <Rt2> as an operand. Modify ARMDisassemblerCore.cpp to accomodate the change and add a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127935 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContextCleanup to provide an easy method for clients to ↵Ted Kremenek2011-03-192-6/+23
| | | | | | select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127929 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContext::GetCurrent() to return quickly if ↵Ted Kremenek2011-03-191-0/+3
| | | | | | | | 'gCrsahRecoveryEnabled' is false. This avoids us needing to go to thread local storage for the performance sensitive case where we are compiling code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127928 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheckize a test.Andrew Trick2011-03-191-7/+16
| | | | | | | (one-by-one until valgrind is happy) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127925 91177308-0d34-0410-b5e6-96231b3b80d8
* If an AllocaInst referred by DbgDeclareInst is used by a LoadInst then the ↵Devang Patel2011-03-182-0/+30
| | | | | | LoadInst should also get a corresponding llvm.dbg.value intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127924 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Devang Patel2011-03-181-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127923 91177308-0d34-0410-b5e6-96231b3b80d8
* Consider debug info intrinsics pointing to null value as dead instructions.Devang Patel2011-03-181-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127922 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a warning.Jim Grosbach2011-03-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127918 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the ARM asm parser for the register-shifted-register forms of ↵Owen Anderson2011-03-183-26/+96
| | | | | | basic instructions like ADD. More work left to be done to support other instances of shifter ops in the ISA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127917 91177308-0d34-0410-b5e6-96231b3b80d8
* Beginnings of MC-JIT code generation.Jim Grosbach2011-03-185-6/+77
| | | | | | | | | | | | | Proof-of-concept code that code-gens a module to an in-memory MachO object. This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld for similarly conceptual work for that part) which will take the compiled object and link it together with the rest of the system, providing back to the JIT a table of available symbols which will be used to respond to the getPointerTo*() queries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127916 91177308-0d34-0410-b5e6-96231b3b80d8
* Match a few more obvious patterns to revsh. rdar://9147637.Evan Cheng2011-03-183-4/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127913 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend live debug values down the dominator tree by following copies.Jakob Stoklund Olesen2011-03-181-24/+136
| | | | | | | | | | | | | | | | | The llvm.dbg.value intrinsic refers to SSA values, not virtual registers, so we should be able to extend the range of a value by tracking that value through register copies. This greatly improves the debug value tracking for function arguments that for some reason are copied to a second virtual register at the end of the entry block. We only extend the debug value range where its register is killed. All original llvm.dbg.value locations are still respected. Copies from physical registers are ignored. That should not be a problem since the entry block already adds DBG_VALUE instructions for the virtual registers holding the function arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127912 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r127852; it's apparently causing an ICE on mingw.Eli Friedman2011-03-183-103/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127909 91177308-0d34-0410-b5e6-96231b3b80d8
* Use lazy parsing in LTO. Unfortunately this is only a 3% time saving forRafael Espindola2011-03-182-8/+27
| | | | | | 'ar'. Have to figure out how to make libLTO even lazier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127901 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean whitespace.Owen Anderson2011-03-181-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127900 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce code duplication.Owen Anderson2011-03-181-31/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127899 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix various codegen issuesJustin Holewinski2011-03-187-50/+124
| | | | | | | | - Emit mad instead of mad.rn for shader model 1.0 - Emit explicit mov.u32 instructions for reading global variables - (most PTX instructions cannot take global variable immediates) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127895 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm-rtdyld support for loading 32-bit code.Jim Grosbach2011-03-181-66/+158
| | | | | | | | Factor out the 64-bit specific bits into a helper function and add an equivalent that loads the 32-bit sections. This allows using llvm-rtdyld on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127892 91177308-0d34-0410-b5e6-96231b3b80d8
* setExecutable() should default to success if there's nothing custom for it.Jim Grosbach2011-03-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127891 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2 PC-relative loads require a fixup rather than just an immediate.Owen Anderson2011-03-182-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127888 91177308-0d34-0410-b5e6-96231b3b80d8
* Update list of link components for llvm-rtdyld.Oscar Fuentes2011-03-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127887 91177308-0d34-0410-b5e6-96231b3b80d8
* Naming conventional tidy up.Jim Grosbach2011-03-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127886 91177308-0d34-0410-b5e6-96231b3b80d8
* MachO file loader and execution utility.Jim Grosbach2011-03-185-3/+264
| | | | | | | | | | | | | Add a bone-simple utility to load a MachO object into memory, look for a function (main) in it, and run that function directly. This will be used as a test and development platform for MC-JIT work regarding symbol resolution, dynamic lookup, etc.. Code by Daniel Dunbar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127885 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating canonical induction variables for non-native types.Andrew Trick2011-03-1820-19/+30
| | | | | | | | | For example, on 32-bit architecture, don't promote all uses of the IV to 64-bits just because one use is a 64-bit cast. Alternate implementation of the patch by Arnaud de Grandmaison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127884 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up.Jim Grosbach2011-03-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127883 91177308-0d34-0410-b5e6-96231b3b80d8
* Support explicit argument forms for the X86 string instructions.Joerg Sonnenberger2011-03-183-1/+371
| | | | | | | For now, only the default segments are supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127875 91177308-0d34-0410-b5e6-96231b3b80d8