summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix an ugly wart in the MCInstPrinter api where theChris Lattner2010-04-041-1/+1
| | | | | | | | raw_ostream to print an instruction to had to be specified at MCInstPrinter construction time instead of being able to pick at each call to printInstruction. llvm-svn: 100307
* rearrange MCContext ownership. Before LLVMTargetMachine created it Chris Lattner2010-03-131-18/+23
| | | | | | | | | | | and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450
* make the mangler take an MCContext instead of an MAI.Chris Lattner2010-03-121-4/+2
| | | | | | No functionality change. llvm-svn: 98363
* remove MAI argument from createAsmStreamer since itChris Lattner2010-03-121-1/+1
| | | | | | can get it from the context now. llvm-svn: 98361
* change MCContext to always have an MCAsmInfo.Chris Lattner2010-03-111-2/+2
| | | | llvm-svn: 98293
* MC: Provide MCAssembler with a TargetAsmBackend.Daniel Dunbar2010-03-111-4/+5
| | | | llvm-svn: 98222
* Enable machine cse pass.Evan Cheng2010-03-101-5/+1
| | | | llvm-svn: 98132
* Revert accidental commit.Evan Cheng2010-03-091-1/+1
| | | | llvm-svn: 98045
* - Make the machine cse dumb coalescer (as opposed to the more awesome simpleEvan Cheng2010-03-091-2/+2
| | | | | | | | | coalescer) handle sub-register classes. - Add heuristics to avoid non-profitable cse. Given the current lack of live range splitting, avoid cse when an expression has PHI use and the would be new use is in a BB where the expression wasn't already being used. llvm-svn: 98043
* We don't really care about correct register liveness information after theJakob Stoklund Olesen2010-03-051-4/+10
| | | | | | post-ra scheduler has run. Disable the verifier checks that late in the game. llvm-svn: 97837
* Run machine licm before machine cse to avoid messing up licm opportunities.Evan Cheng2010-03-041-2/+2
| | | | llvm-svn: 97752
* Rename -machine-cse to -enable-machine-cse.Evan Cheng2010-03-041-1/+1
| | | | llvm-svn: 97713
* Add an option to enable machine cse (it's not doing anything yet.Evan Cheng2010-03-031-0/+5
| | | | llvm-svn: 97627
* Add a flag to addPassesToEmit* to disable the Verifier pass runDan Gohman2010-02-281-8/+18
| | | | | | after LSR, so that clients can opt in. llvm-svn: 97357
* Remove unused "NoPRE" parameter in GVN and createGVNPass().Bob Wilson2010-02-261-1/+1
| | | | llvm-svn: 97235
* Besides removing phi cycles that reduce to a single value, also remove deadBob Wilson2010-02-131-1/+4
| | | | | | | | phi cycles. Adjust a few tests to keep dead instructions from being optimized away. This (together with my previous change for phi cycles) fixes Apple radar 7627077. llvm-svn: 96057
* give MCCodeEmitters access to the current MCContext.Chris Lattner2010-02-121-1/+1
| | | | llvm-svn: 96038
* Reapply the new LoopStrengthReduction code, with compile time andDan Gohman2010-02-121-0/+4
| | | | | | | | | | bug fixes, and with improved heuristics for analyzing foreign-loop addrecs. This change also flattens IVUsers, eliminating the stride-oriented groupings, which makes it easier to work with. llvm-svn: 95975
* Add a new pass on machine instructions to optimize away PHI cycles that Bob Wilson2010-02-121-0/+1
| | | | | | | | | | | reduce down to a single value. InstCombine already does this transformation but DAG legalization may introduce new opportunities. This has turned out to be important for ARM where 64-bit values are split up during type legalization: InstCombine is not able to remove the PHI cycles on the 64-bit values but the separate 32-bit values can be optimized. I measured the compile time impact of this (running llc on 176.gcc) and it was not significant. llvm-svn: 95951
* Run codegen dce pass for all targets at all optimization levels. Previously it'sEvan Cheng2010-02-061-0/+6
| | | | | | | | | | 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
* 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
* 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
* 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-021-3/+20
| | | | | | | 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-021-1/+13
| | | | | | LLVMTargetMachine.cpp with the rest of the command line options. llvm-svn: 95152
* Remove a bunch of stuff around the edges of the ELF writer.Chris Lattner2010-02-021-2/+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
* 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
* 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
* Kill the Mach-O writer, and temporarily make filetype=obj an error.Nate Begeman2010-02-011-17/+1
| | | | | | The MCStreamer based assemblers will take over for this functionality. llvm-svn: 95033
* Revert r94066, which was the patch which added a Verifier pass afterDan Gohman2010-01-221-4/+0
| | | | | | | LoopStrengthReduce, as it's causing too much trouble (even with the old LoopStrengthReduce code). llvm-svn: 94172
* Run the verifier after LSR, to help catch use-before-def errors beforeDan Gohman2010-01-211-0/+4
| | | | | | they reach codegen. llvm-svn: 94066
* Run the pre-register allocation tail duplication pass by default. RemoveBob Wilson2010-01-161-5/+3
| | | | | | | the -pre-regalloc-taildup command-line option, and add a new -disable-early-taildup option. llvm-svn: 93597
* Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.Nate Begeman2010-01-151-3/+14
| | | | | | | | | Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer Further refactoring to completely remove MachOWriter and drive the object file writer with the AsmPrinter MCInst/MCSection logic is forthcoming. llvm-svn: 93527
* Add comment explaining the necessity of r93456Jim Grosbach2010-01-141-0/+5
| | | | llvm-svn: 93459
* Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,Jim Grosbach2010-01-141-1/+1
| | | | | | | | | catch info can get misplaced when a selector ends up more than one block removed from the parent invoke(s). This could happen when a landing pad is shared by multiple invokes and is also a target of a normal edge from elsewhere. llvm-svn: 93456
* Re-enable extension optimization pass.Evan Cheng2010-01-131-0/+1
| | | | llvm-svn: 93313
* Disable opt-ext pass to unbreak the build for now.Evan Cheng2010-01-131-1/+0
| | | | llvm-svn: 93286
* Remove debug option I accidentally left in.Evan Cheng2010-01-131-3/+0
| | | | llvm-svn: 93285
* Add a quick pass to optimize sign / zero extension instructions. For targets ↵Evan Cheng2010-01-131-0/+5
| | | | | | | | where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg. For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used. llvm-svn: 93278
* Allow double defs after tail duplication.Jakob Stoklund Olesen2010-01-061-1/+2
| | | | llvm-svn: 92874
* Change errs() to dbgs().David Greene2010-01-041-4/+5
| | | | llvm-svn: 92524
* Fix setting and default setting of code model for jit. Do thisEric Christopher2009-12-211-0/+26
| | | | | | | | | | by allowing backends to override routines that will default the JIT and Static code generation to an appropriate code model for the architecture. Should fix PR 5773. llvm-svn: 91824
* Remove debugging code.Evan Cheng2009-12-171-24/+0
| | | | llvm-svn: 91604
* Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently ↵Evan Cheng2009-12-171-0/+24
| | | | | | introduced a non-deterministic behavior in the optimizer somewhere. llvm-svn: 91598
* Add a pre-regalloc tail duplication pass.Evan Cheng2009-12-041-1/+11
| | | | llvm-svn: 90567
* Rename new TailDuplicationPass to avoid name conflict with the old one.Bob Wilson2009-11-261-2/+2
| | | | llvm-svn: 89968
OpenPOWER on IntegriCloud