summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Prevent LiveRangeEdit from deleting bundled instructions.Andrew Trick2013-06-22
| | | | | | | | | We have no targets on trunk that bundle before regalloc. However, we have been advertising regalloc as bundle safe for use with out-of-tree targets. We need to at least contain the parts of the code that are still unsafe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184620 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't lose unreferenced non-trivial by-value parametersDavid Blaikie2013-06-21
| | | | | | | | | | | | A FastISel optimization was causing us to emit no information for such parameters & when they go missing we end up emitting a different function type. By avoiding that shortcut we not only get types correct (very important) but also location information (handy) - even if it's only live at the start of a function & may be clobbered later. Reviewed/discussion by Evan Cheng & Dan Gohman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184604 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc-arc-opts] Make IsTrackingImpreciseReleases a const method.Michael Gottesman2013-06-21
| | | | | | Thanks to Bill Wendling for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184593 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the time it takes to generating dwarf for assembly source filesKevin Enderby2013-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that have been run through the 'C' pre-processor. The implementation of SrcMgr.FindLineNumber() is slow but OK if it uses its cache when called multiple times with an SMLoc that is forward of the previous call. In the case of generating dwarf for assembly source files that have been run through the 'C' pre-processor we need to calculate the logical line number based on the last parsed cpp hash file line comment. And the current code calls SrcMgr.FindLineNumber() twice to do this causing its cache not to work and results in very slow compile times: % time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g 672.542u 0.299s 11:13.15 99.9% 0+0k 0+2io 2106pf+0w So we save the info from the last parsed cpp hash file line comment to avoid making the second call to SrcMgr.FindLineNumber() most times and end up with compile times like: % time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g 3.404u 0.104s 0:03.80 92.1% 0+0k 0+3io 2105pf+0w rdar://14156934 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184592 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a ↵Benjamin Kramer2013-06-21
| | | | | | | | frequency with a branch probability." This reverts commit r184584. Breaks PPC selfhost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184590 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make ↵Michael Gottesman2013-06-21
| | | | | | PtrState.RRI private and delete the TODO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184587 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc-arc-opts] Encapsulated PtrState.RRI.{Calls,ReverseInsertPts} into ↵Michael Gottesman2013-06-21
| | | | | | several methods on PtrState. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184586 91177308-0d34-0410-b5e6-96231b3b80d8
* BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with ↵Benjamin Kramer2013-06-21
| | | | | | | | | | | | | | | a branch probability. Zero is used by BlockFrequencyInfo as a special "don't know" value. It also causes a sink for frequencies as you can't ever get off a zero frequency with more multiplies. This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency was propagated into an inner loop causing excessive spilling. PR16402. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184584 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => ↵Michael Gottesman2013-06-21
| | | | | | PtrState.IsTrackingImpreciseRelease(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184583 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods ↵Michael Gottesman2013-06-21
| | | | | | PtrState.{IsCFGHazardAfflicted,SetCFGHazardAfflicted}. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184582 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Add support for selecting CUDA vs OCL mode based on tripleJustin Holewinski2013-06-21
| | | | | | IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184579 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR16360Michael Liao2013-06-21
| | | | | | | | | When (srl (anyextend x), c) is folded into (anyextend (srl x, c)), the high bits are not cleared. Add 'and' to clear off them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184575 91177308-0d34-0410-b5e6-96231b3b80d8
* Update physreg live intervals during remat.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184574 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -precompute-phys-liveness for testing LiveIntervals updates.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184573 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle more cases in LiveRangeEdit::eliminateDeadDefs.Andrew Trick2013-06-21
| | | | | | | | | | Live intervals for dead physregs may be created during coalescing. We need to update these in the event that their instruction goes away. crash.ll is the unit test that catches it when MI sched is enabled on X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184572 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor LiveRangeEdit::eliminateDeadDefs.Andrew Trick2013-06-21
| | | | | | I want to add logic to handle more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184571 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaceAndrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a -join-globalcopies bug; handle undef operands.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184569 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the -join-globalcopies option (off by default).Andrew Trick2013-06-21
| | | | | | | Always coalesce in forward order to propagate rematerialization. I'm fixing this option so I can enable it by default soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184568 91177308-0d34-0410-b5e6-96231b3b80d8
* Make rematerialization in the coalescer less sensitive to LRG order.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184567 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix IMULX machine model. Multiple def operands require multiple SchedWrites.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184566 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: cleanup DEBUG output.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184565 91177308-0d34-0410-b5e6-96231b3b80d8
* MI-Sched: Adjust regpressure limits for reserved regs.Andrew Trick2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184564 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support R_PPC_REL16 family of relocationsUlrich Weigand2013-06-21
| | | | | | | | | | | | | The GNU assembler supports (as extension to the ABI) use of PC-relative relocations in half16 fields, which allows writing code like: li 1, base-. This patch adds support for those relocation types in the assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184552 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support various tls-related modifiersUlrich Weigand2013-06-21
| | | | | | | | | | | | The current code base only supports the minimum set of tls-related relocations and @modifiers that are necessary to support compiler- generated code. This patch extends this to the full set defined in the ABI (and supported by the GNU assembler) for the benefit of the assembler parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184551 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @higher et.al. modifiersUlrich Weigand2013-06-21
| | | | | | | | | This adds support for the @higher, @highera, @highest, and @highesta modifers, including some missing relocation types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184550 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @toc@h modifierUlrich Weigand2013-06-21
| | | | | | | | | This adds the relocation type and other necessary infrastructure to use the @toc@h modifier in the assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184549 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @h modifierUlrich Weigand2013-06-21
| | | | | | | | | | | | | | This adds necessary infrastructure to support the @h modifier. Note that all required relocation types were already present (and unused). This patch provides support for using @h in the assembler; it would also be possible to now use this feature in code generated by the compiler, but this is not done yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184548 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Rename some more VK_PPC_ enumsUlrich Weigand2013-06-21
| | | | | | | | | | | | | | | This renames more VK_PPC_ enums, to make them more closely reflect the @modifier string they represent. This also prepares for adding a bunch of new VK_PPC_ enums in upcoming patches. For consistency, some MO_ flags related to VK_PPC_ enums are likewise renamed. No change in behaviour. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184547 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods ↵Michael Gottesman2013-06-21
| | | | | | PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184534 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method ↵Michael Gottesman2013-06-21
| | | | | | PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184533 91177308-0d34-0410-b5e6-96231b3b80d8
* [obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods ↵Michael Gottesman2013-06-21
| | | | | | | | | | | | PtrState.IsKnownSafe and PtrState.SetKnownSafe. This is apart of a series of patches to encapsulate PtrState.RRI and make PtrState.RRI a private field of PtrState. *NOTE* This is actually the second commit in the patch stream. I should have put this note on the first such commit r184528. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184532 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Some more minor code cleanups/comment additions.Michael Gottesman2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184531 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcarcopts] Refactor out the RRInfo merging code from PtrState into ↵Michael Gottesman2013-06-21
| | | | | | | | RRInfo::Merge. I also added some comments and performed minor code cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184528 91177308-0d34-0410-b5e6-96231b3b80d8
* SLP Vectorizer: do not search for store-chains that are wider than the ↵Nadav Rotem2013-06-21
| | | | | | vector-register size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184527 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: When asm printing include a '[def]' tag for tag decls that are ↵David Blaikie2013-06-21
| | | | | | | | | definitions (& rename the 'fwd' tag to 'decl' for clarity) This change is version locked with a change in Clang, so expect some transient buildbot fallout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184525 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Don't explicitly set `Binding` with STB_*Sean Silva2013-06-21
| | | | | | | | | | | | | | | Instead, just have 3 sub-lists, one for each of {STB_LOCAL,STB_GLOBAL,STB_WEAK}. This allows us to be a lot more explicit w.r.t. the symbol ordering in the object file, because if we allowed explicitly setting the STB_* `Binding` key for the symbol, then we might have ended up having to shuffle STB_LOCAL symbols to the front of the list, which is likely to cause confusion and potential for error. Also, this new approach is simpler ;) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184506 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Remove a (false) dependency on the memoryoperand's value as we do not useQuentin Colombet2013-06-20
| | | | | | | | | | | it at the moment. This allows to form more paired loads even when stack coloring pass destroys the memoryoperand's value. <rdar://problem/13978317> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184492 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Clean up VK_PPC_TOC... namesUlrich Weigand2013-06-20
| | | | | | | | | | | | | | This is another minor cleanup; to bring enum names in line with the corresponding @modifier names, this renames: VK_PPC_TOC -> VK_PPC_TOCBASE VK_PPC_TOC_ENTRY -> VK_PPC_TOC16 No code change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184491 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the X86 disassembler to use xacquire and xrelease when appropriate.Kevin Enderby2013-06-20
| | | | | | | | | | | | | | | | | | This is a bit tricky as the xacquire and xrelease hints use the same bytes, 0xf2 and 0xf3, as the repne and rep prefixes. Fortunately llvm has different llvm MCInst Opcode enums for rep/xrelease and repne/xacquire. So to make this work a boolean was added the InternalInstruction struct as part of the Prefix state which is set with the added logic in readPrefixes() when decoding an instruction to determine if these prefix bytes are to be disassembled as xacquire or xrelease. Then we let the matcher pick the normal prefix instructionID and we change the Opcode after that when it is set into the MCInst being created. rdar://11019859 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184490 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another fixme.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184488 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Minor cleanup in PPCELFObjectWriter::getRelocTypeInnerUlrich Weigand2013-06-20
| | | | | | | | | | | This just re-sorts the big switch statement in PPCELFObjectWriter::getRelocTypeInner to follow the (numerical) order of the reloc types, and fixes a couple of whitespace issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184485 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184484 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Expand sub for v2i32 and v4i32 for SITom Stellard2013-06-20
| | | | | | | | | | | Also add a v2i32 test to the existing v4i32 test. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry<awatry@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184482 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Expand add for v2i32 and v4i32Tom Stellard2013-06-20
| | | | | | | | | | | | Also add SI tests to existing file and a v2i32 test for both R600 and SI. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184481 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Expand v2i32 load/store instead of custom loweringTom Stellard2013-06-20
| | | | | | | | | | | | | | The custom lowering causes llc to crash with a segfault. Ideally, the custom lowering can be fixed, but this allows programs which load/store v2i32 to work without crashing. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry<awatry@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184480 91177308-0d34-0410-b5e6-96231b3b80d8
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184478 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Add support for st_value and st_size.Sean Silva2013-06-20
| | | | | | | | | After this patch, the ELF file produced by `yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64 (under SysV ABI, obviously; I tested on Linux), produces a working executable that goes into an infinite loop! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184469 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Allow symbols to reference sections.Sean Silva2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184468 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-20
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184464 91177308-0d34-0410-b5e6-96231b3b80d8