summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* When CodeGen'ing unoptimized code, there may be unfolded constant expressionsDan Gohman2010-02-081-9/+11
| | | | | | | | | in global initializers. Instead of aborting, attempt to fold them on the spot. If folding succeeds, emit the folded expression instead. This fixes PR6255. llvm-svn: 95583
* Apply the 95471 fix to SelectionDAGBuilder as well;Dale Johannesen2010-02-081-0/+2
| | | | | | | we can get in here if FastISel gives up in a block. (Actually the two copies of this need to be unified. Later.) llvm-svn: 95579
* In guaranteed tailcall mode, don't decline the tailcall optimizationDan Gohman2010-02-081-7/+10
| | | | | | for blocks ending in "unreachable". llvm-svn: 95565
* Give DwarfPrinter a protected (but not virtual) destructor. CppcheckDuncan Sands2010-02-071-0/+2
| | | | | | | | | warns about this base class not having a virtual destructor, but since this class has no virtual methods and neither it or the types derived from it has a destructor, a protected trivial destructor will do (and shuts cppcheck up) the trick without the cost of introducing a vtable. llvm-svn: 95526
* Run codegen dce pass for all targets at all optimization levels. Previously it'sEvan Cheng2010-02-063-0/+14
| | | | | | | | | | only run for x86 with fastisel. I've found it being very effective in eliminating some obvious dead code as result of formal parameter lowering especially when tail call optimization eliminated the need for some of the loads from fixed frame objects. It also shrinks a number of the tests. A couple of tests no longer make sense and are now eliminated. llvm-svn: 95493
* Fix an uninitialized value. Radar 7609421.Bob Wilson2010-02-061-0/+1
| | | | llvm-svn: 95488
* After Victor's latest commits I am seeing nullDale Johannesen2010-02-061-0/+2
| | | | | | | addresses in dbg.declare; ignore this for the moment to prevent things from breaking. llvm-svn: 95471
* Set DW_AT_artificial only if argument is marked as artificial.Devang Patel2010-02-061-5/+12
| | | | llvm-svn: 95461
* Do not generate specification DIE for nested functions.Devang Patel2010-02-051-1/+7
| | | | llvm-svn: 95452
* When the scheduler unfold a load folding instruction it move some of the ↵Evan Cheng2010-02-051-2/+10
| | | | | | | | predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit. rdar://7604000 llvm-svn: 95339
* An empty global constant (one of size 0) may have a section immediatelyBill Wendling2010-02-051-0/+1
| | | | | | | | | | | following it. However, the EmitGlobalConstant method wasn't emitting a body for the constant. The assembler doesn't like that. Before, we were generating this: .zerofill __DATA, __common, __cmd, 1, 3 This fix puts us back to that semantic. llvm-svn: 95336
* Fix typo Duncan noticed.Evan Cheng2010-02-041-1/+1
| | | | llvm-svn: 95322
* Fix small bug in handling instructions with more than one implicitly defined ↵Jakob Stoklund Olesen2010-02-041-1/+1
| | | | | | | | | operand. ProcessImplicitDefs would only mark one operand per instruction with <undef>. This fixed PR6086. llvm-svn: 95319
* It's too risky to eliminate sext / zext of call results for tail call ↵Evan Cheng2010-02-041-6/+4
| | | | | | optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing). llvm-svn: 95282
* Emit appropriate expression to find virtual base offset.Devang Patel2010-02-031-1/+20
| | | | llvm-svn: 95242
* Provide interface to identifiy artificial methods.Devang Patel2010-02-031-0/+3
| | | | llvm-svn: 95240
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-031-4/+4
| | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. llvm-svn: 95205
* change addPassesToEmitFile to return true on failure instead of its input,Chris Lattner2010-02-031-10/+19
| | | | | | | add -filetype=null for performance testing and remove -filetype=dynlib, which isn't planned to be implemented. llvm-svn: 95202
* Revert 94937 and move the noreturn check to codegen.Evan Cheng2010-02-031-2/+7
| | | | llvm-svn: 95198
* Allow all types of callee's to be tail called. But avoid automatic tailcall ↵Evan Cheng2010-02-031-4/+9
| | | | | | if the callee is a result of bitcast to avoid losing necessary zext / sext etc. llvm-svn: 95195
* don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,Chris Lattner2010-02-031-0/+2
| | | | | | .o files don't like that. llvm-svn: 95187
* privatize a bunch of methods and move \n printing into them.Chris Lattner2010-02-031-8/+6
| | | | llvm-svn: 95186
* Reapply 95050 with a tweak to check the register class.Dale Johannesen2010-02-031-0/+16
| | | | llvm-svn: 95183
* rejigger the world so that EmitInstruction prints the \n atChris Lattner2010-02-031-19/+11
| | | | | | | | the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. llvm-svn: 95178
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-031-2/+19
| | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. llvm-svn: 95177
* pass an instprinter into the AsmPrinter if it is available.Chris Lattner2010-02-031-3/+7
| | | | llvm-svn: 95168
* make any use of the "O" stream in asmprinter print toChris Lattner2010-02-031-1/+10
| | | | | | | | | stderr if in filetype=obj mode. This is a hack, and will live until dwarf emission and other random stuff that is not yet going through MCStreamer is upgraded. It only impacts filetype=obj mode. llvm-svn: 95166
* Hook up -filetype=obj through the MachO streamer. Here's a demo:Chris Lattner2010-02-021-6/+13
| | | | | | | | | | | | | $ cat t.ll @g = global i32 42 $ llc t.ll -o t.o -filetype=obj $ nm t.o 00000000 D _g There is still a ton of work left. Instructions are not being encoded yet apparently. llvm-svn: 95162
* Revert 95130.Evan Cheng2010-02-021-1/+1
| | | | llvm-svn: 95160
* use OwningPtr and factor code better.Chris Lattner2010-02-021-19/+21
| | | | llvm-svn: 95156
* refactor code so that LLVMTargetMachine creates the asmstreamer and Chris Lattner2010-02-022-12/+24
| | | | | | | mccontext instead of having AsmPrinter do it. This allows other types of MCStreamer's to be passed in. llvm-svn: 95155
* simplify getVerboseAsmChris Lattner2010-02-021-6/+6
| | | | llvm-svn: 95153
* move handling of asm-verbose out of AsmPrinter.cpp into ↵Chris Lattner2010-02-022-17/+16
| | | | | | LLVMTargetMachine.cpp with the rest of the command line options. llvm-svn: 95152
* remove dead #include, stupid symlinks.Chris Lattner2010-02-021-1/+0
| | | | llvm-svn: 95150
* Remove a bunch of stuff around the edges of the ELF writer.Chris Lattner2010-02-022-11/+1
| | | | | | | Now the only use of the ELF writer is the JIT, which won't be easy to fix in the short term. :( :( llvm-svn: 95148
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-021-1/+1
| | | | | | sibcall eligibility. llvm-svn: 95130
* eliminate FileModel::Model, just use CodeGenFileType. The clientChris Lattner2010-02-021-10/+7
| | | | | | | of the code generator shouldn't care what object format a target uses. llvm-svn: 95124
* eliminate all forms of addPassesToEmitMachineCode exceptChris Lattner2010-02-021-72/+8
| | | | | | | | | the one used by the JIT. Remove all forms of addPassesToEmitFileFinish except the one used by the static code generator. Inline the remaining version of addPassesToEmitFileFinish into its only caller. llvm-svn: 95109
* Test revert 95050; there's a good chance it's causingDale Johannesen2010-02-021-14/+0
| | | | | | buildbot failure. llvm-svn: 95103
* Inline addAssemblyEmitter into its one real caller and deleteChris Lattner2010-02-021-31/+7
| | | | | | | the -print-emitted-asm option. The JIT shouldn't have to pull in the asmprinter. llvm-svn: 95100
* Apparently gdb is not amused by empty lines in pubtypes section.Devang Patel2010-02-021-2/+4
| | | | llvm-svn: 95064
* NULL terminate name in pubtypes sections.Devang Patel2010-02-021-1/+1
| | | | llvm-svn: 95062
* Make local RA smarter about reusing input register of a copyDale Johannesen2010-02-021-0/+14
| | | | | | | as output. Needed for (functional) correctness in inline asm, and should be generally beneficial. 7361612. llvm-svn: 95050
* Update CMake.Daniel Dunbar2010-02-021-1/+0
| | | | llvm-svn: 95041
* Kill the Mach-O writer, and temporarily make filetype=obj an error.Nate Begeman2010-02-013-230/+1
| | | | | | The MCStreamer based assemblers will take over for this functionality. llvm-svn: 95033
* Improve EXTRACT_VECTOR_ELT patch based on comments from DuncanMon P Wang2010-02-012-10/+10
| | | | llvm-svn: 95012
* eliminate a bunch of pointless LLVMContext arguments.Chris Lattner2010-02-011-2/+1
| | | | llvm-svn: 95001
* fix PR 6157. Testcase pending.Dale Johannesen2010-02-011-0/+35
| | | | llvm-svn: 94996
* Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the resultMon P Wang2010-02-012-5/+12
| | | | | | | | type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can be used to extended the width of an integer type. This fixes a bug for Generic/vector-casts.ll on a ppc750. llvm-svn: 94990
* Emit declaration DIE for the class static variables.Devang Patel2010-01-301-1/+10
| | | | llvm-svn: 94870
OpenPOWER on IntegriCloud