summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LLVMTargetMachine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the code that adds the DeadMachineInstructionElimPass fromDan Gohman2008-10-251-4/+0
| | | | | | | | | | | | | target-independent code to target-specific code. This prevents it from running on targets that aren't using fast-isel. In addition to saving compile time, this addresses the problem that not all targets are prepared for it. In order to use this pass, all instructions must declare all their fixed uses and defs of physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58144 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Print*Pass to use raw_ostream.Daniel Dunbar2008-10-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57946 91177308-0d34-0410-b5e6-96231b3b80d8
* Privatize PrintModulePass and PrintFunctionPass and addDaniel Dunbar2008-10-211-3/+4
| | | | | | | | createPrintModulePass and createPrintFunctionPass. - So clients who compile w/o RTTI can use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -disable-fast-isel. Use cl::boolOrDefault with -fast-iselDan Gohman2008-10-071-8/+3
| | | | | | | | | | | instead. So now: -fast-isel or -fast-isel=true enable fast-isel, and -fast-isel=false disables it. Fast-isel is also on by default with -fast, and off by default otherwise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57270 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove OptimizeForSize global. Use function attribute optsize.Devang Patel2008-10-011-1/+1
| | | | 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
* Enable DeadMachineInstructionElim when Fast-ISel is enabled.Dan Gohman2008-09-251-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56604 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the code that adds standard LLVM codegen passes intoDan Gohman2008-09-251-109/+44
| | | | | | | | a separate function, eliminating duplication between the add-passes-for-file and add-passes-for-machine-code code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56599 91177308-0d34-0410-b5e6-96231b3b80d8
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-211-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-4/+4
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor GC metadata table assembly generation out of Collector in preparation ↵Gordon Henriksen2008-08-171-1/+1
| | | | | | for splitting AsmPrinter into its own library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54881 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't run stack slot coloring if -fast.Evan Cheng2008-06-301-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52933 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack coloring by default.Evan Cheng2008-06-061-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52057 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Should not be enabled by default.Evan Cheng2008-06-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51953 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a stack slot coloring pass. Not yet enabled.Evan Cheng2008-06-041-21/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51934 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not run loop-aligner at -fast (e.g. -O0).Evan Cheng2008-06-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51898 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Evan Cheng2008-05-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51793 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak JITAnton Korobeynikov2008-04-231-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50173 91177308-0d34-0410-b5e6-96231b3b80d8
* Add facility for pre-RA passesAnton Korobeynikov2008-04-231-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50165 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-021-2/+3
| | | | | | | | | | | | | | | | | review feedback. -enable-eh is still accepted but doesn't do anything. EH intrinsics use Dwarf EH if the target supports that, and are handled by LowerInvoke otherwise. The separation of the EH table and frame move data is, I think, logically figured out, but either one still causes full EH info to be generated (not sure how to split the metadata correctly). MachineModuleInfo::needsFrameInfo is no longer used and is removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 49006 for the moment.Dale Johannesen2008-04-011-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit exception handling info for functions which areDale Johannesen2008-03-311-4/+2
| | | | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid outputing spaces at the ends of lines.Dan Gohman2008-03-251-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48797 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not align loops if optimizing for size.Devang Patel2008-03-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48794 91177308-0d34-0410-b5e6-96231b3b80d8
* Use PassManagerBase instead of FunctionPassManager for functionsDan Gohman2008-03-111-3/+3
| | | | | | | | | that merely add passes. This allows them to be used with either FunctionPassManager or PassManager, or even with a custom new kind of pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48256 91177308-0d34-0410-b5e6-96231b3b80d8
* Added option -align-loops=<true/false> to disable loop aligner pass.Evan Cheng2008-02-281-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47736 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable exception handling int JITNicolas Geoffray2008-02-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
* don't create the post-ra scheduler unless it is enabled.Chris Lattner2008-01-141-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45972 91177308-0d34-0410-b5e6-96231b3b80d8
* Ammending r45669 with a missing file.Gordon Henriksen2008-01-071-4/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45671 91177308-0d34-0410-b5e6-96231b3b80d8
* allow sinking to be enabled for the jitChris Lattner2008-01-051-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45624 91177308-0d34-0410-b5e6-96231b3b80d8
* Move option to enable machine LICM into LLVMTargetMachine.cpp.Bill Wendling2008-01-041-3/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45572 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a really quick hack at a machine code sinking pass, enabled with ↵Chris Lattner2008-01-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --enable-sinking. It is missing validity checks, so it is known broken. However, it is powerful enough to compile this contrived code: void test1(int C, double A, double B, double *P) { double Tmp = A*A+B*B; *P = C ? Tmp : A; } into: _test1: movsd 8(%esp), %xmm0 cmpl $0, 4(%esp) je LBB1_2 # entry LBB1_1: # entry movsd 16(%esp), %xmm1 mulsd %xmm1, %xmm1 mulsd %xmm0, %xmm0 addsd %xmm1, %xmm0 LBB1_2: # entry movl 24(%esp), %eax movsd %xmm0, (%eax) ret instead of: _test1: movsd 16(%esp), %xmm0 mulsd %xmm0, %xmm0 movsd 8(%esp), %xmm1 movapd %xmm1, %xmm2 mulsd %xmm2, %xmm2 addsd %xmm0, %xmm2 cmpl $0, 4(%esp) je LBB1_2 # entry LBB1_1: # entry movapd %xmm2, %xmm1 LBB1_2: # entry movl 24(%esp), %eax movsd %xmm1, (%eax) ret woo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45570 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial commit of the machine code LICM pass. It successfully hoists this:Bill Wendling2007-12-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _foo: li r2, 0 LBB1_1: ; bb li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr to: _foo: li r2, 0 li r5, 0 LBB1_1: ; bb stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr ZOMG!! :-) Moar to come... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44687 91177308-0d34-0410-b5e6-96231b3b80d8
* Move subreg lowering pass to be right after regalloc, per feedback.Christopher Lamb2007-07-271-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40548 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a MachineFunction pass, which runs post register allocation, that turns ↵Christopher Lamb2007-07-261-0/+4
| | | | | | subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40521 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -print-emitted-asm to print out JIT generated asm to cerr.Evan Cheng2007-07-201-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40123 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify previous patch per review comments.Dale Johannesen2007-07-131-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39817 91177308-0d34-0410-b5e6-96231b3b80d8
* Skeleton of post-RA scheduler; doesn't do anything yet.Dale Johannesen2007-07-131-0/+6
| | | | | | | | Change name of -sched option and DEBUG_TYPE to pre-RA-sched; adjust testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39816 91177308-0d34-0410-b5e6-96231b3b80d8
* Exception handling has been implemented.Duncan Sands2007-07-111-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39732 91177308-0d34-0410-b5e6-96231b3b80d8
* document and hide two options.Chris Lattner2007-06-191-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37651 91177308-0d34-0410-b5e6-96231b3b80d8
* name change requested by review of previous patchDale Johannesen2007-05-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37289 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tail merging the default, except on powerPC. There was no prior artDale Johannesen2007-05-221-2/+2
| | | | | | | | for a target-dependent default with a command-line override; this way should be generally usable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37285 91177308-0d34-0410-b5e6-96231b3b80d8
* move a bunch of code out of the sdisel pass into its own opt pass ↵Chris Lattner2007-03-311-2/+20
| | | | | | "codegenprepare". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35529 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a -print-lsr-output option to LLC, to print the output of the LSR pass.Chris Lattner2007-03-311-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35522 91177308-0d34-0410-b5e6-96231b3b80d8
* Now LoopStrengthReduce is a LoopPass.Devang Patel2007-03-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34984 91177308-0d34-0410-b5e6-96231b3b80d8
* Use exception flag.Jim Laskey2007-02-221-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34496 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the addPassesToEmitFile method up into two. This is so that we canBill Wendling2007-02-081-48/+52
| | | | | | | | do some common stuff, then on our own add an object file writer (by calling a concrete function), and then do some finishing stuff, if need be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34032 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed more <iostream> includesBill Wendling2006-12-071-11/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
* enable the branch folding pass for the JIT.Chris Lattner2006-11-161-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31777 91177308-0d34-0410-b5e6-96231b3b80d8