summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach ISel not to optimize 'optnone' functions (revised).Paul Robinson2013-11-221-0/+5
| | | | | | | | | | | | | Improvements over r195317: - Set/restore EnableFastISel flag instead of just running FastISel within SelectAllBasicBlocks; the flag is checked in various places, and FastISel won't run properly if those places don't do the right thing. - Test looks for normal ISel versus FastISel behavior, and not something more subtle that doesn't work everywhere. Based on work by Andrea Di Biagio. llvm-svn: 195491
* Whitespace.NAKAMURA Takumi2013-11-211-1/+1
| | | | llvm-svn: 195341
* Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."NAKAMURA Takumi2013-11-211-5/+0
| | | | | | | | It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown". FYI, it didn't appear to add either "-O0" or "-fast-isel". llvm-svn: 195339
* Teach ISel not to optimize 'optnone' functions.Paul Robinson2013-11-211-0/+5
| | | | | | Based on work by Andrea Di Biagio. llvm-svn: 195317
* Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.Bill Wendling2013-07-251-1/+0
| | | | | | | | There's no need to specify a flag to omit frame pointer elimination on non-leaf nodes...(Honestly, I can't parse that option out.) Use the function attribute stuff instead. llvm-svn: 187093
* Reset some of the target options which affect code generation.Bill Wendling2013-03-131-0/+26
| | | | | | | | This doesn't reset all of the target options within the TargetOptions object. This is because some of those are ABI-specific and must be determined if it's okay to change those on the fly. llvm-svn: 176986
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-7/+33
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Handle aliases to tls variables in all architectures, not just x86.Rafael Espindola2012-06-231-3/+11
| | | | llvm-svn: 159058
* Teach LLVM about a PIE option which, when enabled on top of PIC, makesChandler Carruth2012-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | optimizations which are valid for position independent code being linked into a single executable, but not for such code being linked into a shared library. I discussed the design of this with Eric Christopher, and the decision was to support an optional bit rather than a completely separate relocation model. Fundamentally, this is still PIC relocation, its just that certain optimizations are only valid under a PIC relocation model when the resulting code won't be in a shared library. The simplest path to here is to expose a single bit option in the TargetOptions. If folks have different/better designs, I'm all ears. =] I've included the first optimization based upon this: changing TLS models to the *Exec models when PIE is enabled. This is the LLVM component of PR12380 and is all of the hard work. llvm-svn: 154294
* Move the TLSModel information into the TargetMachine rather than hidingChandler Carruth2012-04-081-0/+21
| | | | | | | | in TargetLowering. There was already a FIXME about this location being odd. The interface is simplified as a consequence. This will also make it easier to change TLS models when compiling with PIE. llvm-svn: 154292
* Prune some includes and forward declarations.Craig Topper2012-03-261-1/+0
| | | | llvm-svn: 153429
* Prune some includes and forward declarations.Craig Topper2012-03-251-0/+1
| | | | llvm-svn: 153415
* RegAlloc superpass: includes phi elimination, coalescing, and scheduling.Andrew Trick2012-02-101-2/+0
| | | | | | | | | | | | | | | | Creates a configurable regalloc pipeline. Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa. When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>. CodeGen transformation passes are never "required" as an analysis ProcessImplicitDefs does not require LiveVariables. We have a plan to massively simplify some of the early passes within the regalloc superpass. llvm-svn: 150226
* Moving options declarations around.Andrew Trick2012-01-171-8/+0
| | | | | | More short term hackery until we have a way to configure passes that work on LiveIntervals. llvm-svn: 148289
* Added the MachineSchedulerPass skeleton.Andrew Trick2012-01-131-1/+10
| | | | llvm-svn: 148105
* Also remove unnecessary includes from this file, which was supposed to be partNick Lewycky2011-12-111-2/+0
| | | | | | of r146334! llvm-svn: 146338
* Refactor the implementation of the TargetOptions out of TargetMachine, takingNick Lewycky2011-12-101-33/+0
| | | | | | the only parts of TM that depends on CodeGen headers with it. llvm-svn: 146334
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-021-181/+32
| | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. llvm-svn: 145714
* Sink codegen optimization level into MCCodeGenInfo along side relocation modelEvan Cheng2011-11-161-0/+8
| | | | | | | and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. llvm-svn: 144788
* Switch new .file directive emission off by default, change llc's flag for it toNick Lewycky2011-10-311-1/+1
| | | | | | -enable-dwarf-directory. llvm-svn: 143326
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-171-1/+2
| | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. llvm-svn: 142300
* Command line option to enable support for segmented stacks:Rafael Espindola2011-08-301-0/+7
| | | | | | | -segmented-stacks. Patch by Sanjoy Das! llvm-svn: 138811
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-25/+4
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Don't leak CodeGenInfos.Benjamin Kramer2011-07-201-1/+3
| | | | llvm-svn: 135555
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-191-23/+4
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Eliminate asm parser's dependency on TargetMachine:Evan Cheng2011-07-081-2/+3
| | | | | | | | | | - Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". llvm-svn: 134678
* Rename TargetOptions::StackAlignment to StackAlignmentOverride.Evan Cheng2011-06-231-2/+2
| | | | llvm-svn: 133739
* Replace the -unwind-tables option with a per function flag. This is moreRafael Espindola2011-05-251-6/+0
| | | | | | | LTO friendly as we can now correctly merge files compiled with or without -fasynchronous-unwind-tables. llvm-svn: 132033
* Add all the plumbing needed for MC to expand cfi to the old tables inRafael Espindola2011-04-301-1/+2
| | | | | | | the final assembly. It is the same technique used when targeting assemblers that don't support .loc. llvm-svn: 130587
* Remove -use-divmod-libcall. Let targets opt in when they are available.Evan Cheng2011-04-201-5/+0
| | | | llvm-svn: 129884
* Change -arm-trap-func= into a non-arm specific option. Now Intrinsic::trap ↵Evan Cheng2011-04-081-0/+11
| | | | | | is lowered into a call to the specified trap function at sdisel time. llvm-svn: 129152
* Change -arm-divmod-libcall to a target neutral option.Evan Cheng2011-04-071-0/+6
| | | | llvm-svn: 129045
* Integrated-As: Add support for setting the AllowTemporaryLabels flag viaDaniel Dunbar2011-03-281-0/+1
| | | | | | integrated-as. llvm-svn: 128431
* Initialize MCNoExecStack.Rafael Espindola2011-01-231-0/+1
| | | | llvm-svn: 124079
* Change some methods in MCDwarf.cpp to be able to handle an arbitraryRafael Espindola2010-11-191-1/+2
| | | | | | | | | | | | MCStreamer instead of just MCObjectStreamer. Address changes cannot be as efficient as we have to use DW_LNE_set_addres, but at least most of the logic is shared. This will be used so that, with CodeGen still using EmitDwarfLocDirective, llvm-gcc is able to produce debug_line sections without needing an assembler that supports .loc. llvm-svn: 119777
* Split -enable-finite-only-fp-math to two options:Evan Cheng2010-07-151-10/+10
| | | | | | -enable-no-nans-fp-math and -enable-no-infs-fp-math. All of the current codegen fp math optimizations only care whether the fp arithmetics arguments and results can never be NaN. llvm-svn: 108465
* -enable-unsafe-fp-math should not imply -enable-finite-only-fp-math.Evan Cheng2010-07-131-1/+1
| | | | llvm-svn: 108254
* MC: Add TargetMachine support for setting the value of MCRelaxAll withDaniel Dunbar2010-05-261-1/+2
| | | | | | -filetype=obj. llvm-svn: 104747
* Don't eliminate frame pointers from leaf functions if "--disable-fp-elim" isBill Wendling2010-05-181-1/+1
| | | | | | specified. llvm-svn: 104066
* - Set the "HasCalls" flag after instruction selection is finished.Bill Wendling2010-05-171-3/+4
| | | | | | | - Change the logic DisableFramePointerElim() to check for the -disable-non-leaf-fp-elim before -disable-fp-elim. llvm-svn: 103990
* Revert r103804. The comment is correct.Bill Wendling2010-05-141-1/+1
| | | | llvm-svn: 103808
* Rename "HasCalls" in MachineFrameInfo to "AdjustsStack" to better describe whatBill Wendling2010-05-141-1/+1
| | | | | | | | | the variable actually tracks. N.B., several back-ends are using "HasCalls" as being synonymous for something that adjusts the stack. This isn't 100% correct and should be looked into. llvm-svn: 103802
* Remove the -enable-sjlj-eh option, which doesn't do anything.Duncan Sands2010-05-021-10/+4
| | | | | | | Remove the -enable-eh option which is only used by the JIT, and replace it with -jit-enable-eh. llvm-svn: 102865
* Implement -disable-non-leaf-fp-elim which disable frame pointer eliminationEvan Cheng2010-04-211-0/+20
| | | | | | | optimization for non-leaf functions. This will be hooked up to gcc's -momit-leaf-frame-pointer option. rdar://7886181 llvm-svn: 101984
* add llvm codegen support for -ffunction-sections and -fdata-sections,Chris Lattner2010-04-131-1/+24
| | | | | | patch by Sylvere Teissier! llvm-svn: 101106
* Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflectDan Gohman2010-02-081-3/+3
| | | | | | its current purpose. llvm-svn: 95564
* Clarify what -tailcallopt option actually do.Evan Cheng2010-01-271-1/+1
| | | | llvm-svn: 94628
* Remove the '-disable-scheduling' flag and replace it with the 'source' option ofBill Wendling2010-01-231-6/+0
| | | | | | | | | the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also, keep track of the SDNode ordering by default. Eventually, we would like to make this ordering a way to break a "tie" in the scheduler. However, doing that now breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux. llvm-svn: 94308
OpenPOWER on IntegriCloud