Nick Lewycky
04fdd20e58
Set unnamed_addr on strings created through the IRBuilder.
...
llvm-svn: 129040
2011-04-07 00:14:29 +00:00
Nick Lewycky
f2d78099ce
Replace const std::vector& with ArrayRef in the type creation APIs.
...
llvm-svn: 129024
2011-04-06 20:28:34 +00:00
Devang Patel
5799b28555
face+palm
...
Keep track of llvm.dbg.value intrinsics with non null values.
llvm-svn: 129010
2011-04-06 17:08:15 +00:00
Nick Lewycky
e15c6c11b4
Add an empty key for DebugLoc so that you can store an empty DebugLoc in a
...
DenseMap.
llvm-svn: 128994
2011-04-06 06:49:59 +00:00
Nick Lewycky
dfed8e0ff5
Support using DebugLoc's in a DenseMap.
...
llvm-svn: 128988
2011-04-06 05:36:52 +00:00
Jay Foad
fc232f270b
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.
llvm-svn: 128810
2011-04-04 07:44:02 +00:00
Eric Christopher
1ed5af1470
Move Object.cpp out of VMCore and into Object.
...
llvm-svn: 128800
2011-04-03 23:07:51 +00:00
Eric Christopher
e0faa57f96
Add a set of C bindings for the Object interface.
...
Patch by Patrick Walton!
llvm-svn: 128798
2011-04-03 22:34:07 +00:00
Jay Foad
279116b009
Various Instructions' resizeOperands() methods are only used to grow the
...
list of operands. Simplify and rename them accordingly.
llvm-svn: 128708
2011-04-01 08:00:58 +00:00
Duncan Sands
e2ed6e1116
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.
llvm-svn: 128705
2011-04-01 03:34:54 +00:00
Jay Foad
53632b7c03
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
...
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Bill Wendling
c007d0af6d
Remove dead code.
...
llvm-svn: 128519
2011-03-30 01:03:48 +00:00
Evan Cheng
ed09135349
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
llvm-svn: 128502
2011-03-29 23:06:19 +00:00
Bill Wendling
59493294dd
Spruce up the error output.
...
llvm-svn: 128451
2011-03-29 04:28:26 +00:00
Devang Patel
f0148aca2e
Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.
...
llvm-svn: 127720
2011-03-16 00:27:57 +00:00
Francois Pichet
348d41b59b
Unbreak the CMake build.
...
llvm-svn: 127383
2011-03-10 00:51:01 +00:00
Devang Patel
73d68195ce
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
llvm-svn: 127381
2011-03-10 00:21:25 +00:00
Eric Christopher
f99de77b19
Make these options hidden to reduce the amount of text -help puts on the
...
command line, they'll still be seen with -help-hidden.
llvm-svn: 127353
2011-03-09 19:46:51 +00:00
Justin Holewinski
751178c697
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.
llvm-svn: 127157
2011-03-07 14:32:30 +00:00
Nick Lewycky
46bb763f35
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!
llvm-svn: 127116
2011-03-06 03:36:19 +00:00
Devang Patel
9dbcb14cd8
Add ArrayRef variant.
...
llvm-svn: 126978
2011-03-04 01:20:33 +00:00
Tilmann Scheller
ab6450ec63
Use X86_thiscall calling convention for Win64 as well.
...
llvm-svn: 126934
2011-03-03 07:49:07 +00:00
Tilmann Scheller
c557d1eeb4
Add Win64 thiscall calling convention.
...
llvm-svn: 126862
2011-03-02 19:29:22 +00:00
Rafael Espindola
7f301833ee
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 :-)
llvm-svn: 126830
2011-03-02 04:14:42 +00:00
Talin
1d7928c794
Added missing va_end().
...
llvm-svn: 126759
2011-03-01 18:00:49 +00:00
Talin
753b7ce425
Add an END_WITH_NULL accessor for ConstantStruct.
...
llvm-svn: 126714
2011-02-28 23:53:27 +00:00
Devang Patel
83b12031ab
These tags are now covered by dwarf::TagString().
...
llvm-svn: 125987
2011-02-18 23:13:40 +00:00
Rafael Espindola
05e2f8b789
Expose getTypeName to the C API. Patch by Patrick Walton.
...
llvm-svn: 125845
2011-02-18 16:35:37 +00:00
Chris Lattner
87de1d1bb8
hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.
...
llvm-svn: 125828
2011-02-18 04:41:42 +00:00
Nadav Rotem
ad2fd4eada
Enhance constant folding of bitcast operations on vectors of floats.
...
Add getAllOnesValue of FP numbers to Constants and APFloat.
Add more tests.
llvm-svn: 125776
2011-02-17 21:22:27 +00:00
Chris Lattner
db204cbe42
convert ConstantVector::get to use ArrayRef.
...
llvm-svn: 125537
2011-02-15 00:14:00 +00:00
Chris Lattner
ee7f7c2494
revert my ConstantVector patch, it seems to have made the llvm-gcc
...
builders unhappy.
llvm-svn: 125504
2011-02-14 18:15:46 +00:00
Chris Lattner
34f32cb4c2
Switch ConstantVector::get to use ArrayRef instead of a pointer+size
...
idiom. Change various clients to simplify their code.
llvm-svn: 125487
2011-02-14 07:55:32 +00:00
Nadav Rotem
3ce2bfbb55
Fix a regression from r125393;
...
It caused a crash in MultiSource/Benchmarks/Bullet.
Opt hit an assertion with "opt -std-compile-opts" because
Constant::getAllOnesValue doesn't know how to handle floats.
This patch added a test to reproduce the problem and a check that the
destination vector is of integer type.
Thank you Benjamin!
llvm-svn: 125459
2011-02-13 15:45:34 +00:00
Nadav Rotem
c2e51ee68a
Fix 9173.
...
Add more folding patterns to constant expressions of vector selects and vector
bitcasts.
llvm-svn: 125393
2011-02-11 19:37:55 +00:00
Chris Lattner
46815e1da6
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
...
flag. Noticed by Jin Gu Kang!
llvm-svn: 125366
2011-02-11 05:37:21 +00:00
Chris Lattner
9e2e84606d
make the constantexpr interfaces for inbounds GEPs follow the same style
...
as other constantexpr flags, reducing redundancy.
llvm-svn: 125365
2011-02-11 05:34:33 +00:00
Chris Lattner
63f1d56458
switch the constantexpr, target folder, and IRBuilder interfaces
...
for NSW/NUW binops to follow the pattern of exact binops. This
allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW);
llvm-svn: 125270
2011-02-10 07:01:55 +00:00
Chris Lattner
7a5307ec0b
refactor ConstantExpr interfaces a bit around "exactness".
...
llvm-svn: 125190
2011-02-09 16:43:07 +00:00
Chris Lattner
b641eb91a3
fix comment change.
...
llvm-svn: 125047
2011-02-07 20:03:14 +00:00
Chris Lattner
2fd09e3397
implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
...
Factor some code better.
llvm-svn: 125006
2011-02-07 16:40:21 +00:00
Chris Lattner
7b6a968f5d
enhance vmcore to know that udiv's can be exact, and add a trivial
...
instcombine xform to exercise this.
Nothing forms exact udivs yet though. This is progress on PR8862
llvm-svn: 124992
2011-02-06 21:44:57 +00:00
Jay Foad
89383f48ca
Make SwitchInst::removeCase() more efficient.
...
llvm-svn: 124659
2011-02-01 09:22:34 +00:00
Duncan Sands
06e82c76ee
Have m_One also match constant vectors for which every element is 1.
...
llvm-svn: 124655
2011-02-01 08:39:12 +00:00
Nick Lewycky
abfab6156c
Fix 'fcmp one' constant folding. Noticed by inspection.
...
llvm-svn: 124557
2011-01-30 01:49:58 +00:00
Nick Lewycky
001e12d8d5
Fix some formatting and upgrade comments from llvm 1.x to 2.x syntax.
...
llvm-svn: 124556
2011-01-30 01:48:50 +00:00
Nick Lewycky
5259b6a6e2
Add the select optimization recently added to instcombine to constant folding.
...
This is the one where one of the branches of the select is another select on
the same condition.
llvm-svn: 124547
2011-01-29 20:35:06 +00:00
Jay Foad
284c5bc9bd
Fix indentation.
...
llvm-svn: 124375
2011-01-27 14:44:55 +00:00
Jay Foad
db0a7d4143
Simplify User::operator delete().
...
llvm-svn: 124330
2011-01-26 21:56:10 +00:00
Nick Lewycky
8c38fe01dd
AttrListPtr has an overloaded operator== which does this for us, we should use
...
it. No functionality change!
llvm-svn: 124286
2011-01-26 09:23:19 +00:00