Commit Graph

3926 Commits

Author SHA1 Message Date
Eric Christopher
ec281c8934 Another possible bug. Stopgap until we can autogenerate tables and
constraint lengths.

Part of rdar://9037836 and rdar://9119939



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132598 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 22:09:12 +00:00
Eric Christopher
ce1ecf59c8 Fix an off by one error.
Part of rdar://9037836 and rdar://9119939


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132590 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 20:44:52 +00:00
Andrew Trick
c5d93bb5c8 Basic PassManager diagnostics.
Added asserts whenever attempting to use a potentially
uninitialized pass. This helps people trying to develop a new pass and
people trying to understand the bug reports filed by the former people.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132520 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 00:48:58 +00:00
Andrew Trick
7ae0fbc2d0 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 00:44:32 +00:00
Eric Christopher
5fab03d54c Add a new parse hint for multi-letter constraints in inline asm.
Testcase will come when we use it.

Part of rdar://9119939


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132476 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 19:26:37 +00:00
Eli Friedman
e65e9ee79a Add a minor missing -verify check. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132353 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 20:12:07 +00:00
Chad Rosier
4591193b8d CRC32 intrinsics were renamed at revision 132163. This submission
fixes aliasing issues with the old and new names as well as adds test
cases for the auto-upgrader.
Fixes rdar 9472944.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132207 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:38:10 +00:00
Chad Rosier
62660310d9 Renamed llvm.x86.sse42.crc32 intrinsics; crc64 doesn't exist.
crc32.[8|16|32] have been renamed to .crc32.32.[8|16|32] and
crc64.[8|16|32] have been renamed to .crc32.64.[8|64].




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 23:13:19 +00:00
Rafael Espindola
fc2bb8c444 Replace the -unwind-tables option with a per function flag. This is more
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132033 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 03:44:17 +00:00
Devang Patel
88c62fc1b4 Clear list of instructions without DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131906 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-23 17:34:18 +00:00
Chris Lattner
ae441cc33c add a helper method to get the byval alignment of an argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131883 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 23:57:23 +00:00
Chris Lattner
dcef346948 remove StandardPasses, it has been replaced with PassManagerBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131827 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:30:45 +00:00
Nick Lewycky
0cf51561ed Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans to
use these soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 23:14:36 +00:00
Benjamin Kramer
6e35e4c8c1 Remove noisy semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131724 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 09:20:25 +00:00
Eli Friedman
49fcf571da Shuffle StandardPasses.cpp into VMCore; add it to CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131600 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 23:51:11 +00:00
Devang Patel
62fb3556ea Use IRBuiler while constant folding terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131541 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 17:26:46 +00:00
Duncan Sands
7016ec1a45 Now that SrcBits and DestBits always represent the primitive size, rather
than either the primitive size or the element primitive size (in the case
of vectors), simplify the vector logic.  No functionality change.  There
is some distracting churn in the patch because I lined up comments better
while there - sorry about that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131533 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 10:59:25 +00:00
Duncan Sands
bb1695e333 Tighten up checking of the validity of casts. (1) The IR parser would
happily accept things like "sext <2 x i32> to <999 x i64>".  It would
also accept "sext <2 x i32> to i64", though the verifier would catch
that later.  Fixed by having castIsValid check that vector lengths match
except when doing a bitcast.  (2) When creating a cast instruction, check
that the cast is valid (this was already done when creating constexpr
casts).  While there, replace getScalarSizeInBits (used to allow more
vector casts) with getPrimitiveSizeInBits in getCastOpcode and isCastable
since vector to vector casts are now handled explicitly by passing to the
element types; i.e. this bit should result in no functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 09:21:57 +00:00
Duncan Sands
117feba971 Teach getCastOpcode about element-by-element vector casts. For example, "trunc"
can be used to turn a <4 x i64> into a <4 x i32> but getCastOpcode would assert
if you passed these types to it.  Note that this strictly extends the previous
functionality: if getCastOpcode previously accepted two vector types (i.e. didn't
assert) then it still will and returns the same opcode (BitCast).  That's because
before it would only accept vectors with the same bitwidth, and the new code only
touches vectors with the same length.  However if two vectors have both the same
bitwidth and the same length then their element types have the same bitwidth, so
the new logic will return BitCast as before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131530 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 07:13:41 +00:00
Rafael Espindola
0e00c6c561 Don't do tail calls in a function that call setjmp. The stack might be
corrupted when setjmp returns again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131399 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 03:05:33 +00:00
Rafael Espindola
3fa8283744 Make codegen able to handle values of empty types. This is one way
to fix PR9900. I will keep it open until sable is able to comment on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-13 15:18:06 +00:00
Rafael Espindola
87380b605e Fix cmake again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 22:42:41 +00:00
Nick Lewycky
74f0356739 Remove empty file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131162 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 22:38:17 +00:00
Rafael Espindola
fdcdafcd30 Fix cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 22:19:33 +00:00
Nick Lewycky
da07192f8e Revert r131155 for now. It makes VMCore depend on Analysis and Transforms
headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131159 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 22:16:06 +00:00
David Chisnall
0fa92e55c3 Add support for plugins add passes to the default set of passes. The standard set of passes used by front ends can now be modified by LLVM plugins, without needing to modify any front ends.
Still to do:

- Allow replacing / removing passes (infrastructure there, just needs an infrastructure exposed)
- Defining sets of passes to be added or removed as a group
- Extending the support to allow user-defined groups of optimisations
- Allow plugins to be specified for loading automatically (e.g. from plugins.conf or some similar mechanism)

Reviewed by Nick Lewycky.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131155 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 21:36:48 +00:00
Devang Patel
ef7b4685f1 In debug output, clearly list new instructions without DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130957 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-05 22:05:57 +00:00
Bill Wendling
9493a285d1 Replace the "movnt" intrinsics with a native store + nontemporal metadata bit.
<rdar://problem/8460511>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130791 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-03 21:11:17 +00:00
Devang Patel
0b2fb39d8d Print new instructions without DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130542 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-29 21:36:04 +00:00
Matt Beaumont-Gay
2a2116723f Coalesce some DEBUGs (moving an only-used-in-DEBUG variable's declaration into the DEBUG)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130448 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 22:26:05 +00:00
Devang Patel
77562c74e5 Beautify debug info probe output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130435 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 20:46:18 +00:00
Devang Patel
d78bfbc6bb Add command line option to print debug info in human readable form as comment in llvm IR output. This, i.e -enable-debug-info-comment, is very useful if you want to easily find out which optimization pass is losing line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130409 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 17:41:38 +00:00
Duncan Sands
a37caf6472 Another example of a static table that wasn't marked static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130193 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-26 07:30:10 +00:00
Chris Lattner
607b8ebfb8 mark a large static table static. Pointed out by Michael Ilseman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130160 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25 22:14:33 +00:00
Jay Foad
61717b3d94 Fix an assert to check exactly what it says.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130093 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-24 14:30:00 +00:00
Jay Foad
ddcdcc8863 Remove unused STL header includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 19:53:52 +00:00
Jay Foad
ec9186bcf9 PR9214: Convert Metadata API to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 19:59:31 +00:00
Nick Lewycky
8c6d196210 Structs have elements not parameters. I'm surprised this ever compiled...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129888 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20 22:52:37 +00:00
Chris Lattner
7a2bdde0a0 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:18:47 +00:00
Devang Patel
be7cd7580d Fix debug message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129463 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-13 19:47:41 +00:00
Jay Foad
d30aa5a1ed PR9214: Convert ConstantExpr::getIndices() to return an ArrayRef, plus
related tweaks to ExprMapKeyType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129443 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-13 15:22:40 +00:00
Jay Foad
cb53632869 Remove some redundant llvm:: prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129441 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-13 14:39:42 +00:00
Jay Foad
b81e457eb0 PR9214: Convert ConstantExpr::getWithOperands() to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129439 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-13 13:46:01 +00:00
Bill Wendling
f93f7b2446 Reapply r129401 with patch for clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129419 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-13 00:36:11 +00:00
Bill Wendling
f9b2dc66c8 Revert r129401 for now. Clang is using the old way of doing things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129403 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 22:59:27 +00:00
Bill Wendling
d5f323d70b Remove the unaligned load intrinsics in favor of using native unaligned loads.
Now that we have a first-class way to represent unaligned loads, the unaligned
load intrinsics are superfluous.

First part of <rdar://problem/8460511>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129401 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 22:46:31 +00:00
Nick Lewycky
cb4e4eae1a Make IRBuilder support StringRef for building strings.
Also document that the global variables produced are mergable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129330 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 00:29:07 +00:00
Jay Foad
562b84b3ae Don't include Operator.h from InstrTypes.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129271 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 09:35:34 +00:00
Jay Foad
4e9b0e3587 Phi nodes always use an even number of operands, so don't ever allocate
an odd number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129270 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 09:25:51 +00:00
Bill Wendling
5d7a5a4f53 Revert r129235 pending a vetting of the EH rewrite.
--- Reverse-merging r129235 into '.':
D    test/Feature/bb_attrs.ll
U    include/llvm/BasicBlock.h
U    include/llvm/Bitcode/LLVMBitCodes.h
U    lib/VMCore/AsmWriter.cpp
U    lib/VMCore/BasicBlock.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLLexer.cpp
U    lib/AsmParser/LLToken.h
U    lib/Bitcode/Reader/BitcodeReader.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129259 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 23:18:04 +00:00