Commit Graph

3899 Commits

Author SHA1 Message Date
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
Bill Wendling
d7bb295d22 Beginning of the Great Exception Handling Rewrite.
* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.

Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.

(This is a work-in-progress.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 00:04:27 +00:00
Nick Lewycky
2c44a80d99 llvm.global_[cd]tor is defined to be either external, or appending with an array
of { i32, void ()* }. Teach the verifier to verify that, deleting copies of
checks strewn about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129128 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-08 07:30:21 +00:00
Nick Lewycky
84025ba08f Set unnamed_addr on strings created through the IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129040 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 00:14:29 +00:00
Nick Lewycky
ec5d1800f9 Replace const std::vector& with ArrayRef in the type creation APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129024 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 20:28:34 +00:00
Devang Patel
f3480a8015 face+palm
Keep track of llvm.dbg.value intrinsics with non null values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129010 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 17:08:15 +00:00
Nick Lewycky
4841121580 Add an empty key for DebugLoc so that you can store an empty DebugLoc in a
DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 06:49:59 +00:00
Nick Lewycky
af4db5fc95 Support using DebugLoc's in a DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128988 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 05:36:52 +00:00
Jay Foad
3e2f74e6d6 Remove some support for ReturnInsts with multiple operands, and for
returning a scalar value in a function whose return type is a single-
element structure or array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128810 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 07:44:02 +00:00
Eric Christopher
33feb70690 Move Object.cpp out of VMCore and into Object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128800 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-03 23:07:51 +00:00
Eric Christopher
e243fd9e2b Add a set of C bindings for the Object interface.
Patch by Patrick Walton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-03 22:34:07 +00:00
Jay Foad
8891ed7ac9 Various Instructions' resizeOperands() methods are only used to grow the
list of operands. Simplify and rename them accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128708 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-01 08:00:58 +00:00
Duncan Sands
607946533d While testing dragonegg I noticed that isCastable and getCastOpcode
had gotten out of sync: isCastable didn't think it was possible to
cast the x86_mmx type to anything, while it did think it possible
to cast an i64 to x86_mmx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128705 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-01 03:34:54 +00:00
Jay Foad
3ecfc861b4 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 11:28:46 +00:00
Bill Wendling
9f86e8054b Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 01:03:48 +00:00
Evan Cheng
92e3916c3b Add intrinsics @llvm.arm.neon.vmulls and @llvm.arm.neon.vmullu.* back. Frontends
was lowering them to sext / uxt + mul instructions. Unfortunately the
optimization passes may hoist the extensions out of the loop and separate them.
When that happens, the long multiplication instructions can be broken into
several scalar instructions, causing significant performance issue.

Note the vmla and vmls intrinsics are not added back. Frontend will codegen them
as intrinsics vmull* + add / sub. Also note the isel optimizations for catching
mul + sext / zext are not changed either.

First part of rdar://8832507, rdar://9203134


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-29 23:06:19 +00:00
Bill Wendling
0f41587909 Spruce up the error output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128451 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-29 04:28:26 +00:00
Devang Patel
ed4edf9e5f Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127720 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16 00:27:57 +00:00
Francois Pichet
581d535af9 Unbreak the CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127383 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-10 00:51:01 +00:00
Devang Patel
6af531febe Introduce DebugInfoProbe. This is used to monitor how llvm optimizer is treating debugging information.
It generates output that lools like

8 times line number info lost by Scalar Replacement of Aggregates (SSAUp) 
1 times line number info lost by Simplify well-known library calls 
12 times variable info lost by Jump Threading



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127381 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-10 00:21:25 +00:00
Eric Christopher
f607abdf7b Make these options hidden to reduce the amount of text -help puts on the
command line, they'll still be seen with -help-hidden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127353 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09 19:46:51 +00:00
Justin Holewinski
a6428a401b ptx: Fix calling convention printing in AsmWriter.cpp
This allows LLVM IR using ptx_kernel or ptx_device calling
conventions to be properly printed when emitted in text form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-07 14:32:30 +00:00
Nick Lewycky
d01f50f42c ConstantInt has some getters which return ConstantInt's or ConstantVector's of
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127116 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-06 03:36:19 +00:00
Devang Patel
566bd12e54 Add ArrayRef variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126978 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-04 01:20:33 +00:00
Tilmann Scheller
49d7999b89 Use X86_thiscall calling convention for Win64 as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126934 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-03 07:49:07 +00:00
Tilmann Scheller
f1cc70ca93 Add Win64 thiscall calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126862 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 19:29:22 +00:00
Rafael Espindola
38c4e53549 Add a special streamer to libLTO that just records symbols definitions and
uses.

The result produced by the streamer is used to give the linker more accurate
information and to add to llvm.compiler.used. The second improvement removes
the need for the user to add __attribute__((used)) to functions only used in
inline asm. The first one lets us build firefox with LTO on Darwin :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126830 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 04:14:42 +00:00
Talin
bdcd766028 Added missing va_end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126759 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 18:00:49 +00:00