aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CMake builds gold by default since revision 127466. This isOscar Fuentes2011-05-121-2/+4
| | | | | | | | | inconsistent with autoconf, which by default set BINUTILS_INCDIR to empty and exclude gold from target list. Based on a patch by Haitao Li! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131229 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit 131172 with fix. MachineInstr identity checks should check deadEvan Cheng2011-05-125-17/+294
| | | | | | | | | | markers. In some cases a register def is dead on one path, but not on another. This is passing Clang self-hosting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131214 91177308-0d34-0410-b5e6-96231b3b80d8
* indvars: Added SimplifyIVUsers.Andrew Trick2011-05-121-85/+99
| | | | | | | | Interleave IV simplifications. Currently involves EliminateComparison and EliminateRemainder. Next I'll add EliminateExtend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131210 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused variable and move a couple others inside DEBUG.Matt Beaumont-Gay2011-05-111-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131208 91177308-0d34-0410-b5e6-96231b3b80d8
* Address the last bit of relocation flag related divergence betweeenJason W Kim2011-05-112-25/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM and binutils. With this patch, there are no functional differences between the .o produced directly from LLVM versus the .s to .o via GNU as, for relocation tags at least, for both PIC and non-PIC modes. Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is necessary but not sufficient to determine whether the overall codegen mode is PIC or not. Why is this necessary? There is an incompatibility of how relocs are emitted in the .rodata section. Binutils PIC likes to emit certain relocs as section relative offsets. Non-PIC does not do this. So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which forces the objectwriter to pretend that all relocs are for PIC mode. Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected on llc. Todo: There are probably more issues for PIC mode on ARM/MC/ELF... Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s tests as well as expanded to cover the gamut. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131205 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn this into a table, this will make more sense shortly.Eric Christopher2011-05-111-11/+29
| | | | | | | Part of rdar://8470697 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131200 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this test to CodeGen/Thumb. rdar://problem/9416774Stuart Hastings2011-05-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131196 91177308-0d34-0410-b5e6-96231b3b80d8
* Identify end of prologue (and beginning of function body) using ↵Devang Patel2011-05-113-44/+95
| | | | | | DW_LNS_set_prologue_end line table opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131194 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid hoisting spills when looking at a copy from another register that is alsoJakob Stoklund Olesen2011-05-111-7/+16
| | | | | | | | | | | | | about to be spilled. This can only happen when two extra snippet registers are included in the spill, and there is a copy between them. Hoisting the spill creates problems because the hoist will mark the copy for later dead code elimination, and spilling the second register will turn the copy into a spill. <rdar://problem/9420853> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131192 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduced test case. rdar://problem/9416774Stuart Hastings2011-05-111-36/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131191 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix encoding of Thumb BLX register instructions. Patch by Koan-Sin Tan.Owen Anderson2011-05-112-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131189 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo and missing checkin from r131186.Andrew Trick2011-05-112-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131187 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugpoint support for miscompilations that result in a crash.Andrew Trick2011-05-116-11/+33
| | | | | | | | | | This change allows bugpoint to pinpoint the "opt" pass and bitcode segment responsible for a crash caused by miscompilation. At least it works well for me now, without having to create any custom execution wrappers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131186 91177308-0d34-0410-b5e6-96231b3b80d8
* And lo, I was given a testcase for 131152. rdar://problem/9416774Stuart Hastings2011-05-111-0/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131184 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes a bug in the DAGCombiner. LoadSDNodes have two values (data, chain).Nadav Rotem2011-05-115-12/+29
| | | | | | | | | | If there is a store after the load node, then there is a chain, which means that there is another user. Thus, asking hasOneUser would fail. Instead we ask hasNUsesOfValue on the 'data' value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131183 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle gcc-compatible compilers (such as clang) the same way we handleOscar Fuentes2011-05-113-4/+10
| | | | | | | | gcc. Fixes PR9886. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131181 91177308-0d34-0410-b5e6-96231b3b80d8
* Add custom lowering of X86 vector SRA/SRL/SHL when the shift amount is a ↵Nadav Rotem2011-05-113-11/+222
| | | | | | splat vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131179 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 131172 as it is causing clang to miscompile itself. I will tryRafael Espindola2011-05-114-296/+10
| | | | | | to provide a reduced testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131176 91177308-0d34-0410-b5e6-96231b3b80d8
* Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmpBill Wendling2011-05-115-7/+7
| | | | | | | | | intrinsic call. This prevents it from being reordered so that it appears *before* the setjmp intrinsic (thus making it completely useless). <rdar://problem/9409683> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131174 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Bill Wendling2011-05-111-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131173 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a late optimization to BranchFolding that hoist common instruction sequencesEvan Cheng2011-05-114-10/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the start of basic blocks to their common predecessor. It's actually quite common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size benefit. e.g. pushq %rax testl %edi, %edi jne LBB0_2 ## BB#1: xorb %al, %al popq %rdx ret LBB0_2: xorb %al, %al callq _foo popq %rdx ret => pushq %rax xorb %al, %al testl %edi, %edi je LBB0_2 ## BB#1: callq _foo LBB0_2: popq %rdx ret rdar://9145558 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131172 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize atomic lock or that doesn't use the result value.Eric Christopher2011-05-102-1/+83
| | | | | | | | | Next up: xor and and. Part of rdar://8470697 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131171 91177308-0d34-0410-b5e6-96231b3b80d8
* Add triple.Rafael Espindola2011-05-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131169 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cmake again.Rafael Espindola2011-05-101-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131164 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove empty file.Nick Lewycky2011-05-101-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131162 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid a gcc warning.Rafael Espindola2011-05-101-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131161 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cmake build.Rafael Espindola2011-05-101-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131160 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r131155 for now. It makes VMCore depend on Analysis and TransformsNick Lewycky2011-05-103-655/+150
| | | | | | | headers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131159 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize moveTypeModule.Rafael Espindola2011-05-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131157 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable my little CopyToReg argument hack with fast-isel. ↵Eli Friedman2011-05-101-2/+3
| | | | | | rdar://problem/9413587 . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131156 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for plugins add passes to the default set of passes. The ↵David Chisnall2011-05-103-150/+655
| | | | | | | | | | | | | | | | | standard set of passes used by front ends can now be modified by LLVM plugins, without needing to modify any front ends. Still to do: - Allow replacing / removing passes (infrastructure there, just needs an infrastructure exposed) - Defining sets of passes to be added or removed as a group - Extending the support to allow user-defined groups of optimisations - Allow plugins to be specified for loading automatically (e.g. from plugins.conf or some similar mechanism) Reviewed by Nick Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131155 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly walk through nested and adjacent CALLSEQ_START nodes. NoStuart Hastings2011-05-101-1/+2
| | | | | | | | test case; I've only seen this on a release branch, and I can't get it to reproduce on trunk. rdar://problem/7662569 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131152 91177308-0d34-0410-b5e6-96231b3b80d8
* Produce a __debug_frame section on darwin ARM when appropriate.Rafael Espindola2011-05-105-75/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131151 91177308-0d34-0410-b5e6-96231b3b80d8
* On MachO, unlike ELF, there should be no relocation to produce the CIE pointer.Rafael Espindola2011-05-102-8/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131149 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DwarfRequiresRelocationForStmtList toRafael Espindola2011-05-104-8/+8
| | | | | | DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131148 91177308-0d34-0410-b5e6-96231b3b80d8
* The EH symbols are only needed in eh_frame, not debug_frame.Rafael Espindola2011-05-102-2/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131146 91177308-0d34-0410-b5e6-96231b3b80d8
* Use .cfi_sections to put the unwind info in .debug_frame when possible. WithRafael Espindola2011-05-105-10/+45
| | | | | | | | | this clang will use .debug_frame in, for example, clang -g -c -m32 test.c This matches gcc's behaviour. It looks like .debug_frame is a bit bigger than .eh_frame, but has the big advantage of not being allocated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131140 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor lock versions of binary operators to be a little lessEric Christopher2011-05-101-73/+83
| | | | | | | cut and paste. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131139 91177308-0d34-0410-b5e6-96231b3b80d8
* First cut at getting debugging support for ARM/MC/ELF/.oJason W Kim2011-05-101-1/+0
| | | | | | | | | | DWARF stuff also gets fixed up by ELFARMAsmBackend::ApplyFixup(), but the offset is not guaranteed to be mod 4 == 0 as in text/data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131137 91177308-0d34-0410-b5e6-96231b3b80d8
* Downgrade a tablegen warning to an error.Jakob Stoklund Olesen2011-05-101-3/+2
| | | | | | | Ambiguous sub-register index compositions are OK as long as the backend writer knows what he is doing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131134 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR9883. Make sure all caches are invalidated when a live range is repaired.Jakob Stoklund Olesen2011-05-104-4/+8
| | | | | | | | The previous invalidation missed the alias interference caches. Also add a stats counter for the number of repaired ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131133 91177308-0d34-0410-b5e6-96231b3b80d8
* In a debug_frame the cfi offset is to the start of the debug_frame section!Rafael Espindola2011-05-102-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131129 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: add test cases for cvt, fneg, and selpJustin Holewinski2011-05-103-0/+274
| | | | | | Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CFIStartSections to the asm printer. Add an assert that at leastRafael Espindola2011-05-102-0/+20
| | | | | | one of the sections is created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131124 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: add PTX 2.3 setting in PTX sub-target.Justin Holewinski2011-05-102-0/+4
| | | | | | Patch by Wei-Ren Chen git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131123 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for producing .deubg_frame sections.Rafael Espindola2011-05-105-47/+111
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131121 91177308-0d34-0410-b5e6-96231b3b80d8
* Small cleanups.Rafael Espindola2011-05-101-8/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131120 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-105-6/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131119 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument.Rafael Espindola2011-05-101-12/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131118 91177308-0d34-0410-b5e6-96231b3b80d8
* Parsing and plumbing for .cfi_sections.Rafael Espindola2011-05-103-1/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131117 91177308-0d34-0410-b5e6-96231b3b80d8