summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Fastcc passes arguments in EAX and EDX, make sure the JIT doesn't clobber themChris Lattner2005-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22137 91177308-0d34-0410-b5e6-96231b3b80d8
* Tailcalls require stubs to be emitted. Otherwise, the compilation callbackChris Lattner2005-05-19
| | | | | | | doesn't know who 'called' it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22136 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap long linesMisha Brukman2005-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22125 91177308-0d34-0410-b5e6-96231b3b80d8
* teach the inliner about coldcc and noreturn functionsChris Lattner2005-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22113 91177308-0d34-0410-b5e6-96231b3b80d8
* comment the hpux bitDuraid Madina2005-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22081 91177308-0d34-0410-b5e6-96231b3b80d8
* HP-UX system headers make a mess of isinf(), so much so that gcc fixincludesDuraid Madina2005-05-16
| | | | | | | can't patch it up for c++ (works in C though) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22079 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't look for __builtin_ffs, we'll never see it from llvm-gcc and there'sReid Spencer2005-05-15
| | | | | | | not reason to include it for other front ends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22070 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide this optimization as well:Reid Spencer2005-05-15
| | | | | | | ffs(x) -> (x == 0 ? 0 : 1+llvm.cttz(x)) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22068 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC "branch and link" instructions are branches in the PPC sense, but notChris Lattner2005-05-15
| | | | | | | | in the LLVM code generator sense (they are calls). Don't mark them as such, which fixes the regressions on the ppc tester last night git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22065 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix andrews changes to fit in 80 columnsChris Lattner2005-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22064 91177308-0d34-0410-b5e6-96231b3b80d8
* Duh .. you actually have to #include Config/config.h before you can testReid Spencer2005-05-15
| | | | | | | for one of the values that it defines! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22058 91177308-0d34-0410-b5e6-96231b3b80d8
* Some cleanups for compilation with GCC 4.0.0 to remove warnings:Reid Spencer2005-05-15
| | | | | | | | * Use C++ style casts, not C style casts * Abstract base classes should have virtual destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
* make angry compilers happy againDuraid Madina2005-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22054 91177308-0d34-0410-b5e6-96231b3b80d8
* aCC and STLport complained about this, because they're like thatDuraid Madina2005-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22053 91177308-0d34-0410-b5e6-96231b3b80d8
* don't reserve space for tailcall arg areas. It explicitly managed.Chris Lattner2005-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22050 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach reginfo how to deal with ADJSTACKPTRri, allowing us to generate:Chris Lattner2005-05-15
| | | | | | | | | | | | | add %ESP, 20 jmp %EDX # TAIL CALL instead of: add %ESP, -8 add %ESP, 28 jmp %EDX # TAIL CALL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22047 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement proper tail calls in the X86 backend for all fastcc->fastccChris Lattner2005-05-15
| | | | | | | tail calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22046 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some simplifications for MULH[SU]. This allows us to compile this:Chris Lattner2005-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | long %bar(long %X) { %Y = mul long %X, 4294967297 ret long %Y } to this: l1_bar: mov %EAX, DWORD PTR [%ESP + 4] mov %EDX, %EAX add %EDX, DWORD PTR [%ESP + 8] ret instead of: l1_bar: mov %ECX, DWORD PTR [%ESP + 4] mov %EDX, 1 mov %EAX, %ECX mul %EDX add %EDX, %ECX add %EDX, DWORD PTR [%ESP + 8] mov %EAX, %ECX ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22044 91177308-0d34-0410-b5e6-96231b3b80d8
* Add markers in the asm file for tail calls, add a new ADJSTACKPTRriChris Lattner2005-05-15
| | | | | | | sorta-pseudo-instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22042 91177308-0d34-0410-b5e6-96231b3b80d8
* When inserting callee-save register reloads, make sure to skip over anyChris Lattner2005-05-15
| | | | | | | | terminator instructions before the 'ret' in case the target has a multi-instruction return sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22041 91177308-0d34-0410-b5e6-96231b3b80d8
* Yes, calltarget is the operand of the day.Chris Lattner2005-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22040 91177308-0d34-0410-b5e6-96231b3b80d8
* When emitting the function epilog, check to see if there already a stackChris Lattner2005-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adjustment. If so, we merge the adjustment into the existing one. This allows us to generate: caller2: sub %ESP, 12 mov DWORD PTR [%ESP], 0 mov %EAX, 1234567890 mov %EDX, 0 call func2 add %ESP, 8 ret 4 intead of: caller2: sub %ESP, 12 mov DWORD PTR [%ESP], 0 mov %EAX, 1234567890 mov %EDX, 0 call func2 sub %ESP, 4 add %ESP, 12 ret 4 for X86/fast-cc-merge-stack-adj.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22038 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some new instructionsChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22036 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes for ffs lib call simplification:Reid Spencer2005-05-14
| | | | | | | | | * Check for availability of ffsll call in configure script * Support ffs, ffsl, and ffsll conversion to constant value if the argument is constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22027 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llxChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22026 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve calling conv when hacking on callsChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22025 91177308-0d34-0410-b5e6-96231b3b80d8
* preserve calling conventions when hacking on codeChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22024 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to preserve the calling convention when changing an invoke intoChris Lattner2005-05-14
| | | | | | | | a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib on X86 with -enable-x86-fastcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22023 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass i64 values correctly split in reg/mem to fastcc calls.Chris Lattner2005-05-14
| | | | | | | This fixes fourinarow with -enable-x86-fastcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22022 91177308-0d34-0410-b5e6-96231b3b80d8
* Use target-specific nodes for calls. This allows the fastcc code to not haveChris Lattner2005-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to do ugly hackery to avoid emitting code like this: call foo mov vreg, EAX adjcallstackup ... If foo is a fastcc call and if vreg gets spilled, we might end up with this: call foo mov [ESP+offset], EAX ;; Offset doesn't consider the 12! sub ESP, 12 Which is bad. The previous hacky code to deal with this was A) gross B) not good enough. In particular, it could miss cases and emit the bad code above. Now we always emit this: call foo adjcallstackup ... mov vreg, EAX directly. This makes fastcc with callees poping the stack work much better. Next stop (finally!) really is tail calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22021 91177308-0d34-0410-b5e6-96231b3b80d8
* allow token chain at start or end of nodeChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22020 91177308-0d34-0410-b5e6-96231b3b80d8
* remove special case hacks for readport/readio from the binary operatorChris Lattner2005-05-14
| | | | | | | codepath git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22019 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement fixme's by memoizing nodes.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22018 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn this into a wrapper for a simpler version of getNode.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22016 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate special purpose hacks for dynamic_stack_alloc.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22015 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the general mechanism for creating multi-value nodes instead of usingChris Lattner2005-05-14
| | | | | | | special case hacks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22014 91177308-0d34-0410-b5e6-96231b3b80d8
* use a target-specific node and custom expander to lower long->FP to FILD64m.Chris Lattner2005-05-14
| | | | | | | | This should fix some missing symbols problems on BSD and improve performance of programs that use that operation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22012 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap long line, actually add node to the graph.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22011 91177308-0d34-0410-b5e6-96231b3b80d8
* legalize target-specific operationsChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22010 91177308-0d34-0410-b5e6-96231b3b80d8
* add a getNode() version that allows construction of any node type.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22009 91177308-0d34-0410-b5e6-96231b3b80d8
* LowerOperation takes a dagChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22004 91177308-0d34-0410-b5e6-96231b3b80d8
* Print the symbolic register name in a register allocator debug dump.Chris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22002 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to have a custom int64->fp expander if desiredChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22001 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the start of the arg area and the end (after the RA is pushed)Chris Lattner2005-05-13
| | | | | | | is always 8-byte aligned for fastcc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21995 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the assertionChris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21994 91177308-0d34-0410-b5e6-96231b3b80d8
* Align doubles on 8-byte boundaries if possible.Chris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21993 91177308-0d34-0410-b5e6-96231b3b80d8
* print stack object alignment in -print-machineinstr dumpsChris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21992 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21991 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the problems with callee popped argument listsChris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21988 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit SAR X, 0 in the case of sdiv Y, 2Chris Lattner2005-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21986 91177308-0d34-0410-b5e6-96231b3b80d8