summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Prefix IR dumps with LiveInterval indices when possible. This turnsDavid Greene2009-07-211-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this: %ESI<def> = MOV32rr %EDI<kill> ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use> %reg1027<def> = MOVZX64rr32 %ESI %reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead> %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead> %RDI<def> = MOV64rr %RSP %RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead> %RSP<def> = MOV64rr %RDI into this: 4 %reg1024<def> = MOV32rr %EDI<kill> 12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use> 20 %reg1025<def> = MOVZX64rr32 %reg1024 28 %reg1026<def> = MOV64rr %reg1025<kill> 36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead> 44 %reg1027<def> = MOV64rr %reg1026<kill> 52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead> 60 %reg1028<def> = MOV64rr %RSP 68 %reg1029<def> = MOV64rr %reg1028<kill> 76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead> 84 %RSP<def> = MOV64rr %reg1029 This helps greatly when debugging register allocation and coalescing problems. llvm-svn: 76615
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-0/+5
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* Add PrefixPrinter arguments to the dump routines for MachineFunction andDavid Greene2009-07-212-4/+9
| | | | | | MachineBasicBlock. We'll use these shortly. llvm-svn: 76603
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-211-4/+4
| | | | llvm-svn: 76598
* Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match theChris Lattner2009-07-212-2/+3
| | | | | | LLVM IR concept. llvm-svn: 76590
* Another rewriter bug exposed by recent coalescer changes. ↵Evan Cheng2009-07-211-23/+27
| | | | | | ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past. llvm-svn: 76558
* Simplify / normalize some uses of Value::getName.Daniel Dunbar2009-07-211-1/+1
| | | | llvm-svn: 76553
* Support adding relocations for data sections, handling the cases whereBruno Cardoso Lopes2009-07-213-24/+57
| | | | | | | global declared symbols are initialized with references from other global symbols. llvm-svn: 76540
* Fix a dagga combiner bug: avoid creating illegal constant.Evan Cheng2009-07-211-9/+12
| | | | | | | | Is this really a winning transformation? fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or (srl (and x, (shl -1, c1)), (sub c1, c2)) llvm-svn: 76535
* Move a bit more state over to the LLVMContext.Owen Anderson2009-07-211-4/+6
| | | | llvm-svn: 76533
* Cross RC coalescing is now on by default.Evan Cheng2009-07-211-4/+4
| | | | llvm-svn: 76519
* Move stripping of bitcasts in inline asm argumentsDale Johannesen2009-07-202-12/+7
| | | | | | | to a place where it affects everything. Occurs only on calls AFAIK. llvm-svn: 76502
* Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that ↵Bill Wendling2009-07-201-1/+0
| | | | | | humans can understand it. llvm-svn: 76480
* Pass in the unfortunately named "LessPrivatePrefix" for theBill Wendling2009-07-201-1/+2
| | | | | | | | "LinkerPrivatePrefix". It seems to have been used in only one place before I started this "linker_private" business. I'm thinking that a rename is in order... llvm-svn: 76479
* Use TII->findCommutedOpIndices to find the commute operands (rather than ↵Evan Cheng2009-07-201-4/+8
| | | | | | guessing). llvm-svn: 76472
* Fix some sub-reg coalescing bugs where the coalescer wasn't updating the ↵Evan Cheng2009-07-201-12/+18
| | | | | | resulting interval's register class. llvm-svn: 76458
* 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
OpenPOWER on IntegriCloud