Commit Graph

52661 Commits

Author SHA1 Message Date
Kevin Enderby
d49b2a7a9d Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses a
symbol from an assignment.  In this case the symbol did not have a fragment so
MCObjectWriter::IsSymbolRefDifferenceFullyResolved() should not have been
calling IsSymbolRefDifferenceFullyResolvedImpl() with a NULL fragment and should
just have returned false in that case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149442 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 23:02:57 +00:00
Bob Wilson
bda59fdd71 Add Triple::getMacOSXVersion to replace crufty code in the clang driver.
This new function provides a way to get the Mac OS X version number from
either generic "darwin" triples of macosx triples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149438 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 22:32:29 +00:00
Jim Grosbach
0c3cfefca6 Refactor loop for better readability.
Excellent suggestion from Ben Kramer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 20:56:55 +00:00
Jim Grosbach
c73f42b540 Add explanatory comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149416 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 20:34:53 +00:00
Andrew Trick
ab78e20ce0 Obvious unnecessary loop removal. Follow through from previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149398 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 18:54:19 +00:00
Devang Patel
0db58bfece Add assembler dialect attribute in asm parser which lets target specific asm parser change dialect on the fly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149396 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 18:14:05 +00:00
Bill Wendling
b319f12727 Increase the initial vector size to be equivalent to the size of the Deps
vector. This potentially saves a resizing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149369 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 07:04:52 +00:00
Bill Wendling
5d8ab0f02b Cache the size of the vector instead of calling .size() all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149368 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 06:57:53 +00:00
Craig Topper
cac50c5ab8 Remove pcmpgt/pcmpeq intrinsics as clang is not using them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149367 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 06:52:44 +00:00
Chris Lattner
6a89228fac eliminate the "string" form of ConstantArray::get, using
ConstantDataArray::getString instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149365 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 06:18:43 +00:00
Chris Lattner
1b2f643753 with recent changes, ConstantArray is never a "string". Remove the associated
methods and constant fold the clients to false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 06:05:00 +00:00
Andrew Trick
b3d58474c8 RAFast: Generalize the logic for return operands.
This removes implicit assumption about the form of MI coming into regalloc. In particular, it should be independent of ProcessImplicitDefs which will eventually become a standard part of coming out of SSA--unless we simply can eliminate IMPLICIT_DEF completely. Current unit tests expose this once I remove incidental pass ordering restrictions.

This is not a final fix. Just a temporary workaround until I figure out the right way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 05:55:32 +00:00
Chris Lattner
7f2c6dc8a0 fix a small oversight that broke the fhourstones app.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 05:18:56 +00:00
Chris Lattner
f0e1053a63 remove the last vestiges of llvm::GetConstantStringInfo, in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 05:09:17 +00:00
Chris Lattner
2cf07eccff eliminate the last uses of GetConstantStringInfo from this file, I didn't realize I was that close...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149354 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 04:54:27 +00:00
Chandler Carruth
6f72ac4799 Add various coarse bit-width architecture predicates to llvm::Triple.
These are very useful for frontends and other utilities reasoning about
or selecting between triples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149353 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 04:52:32 +00:00
Chris Lattner
90f1d8a5da start moving SimplifyLibcalls over to getConstantStringInfo, which is
dramatically more efficient than GetConstantStringInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149352 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 04:43:11 +00:00
Chris Lattner
3ef9cfef13 Change ConstantArray::get to form a ConstantDataArray when possible,
kicking in the big win of ConstantDataArray.  As part of this, change
the implementation of GetConstantStringInfo in ValueTracking to work
with ConstantDataArray (and not ConstantArray) making it dramatically,
amazingly, more efficient in the process and renaming it to 
getConstantStringInfo.

This keeps around a GetConstantStringInfo entrypoint that (grossly)
forwards to getConstantStringInfo and constructs the std::string 
required, but existing clients should move over to 
getConstantStringInfo instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149351 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 04:42:22 +00:00
Chris Lattner
4a6facbc57 rework this logic to not depend on the last argument to GetConstantStringInfo,
which is going away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149348 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 04:39:22 +00:00
Chris Lattner
c63352f633 don't emit a 1-byte object as a .fill. This is silly and causes
CodeGen/X86/global-sections.ll to fail with CDArray



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149343 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 03:39:24 +00:00
Chris Lattner
9a0b604d33 use the right accessor for ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149342 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 03:16:39 +00:00
Chris Lattner
8b10b69ba2 fix asmwriting of ConstantDataArray to use the right element count,
simplify ConstantArray handling, since they can never be empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149341 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 03:15:40 +00:00
Chris Lattner
c8d75c78ec enhance logic to support ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149340 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 02:55:06 +00:00
Bill Wendling
efd564fbd6 Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149331 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:58:48 +00:00
Bill Wendling
13b1c31412 s/getInnerUnwindDest/getInnerResumeDest/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149328 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:48:40 +00:00
Bill Wendling
9a5c0e8d93 Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copy
over the catch information. The catch information is now tacked to the invoke
instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149326 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:46:13 +00:00
Bill Wendling
08d01462d1 Remove ivar which is identical to another ivar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149323 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:25:54 +00:00
Bill Wendling
4dbd9b8ebf Remove unused ivars and s/getOuterUnwindDest/getOuterResumeDest/g.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149322 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:22:03 +00:00
Bill Wendling
6e69442416 Remove more dead functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149318 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:18:21 +00:00
Bill Wendling
fd3adbb31a s/getInnerUnwindDestNewEH/getInnerUnwindDest/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:15:59 +00:00
Bill Wendling
9e9a34c568 Remove some unused, old-EH methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149316 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:14:49 +00:00
Eli Friedman
d49db36bad Use the correct ShiftAmtTy for creating shifts after legalization. PR11881. Not committing a testcase because I think it will be too fragile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149315 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:08:03 +00:00
Bill Wendling
675f638869 Get rid of references to dead intrinsics.
The eh.selector and eh.resume intrinsics aren't used anymore. Get rid of some
calls to them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:05:20 +00:00
Bill Wendling
06881e8734 Formatting cleanups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149312 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 01:01:16 +00:00
Bill Wendling
27b5658aff Remove no-longer-useful dyn_casts and pals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149307 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 00:56:53 +00:00
Bill Wendling
7750c3fc9f Add a constified getLandingPad() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 00:26:24 +00:00
Kostya Serebryany
a1a8a323f4 [asan] fix the ObjC support (asan Issue #33)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149300 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 23:50:10 +00:00
Chandler Carruth
beb05952ce Chris's constant data sequence refactoring actually enabled printing
vectors of all one bits to be printed more cleverly in the AsmPrinter.
Unfortunately, the byte value for all one bits is the same with
-fsigned-char as the error return of '-1'. Force this to be the unsigned
byte value when returning it to avoid this problem, and update the test
case for the shiny new behavior.

Yay for building LLVM and Clang with -funsigned-char.

Chris, please review, and let me know if there is any reason to not
desire this change. It seems good on the surface, and certainly intended
based on the code written.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149299 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 23:47:44 +00:00
Evan Cheng
893a045cdb PR11834: Use macros which are defined on Windows. Patch by Marina Yatsina.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149294 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 23:10:32 +00:00
Devang Patel
885f65b4a1 Intel syntax. Adjust special code, used to recognize cmp<comparison code>{ss,sd,ps,pd}, for intel syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149291 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 22:47:12 +00:00
Chad Rosier
0cf6b99b96 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149289 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 22:44:13 +00:00
Chad Rosier
431985a421 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149275 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 21:13:22 +00:00
David Greene
448b73a95c Implement String Cast from Integer
Allow casts from integer to string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149273 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 20:47:04 +00:00
Devang Patel
be3e310d5e Intel syntax. Support .intel_syntax directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149270 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 20:02:42 +00:00
Benjamin Kramer
630ecf0f53 Fix refacto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149269 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 20:01:35 +00:00
Matt Beaumont-Gay
baffe7a6f3 Here's a new one: GCC was complaining about an only-used-in-asserts
*function*. Wrap the function in #ifndef NDEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149259 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 19:26:20 +00:00
Chris Lattner
8cf27efe40 Various improvements suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149255 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 18:19:30 +00:00
Douglas Gregor
b2f1b5028c Eliminate narrowing conversion in initializer list, to make C++11 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149254 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 16:57:18 +00:00
Benjamin Kramer
9c68354956 X86: Simplify shuffle mask generation code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149248 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 15:16:21 +00:00
Alexander Potapenko
8375bc9236 Fix compilation of ASan tests on OS X Lion (see http://code.google.com/p/address-sanitizer/issues/detail?id=32)
The redzones emitted by AddressSanitizer for CFString instances confuse the linker and are of little use, so we shouldn't add them. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149243 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30 10:40:22 +00:00