Joey Gouly [Thu, 4 Jul 2013 14:57:20 +0000 (14:57 +0000)]
Add support for MC assembling and disassembling of vsel{ge, gt, eq, vs} instructions.
This adds a new decoder table/namespace 'VFPV8', as these instructions have their
top 4 bits as 0b1111, while other Thumb instructions have 0b1110.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185642
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 4 Jul 2013 14:40:12 +0000 (14:40 +0000)]
[PowerPC] Add all trap mnemonics
This adds support for all basic and extended variants
of the trap instructions to the asm parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185638
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 4 Jul 2013 14:24:00 +0000 (14:24 +0000)]
[PowerPC] Add asm parser support for CR expressions
This adds support for specifying condition registers and
condition register fields via expressions using the symbols
defined by the PowerISA, like "4*cr2+eq".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185633
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 4 Jul 2013 14:22:02 +0000 (14:22 +0000)]
SimplifyCFG: Teach switch generation some patterns that instcombine forms.
This allows us to create switches even if instcombine has munged two of the
incombing compares into one and some bit twiddling. This was motivated by enum
compares that are common in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185632
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 4 Jul 2013 14:12:25 +0000 (14:12 +0000)]
Supporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185627
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 13:54:20 +0000 (13:54 +0000)]
Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.
These exception-related opcodes are not used any longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185625
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 4 Jul 2013 10:04:08 +0000 (10:04 +0000)]
Add a V8FP instruction 'vcvt{b,t}' to convert between half and double precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185620
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:53:49 +0000 (04:53 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185618
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:53:45 +0000 (04:53 +0000)]
Simplify landing pad lowering.
Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.
This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.
This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.
A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185617
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:32:39 +0000 (04:32 +0000)]
FastISel can only apend to basic blocks.
Compute the insertion point from the end of the basic block instead of
skipping labels from the front.
This caused failures in landing pads when live-in copies where inserted
before instruction selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185616
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 04:32:35 +0000 (04:32 +0000)]
Live-in copies go *after* EH_LABELs.
This will soon be tested by exception handling working at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185615
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 4 Jul 2013 03:51:53 +0000 (03:51 +0000)]
Tabs to spaces. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185612
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Jul 2013 01:43:17 +0000 (01:43 +0000)]
Add a space between closing template '>' to unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185607
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Jul 2013 01:31:24 +0000 (01:31 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185606
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 4 Jul 2013 01:10:38 +0000 (01:10 +0000)]
Reapply r185601 with a fix for the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185605
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 4 Jul 2013 00:51:26 +0000 (00:51 +0000)]
Temporarily revert 185601 as it caused cmake build regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185603
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 4 Jul 2013 00:47:09 +0000 (00:47 +0000)]
Add support for futimens for platforms that don't support futimes.
Patch by pashev.igor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185601
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Jul 2013 00:26:30 +0000 (00:26 +0000)]
Revert r185595-185596 which broke buildbots.
Revert "Simplify landing pad lowering."
Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185600
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 3 Jul 2013 23:56:31 +0000 (23:56 +0000)]
Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.
These exception-related opcodes are not used any longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185596
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 3 Jul 2013 23:56:24 +0000 (23:56 +0000)]
Simplify landing pad lowering.
Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.
This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.
This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.
A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185595
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 3 Jul 2013 23:56:20 +0000 (23:56 +0000)]
Add MachineBasicBlock::addLiveIn().
This function adds a live-in physical register to an MBB and ensures
that it is copied to a virtual register immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185594
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Wed, 3 Jul 2013 23:39:13 +0000 (23:39 +0000)]
Have ARMBaseRegisterInfo::getCallPreservedMask return the 'correct' mask for the GHC calling convention.
This is purely academic because GHC calls are always tail calls so the register mask will never be used; however, this change makes the code clearer and brings the ARM implementation of the GHC calling convention in line with the X86 implementation. Also, it might save someone else some time trying to figuring out what is happening...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185592
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 22:40:21 +0000 (22:40 +0000)]
Hoist all of the Entry.getLoc() calls int a single variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185589
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 22:40:18 +0000 (22:40 +0000)]
Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185588
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 3 Jul 2013 21:42:57 +0000 (21:42 +0000)]
[ARM] Improve the instruction selection of vector loads.
In the ARM back-end, build_vector nodes are lowered to a target specific
build_vector that uses floating point type.
This works well, unless the inserted bitcasts survive until instruction
selection. In that case, they incur moves between integer unit and floating
point unit that may result in inefficient code.
In other words, this conversion may introduce artificial dependencies when the
code leading to the build vector cannot be completed with a floating point type.
In particular, this happens when loads are not aligned.
Before this patch, in that case, the compiler generates general purpose loads
and creates the floating point vector from them, instead of directly using the
vector unit.
The patch uses a vector friendly sequence of code when the inserted bitcasts to
floating point survived DAGCombine.
This is done by a target specific DAGCombine that changes the target specific
build_vector into a sequence of insert_vector_elt that get rid of the bitcasts.
<rdar://problem/
14170854>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185587
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 21:37:03 +0000 (21:37 +0000)]
Elaborate on comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185586
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 21:23:59 +0000 (21:23 +0000)]
Add names to the header file since they help in documenting the API
(and for consistency).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185585
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 3 Jul 2013 21:03:35 +0000 (21:03 +0000)]
[PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185583
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 3 Jul 2013 20:56:33 +0000 (20:56 +0000)]
Add platform specific tests doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185581
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Wed, 3 Jul 2013 20:38:01 +0000 (20:38 +0000)]
ARM: Prevent ARMAsmParser::shouldOmitCCOutOperand() from misidentifying certain Thumb2 add immediate T3 encodings.
Before the fix Thumb2 instructions of type "add rD, rN, #imm" (T3 encoding, see ARM ARM A8.8.4) with rD and rN both being low registers (r0-r7) were classified as having the T4 encoding.
The T4 encoding doesn't have a cc_out operand so for above instructions the operand gets erroneously removed, corrupting the token stream and leading to parse errors later in the process.
This bug prevented "add r1, r7, #0xcbcbcbcb" from being assembled correctly.
Fixes <rdar://problem/
14224440>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185575
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 20:36:36 +0000 (20:36 +0000)]
Move typedefs inside the class that they belong to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185573
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 3 Jul 2013 18:38:08 +0000 (18:38 +0000)]
Use an RWMutex instead of a Mutex in PassRegistry.
Patch by Alex Crichton <alex@crichton.co>. Approved by Chris Lattner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185566
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 18:29:47 +0000 (18:29 +0000)]
[PowerPC] Support lmw/stmw in the asm parser
This adds support for the load/store multiple instructions,
currently used by the asm parser only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185564
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 17:59:07 +0000 (17:59 +0000)]
[PowerPC] Use mtocrf when available
Just as with mfocrf, it is also preferable to use mtocrf instead of
mtcrf when only a single CR register is to be written.
Current code however always emits mtcrf. This probably does not matter
when using an external assembler, since the GNU assembler will in fact
automatically replace mtcrf with mtocrf when possible. It does create
inefficient code with the integrated assembler, however.
To fix this, this patch adds MTOCRF/MTOCRF8 instruction patterns and
uses those instead of MTCRF/MTCRF8 everything. Just as done in the
MFOCRF patch committed as 185556, these patterns will be converted
back to MTCRF if MTOCRF is not available on the machine.
As a side effect, this allows to modify the MTCRF pattern to accept
the full range of mask operands for the benefit of the asm parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185561
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 17:05:42 +0000 (17:05 +0000)]
[PowerPC] Always use mfocrf if available
When accessing just a single CR register, it is always preferable to
use mfocrf instead of mfcr, if the former is available on the CPU.
Current code makes that distinction in many, but not all places
where a single CR register value is retrieved. One missing
location is PPCRegisterInfo::lowerCRSpilling.
To fix this and make this simpler in the future, this patch changes
the bulk of the back-end to always assume mfocrf is available and
simply generate it when needed.
On machines that actually do not support mfocrf, the instruction
is replaced by mfcr at the very end, in EmitInstruction.
This has the additional benefit that we no longer need the
MFCRpseud hack, since before EmitInstruction we always have
a MFOCRF instruction pattern, which already models data flow
as required.
The patch also adds the MFOCRF8 version of the instruction,
which was missing so far.
Except for the PPCRegisterInfo::lowerCRSpilling case, no change
in generated code intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185556
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 16:41:29 +0000 (16:41 +0000)]
Prefix failing commands with not to make clear they are expected to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185554
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 16:35:26 +0000 (16:35 +0000)]
Remove another old test.
It was only passing because 'grep andpd' was not finding any andpd, but
we don't fail if part of a pipe fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185552
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 16:30:01 +0000 (16:30 +0000)]
Remove test for the old EH system. It doesn't parse anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185551
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 16:27:55 +0000 (16:27 +0000)]
Fix test: It was missing run lines and llvm-dis has no -disable-verify option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185550
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 15:57:14 +0000 (15:57 +0000)]
Add support for gnu archives with a string table and no symtab.
While there, use early returns to reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185547
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jul 2013 15:46:03 +0000 (15:46 +0000)]
Make llvm-nm return 1 on error.
This is a small compatibility improvement with gnu nm and makes llvm-nm more
useful as a testing tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185546
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 15:13:30 +0000 (15:13 +0000)]
[PowerPC] Remove dead code from PPCDAGToDAGISel::SelectSETCC
The subroutine getCRIdxForSetCC has a parameter "Other" and comment:
If this returns with Other != -1, then the returned comparison
is an or of two simpler comparisons.
However for at least the last five years this routine has never
returned a value of Other != -1; these cases are now handled
differently to begin with.
This patch removes the parameter and the code in SelectSETCC that
attempted to handle the Other != -1 case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185541
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 15:07:05 +0000 (15:07 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185540
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 14:48:37 +0000 (14:48 +0000)]
Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'.
Previously it was able to match 'I' anywhere in the filenames of the svn info results instead of just files that where ignored or unknown to svn. This would cause 'make update' to infinitely recurse if a file was modified with I anywhere in its name since svn info would return a Path pointing to the llvm root for those files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185539
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 3 Jul 2013 14:39:14 +0000 (14:39 +0000)]
[msan] Unpoison stack allocations and undef values in blacklisted functions.
This changes behavior of -msan-poison-stack=0 flag from not poisoning stack
allocations to actively unpoisoning them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185538
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 12:51:09 +0000 (12:51 +0000)]
[PowerPC] Make specialized AltiVec patterns isCodeGenOnly
A couple of AltiVec patterns are just specialized forms of the
generic instruction pattern, and should therefore be marked
isCodeGenOnly to avoid confusing the asm parser:
VCFSX_0, VCTUXS_0, VCFUX_0, VCTSXS_0, and V_SETALLONES.
Noticed by inspection of the generated PPCGenAsmMatcher.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185533
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Jul 2013 12:32:41 +0000 (12:32 +0000)]
[PowerPC] Support mtspr/mfspr in the asm parser
This adds support for the generic forms of mtspr/mfspr
for the asm parser. The compiler will continue to use
the specialized patters for mtlr etc. since those are
needed to correctly describe data flow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185532
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)]
[SystemZ] Fold more spills
Add a mapping from register-based <INSN>R instructions to the corresponding
memory-based <INSN>. Use it to cut down on the number of spill loads.
Some instructions extend their operands from smaller fields, so this
required a new TSFlags field to say how big the unextended operand is.
This optimisation doesn't trigger for C(G)R and CL(G)R because in practice
we always combine those instructions with a branch. Adding a test for every
other case probably seems excessive, but it did catch a missed optimisation
for DSGF (fixed in r185435).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185529
91177308-0d34-0410-b5e6-
96231b3b80d8
Mihai Popa [Wed, 3 Jul 2013 09:21:44 +0000 (09:21 +0000)]
This corrects the implementation of Thumb ADR instruction. There are three issues:
1. it should accept only 4-byte aligned addresses
2. the maximum offset should be 1020
3. it should be encoded with the offset scaled by two bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185528
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 3 Jul 2013 09:20:36 +0000 (09:20 +0000)]
ARM: relax the atomic release barrier to "dmb ishst" on Swift
Swift cores implement store barriers that are stronger than the ARM
specification but weaker than general barriers. They are, in fact, just about
enough to provide the ordering needed for atomic operations with release
semantics.
This patch makes use of that quirk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185527
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 3 Jul 2013 09:19:58 +0000 (09:19 +0000)]
[SystemZ] Rename mapping table fields
Rename Function->DispKey and PairType->DispSize. I'd originally used
"Function" because I thought it might be useful for other InstMappings.
However, it turns out that having two very similar instructions with the
same Function makes it pretty useless for anything other than the displacement
size key. Other InstMappings will want the key to be defined for only one
instruction in the pair.
No behavioural change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185526
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 3 Jul 2013 09:11:00 +0000 (09:11 +0000)]
[SystemZ] Fix caller-allocated save slot FIXME
Get rid of some old code (and associated FIXME) for handling the
caller-allocated register save area. No behavioural change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185525
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 08:26:07 +0000 (08:26 +0000)]
Remove unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185523
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 08:13:55 +0000 (08:13 +0000)]
Constify a few functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185520
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 3 Jul 2013 07:49:03 +0000 (07:49 +0000)]
[XCore] Whitespace fixes, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185519
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 3 Jul 2013 07:48:50 +0000 (07:48 +0000)]
[XCore] Add ISel pattern for LDWCP
Patch by Robert Lytton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185518
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 05:18:47 +0000 (05:18 +0000)]
Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185514
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 05:16:59 +0000 (05:16 +0000)]
Use SmallVectorImpl instead of SmallVector as method argument to avoid specifying vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185513
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 05:11:49 +0000 (05:11 +0000)]
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185512
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 05:01:24 +0000 (05:01 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector
to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185511
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:42:33 +0000 (04:42 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185509
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:40:27 +0000 (04:40 +0000)]
Introduce some typedefs for DenseMaps containing SmallVectors so the vector size doesn't have to repeated when creating iterators for the DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185508
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:30:58 +0000 (04:30 +0000)]
Return SmallVectorImpl& instead of SmallVector& in a couple places to avoid having to specify the vector size in multiple places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185507
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:27:31 +0000 (04:27 +0000)]
Add a space between type and variable name. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185506
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:24:43 +0000 (04:24 +0000)]
Use SmallVectorImpl& instead of SmallVector& to avoid needlessly respecifying the small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185505
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Jul 2013 04:17:25 +0000 (04:17 +0000)]
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185504
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 3 Jul 2013 04:15:22 +0000 (04:15 +0000)]
Change the gettimeofday test to only test on a posix platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185503
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 3 Jul 2013 04:00:54 +0000 (04:00 +0000)]
Added support in FunctionAttrs for adding relevant function/argument attributes for the posix call gettimeofday.
This implies annotating it as nounwind and its arguments as nocapture. To be
conservative, we do not annotate the arguments with noalias since some platforms
do not have restrict on the declaration for gettimeofday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185502
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 3 Jul 2013 04:00:51 +0000 (04:00 +0000)]
Added posix function gettimeofday to LibFunc::Func for all platforms but Windows.
*NOTE* In a recent version of posix, they added the restrict keyword to the
arguments for this function. From some spelunking it seems that on some
platforms, the call has restrict on its arguments and others it does not. Thus I
left off the restrict keyword from the function prototype in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185501
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 02:23:53 +0000 (02:23 +0000)]
Avoid doing a lot of computation when we have multiple ranges and
avoid adding information for the debug_inlined section when it isn't
going to be emitted anyhow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185500
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 3 Jul 2013 02:20:49 +0000 (02:20 +0000)]
SystemZInstrInfo.cpp: Tweak an assertion. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185499
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:57:28 +0000 (01:57 +0000)]
Move iterator to where it's used and update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185498
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:57:26 +0000 (01:57 +0000)]
Move instance variable before experimental section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185497
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:57:23 +0000 (01:57 +0000)]
Fix typo to make grep for DW_AT_comp_dir work without case-insensitive
grep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185496
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:57:20 +0000 (01:57 +0000)]
Remove unnecessary forward declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185495
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:22:29 +0000 (01:22 +0000)]
Add a helpful comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185492
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 3 Jul 2013 01:08:30 +0000 (01:08 +0000)]
addConstantValue, addConstantFPValue never returned anything but
true, so remove the return value and propagate accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185490
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 3 Jul 2013 00:16:11 +0000 (00:16 +0000)]
Trying to fix the bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185489
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 2 Jul 2013 23:40:10 +0000 (23:40 +0000)]
Debug Info: use module flag to set up Dwarf version.
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.
TODO: turn on/off features depending on the Dwarf version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185484
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Jul 2013 21:36:07 +0000 (21:36 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185480
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 2 Jul 2013 21:32:56 +0000 (21:32 +0000)]
Fixed typo in LangRef where we were using _'' to quote instead of the correct _.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185479
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 21:31:59 +0000 (21:31 +0000)]
[PowerPC] PR16512 - Support TLS call sequences in the asm parser
This patch now adds support for recognizing TLS call sequences in
the asm parser. This needs a new pattern BL8_TLS, which is like
BL8_NOP_TLS except without nop. That pattern is used for the
asm parser only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185478
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 21:31:04 +0000 (21:31 +0000)]
[PowerPC] Rework TLS call operand processing
As part of the global-dynamic and local-dynamic TLS sequences, we need
to use a special form of the call instruction:
bl __tls_get_addr(sym@tlsld)
bl __tls_get_addr(sym@tlsgd)
which generates two fixups. The current implementation of this causes
problems with recognizing this form in the asm parser. To fix this,
this patch reworks operand processing for this special form by using
a single operand to hold both __tls_get_addr and sym@tlsld and defining
a print method to output the above form, and an encoding method to
generate the two fixups.
As a side simplification, the patch replaces the two instruction
patterns BL8_NOP_TLSGD and BL8_NOP_TLSLD by a single BL8_NOP_TLS,
since the patterns already operate in an identical fashion (whether
we have a local-dynamic or global-dynamic symbol is already encoded
in the symbol modifier).
No change in code generation intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185477
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 21:29:06 +0000 (21:29 +0000)]
[PowerPC] Remove VK_PPC_TLSGD and VK_PPC_TLSLD
The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD
correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD.
This causes some confusion with the asm parser, since VK_PPC_TLSGD
is output as @tlsgd, which is then read back in as VK_TLSGD.
To avoid this confusion, this patch removes the PowerPC-specific
modifiers and uses the generic modifiers throughout. (The only
drawback is that the generic modifiers are printed in upper case
while the usual convention on PowerPC is to use lower-case modifiers.
But this is just a cosmetic issue.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185476
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 2 Jul 2013 21:17:31 +0000 (21:17 +0000)]
SystemZ: Fold variable into assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185475
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 2 Jul 2013 19:21:43 +0000 (19:21 +0000)]
Add 'REQUIRES: object-emission' to DebugInfo/inlined-arguments.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185465
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 18:47:35 +0000 (18:47 +0000)]
[PowerPC] Support TLS variables in debug info
This adds an implementation of getDebugThreadLocalSymbol for
(64-bit) PowerPC. This needs to return a generic MCExpr
since on ppc64, we need to add a bias of 0x8000 to the
value returned by the R_PPC64_DTPREL64 relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185461
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 18:47:09 +0000 (18:47 +0000)]
[DebugInfo] Allow getDebugThreadLocalSymbol to return MCExpr
This allows getDebugThreadLocalSymbol to return a generic MCExpr
instead of just a MCSymbolRefExpr.
This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185460
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 18:46:46 +0000 (18:46 +0000)]
[DebugInfo] Hold generic MCExpr in AddrPool
This changes the AddrPool infrastructure to enable it to hold
generic MCExpr expressions, not just MCSymbolRefExpr.
This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185459
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 2 Jul 2013 18:46:26 +0000 (18:46 +0000)]
[DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr values
This partially reverts r185202 and restores DIELabel to hold plain
MCSymbol references. Instead, we add a new subclass DIEExpr of
DIEValue that can hold generic MCExpr references.
This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185458
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 2 Jul 2013 18:37:35 +0000 (18:37 +0000)]
Debug Info: cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185456
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 2 Jul 2013 17:31:58 +0000 (17:31 +0000)]
Revert (most of) r185393 and r185395.
"Remove floating point computations form SpillPlacement.cpp."
These commits caused test failures in lencod on clang-native-arm-lnt.
I suspect these changes are only exposing an existing issue, but
reverting anyway to keep the bots passing while we investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185447
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 2 Jul 2013 17:24:00 +0000 (17:24 +0000)]
Hexagon: Avoid unused variable warnings in Release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185445
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 2 Jul 2013 16:48:10 +0000 (16:48 +0000)]
Fix -Wsign-compare warning and remove windows-style line endings introduced by r185421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185443
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 2 Jul 2013 15:50:05 +0000 (15:50 +0000)]
[APFloat] Swap an early out check so we do not dereference str.end().
Originally if D.firstSigDigit == str.end(), we will have already dereferenced
D.firstSigDigit in the first predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185437
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Jul 2013 15:49:13 +0000 (15:49 +0000)]
Remove address spaces from MC.
This is dead code since PIC16 was removed in 2010. The result was an odd mix,
where some parts would carefully pass it along and others would assert it was
zero (most of the object streamer for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185436
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 2 Jul 2013 15:40:22 +0000 (15:40 +0000)]
[SystemZ] Use DSGFR over DSGR in more cases
Fixes some cases where we were using full 64-bit division for (sdiv i32, i32)
and (sdiv i64, i32).
The "32" in "SDIVREM32" just refers to the second operand. The first operand
of all *DIVREM*s is a GR128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185435
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 2 Jul 2013 15:28:56 +0000 (15:28 +0000)]
[SystemZ] Use MVC to spill loads and stores
Try to use MVC when spilling the destination of a simple load or the source
of a simple store. As explained in the comment, this doesn't yet handle
the case where the load or store location is also a frame index, since
that could lead to two simultaneous scavenger spills, something the
backend can't handle yet. spill-02.py tests that this restriction kicks in,
but unfortunately I've not yet found a case that would fail without it.
The volatile trick I used for other scavenger tests doesn't work here
because we can't use MVC for volatile accesses anyway.
I'm planning on relaxing the restriction later, hopefully with a test
that does trigger the problem...
Tests @f8 and @f9 also showed that L(G)RL and ST(G)RL were wrongly
classified as SimpleBDX{Load,Store}. It wouldn't be easy to test for
that bug separately, which is why I didn't split out the fix as a
separate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185434
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Tue, 2 Jul 2013 14:56:45 +0000 (14:56 +0000)]
[SystemZ] Add the MVC instruction
This is the first use of D(L,B) addressing, which required a fair bit
of surgery. For that reason, the patch just adds the instruction
definition and the associated assembler and disassembler support.
A later patch will actually make use of it for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185433
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 2 Jul 2013 14:46:34 +0000 (14:46 +0000)]
[XCore] Fix instruction selection for zext, mkmsk instructions.
r182680 replaced CountLeadingZeros_32 with a template function
countLeadingZeros that relies on using the correct argument type to give
the right result. The type passed in the XCore backend after this
revision was incorrect in a couple of places.
Patch by Robert Lytton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185430
91177308-0d34-0410-b5e6-
96231b3b80d8