Commit Graph

48343 Commits

Author SHA1 Message Date
Chris Lattner
c73b24db5f start using the new helper methods a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135251 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 06:08:15 +00:00
Chris Lattner
b447387726 add CFP::isNegative() and ConstnatInt::isNegative() methods.
Devirtualize the isNegativeZeroValue method.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135249 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:58:04 +00:00
Chris Lattner
ba3ddf391f bump pointer allocate LLVM IR types, since they are never deallocated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135248 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:49:15 +00:00
Chris Lattner
ef58218b8d remove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
that type refinement is toast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:21:59 +00:00
Chandler Carruth
ed0e021643 Remove an unnecessary header from this file. I don't think this header
was really intended, and it may have been required prior to some of the
recent refactors. Including it however causes LLVMX86Desc to need
symbols from LLVMX86CodeGen, forming a dependency cycle. This was masked
in almost all builds: Clang, and GCC w/ optimizations didn't actually
emit the symbols!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135242 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 04:16:38 +00:00
Evan Cheng
1be0e271a0 Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatest
solution but it is a small step towards removing the horror that is
TargetAsmInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135237 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 02:09:41 +00:00
Bill Wendling
833ce06c8f Remove setting the bit for personality function. It should be set by the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135236 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 01:42:32 +00:00
Chandler Carruth
4afa2b842b Major update to CMake build to reflect changes in r135219 in the
backend. Moved some MCAsmInfo files down into the MCTargetDesc
sublibraries, removed some (i suspect long) dead files from other parts
of the CMake build, etc. Also copied the include directory hack from the
Makefile.

Finally, updated the lib deps. I spot checked this, and think its
correct, but review appreciated there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135234 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:40:52 +00:00
Devang Patel
0bf164605d Do not get confused by multiple empty lexical scopes inlined at one location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135232 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:30:39 +00:00
Benjamin Kramer
291e767dcf Output MachO section names in the form SEGMENT,section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135231 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:29:02 +00:00
Benjamin Kramer
7d145789c0 Add support for 64 bit objects to MachOObjectFile.
- I don't see a better way than duplicating all the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135229 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:14:48 +00:00
Benjamin Kramer
82ba5b7c40 MachOObjectFile: Change isSectionText to return true for sections named text, not for load commands name __TEXT (which isn't the case in actual object files)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135228 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:14:46 +00:00
Bill Wendling
79a6a48851 Encode that we have a personality function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135227 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 00:07:31 +00:00
Evan Cheng
1abf2cb59b Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 23:50:31 +00:00
Bill Wendling
4bb5b03712 * If we have an LSDA, we need to mark it in the encoding.
* The personality function should be encoded as an absolute pointer to the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135215 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 23:34:45 +00:00
Devang Patel
9b4a172ac0 Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135212 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 23:17:49 +00:00
Devang Patel
4f455d6f25 Eliminate redundant LLVMContext argument.
Improve DbgScope->dump() output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135207 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 22:30:56 +00:00
Devang Patel
af29322bb3 Undo r135191 (i.e. reapply Chris's patch. Now linker maps NamedMDNodes first, so there is not any need to map DebugLoc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 22:14:06 +00:00
Devang Patel
2959ebd14d Link NamedMDNode before linking function bodies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 22:13:07 +00:00
Jim Grosbach
33c16a2737 ARM diagnostic when 's' suffix on mnemonic that can't set flags.
For example, "mlss r0, r1, r2, r3".

The MLS instruction does not have a flag-setting variant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135203 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 22:04:21 +00:00
Bill Wendling
13123d9463 * Redo the permutation encoding for frameless stacks to be more like what the
unwind library expects.
* Comment the permutation encoding for frameless stacks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135202 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 22:01:34 +00:00
Devang Patel
3dcb4ef757 Add dump()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135200 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:50:04 +00:00
Benjamin Kramer
151bd17a8f Add OperandTypes for Thumb branch targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:47:24 +00:00
Benjamin Kramer
3be41b748e Port operand types for ARM and X86 over from EDIS to the .td files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135198 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:47:22 +00:00
Jim Grosbach
c8ae39e746 ARM MCRR/MCRR2 immediate operand range checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135192 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:26:42 +00:00
Chris Lattner
f546453466 revert r135172 until Devang and I figure out the right answer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135191 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:25:42 +00:00
Jim Grosbach
e540c7422c ARM MCR/MCR2 assembly parsing operand constraints.
The immediate operands are restricted to 0-7. Enforce that when parsing
assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135189 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:19:17 +00:00
Nicolas Geoffray
5cf9fcdad1 After type-system-rewrite branch update the Cpp backend to not use OpaqueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135186 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 21:04:35 +00:00
Evan Cheng
c60f9b7523 Next round of MC refactoring. This patch factor MC table instantiations, MC
registeration and creation code into XXXMCDesc libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135184 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 20:59:42 +00:00
Chris Lattner
f84c59d110 simplify this logic now that GlobalAlias::isDeclaration is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135183 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 20:23:05 +00:00
Chris Lattner
0063225bd7 Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135182 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 20:22:18 +00:00
Eric Christopher
5427edeb68 Check register class matching instead of width of type matching
when determining validity of matching constraint. Allow i1
types access to the GR8 reg class for x86.

Fixes PR10352 and rdar://9777108

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135180 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 20:13:52 +00:00
Jim Grosbach
c83d504085 Reorganize ARM assembler aliases.
Consolidate the individual declarations together for ease of reference. This
mirrors the organization in X86, as well, so is good for consistency. No
functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135179 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 19:47:47 +00:00
Rafael Espindola
64090bd2d4 Add LLVMConstNamedStruct to the C api to let its users create constants
of named struct types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135178 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 19:09:08 +00:00
Chris Lattner
939f616e63 DebugLoc's don't hide any interesting types for TypeFinder to find.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:58:40 +00:00
Chris Lattner
4baa510f48 manually copy debugloc over to a new instruction in clone() instead
of calling getAllMetadata().  This is semantically identical, but doing
it this way avoids unpacking the DebugLoc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135173 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:57:51 +00:00
Chris Lattner
4692be11a9 Stop the ValueMapper from calling getAllMetadata, which unpacks DebugLoc into
an MDNode.  This saves a bunch of time and memory in the IR linker, e.g. when 
doing LTO of files with debug info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135172 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:53:50 +00:00
Bruno Cardoso Lopes
62f67f86fe Add 256-bit load/store recognition and matching in several places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135171 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:50:58 +00:00
Benjamin Kramer
eac0796542 Don't leak operands when putting them into a shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135169 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:41:22 +00:00
Jim Grosbach
3b14a5c546 Update ARM Assembly of LDM/STM.
ldm/stm are the cannonical spellings for ldmia/stmia, so use them as such.
Update the parsing/encoding tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135168 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:35:38 +00:00
Chris Lattner
97d9730a59 add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:12:44 +00:00
Chris Lattner
6c48244973 consolidate GlobalValue::isDeclaration into one
non-virtual function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:10:41 +00:00
Chris Lattner
9854e1bebe code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:01:49 +00:00
Jim Grosbach
9dec507ecb ARM ISB instruction assembly parsing.
The ISB instruction takes an optional operand, just like DMB/DSB. Typically
only 'sy' is meaningful.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135156 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 18:00:31 +00:00
Benjamin Kramer
eb9a85f09e Change Intrinsic::getDeclaration and friends to take an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135154 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 17:45:39 +00:00
Chris Lattner
61afc8820f add a couple more missing C api, patch by Vitaly Lugovskiy!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135151 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 16:20:28 +00:00
Richard Osborne
c7e33965f0 Update XCoreRegisterInfo::eliminateFrameIndex() to handle DBG_VALUE
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135146 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 14:03:48 +00:00
Frits van Bommel
d155945f15 Simplify some functions in the C API by using an ArrayRef to directly reference the array passed to them instead of copying it to a std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135145 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 11:44:09 +00:00
Nadav Rotem
d0f3ef807e [VECTOR-SELECT]
During type legalization we often use the SIGN_EXTEND_INREG SDNode.
When this SDNode is legalized during the LegalizeVector phase, it is
scalarized because non-simple types are automatically marked to be expanded.
In this patch we add support for lowering SIGN_EXTEND_INREG manually.
This fixes CodeGen/X86/vec_sext.ll when running with the '-promote-elements'
flag.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135144 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 11:11:14 +00:00
Nadav Rotem
aeb86fab3e Add assertion for the chain value type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135143 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 10:37:54 +00:00