summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [yaml2obj][ELF] Add an optional `Size` field to the YAML section declaration.Simon Atanasyan2014-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the only method to configure ELF section's content and size is to assign a hexadecimal string to the `Content` field. Unfortunately this way is completely useless when you need to declare a really large section. To solve this problem this patch adds one more optional field `Size` to the `RawContentSection` structure. When yaml2obj generates an ELF file it uses the following algorithm: 1. If both `Content` and `Size` fields are missed create an empty section. 2. If only `Content` field is missed take section length from the `Size` field and fill the section by zero. 3. If only `Size` field is missed create a section using data from the `Content` field. 4. If both `Content` and `Size` fields are provided validate that the `Size` value is not less than size of `Content` data. Than take section length from the `Size`, fill beginning of the section by `Content` and the rest by zero. Examples -------- * Create a section 0x10000 bytes long filled by zero Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Size: 0x10000 * Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE' Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Content: CAFEBABE Size: 0x10000 The patch reviewed by Michael Spencer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208995 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable inline memcpy expansion for Thumb1.James Molloy2014-05-16
| | | | | | | | Patch by Moritz Roth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208994 91177308-0d34-0410-b5e6-96231b3b80d8
* Small dyn_cast and auto cleanup.Rafael Espindola2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208993 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the Load/Store optimization pass to work with Thumb1.James Molloy2014-05-16
| | | | | | | | Patch by Moritz Roth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208992 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the Load/Store optimization pass for Thumb1 but make it return ↵James Molloy2014-05-16
| | | | | | | | | | immediately for now. Patch by Moritz Roth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208991 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few comment typos and style issues.James Molloy2014-05-16
| | | | | | | | Patch by Moritz Roth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208990 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add SELEQZ and SELNEZ instructionsZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3743 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208987 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the GlobalAlias constructor to look a bit more like GlobalVariable.Rafael Espindola2014-05-16
| | | | | | | This is part of the fix for pr10367. A GlobalAlias always has a pointer type, so just have the constructor build the type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208983 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add Compact indexed jumps.Zoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3707 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208981 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-16
| | | | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208980 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Implement global merge optimization for global variables."Rafael Espindola2014-05-16
| | | | | | | | | | | | This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208978 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add Compact zero-compare branch-and-link instructionsZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3718 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208977 91177308-0d34-0410-b5e6-96231b3b80d8
* MergeFunctions Pass, introduced total ordering among GEP operations.Stepan Dyatkovskiy2014-05-16
| | | | | | | | | | | | Patch replaces old isEquivalentGEP implementation, and changes type of comparison result from bool (equal or not) to {-1, 0, 1} (less, equal, greater). This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208976 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add DwarfTypesDWOSection also to MCCOFF.NAKAMURA Takumi2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208975 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add compact branch instructionsZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3691 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208974 91177308-0d34-0410-b5e6-96231b3b80d8
* MergeFunctions Pass, introduced total ordering among operations.Stepan Dyatkovskiy2014-05-16
| | | | | | | | | | | | Patch replaces old isEquivalentOperation implementation, and changes type of comparison result from bool (equal or not) to {-1, 0, 1} (less, equal, greater). This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208973 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add LWPC and LWUPC instructionsZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208971 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add Floating Point Compare setting Mask - CMP.condn.fmtZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3750 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208970 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen: fix operand counting for aliasesTim Northover2014-05-16
| | | | | | | | | | | | | | | | | | | | | TableGen has a fairly dubious heuristic to decide whether an alias should be printed: does the alias have lest operands than the real instruction. This is bad enough (particularly with no way to override it), but it should at least be calculated consistently for both strings. This patch implements that logic: first get the *correct* string for the variant, in the same way as the Matcher, without guessing; then count the number of whitespace chars. There are basically 4 changes this brings about after the previous commits; all of these appear to be good, so I have changed the tests: + ARM64: we print "neg X, Y" instead of "sub X, xzr, Y". + ARM64: we skip implicit "uxtx" and "uxtw" modifiers. + Sparc: we print "mov A, B" instead of "or %g0, A, B". + Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208969 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: disable printing of "fcmXY ..., #0" aliasesTim Northover2014-05-16
| | | | | | | | | The canonical syntax is "fcmXY ..., #0.0". This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208968 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: disable printing of add/sub aliasTim Northover2014-05-16
| | | | | | | | | | This alias appears not to have an appropriate PrintMethod. Normally, I'd look into it, but since AArch64 is disappearing soon it's probably not worth it. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208967 91177308-0d34-0410-b5e6-96231b3b80d8
* Sparc: disable printing of jmp/call aliases (C++ does it)Tim Northover2014-05-16
| | | | | | | | | | These aliases are handled entirely in C++ and only having TableGen InstAliases for some of them was confusing LLVM. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208966 91177308-0d34-0410-b5e6-96231b3b80d8
* Sparc: disable printing on longer "brX,pt" aliasesTim Northover2014-05-16
| | | | | | | This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208965 91177308-0d34-0410-b5e6-96231b3b80d8
* Mips: don't print subu alias for addiuTim Northover2014-05-16
| | | | | | | | | | Certainly not without having a custom PrintMethod to invert the immediate beforehand. But probably not at all. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208964 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: disable printing of bare "mov" aliasesTim Northover2014-05-16
| | | | | | | | | | | In AT&T syntax, we should probably print the full "movl" or "movw". TableGen used to ignore these aliases because it was miscounting the number of operands. This fixes the issue. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208963 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: disable printing of MOV -> MOVZ aliasesTim Northover2014-05-16
| | | | | | | | | | Actually, MOV sometimes is canonical, but for now this is a better approximation than what's there. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208962 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: disable printing of swapped compare-mask aliasesTim Northover2014-05-16
| | | | | | | | | | You can perform (say) an fcmle operation by swapping the operands on an fcmge, but it shouldn't be printed like that. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208961 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: disable printing of LDUR -> LDR aliasesTim Northover2014-05-16
| | | | | | | | | | We accept "ldr w3, [x1, #-1]" as a convenience, but we should still print the canonical "ldur" form. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208960 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: give TST aliases priority over ANDS.Tim Northover2014-05-16
| | | | | | | | | | If an ANDS instruction has Rd == ZR it should be printed as TST since its only effect is on the flags register NZCV. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208959 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: give MOV priority over shorter ORR when printing aliases.Tim Northover2014-05-16
| | | | | | | | | MOV is almost always the right thing to print if possile. People understand it. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208958 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: give NEG priority over SUB when printing aliases.Tim Northover2014-05-16
| | | | | | | | | | For example, the full instruction "sub w0, wzr, w1, uxtw" could print as either "neg w0, w1" or "sub w0, wzr, w1". The former is better. This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208957 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: disable printing of "lslv" type aliasesTim Northover2014-05-16
| | | | | | | | | | You can write "lslv w0, w1, w2" (probably for legacy reasons), but it should be printed as simply "lsl". This will be tested when the TableGen "should I print this Alias" heuristic is fixed (very soon). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208956 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64]Implement NEON post-increment LD1(lane) and post-increment LD1R.Hao Liu2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208955 91177308-0d34-0410-b5e6-96231b3b80d8
* MergeFunctions Pass, introduced total ordering among function attributes.Stepan Dyatkovskiy2014-05-16
| | | | | | | | | This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208953 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add Floating Point Fused Multiply Add SubtractZoran Jovanovic2014-05-16
| | | | | | | Differential Revision: http://reviews.llvm.org/D3727 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208952 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: add some integer/floating point conversion libcallsSaleem Abdulrasool2014-05-16
| | | | | | | | Add some Windows on ARM specific library calls. These are provided by msvcrt, and can be used to perform integer to floating-point conversions (and vice-versa) mirroring similar functions in the RTABI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208949 91177308-0d34-0410-b5e6-96231b3b80d8
* Add C API for thread yielding callback.Juergen Ributzka2014-05-16
| | | | | | | | | | | | | | | | | | | | | Sometimes a LLVM compilation may take more time then a client would like to wait for. The problem is that it is not possible to safely suspend the LLVM thread from the outside. When the timing is bad it might be possible that the LLVM thread holds a global mutex and this would block any progress in any other thread. This commit adds a new yield callback function that can be registered with a context. LLVM will try to yield by calling this callback function, but there is no guaranteed frequency. LLVM will only do so if it can guarantee that suspending the thread won't block any forward progress in other LLVM contexts in the same process. Once the client receives the call back it can suspend the thread safely and resume it at another time. Related to <rdar://problem/16728690> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208945 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Allow multiple profiles in RawInstrProfReaderJustin Bogner2014-05-16
| | | | | | | | | | | | | | | | | | | Allow multiple raw profiles to coexist in a single .profraw file, given the following conditions: - Zero padding at the end of or between profiles will be skipped. - Each profile must start with a valid header. - Mixing endianness or pointer sizes in concatenated profiles files is not allowed. This is needed to handle cases where a program's shared libraries are profiled as well as the main executable itself, as we'll need to emit each executable's counters. Combining the tables in the runtime would be expensive for the instrumented program. rdar://16918688 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208938 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Options query functions and just access our Options directly.Eric Christopher2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208937 91177308-0d34-0410-b5e6-96231b3b80d8
* musttail: Fix the verification of alignment attributesReid Kleckner2014-05-15
| | | | | | | Previously this would fail with an assertion failure when trying to add an alignment attribute without a value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208935 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement global merge optimization for global variables.Jiangning Liu2014-05-15
| | | | | | | | | | | | | This commit implements two command line switches -global-merge-on-external and -global-merge-aligned, and both of them are false by default, so this optimization is disabled by default for all targets. For ARM64, some back-end behaviors need to be tuned to get this optimization further enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208934 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Follow up to r208930, comment usage of 'using' to bring in base ↵David Blaikie2014-05-15
| | | | | | | | class overload. Code review feedback from Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208933 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more MC options into the MCTargetOptions structure.Eric Christopher2014-05-15
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208932 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused llvm namespace bool variable.Eric Christopher2014-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208931 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't put fission type units in comdat sections.David Blaikie2014-05-15
| | | | | | | | | Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208930 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the -L option for SaveTempLabels not be static. No functional change.Eric Christopher2014-05-15
| | | | | | Note: This option name is terrible, we should fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208929 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish materialize for intsReed Kotler2014-05-15
| | | | | | | | | | | | | | Summary: We add code to materialize all integer literals. Test Plan: simplestorei.ll Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3596 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208923 91177308-0d34-0410-b5e6-96231b3b80d8
* Use range forMatt Arsenault2014-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208922 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.Alexey Samsonov2014-05-15
| | | | | | | | | | | | | It is more appropriate than the current situation, when one flag (AbsoluteFilePath) is relevant only if another flag is set. This refactoring would also simplify fetching the short function name (stored in DW_AT_name) instead of a linkage name returned currently. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208921 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't insert lifetime.end markers between a musttail call and retReid Kleckner2014-05-15
| | | | | | | | | | | | | The allocas going out of scope are immediately killed by the return instruction. This is a resend of r208912, which was committed accidentally. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3792 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208920 91177308-0d34-0410-b5e6-96231b3b80d8