aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* No need for |=Andrew Lenharth2008-10-071-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57249 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ADDC if it is valid at any smaller size. Do it right this timeAndrew Lenharth2008-10-071-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57248 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ADDC if it is valid at any smaller size. fixes ↵Andrew Lenharth2008-10-071-3/+18
| | | | | | test/Codegen/Generic/i128-addsub.ll on x86 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57247 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand arith on machines without carry flagsAndrew Lenharth2008-10-071-9/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57243 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle calls with no return values. This fixesDan Gohman2008-10-071-1/+1
| | | | | | | 2006-01-23-UnionInit on x86-64 when inlining is not enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57223 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't dereference the end() iterator. Thanks toDan Gohman2008-10-061-1/+1
| | | | | | | ENABLE_EXPENSIVE_CHECKS for finding this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57181 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unncessary isDeclaration() checks.Devang Patel2008-10-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57179 91177308-0d34-0410-b5e6-96231b3b80d8
* reorder #include order, patch by Kenneth Boyd!Chris Lattner2008-10-061-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57148 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #include to get alloca, patch by Kenneth Boyd!Chris Lattner2008-10-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57147 91177308-0d34-0410-b5e6-96231b3b80d8
* wrap some long lines and expand i32 mul's to libcalls, inspired by aChris Lattner2008-10-041-4/+12
| | | | | | | patch by Mikael Lepisto! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57077 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Reflected changes on source file structure. New plugin supportOscar Fuentes2008-10-041-0/+2
| | | | | | | for llvmc2 incomplete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57076 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compilation error on MSVC.Argyrios Kyrtzidis2008-10-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57046 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix fast-isel's handling of atomic instructions. They mayDan Gohman2008-10-041-1/+4
| | | | | | | | | expand to multiple basic blocks, in which case fast-isel needs to informed of which block to use as it resumes inserting instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57040 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the local allocator's liveness computation where itDan Gohman2008-10-041-3/+5
| | | | | | | | | was setting kill flags on tied uses in two-address instructions. The kill flags were causing the allocator to think it could allocate the use and its tied def in different registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57039 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass MemOperand through for 64-bit atomics on 32-bit,Dale Johannesen2008-10-031-5/+18
| | | | | | | | | incidentally making the case where the memop is a pointer deref work. Fix cmp-and-swap regression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57027 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -1ULL instead of uint64_t(-1), at Anton's suggestion.Dan Gohman2008-10-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57021 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos pointed out by Duncan. Also untabify these files.Evan Cheng2008-10-033-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57018 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-0324-132/+132
| | | | | | | isReg, etc., from isRegister, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
* The result of getSetCCResultType (eg: i32) may be largerDuncan Sands2008-10-031-4/+8
| | | | | | | | | | than the type an i1 is promoted to (eg: i8). Account for this. Noticed by Tilmann Scheller on CellSPU; he will hopefully take care of fixing this in LegalizeDAG and adding a testcase! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56997 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement fast-isel support for zero-extending from i1.Dan Gohman2008-10-031-1/+12
| | | | | | | | It turns out that this is a fairly common operation, and it's easy enough to handle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56990 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize conditional branches in X86FastISel. This replacesDan Gohman2008-10-021-10/+18
| | | | | | | | | | | | sequences like this: sete %al testb %al, %al jne LBB11_1 with this: je LBB11_1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56969 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new MachineBasicBlock utility function, isLayoutSuccessor, thatDan Gohman2008-10-021-0/+5
| | | | | | | | can be used when deciding if a block can transfer control to another via a fall-through instead of a branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56968 91177308-0d34-0410-b5e6-96231b3b80d8
* fix build gcc 4.3Andrew Lenharth2008-10-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56965 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a multimap rather than a map for holding the list of copies to insert, ↵Owen Anderson2008-10-021-12/+19
| | | | | | | | | | | so we don't lose copies when two of them have the same source. I don't know what I was thinking when I wrote this originally. Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism guarantees need to be present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56964 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle some 64-bit atomics on x86-32, some of the time.Dale Johannesen2008-10-021-11/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56963 91177308-0d34-0410-b5e6-96231b3b80d8
* A Partitioned Boolean Quadratic Programming (PBQP) based register allocator.Evan Cheng2008-10-023-0/+2208
| | | | | | | Contributed by Lang Hames. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56959 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a think-o in isSafeToMove. This fixes it from thinking thatDan Gohman2008-10-021-1/+1
| | | | | | | volatile memory references are safe to move. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56948 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove OptimizeForSize global. Use function attribute optsize.Devang Patel2008-10-012-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56937 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable FastISel by default (on x86 and x86-64) with the -fast option.Dan Gohman2008-10-011-4/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56930 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some implicit conversions explicit, to avoid compiler warnings.Dan Gohman2008-10-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56927 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold trivial two-operand tokenfactors where the operands are equalDan Gohman2008-10-011-0/+1
| | | | | | | immediately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56921 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in comments.Dan Gohman2008-10-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56919 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the -fno-builtin option in the front-end, not in the back-end.Bill Wendling2008-10-011-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56900 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark merged-in VNInfo's as being PHIKilled.Owen Anderson2008-09-301-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56893 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a simple error in renumbering kill markaers, that took an inordinant ↵Owen Anderson2008-09-301-1/+1
| | | | | | amount of time to track down. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56889 91177308-0d34-0410-b5e6-96231b3b80d8
* - Initialize "--no-builtin" to "false".Bill Wendling2008-09-301-1/+1
| | | | | | | - Testcase for r56885. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56886 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the new `-no-builtin' flag. This flag is meant to mimic the GCCBill Wendling2008-09-301-1/+7
| | | | | | | | | | `-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero" instead of "__bzero" on Darwin10+. This arguably violates the meaning of this flag, but is currently sufficient. The meaning of this flag should become more specific over time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56885 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the primary fast-isel top-level comments to FastISel.cpp, whereDan Gohman2008-09-301-0/+28
| | | | | | | they'll be a little more visible. Also, update and reword them a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56877 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize SelectionDAG's AssignTopologicalOrder even further.Dan Gohman2008-09-302-31/+66
| | | | | | | | | | | | | | | | | | | | Completely eliminate the TopOrder std::vector. Instead, sort the AllNodes list in place. This also eliminates the need to call AllNodes.size(), a linear-time operation, before performing the sort. Also, eliminate the Sources temporary std::vector, since it essentially duplicates the sorted result as it is being built. This also changes the direction of the topological sort from bottom-up to top-down. The AllNodes list starts out in roughly top-down order, so this reduces the amount of reordering needed. Top-down is also more convenient for Legalize, and ISel needed only minor adjustments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56867 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 56835 along with header file changes.Evan Cheng2008-09-303-8/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56848 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commit 56835 since it breaks the build.Duncan Sands2008-09-303-20/+8
| | | | | | | | | | | "If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56837 91177308-0d34-0410-b5e6-96231b3b80d8
* If a re-materializable instruction has a register operand, the spiller will ↵Evan Cheng2008-09-303-8/+20
| | | | | | change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove misuse of ReplaceNodeResults for atomics withDale Johannesen2008-09-291-3/+0
| | | | | | | | valid types. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56808 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FastISel to not initialize the PIC-base register multiple timesDan Gohman2008-09-291-60/+65
| | | | | | | in functions with PIC references from more than one basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56807 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily reverting r56683. This is causing a failure during the build of ↵Bill Wendling2008-09-261-4/+1
| | | | | | | | | | | | | | | | | | llvm-gcc: /Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311. ../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. {standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" {standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression {standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb" ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56703 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConstantSDNode's getSignExtended to getSExtValue, forDan Gohman2008-09-262-10/+10
| | | | | | | | consistancy with ConstantInt, and re-implement it in terms of ConstantInt's getSExtValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56700 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix @llvm.frameaddress codegen. FP elimination optimization should be ↵Evan Cheng2008-09-261-1/+4
| | | | | | disabled when frame address is desired. Also add support for depth > 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56683 91177308-0d34-0410-b5e6-96231b3b80d8
* Add "inreg" field to CallSDNode (doesn't increaseDale Johannesen2008-09-265-17/+24
| | | | | | | | | | | its size). Adjust various lowering functions to pass this info through from CallInst. Use it to implement sseregparm returns on X86. Remove X86_ssecall calling convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to insert copies for implicit_def's.Owen Anderson2008-09-261-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56674 91177308-0d34-0410-b5e6-96231b3b80d8
* If we have a function with an unreachable statement such that the ending debugBill Wendling2008-09-261-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information is in an unreachable block, then it's possible that the high/low pc values won't be set for the dwarf information. E.g., this function: void abort(void) __attribute__((__noreturn__)); void dead_beef(void) __attribute__ ((noreturn)); int *b; void dead_beef(void) { *b=0xdeadbeef; abort(); } has a call to "@llvm.dbg.region.end" only in the unreachable block: define void @dead_beef() noreturn nounwind { entry: call void @llvm.dbg.func.start(...) call void @llvm.dbg.stoppoint(...) ... call void @abort( ) noreturn nounwind unreachable return: ; No predecessors! call void @llvm.dbg.stoppoint(...) call void @llvm.dbg.region.end(...) ret void } The dwarf information emitted is something like: 0x00000084: TAG_subprogram [5] AT_name( "dead_beef" ) AT_external( 0x01 ) AT_prototyped( 0x01 ) AT_decl_file( 0x01 ) AT_decl_line( 0x08 ) Note that this is *not* the best fix for this problem, but a band-aid for an gaping wound. This code needs to be changed when we revamp our debugging information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56628 91177308-0d34-0410-b5e6-96231b3b80d8