summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* MC/Mach-O: Switch to using MachOFormat.h.Daniel Dunbar2010-11-273-13/+15
| | | | | | - I'm leaving MachO.h, because I believe it has external consumers, but I would really like to eliminate it (we have stylistic disagreements with one another). llvm-svn: 120187
* MC/Mach-O: Introduce Object/MachOFormat for describing purely platform / machineDaniel Dunbar2010-11-271-38/+24
| | | | | | | independent information on the Mach object format, and move some stuff from MachObjectWriter.cpp there. llvm-svn: 120186
* Remove the unused TheTarget member.Rafael Espindola2010-11-265-7/+7
| | | | llvm-svn: 120168
* Fix Whitespace.Michael J. Spencer2010-11-263-41/+41
| | | | llvm-svn: 120166
* Move tree navigation to a new Path class that doesn't have to be a template.Jakob Stoklund Olesen2010-11-261-1/+102
| | | | | | | | The path also holds a reference to the root node, and that allows important iterator accessors like start() and stop() to have no conditional code. (When the compiler is clever enough to remove it.) llvm-svn: 120165
* Use multiple 0x66 prefixes so that all nops up to 15 bytes are a single ↵Rafael Espindola2010-11-251-24/+8
| | | | | | instruction. llvm-svn: 120147
* Namespacify.Benjamin Kramer2010-11-252-3/+3
| | | | llvm-svn: 120146
* Factor some code to parseSectionFlags and fix the default type of a section.Rafael Espindola2010-11-251-49/+58
| | | | llvm-svn: 120145
* Treat a call of function pointer like a load of the pointer when consideringNick Lewycky2010-11-241-1/+6
| | | | | | | whether the pointer can be replaced with the global variable it is a copy of. Fixes PR8680. llvm-svn: 120126
* Behave a bit more like gnu as and use the symbol (instead of the section)Rafael Espindola2010-11-242-6/+18
| | | | | | for any relocation to a symbol defined in a tls section. llvm-svn: 120121
* Relocate with the symbol if the relocation is of kind NTPOFF.Rafael Espindola2010-11-241-1/+2
| | | | | | Patch by David Meyer, I added the test. llvm-svn: 120104
* Fix and add tests for all cases in x86 and x86_64 where gnu as implicitlyRafael Espindola2010-11-241-5/+13
| | | | | | sets the type of a symbol to STT_TLS. llvm-svn: 120100
* Updating MBlaze .mask and .frame directives to match GCC's output and fixing ↵Wesley Peck2010-11-241-12/+19
| | | | | | regression introduced in 120095 by checking MCStreamer::hasRawTextSupport. llvm-svn: 120097
* 1. Fixing error where basic block labels were not being printed out when ↵Wesley Peck2010-11-245-33/+126
| | | | | | | | | | they need to be for the MBlaze backend because AsmPrinter::isBlockOnlyReachableByFallthrough does not take into account delay slots. 2. Re-adding .mask and .frame directives in printed assembly. 3. Adding .ent and .end directives in printed assembly. 4. Minor cleanups to MBlaze backend. llvm-svn: 120095
* Use i8 as SETCC result type for i1 in SPU.Kalle Raiskila2010-11-241-4/+14
| | | | llvm-svn: 120092
* Allow for 'fcmp ogt' in SPU.Kalle Raiskila2010-11-241-2/+2
| | | | | | Fix by Visa Putkinen! llvm-svn: 120090
* If a symbol is used as tls, mark it as tls even if not declare as so. ProbablyRafael Espindola2010-11-241-0/+40
| | | | | | fixes PR8659. llvm-svn: 120076
* add a MemoryBuffer::getOpenFile method, which turns an openChris Lattner2010-11-231-0/+7
| | | | | | file descriptor into a MemoryBuffer (and closes the FD). llvm-svn: 120065
* Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.Duncan Sands2010-11-234-15/+15
| | | | llvm-svn: 120051
* The srem -> urem transform is not safe for any divisor that's not a power of ↵Benjamin Kramer2010-11-232-13/+11
| | | | | | | | | | two. E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. llvm-svn: 120049
* Replace calls to ConstantFoldInstruction with calls to SimplifyInstructionDuncan Sands2010-11-232-11/+12
| | | | | | | in two places that are really interested in simplified instructions, not constants. llvm-svn: 120044
* Constant folding here is pointless, because InstructionSimplifyDuncan Sands2010-11-231-8/+1
| | | | | | | (which does constant folding and more) is called a few lines later. llvm-svn: 120042
* Move the ARM reloc constants to Support/ELF.hJason W Kim2010-11-232-142/+4
| | | | llvm-svn: 120035
* Recognize sign/zero-extended constant BUILD_VECTORs for VMULL operations.Bob Wilson2010-11-231-13/+109
| | | | | | | We need to check if the individual vector elements are sign/zero-extended values. For now this only handles constants values. Radar 8687140. llvm-svn: 120034
* InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is ↵Benjamin Kramer2010-11-232-10/+17
| | | | | | | | positive. This allows to transform the rem in "1 << ((int)x % 8);" to an and. llvm-svn: 120028
* Propagate LeftDistributes and RightDistributes into their only uses.Duncan Sands2010-11-231-6/+4
| | | | | | Stylistic improvement suggested by Frits van Bommel. llvm-svn: 120026
* Fix typo pointed out by Frits van Bommel and Marius Wachtler.Duncan Sands2010-11-231-1/+1
| | | | llvm-svn: 120025
* Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in aDuncan Sands2010-11-234-42/+133
| | | | | | | | | | | | fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existing code. The case of Add has a bunch of funky logic which covers some of this plus a few variants (considers shifts to be a form of multiplication), which I didn't touch. The simplification performed is: A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and also to do it more often by not checking for "only one use" if "B+C" simplifies. llvm-svn: 120024
* Division by pow-of-2 is not cheap on SPU, do it with Kalle Raiskila2010-11-231-2/+0
| | | | | | shifts. llvm-svn: 120022
* Implement the rex64 prefix.Rafael Espindola2010-11-232-1/+5
| | | | llvm-svn: 120017
* Expand a little on the description of what InstructionSimplify does.Duncan Sands2010-11-231-2/+4
| | | | llvm-svn: 120016
* Clarify that constant folding of instructions applies when all operandsDuncan Sands2010-11-231-10/+11
| | | | | | | | are constant. There was in fact one exception to this (phi nodes) - so remove that exception (InstructionSimplify handles this so there should be no loss). llvm-svn: 120015
* Invalidate the layout on any relaxation, not just Instructions. Bug found by ↵Rafael Espindola2010-11-231-9/+11
| | | | | | | | David Meyer. While here, remove unused argument and rename UpdateForSlide to Invalidate. llvm-svn: 120009
* Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.Rafael Espindola2010-11-231-8/+12
| | | | llvm-svn: 120006
* Revert functionality doug added in r98575 that was neverChris Lattner2010-11-231-15/+11
| | | | | | documented and only used by some clang stuff I just removed. llvm-svn: 120002
* Reuse data fragments while lowering. Patch by David Meyer.Rafael Espindola2010-11-231-26/+77
| | | | llvm-svn: 119999
* Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.Wesley Peck2010-11-2327-1123/+1120
| | | | llvm-svn: 119990
* add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,Chris Lattner2010-11-231-0/+8
| | | | | | patch by Greg Pfeil! llvm-svn: 119989
* duncan's spider sense was right, I completely reversed the conditionChris Lattner2010-11-231-8/+8
| | | | | | on this instcombine xform. This fixes a miscompilation of 403.gcc. llvm-svn: 119988
* Fixed some style issues (no _, no spc after !)Jason W Kim2010-11-221-6/+6
| | | | llvm-svn: 119986
* Remove duplicated constants. Thanks to Jason for noticing it.Rafael Espindola2010-11-222-42/+26
| | | | llvm-svn: 119985
* InstCombine: Implement X - A*-B -> X + A*B.Benjamin Kramer2010-11-222-16/+9
| | | | llvm-svn: 119984
* Make the <ARCH>ELFObjectWriter statics privateJason W Kim2010-11-221-0/+3
| | | | llvm-svn: 119982
* Fix misplaced statics.Jason W Kim2010-11-221-6/+5
| | | | llvm-svn: 119981
* Kill trailing whitespaceJason W Kim2010-11-221-3/+3
| | | | llvm-svn: 119979
* Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics ↵Jason W Kim2010-11-221-46/+54
| | | | | | | | | | to inside the class where it belongs. Next step is to rationally break apart the RecordRelocation() Probably the step will be to have 1 member function for ech slot of the ELFRelocationEntry() llvm-svn: 119978
* Fix epilogue codegen to avoid leaving the stack pointer in an invalidEvan Cheng2010-11-223-23/+50
| | | | | | | | | | | | | | | | | state. Previously Thumb2 would restore sp from fp like this: mov sp, r7 sub, sp, #4 If an interrupt is taken after the 'mov' but before the 'sub', callee-saved registers might be clobbered by the interrupt handler. Instead, try restoring directly from sp: add sp, #4 Or, if necessary (with VLA, etc.) use a scratch register to compute sp and then restore it: sub.w r4, r7, #8 mov sp, r7 rdar://8465407 llvm-svn: 119977
* If a GEP index simply advances by multiples of a type of zero size,Duncan Sands2010-11-222-15/+25
| | | | | | then replace the index with zero. llvm-svn: 119974
* Fix a bug with extractelement on SPU.Kalle Raiskila2010-11-221-1/+1
| | | | | | | In the attached testcase, the element was never extracted (missing rotate). llvm-svn: 119973
* Add basic CFI methods to the streamer interface.Rafael Espindola2010-11-223-7/+125
| | | | llvm-svn: 119972
OpenPOWER on IntegriCloud