Chad Rosier [Fri, 19 Apr 2013 18:39:50 +0000 (18:39 +0000)]
[ms-inline asm] Refactor the parsing of identifiers. No functional change
indended.
Part of rdar://
13663589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179871
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 19 Apr 2013 18:16:06 +0000 (18:16 +0000)]
Add test to make sure that a int-to-ptr can be merged correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179869
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 19 Apr 2013 17:37:05 +0000 (17:37 +0000)]
[ms-inline asm] Remove these asserts. C++ variables that use namespace
qualifiers don't necessarily begin with an identifier (e.g., ::foo::bar).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 19 Apr 2013 17:32:29 +0000 (17:32 +0000)]
[ms-inline asm] Move this variable into the scope in which it is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179866
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 19 Apr 2013 17:31:39 +0000 (17:31 +0000)]
[ms-inline asm] Make this a hard error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179865
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Apr 2013 16:56:24 +0000 (16:56 +0000)]
ConstantFolding: ComputeMaskedBits wants the scalar size for vectors.
Fixes PR15791.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 19 Apr 2013 15:57:00 +0000 (15:57 +0000)]
[ms-inline asm] Cleanup the dot operator implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179856
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 19 Apr 2013 15:44:32 +0000 (15:44 +0000)]
ARM: Permit "sp" in ARM variant of STREXD instructions
Patch from Mihail Popa
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179854
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Apr 2013 13:45:05 +0000 (13:45 +0000)]
refactor the struct byte swapping to a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179851
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Apr 2013 12:47:53 +0000 (12:47 +0000)]
Only run the tests in test/Object/ARM if we have ARM support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179850
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Apr 2013 11:43:21 +0000 (11:43 +0000)]
Attributes: Don't print trailing whitespace on the function attribute comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179849
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Apr 2013 11:36:47 +0000 (11:36 +0000)]
Don't read one command past the end.
Thanks to Evgeniy Stepanov for reporting this.
It might be a good idea to add a command iterator abstraction to MachO.h, but
this fixes the bug for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179848
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 19 Apr 2013 09:58:09 +0000 (09:58 +0000)]
ARM: permit "sp" in ARM variants of MOVW/MOVT instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179847
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Fri, 19 Apr 2013 09:32:30 +0000 (09:32 +0000)]
Revert 179826. Tests were worthless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179845
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Apr 2013 07:47:16 +0000 (07:47 +0000)]
Revert "PR14606: debug info imported_module support"
This reverts commit r179836 as it seems to have caused test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179840
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 19 Apr 2013 06:57:04 +0000 (06:57 +0000)]
PR14606: debug info imported_module support
Adding another CU-wide list, in this case of imported_modules (since they
should be relatively rare, it seemed better to add a list where each element
had a "context" value, rather than add a (usually empty) list to every scope).
This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll
need to expand this to cover DW_TAG_imported_declaration too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179836
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 19 Apr 2013 04:31:49 +0000 (04:31 +0000)]
Add support for index resources (for a SlotIndex) to be relinquished.
When the SlotIndexes pass was introduced it was intended to support insertion
of code during register allocation. Removal of code was a minor consideration
(and raised the question of what to do about dangling SlotIndex objects pointing
to the erased index), so I opted to keep all indexes around indefinitely and
simply null out those that weren't being used.
Nowadays people are moving more code around (e.g. via HandleMove), which means
more zombie indexes. I want to start killing off indexes when we're done with
them to reclaim the resources they use up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179834
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 19 Apr 2013 04:03:37 +0000 (04:03 +0000)]
Use 'array_lengthof' as possible to avoid magic numbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179833
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 19 Apr 2013 02:11:06 +0000 (02:11 +0000)]
R600: Add pattern for the BFI_INT instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179830
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 19 Apr 2013 02:11:00 +0000 (02:11 +0000)]
R600/SI: Use InstFlag for VOP3 modifier operands
InstFlag has a default value of 0 and will simplify the VOP3 patterns.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179829
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 19 Apr 2013 02:10:53 +0000 (02:10 +0000)]
R600: Reorganize lit tests and document how they should be organized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179828
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Fri, 19 Apr 2013 01:18:04 +0000 (01:18 +0000)]
Keep coding stanard. Don't use "else if" after "return".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179826
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Fri, 19 Apr 2013 01:10:45 +0000 (01:10 +0000)]
Don't run expensive -O2 and -O3 in tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179825
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 19 Apr 2013 01:04:40 +0000 (01:04 +0000)]
Add some more stats for fast isel vs. SelectionDAG, w.r.t lowering function
arguments in entry BBs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179824
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 19 Apr 2013 00:05:59 +0000 (00:05 +0000)]
Use an enum instead of magic constants to improve readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179820
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 23:34:17 +0000 (23:34 +0000)]
Implement a better fix for PR15185.
If the return type is a pointer and the call returns an integer, then do the
inttoptr convertions. And vice versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179817
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 23:16:46 +0000 (23:16 +0000)]
Relax this assert. It may not hold in all cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179814
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Apr 2013 23:16:12 +0000 (23:16 +0000)]
[ms-inline asm] Apply the condition code mnemonic aliases to both the Intel and
AT&T dialect. Test case for r179804 as well.
rdar://
13674398 and PR13340.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179813
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 22:56:05 +0000 (22:56 +0000)]
Assert if we're trying to generate a null compact unwind entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179809
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 22:55:29 +0000 (22:55 +0000)]
Set the compact unwind encoding to 'requires EH DWARF' if we cannot generate a CU encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179808
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 18 Apr 2013 22:54:25 +0000 (22:54 +0000)]
Disable PPC comparison optimization by default
This seems to cause a stage-2 LLVM compile failure (by crashing TableGen); do
I'm disabling this for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Apr 2013 22:35:36 +0000 (22:35 +0000)]
[asm parser] Add support for predicating MnemonicAlias based on the assembler
variant/dialect. Addresses a FIXME in the emitMnemonicAliases function.
Use and test case to come shortly.
rdar://
13688439 and part of PR13340.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179804
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 18 Apr 2013 22:15:08 +0000 (22:15 +0000)]
Implement optimizeCompareInstr for PPC
Many PPC instructions have a so-called 'record form' which stores to a specific
condition register the result of comparing the result of the instruction with
zero (always as a signed comparison). For integer operations on PPC64, this is
always a 64-bit comparison.
This implementation is derived from the implementation in the ARM backend;
there are some differences because PPC condition registers are allocatable
virtual registers (although the record forms always use a specific one), and we
look for a matching subtraction instruction after the compare (but before the
first use) in addition to before it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179802
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 21:45:04 +0000 (21:45 +0000)]
Make the TargetIndependent flag have the right boolean value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179798
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Apr 2013 21:37:45 +0000 (21:37 +0000)]
X86: Add an SSE2 lowering for 64 bit compares when pcmpgtq (SSE4.2) isn't available.
This pattern started popping up in vectorized min/max reductions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179797
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 18 Apr 2013 20:49:17 +0000 (20:49 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179793
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 20:17:28 +0000 (20:17 +0000)]
Cleanup patch:
Semantics of parameters named Index and Idx were inconsistent between
"include/llvm/IR/Attributes.h", "lib/IR/AttributeImpl.h" and
"lib/IR/Attributes.cpp": sometimes these were fixed 1-based indexes of IR
parameters (or AttributeSet::ReturnIndex for IR return values or
AttributeSet::FunctionIndex for IR functions), other times they were the
internal slot for storage in the underlying AttributeSetImpl. I renamed usage of
the former to "Index" and usage of the latter to "Slot" ("Slot" was already
being used consistently for the latter in a subset of cases)
Patch by Stephen Lin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179791
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 20:15:25 +0000 (20:15 +0000)]
This patch addresses two cleanup issues:
1. Verify::VerifyParameterAttrs in "lib/IR/Verifier.cpp" and
AttrBuilder::removeFunctionOnlyAttrs in "lib/IR/Attributes.cpp" (only called
by Verify::VerifyFunctionAttrs) separately maintained a list of function-only
attribute types. I've consolidated the logic into a new function used for
both cases in "lib/IR/Verifier.cpp", so this logic is in one place (other
than the AsmParser front-end)
2. Various functions in "lib/IR/Verifier.cpp" passed AttributeSet around by
reference needlessly, as it's just a handle to an immutable pimpl body.
Patch by Stephen Lin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179790
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 18 Apr 2013 20:13:04 +0000 (20:13 +0000)]
Fix a -Wdocumentation warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179789
91177308-0d34-0410-b5e6-
96231b3b80d8
Anat Shemer [Thu, 18 Apr 2013 19:56:44 +0000 (19:56 +0000)]
In the function InstCombiner::visitExtractElementInst() removed the limitation that extract is promoted over a cast only if the cast has only one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179786
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Apr 2013 19:50:53 +0000 (19:50 +0000)]
C API: Fix coding style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179785
91177308-0d34-0410-b5e6-
96231b3b80d8
Anat Shemer [Thu, 18 Apr 2013 19:35:39 +0000 (19:35 +0000)]
Added a function scalarizePHI() that sclarizes a vector phi instruction if it has only 2 uses: one to promote the vector phi in a loop and the other use is an extract operation of one element at a constant location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179783
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Apr 2013 18:30:16 +0000 (18:30 +0000)]
Fix comment. Patch by Stephen Lin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179780
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Apr 2013 18:08:55 +0000 (18:08 +0000)]
At Jim Grosbach's request detemplate Object/MachO.h.
We are still able to handle mixed endian objects by swapping one struct at a
time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Apr 2013 17:42:14 +0000 (17:42 +0000)]
Fix a comment, PR15777.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179775
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 18 Apr 2013 17:41:08 +0000 (17:41 +0000)]
Allow misaligned stores in x86 fast-isel.
In X86FastISel::X86SelectStore(), improperly aligned stores are rejected and
handled by the DAG-based ISel. However, X86FastISel::X86SelectLoad() makes
no such requirement. There doesn't appear to be an x86 architectural
correctness issue with allowing potentially unaligned store instructions.
This patch removes this restriction.
Patch by Jim Stichnot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179774
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 18 Apr 2013 17:22:34 +0000 (17:22 +0000)]
LoopVectorizer: Recognize min/max reductions
A min/max operation is represented by a select(cmp(lt/le/gt/ge, X, Y), X, Y)
sequence in LLVM. If we see such a sequence we can treat it just as any other
commutative binary instruction and reduce it.
This appears to help bzip2 by about 1.5% on an imac12,2.
radar://
12960601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179773
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 18 Apr 2013 16:39:32 +0000 (16:39 +0000)]
Fix grammar in LLVMBuild.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Apr 2013 16:28:19 +0000 (16:28 +0000)]
[ms-inline asm] Simplify some logic and add a FIXME for unhandled unary minus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179765
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Apr 2013 16:13:18 +0000 (16:13 +0000)]
Make this private method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179764
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 18 Apr 2013 16:11:44 +0000 (16:11 +0000)]
Fixes to LangRef.rst: incorrect attributes syntax and misplaced 'nobuiltin'
Patch by Stephen Lin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Apr 2013 15:19:45 +0000 (15:19 +0000)]
Fix comment spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179761
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Apr 2013 14:29:13 +0000 (14:29 +0000)]
LoopVectorize: Use a set to avoid longer cycles in the reduction chain too.
Fixes PR15748.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179757
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Thu, 18 Apr 2013 09:11:08 +0000 (09:11 +0000)]
Fix for PR14824, An ARM Load/Store Optimization bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179751
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 18 Apr 2013 08:42:33 +0000 (08:42 +0000)]
Revert "Combine bit test + conditional or into simple math"
It is causing stage2 builds to fail, let's get them running again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179750
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 18 Apr 2013 07:30:07 +0000 (07:30 +0000)]
Combine bit test + conditional or into simple math
Simplify:
(select (icmp eq (and X, C1), 0), Y, (or Y, C2))
Into:
(or (shl (and X, C1), C3), y)
Where:
C3 = Log(C2) - Log(C1)
If:
C1 and C2 are both powers of two
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179748
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 18 Apr 2013 05:39:45 +0000 (05:39 +0000)]
[objc-arc] Do not mismatch up retains inside a for loop with releases outside said for loop in the presense of differing provenance caused by escaping blocks.
This occurs due to an alloca representing a separate ownership from the
original pointer. Thus consider the following pseudo-IR:
objc_retain(%a)
for (...) {
objc_retain(%a)
%block <- %a
F(%block)
objc_release(%block)
}
objc_release(%a)
From the perspective of the optimizer, the %block is a separate
provenance from the original %a. Thus the optimizer pairs up the inner
retain for %a and the outer release from %a, resulting in segfaults.
This is fixed by noting that the signature of a mismatch of
retain/releases inside the for loop is a Use/CanRelease top down with an
None bottom up (since bottom up the Retain-CanRelease-Use-Release
sequence is completed by the inner objc_retain, but top down due to the
differing provenance from the objc_release said sequence is not
completed). In said case in CheckForCFGHazards, we now clear the state
of %a implying that no pairing will occur.
Additionally a test case is included.
rdar://
12969722
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179747
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 18 Apr 2013 04:34:11 +0000 (04:34 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179746
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 18 Apr 2013 04:34:06 +0000 (04:34 +0000)]
Streamline arc-annotation test (removing some cases which do not add any extra coverage) and set it up to use FileCheck variables to make the test more robust.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179745
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 18 Apr 2013 01:00:46 +0000 (01:00 +0000)]
[mips] Rename function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179741
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 18 Apr 2013 00:52:44 +0000 (00:52 +0000)]
[mips] DSP-ASE move from HI/LO register instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179739
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 18 Apr 2013 00:41:53 +0000 (00:41 +0000)]
Mips assembler: formatting and comment changes.
This patch should not have any functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179737
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Apr 2013 23:35:59 +0000 (23:35 +0000)]
Add an option `-enable-old-style-attr-syntax' to print out function attributes in the "old" style.
It's sometimes beneficial to emit a testcase with the old style attribute
syntax. Allow someone to do this.
<rdar://problem/
13563209>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179735
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 21:59:41 +0000 (21:59 +0000)]
[objc-arc] Added annotation option to only emit annotations for a specific ssa identifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179729
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Apr 2013 21:20:55 +0000 (21:20 +0000)]
Two small cleanups for ELF's templates.
* We only ever specialize these templates with an instantiation of ELFType,
so we don't need a template template.
* Replace LLVM_ELF_COMMA with just passing the individual parameters to the
macro. This requires a second macro for when we only have ELFT, but that
is still a small win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179726
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 17 Apr 2013 21:18:16 +0000 (21:18 +0000)]
Add support for subsections to the ELF assembler. Fixes PR8717.
Differential Revision: http://llvm-reviews.chandlerc.com/D598
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179725
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 17 Apr 2013 21:14:38 +0000 (21:14 +0000)]
[ms-inline asm] These should be int64_t, not uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179724
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 21:03:53 +0000 (21:03 +0000)]
Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179721
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 17 Apr 2013 21:01:45 +0000 (21:01 +0000)]
[ms-inline asm] Add support for the minus unary operator. Previously, we were
unable to handle cases such as __asm mov eax, 8*-8.
This patch also attempts to simplify the state machine. Further, the error
reporting has been improved. Test cases included, but more will be added to
the clang side shortly.
rdar://
13668445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179719
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 20:48:03 +0000 (20:48 +0000)]
[objc-arc] Added descriptions for EnableARCAnnotations, EnableCheckForCFGHazards, EnableARCOptimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179718
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Apr 2013 20:48:01 +0000 (20:48 +0000)]
[objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179717
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 20:17:08 +0000 (20:17 +0000)]
More consistent formatting and tidying-up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179716
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 20:10:13 +0000 (20:10 +0000)]
This patch teaches x86 fast-isel to generate the native div/idiv instructions
for the sdiv/srem/udiv/urem bitcode instructions. This is done for the i8,
i16, and i32 types, as well as i64 for the x86_64 target.
Patch by Jim Stichnoth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179715
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 17 Apr 2013 20:04:53 +0000 (20:04 +0000)]
X86 cost model: Exit before calling getSimpleVT on non-simple VTs
getSimpleVT can only handle simple value types.
radar://
13676022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179714
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Apr 2013 20:02:32 +0000 (20:02 +0000)]
A limit of 500 was still a bit too high for some tests.
PR15000 has a testcase where the time to compile was bordering on 30s. When I
dropped the limit value to 100, it became a much more managable 6s. The compile
time seems to increase in a roughly linear fashion based on increasing the limit
value. (See the runtimes below.)
So, let's lower the limit to 100 so that they can get a more reasonable compile
time.
Limit Value Time
----------- ----
10 0.9744s
20 1.8035s
30 2.3618s
40 2.9814s
50 3.6988s
60 4.5486s
70 4.9314s
80 5.8012s
90 6.4246s
100 7.0852s
110 7.6634s
120 8.3553s
130 9.0552s
140 9.6820s
150 9.8804s
160 10.8901s
170 10.9855s
180 12.0114s
190 12.6816s
200 13.2754s
210 13.9942s
220 13.8097s
230 14.3272s
240 15.7753s
250 15.6673s
260 16.0541s
270 16.7625s
280 17.3823s
290 18.8213s
300 18.6120s
310 20.0333s
320 19.5165s
330 20.2505s
340 20.7068s
350 21.1833s
360 22.9216s
370 22.2152s
380 23.9390s
390 23.4609s
400 24.0426s
410 24.6410s
420 26.5208s
430 27.7155s
440 26.4142s
450 28.5646s
460 27.3494s
470 29.7255s
480 29.4646s
490 30.5001s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179713
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 17 Apr 2013 18:46:12 +0000 (18:46 +0000)]
Fix treatment of ARM unallocated hint instructions.
The reference manual defines only 5 permitted values for the immediate field of the "hint" instruction:
1. nop (imm == 0)
2. yield (imm == 1)
3. wfe (imm == 2)
4. wfi (imm == 3)
5. sev (imm == 4)
Therefore, restrict the permitted values for the "hint" instruction to 0 through 4.
Patch by Mihail Popa <Mihail.Popa@arm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179707
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Apr 2013 18:26:02 +0000 (18:26 +0000)]
Appease a gcc warning about an overflow in a constant conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Apr 2013 17:51:19 +0000 (17:51 +0000)]
Don't store AttributeSet::FunctionIndex as an int.
GCC complains: Core.cpp:1449:27: warning: overflow in implicit constant conversion [-Woverflow]
I'm not sure if that's really a problem here, but using the enum type is better
style anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179696
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 17 Apr 2013 17:19:05 +0000 (17:19 +0000)]
PowerPC: Mark some more patterns as isCodeGenOnly.
A couple of recently introduced conditional branch patterns
also need to be marked as isCodeGenOnly since they cannot
be handled by the asm parser.
No change in generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179690
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 17 Apr 2013 17:17:20 +0000 (17:17 +0000)]
Make formatting more consistent and tidy-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179689
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:39 +0000 (15:17 +0000)]
R600: Make Export Instruction not duplicable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179686
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:32 +0000 (15:17 +0000)]
R600: Export is emitted as a CF_NATIVE inst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179685
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 17 Apr 2013 15:17:25 +0000 (15:17 +0000)]
R600: Emit used GPRs count
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179684
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 17 Apr 2013 14:27:04 +0000 (14:27 +0000)]
Use StringSwitch instead of long chain of if-else. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179682
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 17 Apr 2013 08:29:02 +0000 (08:29 +0000)]
Create a stub for DWARF parser unittests
Moves one DWARF-specific header to include/llvm/DebugInfo from lib/.
Add a short unittest for r179095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 17 Apr 2013 06:45:11 +0000 (06:45 +0000)]
Fix -Werror build.
Broken in r179657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179669
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Apr 2013 06:37:30 +0000 (06:37 +0000)]
This appears to be no longer necessary for the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179667
91177308-0d34-0410-b5e6-
96231b3b80d8
Anat Shemer [Wed, 17 Apr 2013 05:34:03 +0000 (05:34 +0000)]
test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179665
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 17 Apr 2013 03:41:36 +0000 (03:41 +0000)]
PR15149/r174304 improvement - print hex for unknown dwarf language codes & add a test case
CR feedback from Rafael Espindola and Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179664
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Apr 2013 03:18:49 +0000 (03:18 +0000)]
Fix random typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179663
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 17 Apr 2013 02:01:10 +0000 (02:01 +0000)]
Do not optimise fprintf() calls if its return value is used.
Differential Revision: http://llvm-reviews.chandlerc.com/D620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179661
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 17 Apr 2013 00:18:04 +0000 (00:18 +0000)]
Mips assembler: Enable handling of nested expressions
This patch allows the Mips assembler to parse and emit nested
expressions as instruction operands. It also extends the
expansion of memory instructions when an offset is given as
an expression.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 17 Apr 2013 00:11:46 +0000 (00:11 +0000)]
[ms-inline asm] Add support for parsing complex immediate expressions. Test
cases to be submitted on clang side shortly.
rdar://
13663768 and PR15760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179655
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:56 +0000 (23:12 +0000)]
C API: Add LLVMTargetMachineEmitToMemoryBuffer()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179648
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:51 +0000 (23:12 +0000)]
C API: Add LLVMGetBufferSize()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179647
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:47 +0000 (23:12 +0000)]
C API: Add LLVMGetBufferStart()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179646
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Apr 2013 23:12:43 +0000 (23:12 +0000)]
C API: Add LLVMAddTargetDependentFunctionAttr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179645
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Apr 2013 20:55:47 +0000 (20:55 +0000)]
Print out the target-independent attributes in a comment before the function definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179622
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 16 Apr 2013 20:05:52 +0000 (20:05 +0000)]
[XCore] Extend test to check positve offsets are folded into addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179621
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 16 Apr 2013 19:56:55 +0000 (19:56 +0000)]
[XCore] Give test more generic name.
I intend to extend the test with more offset folding checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179620
91177308-0d34-0410-b5e6-
96231b3b80d8