summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* For PC relative relocations where symbols are defined in the same section theyBruno Cardoso Lopes2009-07-202-39/+56
| | | | | | | are referenced, ignore the relocation entry and patch the relocatable field with the computed symbol offset directly llvm-svn: 76414
* implement a new magic global "llvm.compiler.used" which is like llvm.used, butChris Lattner2009-07-203-4/+5
| | | | | | doesn't cause ".no_dead_strip" to be emitted on darwin. llvm-svn: 76399
* use stripPointerCasts to simplify some code.Chris Lattner2009-07-201-6/+4
| | | | llvm-svn: 76397
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+3
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Fix http://llvm.org/bugs/show_bug.cgi?id=4583Jakob Stoklund Olesen2009-07-191-2/+6
| | | | | | | | Inline asm instructions may have additional <imp-def,kill> register operands. These operands are not marked with a flag like the normal asm operands, so we must not assert that there is a flag. llvm-svn: 76373
* Fix some minor MSVC compiler warnings.Daniel Dunbar2009-07-192-3/+3
| | | | llvm-svn: 76356
* Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI ↵Bruno Cardoso Lopes2009-07-183-29/+35
| | | | | | usage inside getSection* functions llvm-svn: 76347
* Use a better name for the label relocations while emitting them for Jump TablesBruno Cardoso Lopes2009-07-181-1/+1
| | | | llvm-svn: 76334
* Add support to properly reference private symbols on relocation entries.Bruno Cardoso Lopes2009-07-184-11/+49
| | | | | | | Use proper relocation type to build relocations for JumpTables (rodata sections). llvm-svn: 76326
* Catch more coalescing opportunities.Evan Cheng2009-07-181-4/+7
| | | | llvm-svn: 76282
* Enable cross register class coalescing.Evan Cheng2009-07-182-14/+56
| | | | llvm-svn: 76281
* Fix pr4552. Stack slot coloring with register must take care not to generate ↵Evan Cheng2009-07-171-0/+16
| | | | | | illegal ams. llvm-svn: 76258
* remove AsmPrinter::findGlobalValue, just use Value::stripPointerCasts instead.Chris Lattner2009-07-171-28/+3
| | | | llvm-svn: 76246
* Simplify some more.Evan Cheng2009-07-172-80/+5
| | | | llvm-svn: 76239
* Use more terse and precise linkage checks.Chris Lattner2009-07-171-15/+6
| | | | llvm-svn: 76237
* Eliminate yet another copy of getOpcode.Dan Gohman2009-07-171-17/+6
| | | | llvm-svn: 76236
* these two pieces of code are the same because we alwaysChris Lattner2009-07-171-12/+3
| | | | | | | emit the EHFrame label next to the section_eh_frame and eh_frame_common labels. llvm-svn: 76234
* Untangle a snarl that I discovered when updating the mangler,Chris Lattner2009-07-172-15/+9
| | | | | | | | | | | | | | starting in getCurrentFunctionEHName. Among other problems, we would try to privative a "foo.eh" label, but end up emitting the label as _Lfoo.eh instead of L_foo.eh on darwin. This is really bad, and the linker has always tolerated these labels existing. For now, just emit them as _foo.eh. This patch also fixes problems with ".eh" labels on unnamed functions and eliminates two strangely defined TargetAsmInfo hooks. llvm-svn: 76231
* fix include guard.Chris Lattner2009-07-171-2/+2
| | | | llvm-svn: 76228
* Simplify the coalescer (finally!) by making ↵Evan Cheng2009-07-173-159/+46
| | | | | | LiveIntervals::processImplicitDefs a little more aggressive and teaching liveintervals to make use of isUndef marker on MachineOperands. llvm-svn: 76223
* Add support for naked functionsAnton Korobeynikov2009-07-171-2/+5
| | | | llvm-svn: 76198
* revert one of the loops to use indicies over iterators because there are ↵Bruno Cardoso Lopes2009-07-171-4/+3
| | | | | | vector insertions inside the loop llvm-svn: 76195
* Make promotion in operation legalization for SETCC work correctly.Eli Friedman2009-07-171-23/+5
| | | | llvm-svn: 76153
* Fix my brain cramp by inverting the assertion condition.Evan Cheng2009-07-171-3/+1
| | | | llvm-svn: 76131
* Disable this assert for now, it is firing on an llvm-gcc bootstrap. :(Daniel Dunbar2009-07-161-0/+2
| | | | llvm-svn: 76123
* Assume an inline asm might be a call, so we getDale Johannesen2009-07-161-0/+4
| | | | | | | | | stack alignment right when it is. This is not ideal but conservatively correct. Adjust a test to compensate for changed stack offset value. gcc.apple/asm-block-57.c llvm-svn: 76120
* Emit line numbers in asm comments when available.David Greene2009-07-161-2/+15
| | | | llvm-svn: 76117
* Fix inverted preprocessor conditional.Daniel Dunbar2009-07-161-1/+1
| | | | llvm-svn: 76111
* Add line numbers to OProfile. To do this, I added a processDebugLoc()Jeffrey Yasskin2009-07-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | call to the MachineCodeEmitter interface and made copying the start line of a function not conditional on whether we're emitting Dwarf debug information. I'll propagate the processDebugLoc() calls to the non-X86 targets in a followup patch. In the long run, it'll probably be better to gather this information through the DwarfWriter, but the DwarfWriter currently depends on the AsmPrinter and TargetAsmInfo, and fixing that would be out of the way for this patch. There's a bug in OProfile 0.9.4 that makes it ignore line numbers for addresses above 4G, and a patch fixing it at http://thread.gmane.org/gmane.linux.oprofile/7634 Sample output: $ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop Signalling daemon... done Profiler running. fib(40) == 165580141 Stopping profiling. $ opreport -g -d -l `pwd`/Debug/bin/lli|head -60 Overflow stats not available CPU: Core 2, speed 1998 MHz (estimated) Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000 vma samples % linenr info image name symbol name 00007f67a30370b0 25489 61.2554 fib.c:24 10946.jo fib_left 00007f67a30370b0 1634 6.4106 fib.c:24 00007f67a30370b1 83 0.3256 fib.c:24 00007f67a30370b9 1997 7.8348 fib.c:24 00007f67a30370c6 2080 8.1604 fib.c:27 00007f67a30370c8 988 3.8762 fib.c:27 00007f67a30370cd 1315 5.1591 fib.c:27 00007f67a30370cf 251 0.9847 fib.c:27 00007f67a30370d3 1191 4.6726 fib.c:27 00007f67a30370d6 975 3.8252 fib.c:27 00007f67a30370db 1010 3.9625 fib.c:27 00007f67a30370dd 242 0.9494 fib.c:27 00007f67a30370e1 2782 10.9145 fib.c:28 00007f67a30370e5 3768 14.7828 fib.c:28 00007f67a30370eb 615 2.4128 (no location information) 00007f67a30370f3 6558 25.7287 (no location information) 00007f67a3037100 15603 37.4973 fib.c:29 10946.jo fib_right 00007f67a3037100 1646 10.5493 fib.c:29 00007f67a3037101 45 0.2884 fib.c:29 00007f67a3037109 2372 15.2022 fib.c:29 00007f67a3037116 2234 14.3178 fib.c:32 00007f67a3037118 612 3.9223 fib.c:32 00007f67a303711d 622 3.9864 fib.c:32 00007f67a303711f 385 2.4675 fib.c:32 00007f67a3037123 404 2.5892 fib.c:32 00007f67a3037126 634 4.0633 fib.c:32 00007f67a303712b 870 5.5759 fib.c:32 00007f67a303712d 62 0.3974 fib.c:32 00007f67a3037131 1848 11.8439 fib.c:33 00007f67a3037135 2840 18.2016 fib.c:33 00007f67a303713a 1 0.0064 fib.c:33 00007f67a303713b 1023 6.5564 (no location information) 00007f67a3037143 5 0.0320 (no location information) 000000000080c1e4 15 0.0360 MachineOperand.h:150 lli llvm::MachineOperand::isReg() const 000000000080c1e4 6 40.0000 MachineOperand.h:150 000000000080c1ec 2 13.3333 MachineOperand.h:150 ... llvm-svn: 76102
* Teach MachineInstr::isRegTiedToDefOperand() to correctly parse inline asm ↵Jakob Stoklund Olesen2009-07-161-8/+12
| | | | | | | | | | | operands. The inline asm operands must be parsed from the first flag, you cannot assume that an immediate operand preceeding a register use operand is the flag. PowerPC "m" operands are represented as (flag, imm, reg) triples. isRegTiedToDefOperand() would incorrectly interpret the imm as the flag. llvm-svn: 76101
* Changed my mind. We now allow remat of instructions whose defs have subreg ↵Evan Cheng2009-07-162-6/+8
| | | | | | indices. llvm-svn: 76100
* Privatize the ConstantFP table. I'm on a roll!Owen Anderson2009-07-162-3/+4
| | | | llvm-svn: 76097
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-164-4/+6
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Let RegisterInfo decide whether it can emit cross-class copy or notAnton Korobeynikov2009-07-161-4/+5
| | | | llvm-svn: 75955
* Scan for presence of calls and determine max callframe size early. To allow ↵Anton Korobeynikov2009-07-162-25/+37
| | | | | | ProcessFunctionBeforeCalleeSaveScan() use this information llvm-svn: 75942
* Propagate return result extension typeAnton Korobeynikov2009-07-161-0/+7
| | | | llvm-svn: 75925
* Let callers decide the sub-register index on the def operand of ↵Evan Cheng2009-07-167-14/+24
| | | | | | | | rematerialized instructions. Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right. llvm-svn: 75900
* Fix coding style issues pointed by Bill.Bruno Cardoso Lopes2009-07-163-26/+30
| | | | llvm-svn: 75898
* Skip special LLVM prefix '1' while emitting linknage name.Devang Patel2009-07-161-4/+25
| | | | | | This prefix is used by LLVM to inform the asm printer to not emit usual global symbol prefix before the symbol name. llvm-svn: 75875
* We don't need to use llvm_report_error, this interface can deal with errorsDaniel Dunbar2009-07-151-2/+2
| | | | | | (although we don't get a very good error message). llvm-svn: 75864
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-152-3/+3
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Add missing includes.Daniel Dunbar2009-07-151-0/+2
| | | | llvm-svn: 75862
* Verify that there is no kill flag on tied operands on two-address instructions.Jakob Stoklund Olesen2009-07-151-4/+7
| | | | | | | | | | This extra check is not trigged when runnning "make check" on top-of-tree. Change error message to better match llvm_unreachable() grammar. Don't call llvm_unreachable() when writing error messages to a file, but keep going. llvm-svn: 75860
* Lift addAssemblyEmitter into LLVMTargetMachine.Daniel Dunbar2009-07-151-0/+11
| | | | | | - No functionality change. llvm-svn: 75859
* Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.Daniel Dunbar2009-07-151-5/+15
| | | | | | - No intended functionality change. llvm-svn: 75848
* Fix bug in RegScavenger::scavengeRegister().Jakob Stoklund Olesen2009-07-151-1/+1
| | | | | | | | | | | | | Reserved registers are not candidates for scavenging, and they were removed from the candidate list like this: CreateRegClassMask(RC, Candidates); Candidates ^= ReservedRegs; However, when there are reserved registers outside RC, this causes invalid bits to be set in Candidates. llvm-svn: 75847
* Move a few more convenience factory functions from Constant to LLVMContext.Owen Anderson2009-07-153-5/+9
| | | | llvm-svn: 75840
* ShortenDeadCopySrcLiveRange needs to be more conservative in multi-kill ↵Evan Cheng2009-07-151-1/+6
| | | | | | situations. llvm-svn: 75838
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-151-3/+3
| | | | llvm-svn: 75831
* use std::vector instead of std::list for both Section and Symbol lists becauseBruno Cardoso Lopes2009-07-154-191/+192
| | | | | | we care more about random access than insertion/deletion of elements. llvm-svn: 75828
OpenPOWER on IntegriCloud