summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Make CodeGen TBAA-aware.Dan Gohman2010-10-206-30/+72
| | | | llvm-svn: 116890
* Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do anyJim Grosbach2010-10-194-5/+27
| | | | | | | setup they require. Use this for ARM/Darwin to rematerialize the base pointer from the frame pointer when required. rdar://8564268 llvm-svn: 116879
* Shrink MachineOperand from 40 to 32 bytes on 64-bit hosts.Jakob Stoklund Olesen2010-10-191-3/+3
| | | | | | | | | | | | | Pull an unsigned out of the Contents union such that it has the same size as two pointers and no padding. Arrange members such that the Contents union and all pointers can be 8-byte aligned without padding. This speeds up code generation by 0.8% on a 64-bit host. 32-bit hosts should be unaffected. llvm-svn: 116857
* Re-enable register pressure aware machine licm with fixes. Hoist() may haveEvan Cheng2010-10-191-77/+58
| | | | | | | erased the instruction during LICM so UpdateRegPressureAfter() should not reference it afterwards. llvm-svn: 116845
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-1929-30/+114
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Revert r116781 "- Add a hook for target to determine whether an instruction defDaniel Dunbar2010-10-191-36/+52
| | | | | | is", which breaks some nightly tests. llvm-svn: 116816
* lib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ↵NAKAMURA Takumi2010-10-191-5/+5
| | | | | | | | ".{section}${name}" instead of ".{section}$linkonce_{name}" for linkonce sections. It seems GNU ld/PECOFF relies on section names, linking with g++'s libstdc++.a would fail. llvm-svn: 116791
* Fix for machine licm assert: RCCost <= RegPressure[RCId]Andrew Trick2010-10-191-2/+2
| | | | | | | in MultiSource/Benchmarks/VersaBench/beamformer/beamformer. SmallSet.insert returns true if the element is inserted. llvm-svn: 116790
* - Add a hook for target to determine whether an instruction def isEvan Cheng2010-10-191-52/+36
| | | | | | | | | | | "long latency" enough to hoist even if it may increase spilling. Reloading a value from spill slot is often cheaper than performing an expensive computation in the loop. For X86, that means machine LICM will hoist SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON instructions. - Enable register pressure aware machine LICM by default. llvm-svn: 116781
* Don't recompute MachineRegisterInfo in the Optimize* method.Bill Wendling2010-10-181-1/+1
| | | | llvm-svn: 116750
* Add TypeBasedAliasAnalysis to the standard pass lists. Note that itDan Gohman2010-10-181-2/+2
| | | | | | is currently inert by default. llvm-svn: 116732
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-181-0/+4
| | | | | | | | | | | | does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. llvm-svn: 116720
* Trivial grammar tweak.Jim Grosbach2010-10-181-1/+1
| | | | llvm-svn: 116710
* X86-Windows: Emit an undefined global __fltused symbol when targeting WindowsMichael J. Spencer2010-10-162-1/+22
| | | | | | if any floating point arguments are passed to an external function. llvm-svn: 116665
* Whitespace!Michael J. Spencer2010-10-162-69/+69
| | | | llvm-svn: 116664
* More machine LICM work. It now tracks register pressure for path from ↵Evan Cheng2010-10-161-69/+155
| | | | | | preheader to current BB and use the information determine whether hoisting is worthwhile. llvm-svn: 116654
* Remove unused accessor.Jakob Stoklund Olesen2010-10-151-2/+0
| | | | llvm-svn: 116580
* Eliminate curli from SplitEditor. Use the LiveRangeEdit reference instead.Jakob Stoklund Olesen2010-10-152-18/+13
| | | | llvm-svn: 116547
* Move stack slot assignments into LiveRangeEdit.Jakob Stoklund Olesen2010-10-154-10/+16
| | | | | | | | | | All registers created during splitting or spilling are assigned to the same stack slot as the parent register. When splitting or rematting, we may not spill at all. In that case the stack slot is still assigned, but it will be dead. llvm-svn: 116546
* Create a new LiveRangeEdit class to keep track of the new registers created whenJakob Stoklund Olesen2010-10-146-125/+206
| | | | | | | | | splitting or spillling, and to help with rematerialization. Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it possible to share remat code between InlineSpiller and SplitKit. llvm-svn: 116543
* Only split around a loop if the live range has uses outside the loop periphery.Jakob Stoklund Olesen2010-10-141-14/+13
| | | | | | | | | | Before we would also split around a loop if any peripheral block had multiple uses. This could cause repeated splitting when splitting a different live range would insert uses into the periphery. Now -spiller=inline passes the nightly test suite again. llvm-svn: 116494
* Register pressure and instruction latency aware machine LICM. Work in progress.Evan Cheng2010-10-141-26/+242
| | | | llvm-svn: 116465
* Analysis groups need to initialize their default implementations.Owen Anderson2010-10-131-1/+2
| | | | llvm-svn: 116441
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-1219-19/+118
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Replace FindLiveRangeContaining() with getVNInfoAt() in LiveIntervalAnalysis.Jakob Stoklund Olesen2010-10-111-10/+8
| | | | | | This helps hiding the LiveRange class which really should be private. llvm-svn: 116244
* Properly handle reloading and spilling around partial redefines inJakob Stoklund Olesen2010-10-111-0/+14
| | | | | | | | | | | | LocalRewriter. This is a bit of a hack that adds an implicit use operand to model the read-modify-write nature of a partial redef. Uses and defs are rewritten in separate passes, and a single operand would never be processed twice. <rdar://problem/8518892> llvm-svn: 116210
* Per discussion with Sanjiv, remove the PIC16 target from mainline. When/ifChris Lattner2010-10-111-1/+1
| | | | | | | it comes back, it will be largely a rewrite, so keeping the old codebase in tree isn't helping anyone. llvm-svn: 116190
* fix the default va_arg expansion (in the realignment case) to not implicitlyChris Lattner2010-10-101-1/+1
| | | | | | truncate the stack pointer to 32-bits on a 64-bit machine. llvm-svn: 116169
* Silence compiler warning.Benjamin Kramer2010-10-091-1/+1
| | | | llvm-svn: 116156
* Rename SplitEditor::rewrite to finish() and break it out into a couple of newJakob Stoklund Olesen2010-10-082-40/+56
| | | | | | | | | functions: computeRemainder and rewrite. When the remainder breaks up into multiple components, remember to rewrite those uses as well. llvm-svn: 116121
* Avoid compiler warning: comparison between signed and unsigned integer.Evan Cheng2010-10-081-1/+1
| | | | llvm-svn: 116119
* Extract method ProcessUses from LocalRewriter::RewriteMBB. Both parent and childJakob Stoklund Olesen2010-10-081-320/+336
| | | | | | | | are still way too long, but it's a start. No functional change intended. llvm-svn: 116116
* Do not check that the bodies of two defs of same linkonce global are the same.Anton Korobeynikov2010-10-081-1/+1
| | | | | | | Such a check does not make any sense in presense of inlining and other compiler-dependent stuff. This should fix bunch of warnings on mingw32. llvm-svn: 116113
* Classify value numbers into connected components in linear time.Jakob Stoklund Olesen2010-10-081-23/+15
| | | | llvm-svn: 116105
* Call InitSections in llc and clang so that the binaries produced by themRafael Espindola2010-10-081-0/+1
| | | | | | are easier to diff with those produced by llvm-mc. llvm-svn: 116095
* Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.Evan Cheng2010-10-081-0/+4
| | | | llvm-svn: 116081
* Fix operand latency computation in cases where the definition operand isEvan Cheng2010-10-081-0/+11
| | | | | | | | | | implicit. e.g. %D6<def>, %D7<def> = VLD1q16 %R2<kill>, 0, ..., %Q3<imp-def> %Q1<def> = VMULv8i16 %Q1<kill>, %Q3<kill>, ... The real definition indices are 0,1. llvm-svn: 116080
* Line number 0 indicates there is no source line/file name info available for ↵Devang Patel2010-10-081-1/+7
| | | | | | this construct. llvm-svn: 116061
* After splitting, the remaining LiveInterval may be fragmented into multipleJakob Stoklund Olesen2010-10-072-11/+134
| | | | | | | | | | | | | connected components. These components should be allocated different virtual registers because there is no reason for them to be allocated together. Add the ConnectedVNInfoEqClasses class to calculate the connected components, and move values to new LiveIntervals. Use it from SplitKit::rewrite by creating new virtual registers for the components. llvm-svn: 116006
* Now with fewer extraneous semicolons!Owen Anderson2010-10-0732-33/+33
| | | | llvm-svn: 115996
* Provie a clearner interface so that FE can decide whether a function has ↵Devang Patel2010-10-071-6/+1
| | | | | | prototype or not. llvm-svn: 115988
* Print more loop info.Jakob Stoklund Olesen2010-10-071-0/+16
| | | | llvm-svn: 115951
* Print out MBB number when rewriting.Jakob Stoklund Olesen2010-10-071-1/+2
| | | | llvm-svn: 115950
* Add initialization routines for CodeGen.Owen Anderson2010-10-072-0/+60
| | | | llvm-svn: 115949
* Cache interval iterators in SplitEditor::addTruncSimpleRange so we only have toJakob Stoklund Olesen2010-10-071-10/+20
| | | | | | do one find(). llvm-svn: 115929
* Clean up debug printing.Jakob Stoklund Olesen2010-10-071-15/+19
| | | | llvm-svn: 115928
* Add MachineRegisterInfo::constrainRegClass and use it in MachineCSE.Jakob Stoklund Olesen2010-10-062-7/+16
| | | | | | | | This function is intended to be used when inserting a machine instruction that trivially restricts the legal registers, like LEA requiring a GR32_NOSP argument. llvm-svn: 115875
* Skip unused registers when verifying LiveIntervals.Jakob Stoklund Olesen2010-10-061-0/+5
| | | | llvm-svn: 115874
* Hide analysis group registration behind a macro, just like pass registration.Owen Anderson2010-10-061-1/+1
| | | | llvm-svn: 115835
* Add support for DW_TAG_unspecified_parameters.Devang Patel2010-10-061-6/+15
| | | | llvm-svn: 115833
OpenPOWER on IntegriCloud