summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Hoist common code out of if statement.Jakob Stoklund Olesen2012-03-061-13/+8
| | | | llvm-svn: 152153
* Avoid finalizeBundles infinite looping.Evan Cheng2012-03-061-0/+2
| | | | llvm-svn: 152089
* Make it possible for a target to mark FSUB as Expand. This requires ↵Owen Anderson2012-03-062-16/+39
| | | | | | providing a default expansion (FADD+FNEG), and teaching DAGCombine not to form FSUBs post-legalize if they are not legal. llvm-svn: 152079
* Make MCRegisterInfo available to the the MCInstPrinter.Jim Grosbach2012-03-051-1/+2
| | | | | | | Used to allow context sensitive printing of super-register or sub-register references. llvm-svn: 152043
* Fix warnings about adding a bool to a string.Bill Wendling2012-03-051-2/+2
| | | | | | Patch by Sean Silva! llvm-svn: 152042
* Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce ↵Craig Topper2012-03-0514-52/+52
| | | | | | static data size. llvm-svn: 152016
* Stop fixing bad machine code in LiveIntervalAnalysis.Jakob Stoklund Olesen2012-03-041-15/+3
| | | | | | | | The first def of a virtual register cannot also read the register. Assert on such bad machine code instead of trying to fix it. TwoAddressInstructionPass should never create code like that. llvm-svn: 152010
* Stop adding <imp-def> operands when coalescing sub-registers.Jakob Stoklund Olesen2012-03-041-16/+0
| | | | | | | We are already setting <undef> flags, and that is good enough. The <imp-def> operands don't mean anything any more. llvm-svn: 152009
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-0424-57/+57
| | | | llvm-svn: 152001
* Use uint16_t instead of unsigned to store registers in reg classes. Reduces ↵Craig Topper2012-03-043-3/+3
| | | | | | static data size. llvm-svn: 151998
* Use uint16_t to store registers in callee saved register tables to reduce ↵Craig Topper2012-03-047-7/+7
| | | | | | size of static data. llvm-svn: 151996
* Grammar-o in function name.Eric Christopher2012-03-021-2/+2
| | | | llvm-svn: 151875
* Grammar.Eric Christopher2012-03-021-1/+1
| | | | llvm-svn: 151874
* If the linkage name doesn't exist we're supposed to emit a referenceEric Christopher2012-03-021-4/+3
| | | | | | to the string table for the function name, not the function name. llvm-svn: 151873
* Revert "Reorder the sections being output to reduce the number of assembler"Eric Christopher2012-03-021-3/+3
| | | | | | | | | The inline table needs to be constructed ahead of time so that it doesn't try to create new strings while we're emitting everything. This reverts commit a8ff9bccb399183cdd5f1c3cec2bda763664b4b0. llvm-svn: 151864
* Reorder the sections being output to reduce the number of assemblerEric Christopher2012-03-011-3/+3
| | | | | | | | | fixups that are being used to determine section offsets. Reduces the total number of fixups by 50% for a non-trivial testcase. Part of rdar://10413936 llvm-svn: 151852
* Minimal changes for LLVM to compile under VS11.Michael J. Spencer2012-03-011-1/+1
| | | | llvm-svn: 151849
* Fix a codegen fault in which log2 or exp2 could be dead-code eliminated even ↵James Molloy2012-03-011-2/+4
| | | | | | | | though they could have sideeffects. Only allow log2/exp2 to be converted to an intrinsic if they are declared "readnone". llvm-svn: 151807
* Make InlineSpiller bundle-aware.Jakob Stoklund Olesen2012-03-011-45/+48
| | | | | | | | | | Simply treat bundles as instructions. Spill code is inserted between bundles, never inside a bundle. Rewrite all operands in a bundle at once. Don't attempt and memory operand folding inside bundles. llvm-svn: 151787
* Move getBundleStart() into MachineInstrBundle.h.Jakob Stoklund Olesen2012-03-012-11/+1
| | | | | | | | | This allows the function to be inlined, and makes it suitable for use in getInstructionIndex(). Also provide a const version. C++ is great for touch typing practice. llvm-svn: 151782
* Don't redundantly copy implicit operands when rematerializing.Lang Hames2012-03-011-4/+9
| | | | | | | While we're at it - don't copy vreg implicit operands while rematerializing. This fixes PR12138. llvm-svn: 151779
* LegalizeIntegerTypes: Reorder operations in the "big shift by small amount" ↵Benjamin Kramer2012-02-291-4/+4
| | | | | | optimization, making the lives of later passes easier. llvm-svn: 151722
* Add an analyzeVirtReg() function.Jakob Stoklund Olesen2012-02-291-0/+33
| | | | | | | | | | | | | | This function does more or less the same as MI::readsWritesVirtualRegister(), but it supports bundles as well. It also determines if any constraint requires reading and writing operands to use the same register. Most clients want to know. Use the more modern MO.readsReg() instead of trying to sort out undefs and partial redefines. Stop supporting the extra full <imp-def> operand as an alternative to <def,undef> sub-register defines. llvm-svn: 151690
* Move the operand iterator into MachineInstrBundle.h where it belongs.Jakob Stoklund Olesen2012-02-291-4/+5
| | | | | | | | | Extract a base class and provide four specific sub-classes for iterating over const/non-const bundles/instructions. This eliminates the mystery bool constructor argument. llvm-svn: 151684
* Kill off LiveRangeEdit::getNewVRegs and LiveRangeEdit::getUselessVRegs. TheseLang Hames2012-02-284-31/+10
| | | | | | | | methods are no longer needed now that LinearScan has gone away. (Contains tweaks trivialSpillEverywhere to enable the removal of getNewVRegs). llvm-svn: 151658
* Re-commit r151623 with fix. Only issue special no-return calls if it's a ↵Evan Cheng2012-02-285-20/+29
| | | | | | direct call. llvm-svn: 151645
* Fix off-by one in comment.Benjamin Kramer2012-02-281-1/+1
| | | | llvm-svn: 151644
* LegalizeIntegerTypes: Reenable the large shift with small amount optimization.Benjamin Kramer2012-02-281-11/+21
| | | | | | | | | | | | | To avoid problems with zero shifts when getting the bits that move between words we use a trick: first shift the by amount-1, then do another shift by one. When amount is 0 (and size 32) we first shift by 31, then by one, instead of by 32. Also fix a latent bug that emitted the low and high words in the wrong order when shifting right. Fixes PR12113. llvm-svn: 151637
* Revert r151623 "Some ARM implementaions, e.g. A-series, does return stack ↵Daniel Dunbar2012-02-285-29/+20
| | | | | | prediction. ...", it is breaking the Clang build during the Compiler-RT part. llvm-svn: 151630
* Code cleanup following CR by Duncan.Nadav Rotem2012-02-281-5/+3
| | | | llvm-svn: 151627
* Fix a bug in the code that builds SDNodes from vector GEPs.Nadav Rotem2012-02-281-0/+4
| | | | | | | | | | | When the GEP index is a vector of pointers, the code that calculated the size of the element started from the vector type, and not the contained pointer type. As a result, instead of looking at the data element pointed by the vector, this code used the size of the vector. This works for 32bit members (on 32bit systems), but not for other types. Added code to peel the vector type and added a test. llvm-svn: 151626
* Some ARM implementaions, e.g. A-series, does return stack prediction. That is,Evan Cheng2012-02-285-20/+29
| | | | | | | | | | | | | | | | | the processor keeps a return addresses stack (RAS) which stores the address and the instruction execution state of the instruction after a function-call type branch instruction. Calling a "noreturn" function with normal call instructions (e.g. bl) can corrupt RAS and causes 100% return misprediction so LLVM should use a unconditional branch instead. i.e. mov lr, pc b _foo The "mov lr, pc" is issued in order to get proper backtrace. rdar://8979299 llvm-svn: 151623
* Handle regmasks in MachineCSE.Jakob Stoklund Olesen2012-02-281-0/+6
| | | | | | | | Don't attempt to extend physreg live ranges across calls. <rdar://problem/10942095> llvm-svn: 151610
* Handle regmasks in the machine code verifier.Jakob Stoklund Olesen2012-02-281-0/+15
| | | | llvm-svn: 151607
* Fix 80-column violation.Chad Rosier2012-02-281-2/+2
| | | | llvm-svn: 151599
* Fix for PR12090: clear def maps of aliases when visiting a copy. e.g.Evan Cheng2012-02-271-0/+5
| | | | | | | | | %S5<def> = COPY %S0<kill> First clear def map of Q1, etc. No small test case available. llvm-svn: 151574
* Update machine code verifier.Jakob Stoklund Olesen2012-02-271-35/+91
| | | | | | | | | After the SlotIndex slot names were updated, it is possible to apply stricter checks to live intervals. Also treat bundles as bags of operands when checking live intervals. llvm-svn: 151531
* Make the peephole optimizer clear kill flags on a vreg if it's about to add newLang Hames2012-02-251-0/+4
| | | | | | | | | uses of the vreg, since the old kills may no longer be valid. This was causing -verify-machineinstrs to complain about uses after kills, and could potentially have been causing subtle register allocation issues, but I haven't come across a test case yet. llvm-svn: 151425
* Fixed typo.Lang Hames2012-02-251-1/+1
| | | | llvm-svn: 151417
* Add missing staticJakob Stoklund Olesen2012-02-241-3/+3
| | | | llvm-svn: 151396
* Add a -stress-regalloc=<N> option.Jakob Stoklund Olesen2012-02-241-1/+9
| | | | | | | This will limit all register classes to N registers in order to stress test register allocation. llvm-svn: 151379
* Don't crash when a glue node contains an internal CopyToRegHal Finkel2012-02-241-0/+3
| | | | | | | This is necessary to support the existing ppc lowering code for indirect calls. Fixes PR12071. llvm-svn: 151373
* SDAGBuilder: Remove register sets that were never read and prune dead code ↵Benjamin Kramer2012-02-241-63/+3
| | | | | | surrounding it. llvm-svn: 151364
* ScheduleDAGInstrs.h:155: warning: suggest parentheses around `&&' within `||'.Nick Lewycky2012-02-241-1/+1
| | | | llvm-svn: 151355
* PostRA sched: speed up physreg tracking by not abusing SparseSet.Andrew Trick2012-02-242-35/+80
| | | | llvm-svn: 151348
* Turn avx insert intrinsic calls into INSERT_SUBVECTOR DAG nodes and remove ↵Pete Cooper2012-02-241-0/+15
| | | | | | duplicate patterns for selecting the intrinsics llvm-svn: 151342
* If the Address of a variable is an argument then treat the entireEric Christopher2012-02-241-3/+7
| | | | | | | | | | | variable declaration as an argument because we want that address anyhow for our debug information. This seems to fix rdar://9965111, at least we have more debug information than before and from reading the assembly it appears to be the correct location. llvm-svn: 151335
* Tabs, formatting and long lines oh my!Eric Christopher2012-02-241-4/+6
| | | | llvm-svn: 151334
* Allow an integer to be converted into an MMX type when it's used in an inlineBill Wendling2012-02-231-2/+8
| | | | | | | asm. <rdar://problem/10106006> llvm-svn: 151303
* BitVectorize loop.Benjamin Kramer2012-02-231-3/+1
| | | | llvm-svn: 151274
OpenPOWER on IntegriCloud